Page 1 of 1

Order paid but status -1

Posted: 06 Nov 2018, 11:56
by sixbynine
Hello,

I recently had a problem with an order that has been paid but the status of the order has not been updated to 6 in the db and the order stayed unprepared. Later, after checking in the payment console. I noticed that the order has well been paid and that the money had been captured directly (I'm using omnipay).

So I wonder what happened and how to prevent this to happen again because of course the order was never prepared and the customer was disappointed.

Could the job "order/service/payment" help in this case? I'm not sure about it because, the money had already been captured.

I'm also wondering how I could debug what happened.

Thank you very much,

sbn

Re: Order paid but status -1

Posted: 06 Nov 2018, 19:50
by aimeos
There are three possibilities why this can happen:
1.) The payment provider sent a deferred payment update but the update wasn't recognized for some reason by the "checkout update" component
2.) The payment provider sent a deferred payment update but the URL to the "checkout update" component was wrong
3.) The payment provider didn't sent a deferred status update due to some configuration problem in the backend of the payment provider

Re: Order paid but status -1

Posted: 09 Nov 2018, 09:52
by sixbynine
Thank you for your help.

Today the problem occured again and this time, I've got an error logged :

No value for key "confirmOrderItem" found in ai-client-html/client/html/src/Client/Html/Checkout/Confirm/Intro/Standard.php(108)
---
Notes:
-> I'm using an external Payment Page loading in the current window then redirecting to aimeos confirm page after the payment is confirmed.
-> The problem occurs only sometimes, apparently always to the same returning customers for the others customers the status is updated as expected.

So maybe it could be a client side problem? I.e. the cookies/session could have been destroyed so, even reached, the confirm page couldn't authorize the db fetch ?

I wonder if enabling the job "order/service/payment" could help in this case (because it is not enabled for the moment).

Thank you a lot in advance,

sbn

Re: Order paid but status -1

Posted: 09 Nov 2018, 20:51
by aimeos
That looks like a session problem if no value for the "aimeos/orderid" value available any more. Nevertheless, the payment gateway should sent a payment status update to the checkout update page (if that's not disabled in the backend of the payment provider).

Re: Order paid but status -1

Posted: 09 Nov 2018, 23:00
by sixbynine
Yes! Exactly.
I guess it is maybe a cookie configuration / problem / plugin that destroy the session prematurely.
My payment provider is ADYEN and their support also lead me to the same solution.

If someone else is looking for it :
https://docs.adyen.com/developers/notifications

Note : Except this small problem, Aimeos works perfectly with Adyen + Omnipay !

I created my own controller with the setPaymentStatus method.
Was there an endpoint already made? If it was, what was the exact url to use?


As always: thank you very much for your support.

sbn