This course is archived!
This tutorial uses an older version of Symfony of the stripe-php SDK. The majority of the concepts are still valid, though there *are* differences. We've done our best to add notes & comments that describe these changes.
11.
Checkout Form JS Handling Logic
Keep on Learning!
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
2 Comments
Hi KNP Univ!
I've used Ryan's code and it's working fine, but the code in Stripe documentation as changed (https://stripe.com/docs/ele....
Do you know why? Is it an adaptation to their log or perhaps a security issue?
I'm not a specialist of JS but well I'm curious (as you say in English 'curiosity killed the cat' but not the dev ^_~)
Thanks :)
Hi Céline Ollagnier!
Hmm, curious indeed! Love it! I'm not completely sure why using my key worked. The private key that you seen in the video WAS definitely changed/revoked. However, the public key is still the same - so using just that key might allow you to do a few things with JavaScript :).
Now, about the new "Elements" stuff" - https://stripe.com/docs/elements. I messages Stripe about this. Basically, as you know, before, if you wanted to create a custom checkout form, you just built the custom checkout form. This is still a valid way to do it, and it's not insecure (when I saw Elements, I wondered if there was a security issue they had discovered with creating a custom login form: there is not). They created Elements to (A) make it simpler to create a custom login form, especially one with rich credit card number fields, etc and (B) make it impossible for you to accidentally submit credit card data to your server (in our tutorial, we never use the
name=""attribute to avoid accidentally sending the data to our server - but you could imagine other people messing this up). So, I definitely invite you to checkout Elements, especially if it works well for you! We're hoping - at some point - to add a little "extra" piece to this tutorial about it.Cheers!
"Houston: no signs of life"
Start the conversation!