Closed Richtermeister closed 5 years ago
Yes, you are right.
The support page states the following correlation between response code and status: 1: Approved 2: Declined 3: Error 4: Action Required (typically used for AFDS transactions that are held for review)
Other higher numbers are also error cases: https://support.authorize.net/s/article/What-Is-the-Decline-Reason-Code-for-a-Transaction
I'm closing this issue based on @ashtru's response. Please reopen if any further issues or open a new issue for other questions.
On my end I'm good, since I have adjusted my code. My concern with having this sample code in the open is that it invites faulty implementations. It costs us a lot of money in uncaptured transactions before it was caught. If I PR a proposed fix for the code sample, will you consider it?
Hi @Richtermesiter,
We'd be happy to look into any PR. Please feel free to do that.
We appreciate the enthusiasm and are grateful for any suggestions.
According to this sample code, the transaction is APPROVED, but no check against the response code of the transaction response has been conducted, so the transaction could in fact be Declined or Error status. Am I reading this correctly? Thank you for your help.
https://github.com/AuthorizeNet/sample-code-php/blob/master/PaymentTransactions/charge-customer-profile.php#L46-L47