cancel
Showing results for 
Search instead for 
Did you mean: 

Who Me Too'd this topic

Accept.js - Exceptions regarding failure to load from CDN and bad CORS headers

 

I'm getting two errors when loading the library:

 

1)  XMLHttpRequest cannot load https://jstest.authorize.net/v1/AcceptCore.js. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://[mydomain]' is therefore not allowed access.

 

2) Library is not coming from Accept CDN.

 

based on some posts from a previous thread here back in August (https://community.developer.authorize.net/t5/Integration-and-Testing/Accept-js-error-E-WC-14-Accept-...)

 

I've tried not only loading the script as listed in the official documentation:

 

<script type="text/javascript" src="https://jstest.authorize.net/v1/Accept.js" charset="utf-8"></script>

 

This generates error #1 above related to the CORS origin headers.

 

I've also tried loading the script dynamically as recommended by the moderator on the thread by doing this:

 

$(document).ready(function () {
        $.getScript(jsUrl, function (data, textStatus, jqxhr) {
dispatchEvent(new Event('load')); GetScriptCallback(); }); });

 

and this generates both of the errors listed above.

 

Since both errors appear to be blocking issues, I can't seem to get past it, so at the moment I'm dead in the water.

 

From the thread I cited above, it seems these errors just magically stopped happening for some folks and then came back randomly and then stopped again and so on.  It seems I'm at a point where they are reappearing.

 

I'm not sure what the status of the Accept.js library but based on the open threads and the errors I'm stills seeing 2 months later it seems like somebody shipped it before it was ready for primetime.

 

Nonetheless, I've now got a client who is looking to get up and running with it next week and I'm stuck sorting out these errors so I'd appreciate some assistance.

 

Any updates on what the latest code or documentation is for this library?

describeit
Member
Who Me Too'd this topic