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.
03.
15 Comments
Hello i have a error with my token:
No such token: tok_1D0HYdGNRPEKuC6IlRFsOREX
Hey djibril,
Your token does look like a valid Stripe token. If you have this error, probably the token was regenerated somehow. Do you hardcode this token manually as a string? Or do you retrieve a dynamic token from Request object and pass it with a variable as we show in screencast?
Cheers!
when i process the payment it tries to redirect me to /your-server-side-code
This is very strange because my controller specifies to redirect me to my home page "return $this->redirectToRoute('user_home_show'); "
Is that stripe trying to auto-redirect me somewhere?
all good i fixed it was a stupid mistake thanks anyway
what was the mistake you did ?
Hey Blueblazer172 ,
Do you have a similar issue? If you describe the problem a bit more - we'll try to help you.
Cheers!
again I solved it myself :P
I had to remove the action="/your-server-side-code" parameter in
<form method="POST">
in the checkout.html.twig file
that easy xD
Easy indeed! ;)
Cheers!
Great! Quick catch ;)
Cheers!
Awesome screencast so far! :) Thanks a lot! :)
Just an extra step: Make sure you upgrade nss, curl and openssl, or else Stripe will reject our request with message saying that we're trying to setup non-TLS1.2 communication. According to their blog (source: https://stripe.com/blog/upg... ), the new users starting from July 1st will have to use TLS 1.2. Prior to upgrade (and error) I had:
curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.16.2.3 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
Cheers! :)
Ah, thanks for the note Jovan - very helpful! I hadn't seen this - but I'm sure others will have this exact same error :).
Cheers!
there what "shopping cart" project were you referring to at -2:20?
Yo azeem!
It's not a "shopping cart project", but instead, a "ShoppingCart" class (and shoppping_cart service) that I pre-configured in our project before starting the tutorial :). If you check out the start code, you'll find the class in src/AppBundle/Store/ShoppingCart.php, and the service is configured in services.yml. I didn't want to take the time to setup a shopping cart, so I did it before the tutorial so we could use it.
Does that help? Let me know!
Cheers!
yes, thanks
Hey Dany,
As you can see from logs, your form is submitting to the wrong page. Instead of submitting to the "/charge" page you should submit form to the "/checkout", because in this screencast the form handling in
CheckoutAction().Cheers!
"Houston: no signs of life"
Start the conversation!