cancel
Showing results for 
Search instead for 
Did you mean: 

Authorization using AcceptJS nonce causing OTS Service Error

Is anyone else suddenly getting OTS Service Errors for transactions that use a payment nonce?

 

I have an AcceptJS solution that has been working just fine until a couple days ago:

- uses AcceptJS library to create payment nonce

- use the payment nonce in Java to perform an authOnly transaction (anet-java-sdk 1.9.2)

 

This has been working just fine until a couple days ago, but now every time I try to perform a transaction with a new payment nonce, I get the OTS field validation error. Yes, I've double/triple-checked that the client public key and login id match the sandbox I'm using.

 

Here's how I build the transaction in Java:

TransactionRequestType txnRequest = new TransactionRequestType();
txnRequest.setTransactionType(TransactionTypeEnum.AUTH_ONLY_TRANSACTION.value());

OpaqueDataType opaqueData = new OpaqueDataType();
opaqueData.setDataDescriptor("COMMON.ACCEPT.INAPP.PAYMENT");
opaqueData.setDataValue(nonce);
PaymentType paymentType = new PaymentType();
paymentType.setOpaqueData(opaqueData);

txnRequest.setPayment(paymentType);
txnRequest.setAmount(amount);
CustomerAddressType cat = new CustomerAddressType();
cat.setFirstName(firstName);
cat.setLastName(lastName);
txnRequest.setBillTo(cat);

// Make the API Request
CreateTransactionRequest apiRequest = new CreateTransactionRequest();
apiRequest.setTransactionRequest(txnRequest);
CreateTransactionController controller = new CreateTransactionController(apiRequest);
controller.execute();

CreateTransactionResponse response = controller.getApiResponse();
...

 

 

glyoder
Contributor
21 REPLIES 21

Hi @zoltena,

 

Is your implementation something that was working before and now is suddenly no longer working? Or, are you still in the process of development?

 

If you've been working successfully in production and something suddenly broke without any changes on your end, you'll probably want to call the support number and open a case there to escalate for further investigation.

 

If that's not quite the scenario, then please let us know more. Is this an error you're getting on every single transaction, or just intermittently?

I'm having a similar issue.  Any nonce that is created without a cardCode, it works perfectly.  Once I request the nonce and supply a cardCode, and try to run the Transaction API, I get the OTS Service Error, Field Validation Error.  This occurs on all browsers.

 

Any help would be appreciated.

 

Thanks,

Michael