Reply
Contributor
Posts: 23
Registered: ‎09-01-2011
Accepted Solution

Working with test # in AIM sandbox, test address and CVC2?

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();


Accepted Solutions
Solution
Accepted by topic author jwcarlton
‎08-21-2015 01:58 AM
Moderator
Posts: 590
Registered: ‎08-21-2009

Re: Working with test # in AIM sandbox, test address and CVC2?

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.

View solution in original post


All Replies
Posts: 1,609
Topics: 15
Kudos: 200
Solutions: 121
Registered: ‎06-23-2011

Re: Working with test # in AIM sandbox, test address and CVC2?

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.

Administrator Administrator
Administrator
Posts: 563
Registered: ‎08-03-2011

Re: Working with test # in AIM sandbox, test address and CVC2?

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

 

 

Contributor
Posts: 23
Registered: ‎09-01-2011

Re: Working with test # in AIM sandbox, test address and CVC2?

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?

Solution
Accepted by topic author jwcarlton
‎08-21-2015 01:58 AM
Moderator
Posts: 590
Registered: ‎08-21-2009

Re: Working with test # in AIM sandbox, test address and CVC2?

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.

Contributor
Posts: 23
Registered: ‎09-01-2011

Re: Working with test # in AIM sandbox, test address and CVC2?

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.

Posts: 1,609
Topics: 15
Kudos: 200
Solutions: 121
Registered: ‎06-23-2011

Re: Working with test # in AIM sandbox, test address and CVC2?

Looks like that's what he said. Should only take you a couple minutes to test and find out.

Member
Posts: 3
Registered: ‎11-08-2011

Re: Working with test # in AIM sandbox, test address and CVC2?

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?

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Working with test # in AIM sandbox, test address and CVC2?

Did you use cc# 4222222222222 ?

Member
Posts: 3
Registered: ‎11-08-2011

Re: Working with test # in AIM sandbox, test address and CVC2?

Yes, tried everything yet still always get approved avs=Y, card code response='', cavv response =2