Anyone familiar with Stripe Checkout? Need help with cart

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Anyone familiar with Stripe Checkout? Need help with cart

Post by simonmlewis »

Hi

I am trying to incorporate Stripe into our website, so that we can process payments without the user leaving the site, or even leaving to a custom build site. So they stay put!!

https://stripe.com/docs/checkout/tutorial
This is what I have been guided toward, but I don't understand how to get the contents of a Cart passed through it.

I'm still not 100% familiar with Sessions, so when you add something to cart, it puts each ID of the product into a session, so that each ID is shown on the page, extracted from the session to show what's in their cart.

I need Stripe to take the payment for the calculated amount, but also postage, and I'm guessing if I am to do this all inhouse, we need to be able to calculate postage as well. Then add that into the price.

Then how do you make the invoice go out from Stripe, showing all the items bought (like you can with PayPal).

Any ideas?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Anyone familiar with Stripe Checkout? Need help with car

Post by Celauran »

Did you look at their PHP integration? https://stripe.com/docs/checkout/php
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Anyone familiar with Stripe Checkout? Need help with car

Post by Celauran »

Also checkout the sample payment form on GitHub: https://github.com/myg0v/Simple-Bootstr ... yment-Form
Post Reply