cancel
Showing results for 
Search instead for 
Did you mean: 

Triggering Specific Transaction Responses

Using the Sandbox Account Error Generation Guide, developers can trigger specific transaction responses in the sandbox including approvals, declines, errors, as well as AVS and Card Code responses.

 

Use this thread for discussion: http://community.developer.authorize.net/t5/Integration-and-Testing/Triggering-Specific-Transaction-...

 

Richard

Michelle
All Star
53 REPLIES 53

This seems like an odd situation....

 

I am using CIM to store credit cards.  I attempt to save the payer information with the '46282' zip code - it fails as noted below.

 

How can I test a CustomerGateway.AuthorizeAndCapture() function and test transaction failures when I can't save the payment details zip code with error condition values???

smtaylor88
Member

Try setting the validationmode = testmode when you create the payment profile

problem with testing card code verification, trying to get response code N, actually get zero in 39 position.

test mode in account is set to off.

for testing use http://www.authorize.net/resources/files/ErrorGenerationGuide.pdf
here is request

<?xml version="1.0" encoding="utf-8"?>
<updateCustomerPaymentProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
  <merchantAuthentication>
    <name>7UXcw95ge</name>
    <transactionKey>[FILTERED]</transactionKey>
  </merchantAuthentication>
  <customerProfileId>17731401</customerProfileId>
  <paymentProfile>
    <billTo>
      <firstName>Olga</firstName>
      <lastName>Chekh</lastName>
      <company/>
      <address>knijniy st.
</address>
      <city>Odessa</city>
      <zip>65007</zip>
      <country>Ukraine</country>
      <phoneNumber>380961111111</phoneNumber>
      <faxNumber/>
    </billTo>
    <payment>
      <creditCard>
        <cardNumber>371449*****8431</cardNumber>
        <expirationDate>2013-05</expirationDate>
        <cardCode>***</cardCode>
      </creditCard>
    </payment>
    <customerPaymentProfileId>16654195</customerPaymentProfileId>
  </paymentProfile>
  <validationMode>testMode</validationMode>
</updateCustomerPaymentProfileRequest>

and response

<?xml version="1.0" encoding="utf-8"?>
<updateCustomerPaymentProfileResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
  <messages>
    <resultCode>Ok</resultCode>
    <message>
      <code>I00001</code>
      <text>Successful.</text>
    </message>
  </messages>
  <validationDirectResponse>1,1,1,(TESTMODE) This transaction has been approved.,000000,P,0,none,Test transaction for ValidateCustomerPaymentProfile.,1.00,CC,auth_only,9-wolly,Olga,Chekh,,knijniy st.,Odessa,,65007,Ukraine,380961111111,,,,,,,,,,,0.00,0.00,0.00,FALSE,none,8B5E5625BB005451621FC20FC87DA97C,,,,,,,,,,,,,XXXX8431,American Express,,,,,,,,,,,,,,,,</validationDirectResponse>
</updateCustomerPaymentProfileResponse>

 

Gabrielle
Member
<validationMode>liveMode</validationMode>