cancel
Showing results for 
Search instead for 
Did you mean: 

Who Me Too'd this topic

empty response code

We are using the Java SDK version 1.9.2
We suffer from an intermittent issue when trying to get
the response code from a charge transaction attempt. Here is our code making a charge transaction: PaymentType paymentType = new PaymentType(); CreditCardType creditCard = new CreditCardType(); creditCard.setCardNumber(cardNumber); creditCard.setExpirationDate(expDate); creditCard.setCardCode(cardCode); paymentType.setCreditCard(creditCard); TransactionRequestType txnRequest = new TransactionRequestType(); txnRequest.setTransactionType(TransactionTypeEnum.AUTH_CAPTURE_TRANSACTION.value()); txnRequest.setPayment(paymentType); txnRequest.setAmount(amount); txnRequest.setCurrencyCode(currencyCode); CreateTransactionRequest apiRequest = new CreateTransactionRequest(); MerchantAuthenticationType merchant = new MerchantAuthenticationType(); merchant.setName(merchId); merchant.setTransactionKey(secret); apiRequest.setMerchantAuthentication(merchant); apiRequest.setTransactionRequest(txnRequest); CreateTransactionController controller = new CreateTransactionController(apiRequest); controller.execute(this.environment); CreateTransactionResponse response = controller.getApiResponse(); ---- At this point, sometimes the response object is actually NULL. This issue is discussed on the following page yet there was no clear or helpful response from anyone at authorize.net: https://community.developer.authorize.net/t5/Integration-and-Testing/NULL-RESPONSE-ISSUE/td-p/58657 More common for us, however, is that the CreateTransactionResponse object is not null, but the TransactionResponse object (from calling response.getTransactionResponse()) returns NULL for getResponseCode(). So we have no clue what happened on authorize.net's end and we must assume an unknown error occurred. Any insight, suggestions, or additional steps we should take to avoid this problem would be much appreciated.

 

rfd3270
Member
Who Me Too'd this topic