Reply
All Star
Posts: 699
Registered: ‎11-03-2016

Re: (E_WC_03) Accept.js is not loaded correctly

[ Edited ]

Thanks for posting here everyone, and sorry about any difficulties you've been experiencing. We're investigating, and it looks like there was a CDN caching issue that's now been resolved. In the short term, refreshing the browser cache should clear up any lingering effects.

 

@wkirby, I'm so sorry about your experience with support. The heads of the support organization have been made aware so that they can investigate whatever retraining might be necessary.

Highlighted
Member
Posts: 2
Registered: ‎10-12-2017

Re: (E_WC_03) Accept.js is not loaded correctly

[ Edited ]

Hey everyone.

 

I confirm that AcceptCore.js has changed on the CDN (not sure about Accept.js).

 

Both files of the older version work, and both files of the newer version work. But since the URLs are the same I'm guessing for whatever reason we are having one of the files being cached and not the other, causing a version mismatch.

 

This is troubling because we have no control over our user's browser cache. Unfortunately cache busting Accept.js doesn't propagate the same effect to AcceptCore.js

 

To get around this issue I decided to try forcing the cacheless loading of both files (Accept.JS and AcceptCore.js).

 

I'm still confirming that this indeed clutched the issue but I here is what (appears) to have worked:

 

Original Code:

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

New Code:

<script>
                $.ajaxSetup({
                    cache: true
                });

                function loadScript(script) {
                    jQuery.ajax({
                        async: false,
                        type: 'GET',
                        url: script,
                        data: null,
                        success: function () {
                            console.log(script + ' force loaded');
                        },
                        dataType: 'script',
                        error: function (xhr, textStatus, errorThrown) {
                            console.log(script + ' ' + textStatus);
                        }
                    });
                }

                loadScript('https://js.authorize.net/v1/AcceptCore.js');
                loadScript('https://js.authorize.net/v1/Accept.js');
            </script>
            <script type="text/javascript" src="https://js.authorize.net/v1/Accept.js" charset="utf-8"></script>

This, I hope, forces the fetching of the new versions of the Javascript files, which should then be used when the <script> tag requests it. Requesting it only with jQuery.ajax seems to trigger some sort of CDN enforcement protection so the <script> is still needed.

 

Hoping this helps anyone who is pulling their hairs out like I was.

 

Ideally in the future Authorize.net would be more careful with version changes on their CDN.

Member
Posts: 1
Registered: ‎10-16-2017

Re: (E_WC_03) Accept.js is not loaded correctly

Can you specify the amount of time this would impact customers without having cleared their browser cache?

Member
Posts: 2
Registered: ‎10-12-2017

Re: (E_WC_03) Accept.js is not loaded correctly

Just checking in. We are still having this issue with users using iOS (safari) and OS X (chrome or safari). No idea what else I can do.