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
Yep.
http://developer.authorize.net/api/reference/#payment-transactions-authorize-a-credit-card
I just generated a new payment nonce using our sandbox login id 5JNKx9n3F and client key 26QzsnrpZT2kGQA9y9P9vgb5FSB6Rx9PdyCK53gAEPrKt4834vPB5zHrJhu44sSu.
The request I sent was:
<createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"> <merchantAuthentication> <name>5JNKx9n3F</name> <transactionKey>*****</transactionKey> </merchantAuthentication> <refId>123456</refId> <transactionRequest> <transactionType>authOnlyTransaction</transactionType> <amount>5</amount> <payment> <opaqueData> <dataDescriptor>COMMON.ACCEPT.INAPP.PAYMENT</dataDescriptor> <dataValue>eyJ0b2tlbiI6Ijk0ODgyMTI0NTczNjUwNTQ0MDQ2MDQiLCJ2IjoiMS4xIn0</dataValue > </opaqueData> </payment> <order> <invoiceNumber>INV-12345</invoiceNumber> <description>Product Description</description> </order> <lineItems> <lineItem> <itemId>1</itemId> <name>vase</name> <description>Cannes logo </description> <quantity>18</quantity> <unitPrice>45.00</unitPrice> </lineItem> </lineItems> <tax> <amount>4.26</amount> <name>level2 tax name</name> <description>level2 tax</description> </tax> <duty> <amount>8.55</amount> <name>duty name</name> <description>duty description</description> </duty> <shipping> <amount>4.26</amount> <name>level2 tax name</name> <description>level2 tax</description> </shipping> <poNumber>456654</poNumber> <billTo> <firstName>Ellen</firstName> <lastName>Johnson</lastName> <company>Souveniropolis</company> <address> 14 Main Street </address> <city>Pecan Springs</city> <state>TX</state> <zip>44628</zip> <country>USA</country> </billTo> <shipTo> <firstName>China</firstName> <lastName>Bayles</lastName> <company>Thyme for Tea</company> <address> 12 Main Street </address> <city>Pecan Springs</city> <state>TX</state> <zip>44628</zip> <country>USA</country> </shipTo> <customerIP>192.168.1.1</customerIP> <!-- Uncomment this section for Card Present Sandbox Accounts --> <!-- <retail><marketType>2</marketType><deviceType>1</deviceType></retail> --> <transactionSettings> <setting> <settingName>testRequest</settingName> <settingValue>false</settingValue> </setting> </transactionSettings> <userFields> <userField> <name>MerchantDefinedFieldName1</name> <value>MerchantDefinedFieldValue1</value> </userField> <userField> <name>favorite_color</name> <value>blue</value> </userField> </userFields> </transactionRequest> </createTransactionRequest>
The result is:
E00117 : OTS Service Error 'Field validation error.'
โ02-27-2017 08:23 AM - last edited on โ02-27-2017 12:25 PM by RichardH
Yes, it's still broken. Using http://developer.authorize.net/api/reference/#payment-transactions-authorize-a-credit-card and I still get the OTS field validation error, although I just generated the nonce and haven't used it anywhere.
The (sandbox) login ID I'm using is:
5JNKx9n3F
And the public client key is
26QzsnrpZT2kGQA9y9P9vgb5FSB6Rx9PdyCK53gAEPrKt4834vPB5zHrJhu44sSu
The last nonce I generated
eyJ0b2tlbiI6Ijk0ODgyMTI0NTczNjUwNTQ0MDQ2MDQiLCJ2IjoiMS4xIn0
โ02-27-2017 08:32 AM - edited โ02-27-2017 08:32 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
My implementation also just stopped working today and I keep getting different reasons. All start with E00117:OTS Service Error. The first time I saw this it said "The OTS Service cannot complete the request due to a validation or configuration error".
I added some debugging logs to verify the data I passed to Accept.dispatchData() and now I get "The request was aborted: Could not create SSL/TLS secure channel". I changed nothing, I only logged the secureData to see what I was sending. My browser dev tools tell me that the Accept request's parameters are empty JSON, but my debug log says the object I passed contains the same data that worked fine yesterday.
โ03-03-2017 09:59 AM
โ03-03-2017 10:12 AM
This is with my sandbox account, but it looks like we're having issues with the production site as well. I can't seem to figure out why two orders got 200 OK and were marked processing yet they do not show up under unsettled transactions.
โ03-03-2017 10:18 AM
Hello @kbrockert
For your production account, I would recommend contacting customer support by phone to report the issue. They can be reached at 877-447-3938.
For your sandbox account, we're aware of the issue and I don't yet have the all clear that everything has returned to normal.
Richard
โ03-03-2017 10:22 AM
Thanks, @RichardH. I'll be sure to call the number and subscribe to this thread.
โ03-03-2017 11:01 AM
โ03-06-2017 11:22 AM
I'm also getting this error. I tried it with the sandbox account and with the production account and it made no difference as to which one i used. I'm using a secure key locally so it shouldn't be an ssl issue but I'm stuck at this point
โ04-14-2017 09:09 AM