Reply
Highlighted
Member
Posts: 1
Registered: ‎02-25-2020

E_WC_03: Accept.js is not loaded correctly

I am using same code as given in 

https://developer.authorize.net/api/reference/features/acceptjs.html#Integrating_the_Hosted_Payment_...

 

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>
Highlighted
Member
Posts: 8
Registered: ‎03-24-2020

Re: E_WC_03: Accept.js is not loaded correctly

did u got a answer for this? if u yes could you please share?