WEBVTT

00:00.000 --> 00:00.240
Okay.

00:00.240 --> 00:01.890
Welcome to section 11.

00:01.890 --> 00:06.750
And in this section we're going to focus on creating the order feature in our application.

00:06.750 --> 00:11.550
And this section is a good opportunity to practice some of the things that we've already looked at in

00:11.550 --> 00:19.200
this course in order to build this particular feature, as well as add a few new things as well.

00:19.200 --> 00:23.070
So coming up in this section, we're going to take a look at creating order entities.

00:23.100 --> 00:27.240
Now our order entity itself is going to be made up of several different things.

00:27.240 --> 00:32.730
We're going to have our order, the order item, the delivery address information, the payment information,

00:32.730 --> 00:36.060
the product information, all of which makes up the order itself.

00:36.060 --> 00:40.590
So it's going to be an aggregate type of entity, something that we've not looked at yet.

00:40.620 --> 00:42.660
We've looked at relatively simple entities.

00:42.660 --> 00:45.150
This one's going to be a bit more complex.

00:45.150 --> 00:51.480
And once we have our order, we need to be able to define its status as because we're using the strong

00:51.480 --> 00:52.740
customer authentication.

00:52.740 --> 00:58.320
When the payment is made, then we don't have any direct communication between the API and stripe.

00:58.350 --> 00:59.820
They're all completely separate.

00:59.820 --> 01:01.680
So we need to look at webhooks.

01:01.680 --> 01:06.540
And this is how stripe is going to notify our API that something has taken place.

01:06.540 --> 01:09.360
Either the payment succeeded or the payment has failed.

01:09.360 --> 01:12.630
And then we can update the order status accordingly.

01:12.660 --> 01:18.120
Now, because we're running everything locally on our developer machine, our application is not out

01:18.120 --> 01:19.350
there on the internet.

01:19.350 --> 01:25.500
So how could stripe directly notify our application running on our development machine when our application

01:25.500 --> 01:26.460
is not on the internet?

01:26.460 --> 01:30.240
Well, we'll need to use a tool from stripe to help us test that.

01:30.240 --> 01:33.780
And we can use the stripe command line interface to do so.

01:33.780 --> 01:35.880
So that's what's coming up in this section.

01:35.880 --> 01:37.320
And let's begin.
