1 00:00:00,690 --> 00:00:05,200 You were able to get that payment model to appear, but now we need an actual credit card to enter in 2 00:00:05,200 --> 00:00:07,150 there to actually test out this entire flow. 3 00:00:07,450 --> 00:00:12,210 Well, luckily, Stripe has our back and the stripe documentation, which you can find at stripe dot 4 00:00:12,230 --> 00:00:14,260 com docs slash testing. 5 00:00:14,890 --> 00:00:18,490 We can scroll down on this page a little bit and they're going to list out some credit card numbers 6 00:00:18,490 --> 00:00:22,810 right here that are always going to work for any given charge on a stripe account. 7 00:00:22,900 --> 00:00:27,370 While the stripe account is in the test mode and ours is definitely the test mode right now. 8 00:00:28,150 --> 00:00:33,660 So in other words, if we enter in a credit card number of four to four to four to any three digits 9 00:00:33,660 --> 00:00:37,450 CBC and any future date, the charge will work as expected. 10 00:00:37,990 --> 00:00:39,160 So let's try that out right now. 11 00:00:41,010 --> 00:00:43,760 I'm going to once again recreate my order because it already has expired. 12 00:00:45,230 --> 00:00:47,060 Purchase and then pay with card. 13 00:00:47,840 --> 00:00:51,920 By the way, when we click on Pay with Card, you might see a ton of Eyre's pop up right here and even 14 00:00:51,980 --> 00:00:53,120 a couple of warnings. 15 00:00:53,630 --> 00:00:56,930 All those errors, all the warnings really, truly can be ignored. 16 00:00:57,320 --> 00:01:01,100 We are not using Stripe in such a critical way that these errors or warnings are going to cause any 17 00:01:01,100 --> 00:01:02,000 issue whatsoever. 18 00:01:03,230 --> 00:01:04,390 It's now inside this motel. 19 00:01:04,480 --> 00:01:07,080 I got to put in or two for two for two for two. 20 00:01:08,080 --> 00:01:11,460 A future date and then any three digits CBC. 21 00:01:12,260 --> 00:01:16,780 Well, then click on paid twenty dollars and we'll see a console log right there. 22 00:01:17,320 --> 00:01:18,910 This is our token object. 23 00:01:18,970 --> 00:01:21,910 This is the thing that's going to allow us to charge a user's credit card. 24 00:01:22,570 --> 00:01:27,850 The most important piece of information of this is the I.D. That idea right there is the real token. 25 00:01:28,090 --> 00:01:31,490 We want to take that value and send it off to our payment API. 26 00:01:32,080 --> 00:01:36,460 Our payment API can then do a follow up and charge the user's credit card for this amount of money. 27 00:01:37,420 --> 00:01:38,020 That's pretty much it. 28 00:01:38,080 --> 00:01:41,830 Oh, if I do now is take that idea, make a post request and we are pretty much good to go. 29 00:01:43,910 --> 00:01:47,600 All right, so let's take that idea, the next video, make sure we do that poster cost off to the payments 30 00:01:47,600 --> 00:01:48,080 API. 31 00:01:48,410 --> 00:01:52,670 We also need to make sure that we handle the case in which a user pays for this thing before the order 32 00:01:52,670 --> 00:01:53,300 expires. 33 00:01:53,730 --> 00:01:56,030 They're pretty close here to getting this entire flow wrapped up. 34 00:01:56,270 --> 00:01:57,470 Just a couple more steps.