Closed simonmaass closed 2 months ago
Hi @simonmaass!
Thank you for bringing this issue to our attention. It appears we haven’t fully resolved this situation on our end yet. I've created an internal ticket to address it in the future.
In the meantime, you can use the mollieResetCart
function (available in GraphQL) as a workaround:
GraphQL Integration - Resetting the Cart
Thank you for addressing this issue internally! Just to clarify - the proposed workaround would result in many canceled orders right? As each payment try would result in a canceled order and the proposed endpoint would just "reactivate" the cart and enable us to re-create an order with the same cart... did i unterstand this correct? What would be great is if the order would get uncanceled and the payment retired - or not canceled in the first place. Happy friday @Frank-Magmodules !
Hi @simonmaass,
We’re pleased to inform you that we’ve released version v2.41.0, which addresses this issue. We’ve added a reset-cart
WebAPI endpoint, so if a payment is canceled, you can use this endpoint to reset the cart. After that, you can call the startTransaction
endpoint again to re-initialize
the payment on the POS.
You can view the exact changes in this commit: https://github.com/mollie/magento2/commit/55610c7fd01e819a851f0e7879d55a516660295b
We’ll also be adding this to the WIKI/Docs soon! In the meantime, please let me know if this meets your needs so we can close this request on a positive note.
Hi there @simonmaass, just to let you know, we’ve also updated the REST wiki guide on how to use the reset function. We are closing this issue for now. Have a great day!
@Frank-Magmodules thank you - just to clarify: If using this flow you will have 1 order per payment try? In order words the first order will be canceled and then you reset the old cart and create a new order on top of the old canceled one?
@simon No, it will remain as a single order. Even if you retry, you will still have just one order.
What would be the correct payment flow implementation in order to re-try a failed POS device payment in a phisical store?
Scenario: We have a POS software (vue web app) that is using magento 2 as a backend order management system.
When creating an order in the POS software we create an order in magento and afterwards wait for the payment webhook from the POS payment device from mollie.
Sometimes the customer has used the wrong PIN code or accidentally canceled the payment on the POS device.
Now magento received an "expired" or "canceled" mollie payment state and cancels the entire order.
How could we create a new payment transaction in the POS software and "uncancel" the magento order and attach the new payment transation to the magento order?
Thank you for some advice!