Open sinkgregor opened 2 months ago
Hello @sinkgregor!
I'm aware of this issue but frankly I postponed to fix it due to lack of time right now.
However it can be easily ignored by sending the CancelPayment
command to an async task with this config :
# config/packages/messenger.yaml
framework:
messenger:
routing:
'FluxSE\SyliusPayumStripePlugin\Command\CancelPayment': main
'FluxSE\SyliusPayumStripePlugin\Command\CaptureAuthorizedPayment': main
'FluxSE\SyliusPayumStripePlugin\Command\RefundPayment': main
It is far from perfect but can allow you to wait for the fix.
What you suggested is one way to fix this issue, if you can submit a PR I would be glad to review it and help you doing so.
Hello,
We have encountered an error. When we cancel an order for a customer in the administration, we receive an error indicating that the payment cannot be canceled because the payment is already expired.
The error:
Steps to replicate:
Possible Solution: This could be resolved if the CancelOrderProcessor does not attempt to cancel the payment if the payment is in the state new, or if the CancelPaymentHandler checks whether the transaction is already expired.
This issue interferes with canceling orders because when the cancellation fails, the order is also not canceled, as the transaction is rolled back.