I used the PHP SDK to set up AIM and ARBs for our subscription service, which went into production 30 days ago and all was fine.. till now.
Now we find ALL of those ARBs are being declined since they have NO address..
"
TRANSACTION RESULTS Response : The transaction has been declined because of an AVS mismatch. The address provided does not match billing address of cardholder.
"
The subscriptions show nothing but client name, so narturally the address does not macth.. THERE IS NO ADDRESS
I use a single script to set up the initial charge (which works fine) and then if the intial charge was approved, do the ARB, which also "APPEARS" to work.. until it comes time to do the first actual ARB charge.. THEY ALL FAIL
What do I need to add to my code to convey the address associated with the card ? What do they want if it isnt billToAddress ? and better yet.. why do ALL the examples I can find lack this NON-OPTIONAL info? .. sorry.. very irritated
$subscription = new AuthorizeNet_Subscription; $subscription->name = $row['salescname'] ." #".$row['id']; $subscription->intervalLength = "1"; $subscription->intervalUnit = "months"; $subscription->startDate = $NextMonth; $subscription->totalOccurrences = "9999"; $subscription->amount = $row['salesreoccuring']; $subscription->creditCardCardNumber = trim(str_replace("-", "", $row['salescnumber'])); $subscription->creditCardExpirationDate = $row['salesexpdate']; $subscription->creditCardCardCode = $row['salesvcnumb']; $subscription->billToFirstName = $first_name; $subscription->billToLastName = $last_name; $subscription->billToAddress = $row['salescaddress']; $subscription->billTocity = $row['salescccity']; $subscription->billTostate = $row['salesccstate']; $subscription->billTozip = str_replace(" ", "", $row['salescczip']);
Solved! Go to Solution.
08-13-2015 01:07 PM
Got a support response sugesting I do print_r($subscription) and "$subscription->getXml()" (which I didnt actually understand what was requested so didn't fo that).
It appears all this grief was due to slightly different case on the subscriiption array indexes...
eg;
[billTocity] WRONG
[billToCity] CORRECT..
Correcting the folowing to use the correct case seems to have fixed it.. but of course I won't actually know for 30 days
$subscription->billToAddress = $billtoaddress;
$subscription->billToCity = $billtocity;
$subscription->billToState = $billtostate;
$subscription->billToZip = $billtozip;
$subscription->billToCountry = $country;
08-17-2015 10:04 AM
Hi apex2014,
Your code looks valid, I would like to check this for you but we will need specific details. If you can please contact Developer@Authorize.Net and provide us the Payment Gateway ID in question and sample subscription IDs.
Thanks,
Joy
08-13-2015 01:54 PM
Ok, I've done that. Thanks
08-13-2015 02:08 PM
Got a support response sugesting I do print_r($subscription) and "$subscription->getXml()" (which I didnt actually understand what was requested so didn't fo that).
It appears all this grief was due to slightly different case on the subscriiption array indexes...
eg;
[billTocity] WRONG
[billToCity] CORRECT..
Correcting the folowing to use the correct case seems to have fixed it.. but of course I won't actually know for 30 days
$subscription->billToAddress = $billtoaddress;
$subscription->billToCity = $billtocity;
$subscription->billToState = $billtostate;
$subscription->billToZip = $billtozip;
$subscription->billToCountry = $country;
08-17-2015 10:04 AM