I'm still working in sandbox mode. I have the test Visa and MC numbers and expiration, but what about testing for address verification and CVC2 verification? What data should I send to those variables?
While we're on the subject, I couldn't find any real info on the variables to send in the Docs, but I found this on Google. Is this still correct (assuming that it ever was)?
$transaction = new AuthorizeNetAIM('ID', 'KEY');
$transaction->setSandbox(true);
$transaction->amount = '9.99';
$transaction->card_num = '4007000000027';
$transaction->exp_date = '10/16';
$transaction->first_name = $cardholder_first_name;
$transaction->last_name => $cardholder_last_name;
$transaction->card_code => $cvc2;
$transaction->address => $billing_address;
$transaction->city => $billing_city;
$transaction->state => $billing_state;
$transaction->zip => $billing_zip;
$response = $transaction->authorizeAndCapture();
Solved! Go to Solution.
09-05-2011 07:11 PM
Please make sure that your sandbox account is in live mode. Transactions run in test mode (on either a test or production account) are only very basic simulations and approve pretty much everything. Your test account needs to be in live mode for a more complete simulation that will recognize these triggers.
09-09-2011 03:59 PM
I always just put in my own credit card info with card code 900 (your own card code won't work in sandbox). Don't know about address testing, I just turned it on and trusted that it would work correctly. Since I output the error text, I don't need to have every specific error coded for in advance, just success or failure.
Don't know if this helps.
09-06-2011 06:35 AM
Hi jwcarlton,
Error Generation Guide lists values you can use to trigger certain transaction responses when using your test account. You can check the guide here: http://www.authorize.net/files/ErrorGenerationGuide.pdf
Thanks!
-Joy
09-07-2011 07:32 PM
Joy, I tried using the codes in the PDF you posted, but it's either not working correctly, or I'm totally misunderstanding the seemingly simple instructions.
Did I understand correctly that I should just use, for example, a zip code of 46282 while in the Sandbox, and it will automatically give me an error message that the charge is declined? When I did that, both $response->approved and $response->error_message came back as false (so it didn't charge, but it didn't give me an error message that I could pass along to the customer, either).
Further, when I changed the zip to 46201, I expected the charge to decline with an error that the address matched, but the zip didn't. But instead, the transaction was approved, anyway.
Similarly, when I changed the CVC2 to 901, I expected it to decline with an error that the CVC2 didn't match, but the transaction was still approved.
Where am I messing up?
09-08-2011 11:19 PM
Please make sure that your sandbox account is in live mode. Transactions run in test mode (on either a test or production account) are only very basic simulations and approve pretty much everything. Your test account needs to be in live mode for a more complete simulation that will recognize these triggers.
09-09-2011 03:59 PM
I actually clicked on "Accept as Solution" by accident; I mean to click Reply. I don't see a way to undo that.
Trevor, do you mean to just change $transaction->setSandbox(true); to false, and use the test credit card info? If not, then I'm not sure how to do what you said.
09-10-2011 06:54 PM
Looks like that's what he said. Should only take you a couple minutes to test and find out.
09-11-2011 02:44 AM
No way to get it work with any combinations with zip codes, only dollar amounts. Does anyone have a working example with zip code trigger that you can post here?
11-08-2011 02:00 PM
Did you use cc# 4222222222222 ?
11-08-2011 02:07 PM
Yes, tried everything yet still always get approved avs=Y, card code response='', cavv response =2
11-08-2011 02:09 PM