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(); ...
Solved! Go to Solution.
02-24-2017 08:15 AM
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.
02-28-2017 05:21 AM
02-24-2017 08:30 AM
Sandbox - we've not gone to prod with this yet.
02-24-2017 08:47 AM
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.
02-24-2017 09:02 AM
02-24-2017 09:10 AM
E00117 : OTS Service Error 'Field validation error.'
02-24-2017 09:35 AM
@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
02-24-2017 09:37 AM
@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
02-24-2017 03:37 PM
Any ETA on when this might be fixed? Thanks.
02-27-2017 07:29 AM
@glyoder It should have returned to normal, are you still getting an error?
02-27-2017 08:13 AM