Jump to content

stripe problem


Recommended Posts

Hi everyone

I use a local prestashop version, version 1.7.4.4. I have installed the stripe plugin, I have configured it, insert public and private keys because it is connected. Unfortunately, as soon as I arrive in the payment section of my e commerce site I do not see the form payment of stripe. By enabling debugging the following error appears:
payment_stripe.js:21 Uncaught ReferenceError: StripePubKey is not defined
    at HTMLDocument.<anonymous> (payment_stripe.js:21)
    at fire (core.js:690)
    at Object.fireWith [as resolveWith] (core.js:711)
    at Function.ready (core.js:745)
    at HTMLDocument.completed (core.js:748)

 

Could you help me please? Thanks a lot to everyone

 

 

 

Link to comment
Share on other sites

  • 3 weeks later...

Hi!

I got the same problem on Prestashop 1.7.5.0 and I solved it by modifing /modules/stripe_official/views/js/payment_stripe.js

Replace 

"if (!stripe_isInit && $('section#checkout-payment-step').hasClass('js-current-step')) {"

near line  #20 by:

"if (!stripe_isInit && $('section#checkout-payment-step').hasClass('js-current-step') && typeof(StripePubKey)!=='undefined') {"

After that you should not have JS error in console and other JS on page should work correctly.

But this bug should appear only if Stripe payment is not available for particaular visitor due to currency, group, country and carrier settings.

So, you probably should also check in BO "Payment -> Preferences" if Stripe is enabled for all cases you need.
 

 

2019-01-29-b8lr43yk78aeqb5yey91wo3xq.png

Edited by disasoft (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...