Anvil: Web Apps with Nothing but Python Transcripts
Chapter: Ecommerce and accepting payments
Lecture: Enabling the Stripe service

Login or purchase this course to watch this video and the rest of the course contents.
0:00 I've built a couple e-commerce websites over the years and there are really hard ways to do it and quite easy ways to do it.
0:08 A hard way is to work with some ancient e-commerce API from some bank's merchant account and they're just really crummy, hard to work with.
0:17 And then you've got to handle all the flow, all the forms and validation and all of that stuff and all the edged cases in your Web app.
0:24 Another way to do it, is to use something modern and clean and simple like Stripe. And so, what we're going to do and what Anvil has done and supported
0:32 is allow us to use something called Stripe Checkout. If you've taken any of our paid courses you will know what this looks like.
0:40 So come over here, here's are site and see that blue button buy now, get lifetime access for $49? If you click this, what happens is
0:49 something pops up that looks just like that. Our Python, here's our icon lifetime access to the course $49.
0:57 You enter your email, your credit card number expiration and CVV date or CVV code and then you hit pay.
1:03 In the bottom left, see how it says powered by Stripe. This is what we're going to add to our application.
1:11 We're going to add the ability to have this dialogue come. And when we actually hit the pay $49 here
1:17 what's going to happen is, there's going to be some code run over on Anvil as a response. Now, on this one it actually does a post back
1:24 and loads up a different page. The way Anvil's done it they've kind of taken care of that. So it's even simpler than pure Stripe Checkout
1:32 which is great.


Talk Python's Mastodon Michael Kennedy's Mastodon