• Resolved thesoorajdas

    (@thesoorajdas)


    Hi there,

    After having tried multiple Stripe payment plugins, I must say this one has been the best so far. I have been having trouble setting up Apple Pay on my website, however. Although I have got the domain verified on Stripe, I believe that my caching plugin ‘JCH Optimize Pro’ seems to be including the JS files of the plugin and Stripe within the minified version. When I turn off the caching plugin, everything works fine.

    Now, I have been trying to exclude all of the relevant files from the caching plugin manually, but have not had success yet.

    The error message that shows on the product pages, cart and checkout page is – “ReferenceError: Can’t find variable: Stripe”

    The JS files that I have set to be excluded from JCH Optimize are:
    /apps/woo-stripe-payment/assets/js/frontend/wc-stripe.min.js
    apps/woo-stripe-payment/assets/js/frontend/applepay-product.min.js

    Are there any other JS/CSS files that I need to exclude, in order to make this work?

    Thanks.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hi @thesoorajdas,

    You should exclude the following external script to resolve that error:

    https://js.stripe.com/v3/

    Kind Regards,

    Thread Starter thesoorajdas

    (@thesoorajdas)

    Hi @mrclayton

    Thanks for this. While I have been able to resolve the ‘Can’t find variable: Stripe’ error, now I see the below on the console:

    [Error] ReferenceError: Can't find variable: jQuery
    	Global Code (form-handler.min.js:1)
    [Error] ReferenceError: Can't find variable: jQuery
    	Global Code (wc-stripe.min.js:1:43881)
    [Error] ReferenceError: Can't find variable: jQuery
    	Global Code (mini-cart.min.js:1:2879)
    [Error] ReferenceError: Can't find variable: jQuery
    	Global Code (applepay-product.min.js:1:1681)

    Would you know how I could possible resolve this?

    Regards.

    Plugin Author Payment Plugins

    (@mrclayton)

    @thesoorajdas jQuery is a dependency of the Stripe plugin. jQuery should automatically be registered by WP.

    If you don’t have any custom development, then I’d say your caching plugin is once again the culprit.

    Kind Regards,

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Trouble Displaying the Apple Pay Button’ is closed to new replies.