How to configure and adapt Aimeos based shops as developer
Forum rules: Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#7165 by sixbynine
06 Nov 2018, 11:56

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,

#7166 by aimeos
06 Nov 2018, 19:50
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
#7186 by sixbynine
09 Nov 2018, 09:52
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)
-> 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,

#7188 by aimeos
09 Nov 2018, 20:51
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).
#7191 by sixbynine
09 Nov 2018, 23:00
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 :

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.