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
1 ACCEPTED SOLUTION

Accepted Solutions

OK, I found the problem, and it's on our side! โ˜น

 

It's actually Chrome's fault.

 

Basically, I created a html form to generate the payment nonce and display it in a text field. When I double-click the field (select all) and copy, chrome is for some reason leaving off the last character (an "="). So when I use the nonce it then gets rejected because of a missing character. Sorry for the trouble. I don't know why my browser started behaving this way.

View solution in original post

21 REPLIES 21

Hello @glyoder

 

Is this occuring in the sandbox or production?

 

Richard

RichardH
Administrator Administrator
Administrator

Sandbox - we've not gone to prod with this yet.

For what it's worth, I've been able to replicate the error using the "try it" functionality on the API reference page.

 

For the authOnly example, I replaced the payment info with

 

<payment>
<opaqueData>
<dataDescriptor>COMMON.ACCEPT.INAPP.PAYMENT</dataDescriptor>
<dataValue>eyJ0b2tlbiI6Ijk0ODc5NTU1NzE3ODUzODQ1MDQ2MDMiLCJ2IjoiMS4xIn0</dataValue >
</opaqueData>
</payment>

 

And set the sandbox login id and transaction id. I get the same OTS error.

 

@glyoder

 

Can you provide the exact error message returned?

 

Richard

E00117 : OTS Service Error 'Field validation error.'

@glyoder I've reported your issue to the product team for analysis.

I'd recommend subscribing to this topic so that you'll be alerted via email if there are updates. To subscribe, click Topic Options at the top of this thread and then select Subscribe. You'll then receive an email once anyone replies to your post.

Thanks,

Richard

@glyoder  We've detected some unusually activity in the logs for this service and our operation center team is investigating.

 

Once a solution is found, we'll also request that additional monitoring be added to avoid similar issues in the future.

 

Richard

Any ETA on when this might be fixed? Thanks.

@glyoder  It should have returned to normal, are you still getting an error?