You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I want to change the time when the invoice is created. I would like it to be connected to the transition named complete on sylius_payment.
I see that the OrderPlacedProducer is not connected to the state machine but listens for doctrine events (postPersist & postUpdate).
Can I try to rewrite the call to the OrderPlacedProducer by connecting it to the state machine ?
This could solve the following issues : #174#235
The text was updated successfully, but these errors were encountered:
ehibes
changed the title
OrderPlacedProducer is not plugged on state machine
OrderPlacedProducer is not connected to the state machine
May 25, 2022
Hello @ehibes I would also love to see this be rewritten because it create some issues while creating orders through BeHat or fully coded orders by hand.
Hi, very late reply from my side, sorry for that 😓
I tried to recall the reasons why we decided to base this logic on doctrine events (I also consulted it quickly with @Zales0123) instead of the states machine. In my opinion, the main thing could be the fact that the transaction should be completed before generating the invoice, but based on the postPersist and postUpdate events, the behavior would be the same as using a state machine callbacks, on my current knowledge.
So if the refactor the implementation to link it to the state machine allows for easier customization, and also it seems to be more consistent with Sylius itself, I think we could change that before releasing a stable plugin version. However, the moment of generating the invoice should stay the same, as it is when the invoice should be generated for the majority of shops.
Hi,
I want to change the time when the invoice is created. I would like it to be connected to the transition named
complete
onsylius_payment
.I see that the
OrderPlacedProducer
is not connected to the state machine but listens for doctrine events (postPersist & postUpdate).Can I try to rewrite the call to the
OrderPlacedProducer
by connecting it to the state machine ?This could solve the following issues : #174 #235
The text was updated successfully, but these errors were encountered: