evertec / athmovil-javascript-api

Technical documentation used to integrate ATH Móvil's Payment Button on websites using HTML and Javascript.
5 stars 0 forks source link

jQuery.Deferred exception: Cannot set property 'total' of undefined #18

Open exelgn opened 3 years ago

exelgn commented 3 years ago

Hello! I am in Sandbox environment. The ATH Móvil button was working smoothly weeks ago, but since today, I noticed the following message:

jquery-3.6.0.js:4050 jQuery.Deferred exception: Cannot set property 'total' of undefined TypeError: Cannot set property 'total' of undefined at Object. (https://www.athmovil.com/api/js/v3/athmovilV3.js:1:19349) at mightThrow (https://localhost:44395/Scripts/jquery-3.6.0.js:3766:29) at process (https://localhost:44395/Scripts/jquery-3.6.0.js:3834:12) undefined

(I also tested it with jQuery 3.3.1)

This message appears in my console (Chrome) seconds later when I click the Pay button in your API Payment Web page.

I tried the code example in the readme with copy/paste, but the message stills the same. I also checked if the total is filled as I use a variable, but even hardcoded, it still throws that error.

I noticed that the response is not redirecting to neither of these: onCompletedPayment(), onCancelledPayment() nor onExpiredPayment().

Please, let me know If you can replicate this since I am stuck with this one after I got it working. By the way, very easy to implement! :)

Thanks.

exelgn commented 3 years ago

I just tried in a new page with only your code and the same error appears. Here is the example to see the error (appears at console in Chrome and Edge after clicking "Pay").

index.html.txt (made it *.txt so I could upload the HTML file).

exelgn commented 3 years ago

I just saw this message in the Network tab in Chrome DevTools:

{timestamp: 1626223855042, status: 404, error: "Not Found", message: "No message available",…} error: "Not Found" message: "No message available" path: "/api/v3/sandboxconsultTransactionUIID" status: 404 timestamp: 1626223855042

exelgn commented 3 years ago

I tested it with https (SSL) just in case, but it was the same. https://digixel.net/index.html

mess-lelouch commented 3 years ago

The same issue described in the main post happens to me and I confirmed that this is broken because of the "Not Found" response a few comments above. Currently the sandbox flow is broken because of this.