Jump to content

Stripe Module not going past step 4)Payment


Recommended Posts

Hi Belini

 

I'm using the Official Stripe version (currently on Prestashop modules) with 1.7.0.6.

 

It looks like the jquery isn't getting loaded properly so the $ references are just bugging out.

 

I'm trying to work out how to force jquery to load for every page (as a work around) but there are about a million entry points into the code - so I've got no idea where to start lol.

 

I thought I could override the main Controllers model to load jquery on every controller, but that didn't work either :)

 

Any ideas gratefully received!

Link to comment
Share on other sites

Hi, I'm a newbie too so here goes.

 

It would make sense that you can include JQuery into templates but I just couldn't find where to put it. 

 

So I downloaded the compressed minified JQuery 3.2.0 code and inserted it into the beginning of the payment_stripe.js and jquery.the-model.js

 

I also enclosed the code in each file in an "on document ready" wrapper (see in about 5 billion places how this is done) - but its probably not even needed. It worked so I left it basically lol.

 

This means that every time each of these files is opened it already has the jquery library included. I assumed I could paste it into the first one to load and the second .js file would see it - but you cannot guarantee they will always complete loading in the sequence specified. If the second file just happens to finish loading before the first, you get the jquery reference error again. So the only way to be sure was posting it into both!

 

The files I changed were under /modules/stripe_official/views/js

 

The payments then go through ok. 

 

I'm sure someone with more knowledge will show us how this should be implemented properly - but in the meantime I've left it bodged.

 

I guess 2 x 32k chunks of code isn't going to make a massive overhead with Preastashop's footprint of 166MB !!

Edited by TheSecurityBunker (see edit history)
  • Like 1
Link to comment
Share on other sites

i'll take this opportunity to let you know there are much cheaper and working alternatives to the official stripe module.  I assume you are using this official module?

https://addons.prestashop.com/en/payment-card-wallet/24996-stripe-official.html

 

I find it amusing that you would pay $150 for an official module that does not work, and then come to the community for support.  Did you try to contact the 'author' of the module?

Link to comment
Share on other sites

And how exactly is it free?  The module I linked has $149.99 price tag associated to it

 

The module you linked to says FREE just above the big download button. 

 

Maybe it used to cost money and your browser has cached it?

 

Ah just noticed you are in the US. Maybe it has regional restrictions?

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

  • 3 weeks later...

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...