Тёмный

Basics of Integrating Stripe with PHP | Accept Credit Card Payments on Your PHP Site 

Johnny Code
Подписаться 2,6 тыс.
Просмотров 2,9 тыс.
50% 1

I’d like to share how I use Stripe to process credit card payments for restaurant pick-up orders. After the customers select their items, I send them to Stripe's payment page to finish checkout. After they complete their payment, Stripe sends them back to my site to confirm the order. In this video, we'll focus on the integration points and not worry about how the shopping cart works or any of the user interfaces. We’ll see how little PHP code it takes to integrate with Stripe as a payment processor.
Demo Code
github.com/joh...
Stripe SDK
stripe.com/doc...
Stripe API Documentation (Line Items)
stripe.com/doc...

Опубликовано:

 

10 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 10   
@stront
@stront Год назад
Just what I've been looking for. First tutorial that actually works for me. Only thing I can't seem to get to work is retrieving the customers information so I can display it or import it into my database. Any chance you've got code for that that works with the demo code you provided? Or maybe a tutorial? Cheers.
@johnnycode
@johnnycode Год назад
I don't save customer info so I don't have code for that. Before you can retrieve a customer, you have to first create the customer in Stripe. It sounds like you didn't create the customers in Stripe first?
@Hamster2wire
@Hamster2wire Месяц назад
Hi, may I know how to get lineItems data from cart page?
@johnnycode
@johnnycode Месяц назад
lineItems data is an array that you construct and store in the user's session when your customer adds an item to cart. This is something you do in PHP and is not relevant to Stripe; you just have to create the array in the format shown in the video. Look into how to do a basic PHP shopping cart.
@rust_soldier
@rust_soldier Год назад
Fatal error: Uncaught (Status 400) (Request req_dRL7O7hJBqtmJF) Invalid array thrown in
@KalmanWebDesign
@KalmanWebDesign 8 месяцев назад
So how would you change the quantities when a customer changes them on the product?
@johnnycode
@johnnycode 8 месяцев назад
From your front end UI, when the customer changes the item quantity and clicks a submit button, then your backend PHP code would know the quantity required. Alternatively, you could use something like jquery.post() to send the quantity to the backend PHP when the customer triggers a onChange() event on the quantity input box.
@KalmanWebDesign
@KalmanWebDesign 8 месяцев назад
Thanks!@@johnnycode
@tianadede349
@tianadede349 10 месяцев назад
thanks bro
@kannyiriabdulai8776
@kannyiriabdulai8776 Год назад
👍
Далее
Что думаете?
00:54
Просмотров 514 тыс.
Они захватят этот мир🗿
00:48
Просмотров 761 тыс.
Мой телеграмм: v1ann
00:14
Просмотров 45 тыс.
How to place hold on card in stripe using PHP
16:03
Просмотров 3,6 тыс.
The Most Legendary Programmers Of All Time
11:49
Просмотров 557 тыс.
Accept a payment with the Payment Element using PHP
22:02
We Built an App in 24 Hours [No Code]
11:56
Просмотров 427 тыс.
How To Accept Payments With Stripe
23:05
Просмотров 274 тыс.