I am using same code as given in
for creating dataDescriptor and dataValue.
but getting "E_WC_03: Accept.js is not loaded correctly" error from responseHandler.
I am not getting this error befor one or two hours. after some time this happan.
Here is my code:
<form id="authPaymentForm" method="POST" action="http://thed.com/order/AuthorizeOrderResponse"> <input type="hidden" name="dataValue" id="dataValue" /> <input type="hidden" name="dataDescriptor" id="dataDescriptor" /> <button type="button" id="authButton" class="AcceptUI" data-billingAddressOptions='{"show":false, "required":false}' data-apiLoginID="apiLoginID" //as per my account data-clientKey="clientKey" //as per my account data-acceptUIFormBtnTxt="Submit" data-acceptUIFormHeaderTxt="Card Information" data-responseHandler="responseHandler"> hidden </button> </form> <script type="text/javascript"> function responseHandler(response) { debugger if (response.messages.resultCode === "Error") { var i = 0; while (i < response.messages.message.length) { ShowMessage(response.messages.message[i].code + ": " + response.messages.message[i].text, "error"); i = i + 1; } } else { paymentFormUpdate(response.opaqueData); } } function paymentFormUpdate(opaqueData) { document.getElementById("dataDescriptor").value = opaqueData.dataDescriptor; document.getElementById("dataValue").value = opaqueData.dataValue; document.getElementById("authPaymentForm").submit(); } </script> <script type="text/javascript" src="https://jstest.authorize.net/v3/AcceptUI.js" charset="utf-8"> </script>
02-25-2020 05:21 AM