I followed the example shown on https://developer.authorize.net/api/reference/features/acceptjs.html into my php page form but when I process the form with
Accept.dispatchData(secureData, responseHandler);
It generates an OPTIONS error response of :
{
"messages": {
"resultCode": "Error",
"message": [
"code": "E00003",
"text": "Root element is missing."
]
}
}
The secureData being submitted (in case it matters) is:
{
"cardData": {
"cardNumber": "4111111111111111",
"month": "02",
"year": "2018",
"zip": "83854",
"fullname": "Lisa Smith �"
},
"authData": {
"clientKey": "2w77y4wpDGw89R8bM2VcRS4Bm69tQ6qLYT5ACbq9E2uBW9wgVqPAzXADfdC8kqLz",
"apiLoginID": "72R9aMvP"
}
}
I checked and made sure the sandbox key and login id are correct.
I also get a POST response from apitest.authorize.net:
{
"opaqueData": {
"dataDescriptor": "COMMON.ACCEPT.INAPP.PAYMENT",
"dataValue": "9486742822834605004604"
},
"messages": {
"resultCode": "Ok",
"message": [
"code": "I00001",
"text": "Successful."
]
}
}
but since the OPTIONS returned an error it does not call the responseHandler() routine.
I hope I have included enough information for someone to see and help with a solution.
One other thing. The console also shows a message:
TypeError: window[b] is not a function AcceptCore.js:1:3956
n https://jstest.authorize.net/v1/AcceptCore.js:1:3956
o/c.onload/< https://jstest.authorize.net/v1/AcceptCore.js:1:4265