cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to Test Failed Transaction on Sandbox

Hi,
 
We are trying to ​test credit card payment without zip code and we are not able to test Failure for any case. It is failing for validation on various attempts but we are not getting failure in response from your side. 
 
 
Android details: 
 
1) We are using following SDK in our gradle :
    compile 'net.authorize:accept-android-sdk:+'
2) We refer this sample code for autorize.net from this link
3) First we instantiate AcceptSDKApiClient class.
4) On Click of make payment create object of EncryptTransactionObject class using ClientKeyBasedMerchantAuthentication and CardData objects. 
 
     return TransactionObject.
                createTransactionObject(
                        TransactionType.SDK_TRANSACTION_ENCRYPTION) // type of transaction object
                .cardData(prepareCardDataFromFields()) // card data to get Token
                .merchantAuthentication(merchantAuthentication).build();
 
 
5) Then request to AcceptSDKApiClient.getTokenWithRequest(EncryptTransactionObject, EncryptTransactionCallback);
6) Then we get response in following callbacks methods
                      public void onEncryptionFinished(EncryptTransactionResponse response) {}
              public void onErrorReceived(ErrorTransactionResponse errorResponse) {}
7)But in Our case we always get response in onEncryptionFinished() with resultcode OK and  MessageList :[Message{Code='I_WC_01', MessageText='Successful.'}]
 
Server log
 

{"PropertyChanged":null,"messages":{"PropertyChanged":null,"message":[{"PropertyChanged":null,"code":"I00001","text":"Successful."}],"resultCode":0},"refId":null,"sessionToken":null,"profileResponse":null,"transactionResponse":{"PropertyChanged":null,"accountNumber":"XXXX4882","accountType":"Visa","authCode":"000000","avsResultCode":"P","cavvResultCode":"","cvvResultCode":"","emvResponse":null,"entryMode":null,"errors":null,"messages":[{"PropertyChanged":null,"code":"1","description":"This transaction has been approved."}],"prePaidCard":null,"profile":null,"rawResponseCode":null,"refTransID":"","responseCode":"1","secureAcceptance":null,"shipTo":null,"splitTenderId":null,"splitTenderPayments":null,"testRequest":"1","transHash":"1F25BFC41864CA85D4876CA528B9A65F","transHashSha2":"","transId":"0","userFields":null}}

 

 

Afterwards we also tested it with following card

 

Card Type American Express
Card used : 370000000000002
Month : 04
Year : 20
CVV : 0106 / 901
 
All these details are of Sandbox enviornment as per https://developer.authorize.net/hello_world/testing_guide/ guidelines provided.
 
MarotiMulange
Member
3 REPLIES 3

@MarotiMulange Pls. try with the amount = 400.30 or 400.24 to try out error scenario in the sandbox. I have tried the above amounts for 400.30, i get errorcode = 30 and for 400.24 , i get error code = 23. 

 

-Bhavana

bhav
Authorize.Net Expert Authorize.Net Expert
Authorize.Net Expert

@bhav 

I have tried with the amount=400.30 or 400.24 ($6.27) but didn't get failed, always getting success from authorize.net server.
 
Please check the log for reference==>
 
 
12-29 15:29:41.900: D/AcceptFragment(2609): cardNumber :370000000000002 month :04 year :2020 cvv :0106 amount :400.24
 
12-29 15:29:47.033: D/AcceptFragment(2609): ResultCode :Ok
12-29 15:29:47.033: D/AcceptFragment(2609): MessageList :[Message{Code='I_WC_01', MessageText='Successful.'}]
 
12-29 15:29:47.033: D/AcceptFragment(2609): ResponseMessages :net.authorize.acceptsdk.datamodel.common.ResponseMessages@4231f758
12-29 15:29:47.033: D/AcceptFragment(2609): Data Descriptor :COMMON.ACCEPT.INAPP.PAYMENT
 
I have two questions.
1:- Is this amount in rupees or dollar? 
I have tested in both amount rupees=400.24 and dollar=6.27
 
2:-Should we check this error code (30 or 23)  backend or frontend?
I am frontend (Android) developer and tested on my end, but always getting success.

i used with accept.js...and got the message Message{Code='I_WC_01', MessageText='Successful.'}..

is this measn success?and itried with accept hosted it got code and i got merchant email for the payment...