cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

My script is running several times, and I don't know why

I store payment information in a PCI compliant database, and wrote a script to process transactions monthly. This has worked properly for several years, but in the last several months when I run the script it tries to process every card 3 times!

Luckily, the Auth.net system properly blocks the 2 duplicates! But I can't figure out why my script is trying to run them more than once.

I use this format:

require_once 'anet_php_sdk/AuthorizeNet.php';
$transaction = new AuthorizeNetAIM("$api_id", "$trans_key");

$fields = [
  'foo' => 'bar'
];

$transaction->setFields($fields);
$response = $transaction->authorizeOnly();

Since I built this so long ago, I'm rusty on how to test it.

First question, did something change with Auth.net that could have caused this to start happening?

If not, can I simply set $transaction->setSandbox(true); before $fields = []; , and then run the script to see what's happening without the card owner seeing anything on their end?

jwcarlton
Contributor
0 REPLIES 0