1 00:00:00,840 --> 00:00:07,500 So here what I'm going to do is that I'm going to store the order in in the in the session or we can 2 00:00:07,500 --> 00:00:07,890 pass it. 3 00:00:07,890 --> 00:00:09,960 But I think in the session would be better. 4 00:00:09,960 --> 00:00:12,180 I'm going to say session. 5 00:00:13,410 --> 00:00:14,030 Event. 6 00:00:15,960 --> 00:00:21,360 Order underscore it is equal to order 80. 7 00:00:24,120 --> 00:00:31,920 And then in the basement, in the pavement here, we need to do what we need to do is that in case the 8 00:00:31,920 --> 00:00:37,980 user came from the order details, we can keep up and then order. 9 00:00:39,720 --> 00:00:43,740 Order I.D. would be equal to. 10 00:00:46,220 --> 00:00:46,810 Lost. 11 00:00:49,220 --> 00:00:49,930 Order 80. 12 00:00:55,580 --> 00:01:01,820 And if you user came from the from the cart, what we need to do is that we need to do the same thing 13 00:01:01,820 --> 00:01:02,600 when this time. 14 00:01:05,150 --> 00:01:11,390 The order and order, it is going to be equal to session order 80. 15 00:01:13,010 --> 00:01:13,640 Session. 16 00:01:19,590 --> 00:01:20,280 Ordering. 17 00:01:26,820 --> 00:01:28,380 I mean, you don't forget the semicolon. 18 00:01:29,520 --> 00:01:29,890 That's it. 19 00:01:29,910 --> 00:01:33,630 Now we need to pass the order in, so we have to pass the order in. 20 00:01:34,470 --> 00:01:35,520 And that's it. 21 00:01:35,550 --> 00:01:39,720 Now we need to hit an over to the complete payment. 22 00:01:40,680 --> 00:01:51,930 So I'm going to create now a complete payment that would be here in this file view file, complete underscore 23 00:01:53,100 --> 00:01:53,850 payment. 24 00:01:54,920 --> 00:01:55,730 Not BHP. 25 00:01:56,120 --> 00:02:01,040 I think the complete theme that BHP, what we need to do is that we need to do two things. 26 00:02:01,430 --> 00:02:02,690 We need to change the order. 27 00:02:03,470 --> 00:02:03,980 We need to. 28 00:02:04,190 --> 00:02:05,480 Let me add a comment. 29 00:02:06,200 --> 00:02:06,800 Change. 30 00:02:08,180 --> 00:02:08,780 Order. 31 00:02:09,440 --> 00:02:10,100 Status. 32 00:02:11,410 --> 00:02:12,900 To be. 33 00:02:15,160 --> 00:02:22,670 And the second thing is to store payment and full payment and in database. 34 00:02:22,690 --> 00:02:24,580 That's it's very, very, very simple. 35 00:02:24,880 --> 00:02:30,280 And then just go to user account. 36 00:02:32,450 --> 00:02:33,080 Very simple. 37 00:02:33,380 --> 00:02:43,400 So in order to do all of all of these first here in the payment, we have the the transaction ID and 38 00:02:43,970 --> 00:02:48,200 transaction ID and the order ID. 39 00:02:48,290 --> 00:02:57,170 So I'm going to again go to, by the way, we need the user I.D., but the user ID is stored in the 40 00:02:58,190 --> 00:03:01,130 the user ID is stored in decision, so we don't have to worry about it. 41 00:03:02,060 --> 00:03:08,450 So what I'm going to do is that I'm going to go to the complete payment and then I'm going to say if. 42 00:03:10,140 --> 00:03:10,560 If. 43 00:03:11,910 --> 00:03:13,110 Is said. 44 00:03:14,710 --> 00:03:15,630 Is said. 45 00:03:16,600 --> 00:03:17,140 Get. 46 00:03:19,430 --> 00:03:19,970 Get. 47 00:03:21,920 --> 00:03:22,970 And then transaction. 48 00:03:24,840 --> 00:03:27,600 Transaction ID and. 49 00:03:29,430 --> 00:03:30,090 And. 50 00:03:31,790 --> 00:03:33,200 Is said. 51 00:03:34,240 --> 00:03:35,860 Order I.D. and get your I.D.. 52 00:03:43,110 --> 00:03:43,770 Order in. 53 00:03:45,460 --> 00:03:50,090 Then we need you to complete and do everything. 54 00:03:50,100 --> 00:03:56,700 So here are the comments and sign this statement here and then here. 55 00:03:58,530 --> 00:03:59,340 And then here. 56 00:04:03,130 --> 00:04:04,240 Eliminating movies. 57 00:04:05,870 --> 00:04:07,340 And also remove it from here. 58 00:04:10,290 --> 00:04:13,050 So the first thing that we need to do is that we need to change the order status. 59 00:04:13,500 --> 00:04:16,890 So to change the order status, we need to access the order table. 60 00:04:18,200 --> 00:04:22,250 So I'm going to copy accounts from the police order because we already have them. 61 00:04:22,260 --> 00:04:24,830 But first we need to connect to the database and start a session. 62 00:04:25,190 --> 00:04:28,430 So I'm going to copy these two and then I'm going to be sitting at the top here. 63 00:04:29,030 --> 00:04:32,540 We need to say session, start and include connection. 64 00:04:35,960 --> 00:04:37,190 And then we need to. 65 00:04:39,820 --> 00:04:40,410 Update. 66 00:04:40,420 --> 00:04:41,350 So to update. 67 00:04:43,360 --> 00:04:43,840 We need. 68 00:04:43,840 --> 00:04:50,110 We have I think we have a code that updates in the account, remember. 69 00:04:51,370 --> 00:04:52,000 In that account. 70 00:04:52,000 --> 00:04:54,790 We have a code that we already used here. 71 00:04:57,090 --> 00:04:58,020 Here this update. 72 00:04:58,800 --> 00:05:00,300 So I'm going to copy this. 73 00:05:00,600 --> 00:05:05,820 I'm going to copy this, these two lines, and then I'm going to pasted a paste them here. 74 00:05:08,330 --> 00:05:10,250 And then we need to say connection. 75 00:05:12,170 --> 00:05:16,250 Let me push this, because this must be inside. 76 00:05:19,460 --> 00:05:20,750 Maybe push these. 77 00:05:21,530 --> 00:05:30,500 So here I'm going to say connection, prepare, update orders and then set order status. 78 00:05:34,480 --> 00:05:38,320 I mean, question mark, where are order 80? 79 00:05:38,740 --> 00:05:39,450 Order 80. 80 00:05:41,230 --> 00:05:47,170 So we need to say by interim order status SE and I will order it. 81 00:05:48,130 --> 00:05:49,390 And then we need to say here. 82 00:05:53,510 --> 00:05:54,020 Order. 83 00:05:57,400 --> 00:05:58,090 Status. 84 00:06:03,340 --> 00:06:04,040 An already. 85 00:06:12,370 --> 00:06:13,450 And he order. 86 00:06:16,420 --> 00:06:16,750 I'd. 87 00:06:20,650 --> 00:06:24,340 Is equal to the order it gets. 88 00:06:25,680 --> 00:06:26,250 All right. 89 00:06:36,840 --> 00:06:46,050 And the order, status, order, order underscore status is going to be equal to paint. 90 00:06:46,140 --> 00:06:47,940 At this point, it hasn't been paid. 91 00:06:49,470 --> 00:06:52,770 And this transaction we also need to see from. 92 00:06:54,530 --> 00:06:55,940 Such an ID. 93 00:07:00,980 --> 00:07:05,240 I.D. is equal to your card transaction, maybe. 94 00:07:11,690 --> 00:07:16,100 And here we update, we update this and then we need to say excuse. 95 00:07:16,100 --> 00:07:18,980 Here is the empty excuse. 96 00:07:21,820 --> 00:07:22,870 So this the first step. 97 00:07:23,350 --> 00:07:29,320 The second step is that we need to store the payment info so it is stored in the payment info we need 98 00:07:29,320 --> 00:07:35,070 to say is the empty and then it is the empty one. 99 00:07:35,080 --> 00:07:43,720 Now another, another statement of we need to say gone and then prepare and then insert. 100 00:07:43,720 --> 00:07:48,550 But instead of click and you think this goes from scratch, let me get it from here. 101 00:07:49,210 --> 00:07:50,720 So here we have this insert. 102 00:07:51,370 --> 00:07:54,490 So let me get I think this is shorter. 103 00:07:54,490 --> 00:07:55,480 So I'm going to get this one. 104 00:07:57,930 --> 00:08:01,740 I'm going to give this one and then I'm going to sit here in the. 105 00:08:02,720 --> 00:08:03,740 Complete payment. 106 00:08:08,120 --> 00:08:16,160 And then I'm going to say statement one so is the empty one is equal to is equal to conviction. 107 00:08:16,160 --> 00:08:18,170 Prepare insert into payments. 108 00:08:20,440 --> 00:08:26,480 And then what we want to insert is that we want to insert the order in order underscore it. 109 00:08:27,460 --> 00:08:35,190 And we need to insert the order status, the user I.D. and the transaction item. 110 00:08:41,670 --> 00:08:43,620 The order status is not important here. 111 00:08:44,790 --> 00:08:46,650 The order status is not important by the user. 112 00:08:46,660 --> 00:08:47,700 It is very important. 113 00:08:48,210 --> 00:08:50,790 The order is also very important to the transaction. 114 00:08:50,790 --> 00:08:54,000 It is also important we don't need this. 115 00:08:54,540 --> 00:08:55,710 We don't need any of this. 116 00:08:57,270 --> 00:09:04,320 And we don't actually we don't need the order order status because payments, it means that the obviously 117 00:09:04,530 --> 00:09:07,210 we aren't storing something that hasn't been built. 118 00:09:07,230 --> 00:09:09,240 We are storing only payments. 119 00:09:09,810 --> 00:09:11,760 So I'm going to to you three question marks. 120 00:09:12,210 --> 00:09:12,870 We need the order. 121 00:09:12,870 --> 00:09:20,700 I need the user I.D. and the transaction I.D. And then here we need to say that statements one and then 122 00:09:20,700 --> 00:09:33,900 bind where we need to bind II and we need to bind order ID and user ID user which, which doesn't exist 123 00:09:34,350 --> 00:09:34,570 yet. 124 00:09:34,570 --> 00:09:36,950 This transaction I. 125 00:09:39,650 --> 00:09:40,340 Transaction. 126 00:09:41,420 --> 00:09:43,460 And we need to remove all of these things. 127 00:09:44,600 --> 00:09:45,980 So we need to get the user I.D.. 128 00:09:45,980 --> 00:09:46,730 Where's the user? 129 00:09:46,730 --> 00:09:48,890 I need the user I.D. is in the session. 130 00:09:48,890 --> 00:09:53,330 So I'm going to say user ID is equal to session. 131 00:09:57,520 --> 00:09:58,240 User I.D.. 132 00:10:07,880 --> 00:10:14,270 And then we say here, statement, one statement, one statement, and then excuse. 133 00:10:14,570 --> 00:10:17,180 Finally, we go to user account. 134 00:10:17,180 --> 00:10:21,260 So I'm going to say, hey there and then location. 135 00:10:23,250 --> 00:10:33,450 And then count that HP And then you can pass even a parameter say remember in that count, let me go 136 00:10:33,450 --> 00:10:37,200 to the account in that count we have in the bottom here. 137 00:10:38,800 --> 00:10:39,580 We have. 138 00:10:40,890 --> 00:10:42,720 I think at up not in the bottom. 139 00:10:43,560 --> 00:10:48,750 We have a user name, user email message. 140 00:10:48,780 --> 00:10:51,570 I think our message let's say your message. 141 00:10:53,840 --> 00:10:54,680 The men. 142 00:10:56,830 --> 00:11:04,150 So since all is equal to our payment message. 143 00:11:04,180 --> 00:11:05,140 I'm going to say payment. 144 00:11:06,180 --> 00:11:07,680 Message is equal to. 145 00:11:12,580 --> 00:11:13,120 Beat. 146 00:11:16,990 --> 00:11:19,300 So successfully. 147 00:11:21,150 --> 00:11:27,240 Thanks for your big. 148 00:11:28,650 --> 00:11:29,610 Thanks for your. 149 00:11:30,660 --> 00:11:31,140 Shocking. 150 00:11:33,900 --> 00:11:34,470 With us. 151 00:11:36,240 --> 00:11:36,930 And that's it. 152 00:11:36,960 --> 00:11:44,070 Now we need to clear the payments table in order to be able to continue. 153 00:11:47,130 --> 00:11:48,360 And else. 154 00:11:51,680 --> 00:11:59,810 We need to exit this page and take the user to it and then location. 155 00:12:02,100 --> 00:12:02,940 Index. 156 00:12:04,110 --> 00:12:07,110 That BHP and then exit.