Reply
Highlighted
Contributor
Posts: 20
Registered: ‎02-24-2017
Accepted Solution

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();
...

 

 


Accepted Solutions
Solution
Accepted by topic author glyoder
‎02-28-2017 05:21 AM
Contributor
Posts: 20
Registered: ‎02-24-2017

Re: Authorization using AcceptJS nonce causing OTS Service Error

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


All Replies
Posts: 2,331
Topics: 51
Kudos: 158
Blog Posts: 65
Registered: ‎12-05-2011

Re: Authorization using AcceptJS nonce causing OTS Service Error

Hello @glyoder

 

Is this occuring in the sandbox or production?

 

Richard

--------

Webhooks are now available for Authorize.Net

Using SOAP, see our deprecation notice.
Check out Accept.js, our Javascript replacement for DPM.
Pro Tip: Never use test mode in the sandbox, instead use the Testing Guide.
Contributor
Posts: 20
Registered: ‎02-24-2017

Re: Authorization using AcceptJS nonce causing OTS Service Error

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

Contributor
Posts: 20
Registered: ‎02-24-2017

Re: Authorization using AcceptJS nonce causing OTS Service Error

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.

 

Posts: 2,331
Topics: 51
Kudos: 158
Blog Posts: 65
Registered: ‎12-05-2011

Re: Authorization using AcceptJS nonce causing OTS Service Error

@glyoder

 

Can you provide the exact error message returned?

 

Richard

--------

Webhooks are now available for Authorize.Net

Using SOAP, see our deprecation notice.
Check out Accept.js, our Javascript replacement for DPM.
Pro Tip: Never use test mode in the sandbox, instead use the Testing Guide.
Contributor
Posts: 20
Registered: ‎02-24-2017

Re: Authorization using AcceptJS nonce causing OTS Service Error

E00117 : OTS Service Error 'Field validation error.'

Posts: 2,331
Topics: 51
Kudos: 158
Blog Posts: 65
Registered: ‎12-05-2011

Re: Authorization using AcceptJS nonce causing OTS Service 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

--------

Webhooks are now available for Authorize.Net

Using SOAP, see our deprecation notice.
Check out Accept.js, our Javascript replacement for DPM.
Pro Tip: Never use test mode in the sandbox, instead use the Testing Guide.
Posts: 2,331
Topics: 51
Kudos: 158
Blog Posts: 65
Registered: ‎12-05-2011

Re: Authorization using AcceptJS nonce causing OTS Service Error

@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

--------

Webhooks are now available for Authorize.Net

Using SOAP, see our deprecation notice.
Check out Accept.js, our Javascript replacement for DPM.
Pro Tip: Never use test mode in the sandbox, instead use the Testing Guide.
Contributor
Posts: 20
Registered: ‎02-24-2017

Re: Authorization using AcceptJS nonce causing OTS Service Error

Any ETA on when this might be fixed? Thanks.

Posts: 2,331
Topics: 51
Kudos: 158
Blog Posts: 65
Registered: ‎12-05-2011

Re: Authorization using AcceptJS nonce causing OTS Service Error

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

--------

Webhooks are now available for Authorize.Net

Using SOAP, see our deprecation notice.
Check out Accept.js, our Javascript replacement for DPM.
Pro Tip: Never use test mode in the sandbox, instead use the Testing Guide.