0

We are using Magento v2.4.3 and Braintree as the payment gateway. Due to the supply chain issues, we have a scenario we deal with sporadically where a customer places an order for a special order item. The new order is "Authorized Only" at the payment gateway. The authorization expires in 7 days at Braintree. If we end up needing to CANCEL the order after the 7 days, we try to CANCEL or VOID the order, we get the following error and the cancellation is not allowed.

"Your payment could not be taken. Please try again or use a different payment method. Transaction can only be voided if status is authorized, submitted_for_settlement, or - for PayPal - settlement_pending."

We do not want to capture funds and then issue a refund, we just need to cancel the order. The only workaround we have discovered is by Invoicing the order but using "Capture Offline", then creating a credit memo on the newly created invoice, and also using the "Offline" credit method. However, this is not ideal since the revenue details will still show up in the overall store stats and reports most likely.

Any suggestions on how to resolve this issue? Any settings at Braintree where we can re-authorize the same transaction? Any settings in Magento?

Thanks in advance.

2 Answers 2

1

I'm very sorry for misunderstanding your question.

To Cancel Magento Orders With Expired Pre-Authorization:

Update the database record for sales_payment_transaction by changing the is_cloased value for the transaction to 1. You will need the order id and the transaction id which you can both get from the URL when viewing the transaction in your browser.

You can also update the value through phpMyAdmin by opening the sales_payment_transaction and looking for the row with order_id and txn_id for your order.

Once the is_closed value is set to 1, you should now be able to cancel the order since it tells the system the authorization is closed and not to try to void the authorization which has already expired.

0

After 7 days, the order will be automatically canceled on Braintree. Or you can visit the admin page of Braintree to cancel the order manually.

1
  • I appreciate the comment, but your response has nothing to do with my question. I assume you mean "cancel the authorization at Braintree", not "cancel the order at Braintree"? I'm specifically wanting to cancel the order in Magento, but due to the Authorization at Braintree expiring, Magento will not allow the order to be canceled. Hopefully this clarifies my issue.
    – Spencer
    Commented Dec 10, 2021 at 18:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.