We are using AcceptUI.js impement payment function. Everyting working fine for more than 2 years. But recently some users feedback after enterning credit card number information the payment popup form display loading forever. We added logs found responseHandler() never callback in their case. I want to know in what's case this would be happen and how to fix it. Hope someone could help me out, it's really frustrate, since seems the issues happend in accept.js it self, we can not do anymore actions, the callback not execute so do not know what's error get.
Following is code we are using:
<input type="hidden" name="dataValue" id="dataValue" /> <input type="hidden" name="dataDescriptor" id="dataDescriptor" /> <input type="button" class="AcceptUI btnPlaceOrder btnPlaceOrderAuthorize btn-pcusa" value="Payment | Place Order" style=" width: 100%; padding: 8px 20px; font-weight: normal; margin-bottom: 10px; font-size: 16pt; " data-billingAddressOptions='{"show":true, "required":false}' data-apiLoginID="<%=creditCardApiLoginID %>" data-clientKey="<%=creditCardClientKey %>" data-acceptUIFormBtnTxt="Place Order" data-acceptUIFormHeaderTxt="Card Information" data-responseHandler="responseHandler" /> <script type="text/javascript"> //Authorize.net payment function responseHandler(response) { pageViewController.postOrderEvent("Authorize responseHandler call back: " + JSON.stringify(response)); if (response.messages.resultCode === "Error") { var i = 0; var error = 'Checkout Credicard Pay Error:'; while (i < response.messages.message.length) { console.log( response.messages.message[i].code + ": " + response.messages.message[i].text ); if (error != '') { error += "\n"; } error += response.messages.message[i].text; i = i + 1; } jsErrorHandler.postErrorToServer(error); setTimeout(alert(error), 1000); pageViewController.postOrderEvent("Authorize callback error"); } else { pageViewController.postOrderEvent("Authorize callback success"); paymentFormUpdate(response); } } function paymentFormUpdate(response) { var opaqueData = response.opaqueData; document.getElementById("dataDescriptor").value = opaqueData.dataDescriptor; document.getElementById("dataValue").value = opaqueData.dataValue; //document.getElementById("aspnetForm").submit(); pageViewController.postOrderEvent("Authorize callback success start creditCardProcess"); pageViewController.creditCardProcess(response); } </script>
11-04-2020 08:49 PM
BTW the UI stuck at "Loading" popup dialog for ever, user has tried many times with refersh page, but still can not solve it.
11-04-2020 08:58 PM
11-04-2020 11:49 PM
10-09-2021 01:30 AM
10-10-2021 02:19 AM - edited 10-10-2021 02:20 AM