coreshop / CoreShop

CoreShop - Pimcore enhanced eCommerce
http://www.coreshop.org
Other
277 stars 157 forks source link

Improve Order Confirmation #2740

Closed solverat closed 3 weeks ago

solverat commented 4 weeks ago
Q A
Bug report? no
Feature request? sort of
BC Break report? no
RFC? yes

Introduction

Within some projects, we struggle with order confirmation state / notification. Per default, there is this condition within the notification to trigger the order confirmation message:

image

The order state "confirmed" will be applied, when a payment changed to one of these states:

Most of the time, this is fine (especially when using credit card gateways).


Issue

Some of our projects are using a lot of different gateways:

All of them are coming with their own "state logic" and we cannot rely on the order state "confirmed" only.

Examples:

Possible Solution

It's quite obvious, we cannot rely on the order state "confirmed". But what shall we do?

Notification Rules

Currently, we cannot switch to different notification rules, because some conditions are missing:

These must be available on rule type "order"


Of course, happy to hear better / other ideas regarding the "order confirmation dilemma" :)

dpfaffenbauer commented 4 weeks ago

@solverat it seems to me, and we experienced this as well, that the Processing state should never confirm the order, completed or authorized should. You introduced this change last year: https://github.com/coreshop/CoreShop/pull/2481. I guess we revert that then? Processing does not mean it is paid. completed or authorized does.

solverat commented 4 weeks ago

Thanks for the quick feedback. I'm not sure about that. I guess we're dealing with a logical issue here:

These states (complete, authorized, processing) "only" confirm the order (So a user is able to see the "thank you" page), but it does not necessarily mean, that the order has been confirmed from payment side.

In #2481, I've added the "processing" part, because some payment gateways only changes to "processing" and 20 min later, they're sending "paid" by server API. If we're removing the "processing", the user never reaches the "thank you" page.

References:

However, we could remove the PaymentInterface::STATE_PROCESSING from these classes:

Everything else should be fine.

dpfaffenbauer commented 4 weeks ago

@solverat No, Order Confirmation means what it says, it confirms the order to send out the confirmation email. If you have a special payment provider where "processing" means it's fine, then you can create your own Extension that then confirms the order. So I'd say we remove the processing from the confirmation again.

solverat commented 4 weeks ago

Yes, that's why I've suggested removing the PaymentInterface::STATE_PROCESSING from these classes: