Open offsui opened 3 years ago
@offsui Could you explain what you mean by the "Orders are not added"? The order should be created before the customer completes the transaction, the only thing the webhooks do in this case is update the order state and add messages to the history.
The Order is of course added into the database but with Status "0" which means, it is nowhere visible and no e-mails are sent to the customer. It is possible to add Order Status to Wallee Specific Tasks like (Processing, Authorized, Completed, Fulfill and more).
The Fulfill Status is the most important which means the payment was successful 100%.
If we have the "Authorized" Status allocated to an Opencart Order Status, it will update the Order with a Webhook to this status initial after order.
Customer paid, is on success page and in this time, wallee sends the status update (authorized) webhook which will "add" the order (and send confirmation e-mails and all other processes).
But if this webhook fails, the order is not "added" (no confirmation mails sent, no coupons used). You can try this when you turn off the wallee webhooks in a test store. You can make an order but it won't be added.
(Maybe the Processing Status is for that, but it is also not helpful, because all initiated payments are processing also those which fails later, so for this order it should not send a confirmation mail)
I noticed that Orders are not added, when Wallee Webhooks are not coming in (due Customer Server Problems or Wallee Timeout/Server Problems). It can be very careful. If Customer used Coupons or Store Credit and the Order is not added, those Codes/Credit are "not used" and the customer could retry the same order.
If the Customer has a Credit of 50.00, he makes an order worth 100 and pays 50.00 by Wallee Payment, wallee don't send an Webhook (like 20 minute timeout), the customer didn't receive an Confirmation E-Mail & nothing due that issue. He can re-do the same order now with the same Credit which is very bad!
It would be good, if like the order was successfull, the order is added - and not by using only the Wallee webhook.