I am working on building what is essentially a custom pre-order module. I am using Braintree as the payment gateway, and requiring for pre-orders that a customer uses a vaulted credit card for payment.
The situation is fairly typical, which is that the original auth may fall off before the order is actually ready to ship (before the fulfillment house has inventory). Once the fulfillment house notifies Magento that it has inventory, before we send the order to the fulfillment warehouse to be shipped we need to re-auth the credit used for the order to ensure that the funds are still available and to ensure that once the order is shipped we'll be able to collect / capture payment.
Looking at Magento 2's Payment
and Order
classes, it SEEMS like perhaps this functionality should be easy ( 1. cancel / void previous auth 2. create a new auth transaction ), but I can't seem to find where the appropriate place for this functionality might be.
Thank you!