toastr is not defined if wrong credit card number

Edward

Member
If someone puts wrong credit card information, the notification doesn't comes and I get this js error in the console "toastr is not defined", if wrong credit card number".

Any thoughts? I have the latest plugin version of aliexpress
 

Edward

Member
Here is a screenshot, the total price disappears and other information on the checkout page.
 

Attachments

  • gfbf.PNG
    gfbf.PNG
    16.1 KB · Views: 10
  • Screenshot (21).png
    Screenshot (21).png
    162.5 KB · Views: 9

Direct Webstore

Well-Known Member
Still have no idea "where" you are seeing that error message or what "console" you are talking about ... but the already entered info will disappear if you refresh the page "after" that error message.
 

Edward

Member
Every browser has a developer console. In chrome you can see it if you press f12 and click on the tab "console". There you can see any error logs from javascript.

"Toastr" is a javascript plugin used by alisropship to show notifications on the top of the screen.

On my store this notification doesn't work and it breaks the checkout page.

For example I am a customer I come to the website I go to checkout and put my credit card information wrong. Normally I should get a notification on the top of the screen and I can try again.

But on my website the checkout page breaks, meaning the items and price dissappear and no notification pops up.

I can make a video if this isn't clear.
 

Direct Webstore

Well-Known Member
Every browser has a developer console. In chrome......

Right! THAT console. (I usually right click/inspect) Thought you were on about some "console" in the plugin or WP.

This may sound strange ... but try deleting all your payment info (Stripe, Paypal, secret keys etc) from the plugin's backend. Clear your browsers cache ... re-enter all the payment info again ... and save. Then try it.

(this solved a slightly similar problem I had)
 

Edward

Member
My site doesn't have the "bug". I've seen no one else mention this bug either. So it's not a bug. It's a problem with your particular setup alone. You have to write to them.
Anyway I fixed it myself for now.

I included this script in the footer.php:
Code:
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js"></script>
And it works fine now.
 

Edward

Member
One more question.

If someone puts wrong credit card details, should the order have the flag "Abandonded" or "Failed". For me it shows "Abandonded".
 

Direct Webstore

Well-Known Member
I myself wouldn't be happy with a "band-aid" solution like that. I'd want to find out what's causing it in case it affects other things. I'd be writing to support. ... but if you're happy ... great. :)
 
Top