Magento faithfully logs the transaction detail when I manually capture an invoice within the Magento store interface. I assume that Magento would likewise generate the same transaction detail entry when I programmatically capture an invoice through the Magento REST API. Unfortunately, this is not the case, as my automated script does not trigger whatever Magento process logs a successful credit card transaction.
I believe my Authorize.net account is set up properly. After I receive an order I can see that the customer's credit card has been auth checked. I can then use the Magento online interface to create an invoice and manually capture the credit card payment. This creates a beautiful transaction log entry within the order.
My goal has been to automate this process using the Magento 2 REST API. My automation uses the following REST endpoints:
- use order to create invoice
- POST
/rest/v1/order/{order_id}/invoice
- RETURNS integer
{invoice_id}
- POST
- use invoice to capture payment
- POST
/rest/v1/invoices/{invoice_id}/capture
- RETURNS string
true
- POST
I receive a string value response of true
from the invoice capture, and I can log into my Authorize.net account and see that the credit card transaction has been settled. Unfortunately, this transaction detail is not logged in Magento against the order. The capture transaction entry is simply missing. I would rather not have to log into my Authorize.net account to verify the successful settlement of each transaction. I would rather that information be visible within Magento itself.
Is there another step I need to take to force the transaction capture entry to appear in the Magento order transaction history?