I have a problem while implementing the payment process on my client website, using the SyliusPayboxBundle:
- I start the payment process: A new
sylius_paymententry (calling A) is created with the statenew - I enter wrong card informations: The previous
sylius_paymententry A is marked ascancelledand a new one is created (calling B) with the statenew - I enter good card informations: The entry B is deleted instead of being marked as
completedas it's done when I use good card information on the first try, so I only have the A which iscancelled
The default state machine is not override, I don't understand why this is happening and my order is blocked in an unstable state: Sylius allows a new payment attempt, but the bank block it because in reality the payment was validated on the second attempt.
In the Profiler, I see Doctrine queries.
On the first /payment/notify (the bad card number):
- the creation of the B entry
- the update of the
stateanddetailsof the entry A
On the second /payment/notify (the good card number):
- the deletion of the entry B
- the update of the
detailsof the entry A, not thestate
In the second call, I thought that entry A would not be changed and entry B would be updated with completed status. This is not the expected process?