AuthorizeNet / sample-code-php

This repository contains working code samples which demonstrate php integration with the Authorize.Net API
MIT License
175 stars 197 forks source link

Sample code does not properly verify responseCode #146

Open mintplugins opened 5 years ago

mintplugins commented 5 years ago

The sample code for a credit card transaction does not verify the responseCode properly. Using fraud filters in my sandbox, I have a scenario where my response code is 4, which means the transaction was declined.

But this check allows it to go through as though the transaction was all fine: https://github.com/AuthorizeNet/sample-code-php/blob/master/PaymentTransactions/charge-credit-card.php#L97

Notice the response code is not being checked there at all.