• Hi there, sorry to bother you again twice in one week, but I am testing this plugin again on iPad now and it doesn’t seem to work with version 1.8.4 of this plugin.

    I have tested it in Safari and FireFox for iOS on iPad and when the donation buttons are clicked (generated by the shortcode), the page automatically redirects to the “thank you” page without the Stripe pop up ever appearing or any card data being entered. Perhaps this is a conflict with pop up blocking on iOS or something?

    The new window Stripe pop up works correctly on Firefox/Chrome mobile for Android.

    I have deactivated all plugins, but this error still occurs.
    From the plugin’s debug log, it appears there is an issue with the Stripe token:

    [05/02/2018 2:29 PM] – Payment processing started.
    [05/02/2018 2:29 PM] – Triggering hook for addons to process posted data if needed.
    [05/02/2018 2:29 PM] – Checking received data.
    [05/02/2018 2:29 PM] – FAILURE: Invalid Stripe Token

    The page I need help with: [log in to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter temparcweb

    (@temparcweb)

    It appears there is a JavaScript error causing this. Below is the console output from Safari’s inspector on iOS:

    SyntaxError: Unexpected token ‘=’. Expected a ‘)’ or a ‘,’ after a parameter declaration.

    stripe-handler.js:61

    Plugin Contributor Alexander C.

    (@alexanderfoxc)

    Hi and thank you for your report.

    Looks like default parameters from ES2015 are not yet supported in Safari. I will rewrite that JS function so it won’t be declaring default parameters during function definition.

    I will provide a testing version when it’s done so you could test it on your site.

    Plugin Contributor Alexander C.

    (@alexanderfoxc)

    Please try this version https://stripe-plugins.com/testing/stripe-payments_1.8.5.zip

    Clear your Safari cache to make sure new updated js file is downloaded from the server and try to make the payment again.

    Thread Starter temparcweb

    (@temparcweb)

    Thank you for your quick response.

    I am still seeing the JavaScript error in Safari & Firefox on iOS. I am also seeing it in Internet Explorer 11 on a Windows desktop.

    It does not appear to be resolved even after the cache has been cleared.

    Plugin Contributor Alexander C.

    (@alexanderfoxc)

    Yep, it appears there is another function with default parameters declaration. Will rewrite it and let you know.

    Thread Starter temparcweb

    (@temparcweb)

    Thank you. I have reverted to 1.7.1 for now which is working in all browsers.

    Plugin Contributor Alexander C.

    (@alexanderfoxc)

    Please try this one: https://stripe-plugins.com/testing/stripe-payments_1.8.5_2.zip

    I have fixed all JS errors reported by IE11 in the plugin. However, it still doesn’t work there though as it reports JS errors in checkout.js from Stripe’s website (which I cannot control, obviously). Hope it should fix the things in Safari though.

    • This reply was modified 6 years, 10 months ago by Alexander C..
    Plugin Contributor Alexander C.

    (@alexanderfoxc)

    Oops, I was wrong. It’s working just fine in IE11 for me.

    Let me know how it goes for you.

    Hi, I get the same problem too – on a 3rd generation iPad (Safari iOS 9.3.5) it goes straight to the ‘thank you’ page after the button is pressed without going to the card input form.

    It otherwise works properly on the latest versions of Firefox (Win 10 desktop), Edge (Win 10 desktop), IE (Win 10 desktop), Chrome (Win 10 desktop), Chrome (Android tablet), Safari (iPad Air 2). As well as on Safari (iPhone iOS 10.3.3).

    Plugin Contributor Alexander C.

    (@alexanderfoxc)

    Hi. Can you please try the version I posted above and see if it works?

    Thread Starter temparcweb

    (@temparcweb)

    @alexanderfoxc This new version appears to have fixed the issue in Safari and IE 11. Thank you.

    Plugin Contributor Alexander C.

    (@alexanderfoxc)

    No, thank YOU for helping me debug this. I don’t have an iPad so it makes it difficult to make tests like that. But now I figured it doesn’t support some modern JS specifications, so I’ll try to stick to older ones to make sure it works on iPad.

    Don’t think many people are using IE11, but it appears to support same JS specifications as Safari on iPad, so most likely, if it works in IE11, it will also work in Safari ??

    Once again, thank you for reporting this and helping to nail it. An updated version will be released to WP plugins directory very soon.

    Have a nice weekend!

    Thread Starter temparcweb

    (@temparcweb)

    @alexanderfoxc no problem! Just had to do some backwards compatibility testing on a site for a client and discovered the error ??

    The new ES2015/2016 JS specifications are indeed not supported on IE11 or older Safari versions, you are correct. I anticipate there will be more and more issues like this at resulting from the fast pace JavaScript is developing every year.

    Thanks for your quick responses and help to debug it!

    Take care.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Stripe token invalid on iOS (iPad)’ is closed to new replies.