1
00:00:00,390 --> 00:00:06,600
And before we continue the project, let me just give you a general overview of how accepting payments

2
00:00:06,600 --> 00:00:07,890
online works.

3
00:00:08,310 --> 00:00:14,100
And if you took my research project, this probably is going to be a repetition since most likely you

4
00:00:14,100 --> 00:00:15,390
worked on the e-commerce.

5
00:00:15,650 --> 00:00:18,590
If you didn't don't want to, you don't have to understand the entire project.

6
00:00:18,900 --> 00:00:22,470
We're just going to be focusing on accepting payments part.

7
00:00:22,890 --> 00:00:24,420
And the idea is following where.

8
00:00:25,330 --> 00:00:31,570
Online, I cannot just directly communicate with Stripe, so I have this dollar amount that the user

9
00:00:31,570 --> 00:00:32,299
is about to pay.

10
00:00:32,650 --> 00:00:40,300
I cannot just send a request directly to a stripe that would be highly, highly insecure, meaning from

11
00:00:40,300 --> 00:00:42,520
the front and directly to the stripe.

12
00:00:42,940 --> 00:00:50,360
Instead, what we want to do, we want to communicate with our back end where we send the payment intent.

13
00:00:50,620 --> 00:00:55,990
Now, in my react, we actually built this little logic using serverless function.

14
00:00:56,270 --> 00:00:59,490
Now in this case will work with our node.

15
00:00:59,500 --> 00:01:04,300
So we'll set up the route in our node server where we'll handle that.

16
00:01:04,569 --> 00:01:11,110
And it goes something like this where once you refresh the page, notice we have this create payment

17
00:01:11,110 --> 00:01:14,900
intent and actually we can take a look at the request.

18
00:01:15,250 --> 00:01:16,850
So let me make this bigger.

19
00:01:16,870 --> 00:01:20,110
Let's keep on scrolling and notice here all the way in the bottom.

20
00:01:20,890 --> 00:01:24,680
I'm actually sending what the user is about to pay.

21
00:01:25,120 --> 00:01:29,080
So I have the card, I have the amount and I'm good to go.

22
00:01:29,080 --> 00:01:30,860
And you'll see why we're sending the card.

23
00:01:30,910 --> 00:01:35,660
I'll explain as we're setting up the functionality then from the back end.

24
00:01:36,160 --> 00:01:43,450
So from our own server, in this case, we communicate with Stripe, which is secure, and that once

25
00:01:43,450 --> 00:01:49,080
we get back the information, then we can proceed on a front end with the payment.

26
00:01:49,330 --> 00:01:50,710
So that's the general idea.

27
00:01:51,040 --> 00:01:58,270
Instead of directly communicating from the front end to the Strib, we have this middle step where we

28
00:01:58,270 --> 00:02:03,040
communicate with our own back and we get back that payment intent.

29
00:02:03,400 --> 00:02:10,120
If everything is correct, then we can proceed with a payment of where it is clear and now we're going

30
00:02:10,120 --> 00:02:12,060
to move on to the next step.

