Completed
Push — development ( c72a58...bbb3cb )
by Ashutosh
10:50 queued 12s
created
app/Plugins/Ccavanue/Controllers/ProcessController.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@
 block discarded – undo
148 148
                     $checkout_controller = new \App\Http\Controllers\Front\CheckoutController();
149 149
                     $checkout_controller->checkoutAction($invoice);
150 150
                 } else {
151
-                     $invoice = new \App\Model\Order\Invoice();
151
+                        $invoice = new \App\Model\Order\Invoice();
152 152
                     $invoice = $invoice->findOrFail($invoiceid);
153 153
                     $control->successRenew($invoice);
154 154
                 }
Please login to merge, or discard this patch.
app/Plugins/Ccavanue/views/settings.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
                         <div class="pull-right">
63 63
 
64 64
                             <?php
65
-                            $status=0;
65
+                            $status = 0;
66 66
 
67 67
                             ?>
68 68
                           <!--   <div class="btn-group {{$status == '0' ? 'locked_active unlocked_inactive' : 'locked_inactive unlocked_active'}}" id="toggle_event" style="margin-top:-8px">
Please login to merge, or discard this patch.
app/Plugins/Paypal/routes.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 \Event::listen('App\Events\PaymentGateway', function ($event) {
4
-	$controller = new App\Plugins\Paypal\Controllers\ProcessController();
5
-	echo $controller->PassToPayment($event->para);
4
+    $controller = new App\Plugins\Paypal\Controllers\ProcessController();
5
+    echo $controller->PassToPayment($event->para);
6 6
 });
7 7
 Route::get('payment-gateway/paypal', 'App\Plugins\Paypal\Controllers\SettingsController@Settings');
8 8
 Route::patch('payment-gateway/paypal', 'App\Plugins\Paypal\Controllers\SettingsController@postSettings');
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-\Event::listen('App\Events\PaymentGateway', function ($event) {
3
+\Event::listen('App\Events\PaymentGateway', function($event) {
4 4
 	$controller = new App\Plugins\Paypal\Controllers\ProcessController();
5 5
 	echo $controller->PassToPayment($event->para);
6 6
 });
Please login to merge, or discard this patch.
app/Plugins/Paypal/Controllers/ProcessController.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -198,7 +198,7 @@
 block discarded – undo
198 198
                 $view = $cont->getViewMessageAfterPayment($invoice, $state, $currency);
199 199
                 $status = $view['status'];
200 200
                 $message = $view['message'];
201
-                  \Session::forget('items');
201
+                    \Session::forget('items');
202 202
                     \Session::forget('code');
203 203
                     \Session::forget('codevalue');
204 204
             } else {
Please login to merge, or discard this patch.
app/Plugins/Paypal/Controllers/SettingsController.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,8 @@
 block discarded – undo
50 50
     }
51 51
 
52 52
     public function postSettings(Request $request)
53
-    {dd($request->all());
53
+    {
54
+dd($request->all());
54 55
         $this->validate($request, [
55 56
             'business'    => 'required',
56 57
             'cmd'         => 'required',
Please login to merge, or discard this patch.
app/Plugins/Paypal/views/settings.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
                         <div class="pull-right">
65 65
 
66 66
                             <?php
67
-                            $status=0;
67
+                            $status = 0;
68 68
                             $cont = new \App\Plugins\Paypal\Model\Paypal();
69 69
                             $recentselected = $cont->find(1)->pluck('paypal_url')->first();
70 70
                             ?>
Please login to merge, or discard this patch.
app/Http/Controllers/Front/CheckoutController.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -266,14 +266,14 @@  discard block
 block discarded – undo
266 266
                 }
267 267
             } else {
268 268
                 if ($paynow == false) {//Regular Payment for free Product
269
-                     $action = $this->checkoutAction($invoice);
270
-                 } else {//Renewal Payment for free Product
271
-                     $control = new \App\Http\Controllers\Order\RenewController();
269
+                        $action = $this->checkoutAction($invoice);
270
+                    } else {//Renewal Payment for free Product
271
+                        $control = new \App\Http\Controllers\Order\RenewController();
272 272
                     $control->successRenew($invoice);
273 273
                     $payment = new \App\Http\Controllers\Order\InvoiceController();
274 274
                     $payment->postRazorpayPayment($invoice->id, $invoice->grand_total);
275 275
 
276
-                 }
276
+                    }
277 277
                
278 278
                 // $check_product_category = $this->product($invoiceid);
279 279
                 $url = '';
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
     public function checkregularPaymentOrRenewal($invoiceid)
304 304
     {
305 305
         $paynow = false;
306
-         if ($invoiceid) {
306
+            if ($invoiceid) {
307 307
             $paynow = true;
308 308
         }
309 309
         return $paynow;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -234,7 +234,7 @@
 block discarded – undo
234 234
             if (Cart::getSubTotal() != 0 || $cost > 0) {
235 235
                 $this->validate($request, [
236 236
                     'payment_gateway'=> 'required',
237
-                    ],[
237
+                    ], [
238 238
                         'payment_gateway.required'=> 'Please Select a Payment Gateway',
239 239
                     ]);
240 240
                 if ($payment_method == 'razorpay') {
Please login to merge, or discard this patch.
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -80,7 +80,8 @@  discard block
 block discarded – undo
80 80
      */
81 81
     public function checkoutForm(Request $request)
82 82
     {
83
-        if (!\Auth::user()) {//If User is not Logged in then send him to login Page
83
+        if (!\Auth::user()) {
84
+//If User is not Logged in then send him to login Page
84 85
             $url = $request->segments(); //The requested url (chekout).Save it in Session
85 86
             \Session::put('session-url', $url[0]);
86 87
             $content = Cart::getContent();
@@ -106,7 +107,8 @@  discard block
 block discarded – undo
106 107
 
107 108
         try {
108 109
             $domain = $request->input('domain');
109
-            if ($domain) {//Store the Domain  in session when user Logged In
110
+            if ($domain) {
111
+//Store the Domain  in session when user Logged In
110 112
                 foreach ($domain as $key => $value) {
111 113
                     \Session::put('domain'.$key, $value);
112 114
                 }
@@ -131,7 +133,8 @@  discard block
 block discarded – undo
131 133
     public function getAttributes($content)
132 134
     {
133 135
         try {
134
-            if (count($content) > 0) {//after ProductPurchase this is not true as cart is cleared
136
+            if (count($content) > 0) {
137
+//after ProductPurchase this is not true as cart is cleared
135 138
                 foreach ($content as $key => $item) {
136 139
                     $attributes[] = $item->attributes;
137 140
                     $cart_currency = $attributes[0]['currency']['currency']; //Get the currency of Product in the cart
@@ -265,9 +268,11 @@  discard block
 block discarded – undo
265 268
                     \Event::fire(new \App\Events\PaymentGateway(['request' => $request, 'cart' => Cart::getContent(), 'order' => $invoice]));
266 269
                 }
267 270
             } else {
268
-                if ($paynow == false) {//Regular Payment for free Product
271
+                if ($paynow == false) {
272
+//Regular Payment for free Product
269 273
                      $action = $this->checkoutAction($invoice);
270
-                 } else {//Renewal Payment for free Product
274
+                 } else {
275
+//Renewal Payment for free Product
271 276
                      $control = new \App\Http\Controllers\Order\RenewController();
272 277
                     $control->successRenew($invoice);
273 278
                     $payment = new \App\Http\Controllers\Order\InvoiceController();
Please login to merge, or discard this patch.
app/Http/Controllers/Front/PageController.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
                                  style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
78 78
                         })
79 79
 
80
-                          ->rawColumns(['checkbox', 'name', 'url',  'created_at', 'action'])
80
+                            ->rawColumns(['checkbox', 'name', 'url',  'created_at', 'action'])
81 81
                         ->make(true);
82 82
         // ->searchColumns('name', 'content')
83 83
                         // ->orderColumns('name')
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         try {
130 130
             $url = $request->input('url');
131 131
             if ($request->input('type') =='contactus') {
132
-               $url = url('/contact-us');
132
+                $url = url('/contact-us');
133 133
             }
134 134
             $this->page->name = $request->input('name');
135 135
             $this->page->publish = $request->input('publish');
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -49,17 +49,17 @@  discard block
 block discarded – undo
49 49
     public function getPages()
50 50
     {
51 51
         return \DataTables::of($this->page->get())
52
-                        ->addColumn('checkbox', function ($model) {
52
+                        ->addColumn('checkbox', function($model) {
53 53
                             return "<input type='checkbox' class='page_checkbox' 
54 54
                             value=".$model->id.' name=select[] id=check>';
55 55
                         })
56
-                        ->addColumn('name', function ($model) {
56
+                        ->addColumn('name', function($model) {
57 57
                             return ucfirst($model->name);
58 58
                         })
59
-                        ->addColumn('url', function ($model) {
59
+                        ->addColumn('url', function($model) {
60 60
                             return $model->url;
61 61
                         })
62
-                        ->addColumn('created_at', function ($model) {
62
+                        ->addColumn('created_at', function($model) {
63 63
                             $created = $model->created_at;
64 64
                             if ($created) {
65 65
                                 $date1 = new \DateTime($created);
@@ -71,13 +71,13 @@  discard block
 block discarded – undo
71 71
                             return $createdate;
72 72
                         })
73 73
 
74
-                        ->addColumn('action', function ($model) {
74
+                        ->addColumn('action', function($model) {
75 75
                             return '<a href='.url('pages/'.$model->id.'/edit')
76 76
                             ." class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit'
77 77
                                  style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
78 78
                         })
79 79
 
80
-                          ->rawColumns(['checkbox', 'name', 'url',  'created_at', 'action'])
80
+                          ->rawColumns(['checkbox', 'name', 'url', 'created_at', 'action'])
81 81
                         ->make(true);
82 82
         // ->searchColumns('name', 'content')
83 83
                         // ->orderColumns('name')
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
             $selectedParent = $this->page->where('id', $id)->pluck('parent_page_id')->toArray();
110 110
             $parentName = $this->page->where('id', $selectedParent)->pluck('name', 'id')->toArray();
111 111
 
112
-            return view('themes.default1.front.page.edit', compact('parents', 'page', 'default', 'selectedDefault', 'publishingDate','selectedParent',
112
+            return view('themes.default1.front.page.edit', compact('parents', 'page', 'default', 'selectedDefault', 'publishingDate', 'selectedParent',
113 113
                 'parentName'));
114 114
         } catch (\Exception $ex) {
115 115
             return redirect()->back()->with('fails', $ex->getMessage());
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
         try {
130 130
             $url = $request->input('url');
131
-            if ($request->input('type') =='contactus') {
131
+            if ($request->input('type') == 'contactus') {
132 132
                $url = url('/contact-us');
133 133
             }
134 134
             $this->page->name = $request->input('name');
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
         ]);
162 162
 
163 163
         try {
164
-            if($request->input('default_page_id') != '') {
164
+            if ($request->input('default_page_id') != '') {
165 165
             $page = $this->page->where('id', $id)->first();
166 166
             $page->fill($request->except('created_at'))->save();
167 167
             $date = \DateTime::createFromFormat('d/m/Y', $request->input('created_at'));
Please login to merge, or discard this patch.
app/Http/Controllers/Order/InvoiceController.php 1 patch
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -130,12 +130,12 @@  discard block
 block discarded – undo
130 130
         $query = $this->advanceSearch($name, $invoice_no, $currency, $status, $from, $till);
131 131
 
132 132
         return \DataTables::of($query->take(100))
133
-         ->setTotalRecords($query->count())
133
+            ->setTotalRecords($query->count())
134 134
 
135
-         ->addColumn('checkbox', function ($model) {
136
-             return "<input type='checkbox' class='invoice_checkbox' 
135
+            ->addColumn('checkbox', function ($model) {
136
+                return "<input type='checkbox' class='invoice_checkbox' 
137 137
                             value=".$model->id.' name=select[] id=check>';
138
-         })
138
+            })
139 139
                         ->addColumn('user_id', function ($model) {
140 140
                             $first = $this->user->where('id', $model->user_id)->first()->first_name;
141 141
                             $last = $this->user->where('id', $model->user_id)->first()->last_name;
@@ -143,9 +143,9 @@  discard block
 block discarded – undo
143 143
 
144 144
                             return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'</a>';
145 145
                         })
146
-                         ->addColumn('number', function ($model) {
147
-                             return ucfirst($model->number);
148
-                         })
146
+                            ->addColumn('number', function ($model) {
147
+                                return ucfirst($model->number);
148
+                            })
149 149
 
150 150
                         ->addColumn('date', function ($model) {
151 151
                             $date = ($model->created_at);
@@ -153,12 +153,12 @@  discard block
 block discarded – undo
153 153
                             return $date;
154 154
                             // return "<span style='display:none'>$model->id</span>".$date->format('l, F j, Y H:m');
155 155
                         })
156
-                         ->addColumn('grand_total', function ($model) {
157
-                             return $model->grand_total;
158
-                         })
159
-                          ->addColumn('status', function ($model) {
160
-                              return ucfirst($model->status);
161
-                          })
156
+                            ->addColumn('grand_total', function ($model) {
157
+                                return $model->grand_total;
158
+                            })
159
+                            ->addColumn('status', function ($model) {
160
+                                return ucfirst($model->status);
161
+                            })
162 162
 
163 163
                         ->addColumn('action', function ($model) {
164 164
                             $action = '';
@@ -176,30 +176,30 @@  discard block
 block discarded – undo
176 176
                             style='color:white;'> </i>&nbsp;&nbsp;View</a>"
177 177
                                     ."   $action";
178 178
                         })
179
-                         ->filterColumn('user_id', function ($query, $keyword) {
180
-                             $sql = 'first_name like ?';
181
-                             $query->whereRaw($sql, ["%{$keyword}%"]);
182
-                         })
179
+                            ->filterColumn('user_id', function ($query, $keyword) {
180
+                                $sql = 'first_name like ?';
181
+                                $query->whereRaw($sql, ["%{$keyword}%"]);
182
+                            })
183 183
 
184
-                          ->filterColumn('status', function ($query, $keyword) {
185
-                              $sql = 'status like ?';
186
-                              $query->whereRaw($sql, ["%{$keyword}%"]);
187
-                          })
184
+                            ->filterColumn('status', function ($query, $keyword) {
185
+                                $sql = 'status like ?';
186
+                                $query->whereRaw($sql, ["%{$keyword}%"]);
187
+                            })
188 188
 
189 189
                         ->filterColumn('number', function ($query, $keyword) {
190 190
                             $sql = 'number like ?';
191 191
                             $query->whereRaw($sql, ["%{$keyword}%"]);
192 192
                         })
193
-                         ->filterColumn('grand_total', function ($query, $keyword) {
194
-                             $sql = 'grand_total like ?';
195
-                             $query->whereRaw($sql, ["%{$keyword}%"]);
196
-                         })
197
-                          ->filterColumn('date', function ($query, $keyword) {
198
-                              $sql = 'date like ?';
199
-                              $query->whereRaw($sql, ["%{$keyword}%"]);
200
-                          })
201
-
202
-                         ->rawColumns(['checkbox', 'user_id', 'number', 'date', 'grand_total', 'status', 'action'])
193
+                            ->filterColumn('grand_total', function ($query, $keyword) {
194
+                                $sql = 'grand_total like ?';
195
+                                $query->whereRaw($sql, ["%{$keyword}%"]);
196
+                            })
197
+                            ->filterColumn('date', function ($query, $keyword) {
198
+                                $sql = 'date like ?';
199
+                                $query->whereRaw($sql, ["%{$keyword}%"]);
200
+                            })
201
+
202
+                            ->rawColumns(['checkbox', 'user_id', 'number', 'date', 'grand_total', 'status', 'action'])
203 203
                         ->make(true);
204 204
     }
205 205
 
@@ -292,8 +292,8 @@  discard block
 block discarded – undo
292 292
                 $attributes[] = $item->attributes;
293 293
             }
294 294
             $invoice = $this->invoice->create(['user_id' => $user_id, 'number' => $number,
295
-             'date'                                      => $date, 'discount'=>$codevalue, 'grand_total' => $grand_total, 'coupon_code'=>$code, 'status' => 'pending',
296
-             'currency'                                  => \Auth::user()->currency, ]);
295
+                'date'                                      => $date, 'discount'=>$codevalue, 'grand_total' => $grand_total, 'coupon_code'=>$code, 'status' => 'pending',
296
+                'currency'                                  => \Auth::user()->currency, ]);
297 297
             
298 298
             foreach (\Cart::getContent() as $cart) {
299 299
                 $this->createInvoiceItems($invoice->id, $cart, $codevalue);
@@ -414,11 +414,11 @@  discard block
 block discarded – undo
414 414
             $grand_total = \App\Http\Controllers\Front\CartController::rounding($grand_total);
415 415
 
416 416
             $invoice = Invoice::create(['user_id' => $user_id, 'number' => $number, 'date' => $date,
417
-             'coupon_code'                        => $code, 'discount'=>$codeValue,
417
+                'coupon_code'                        => $code, 'discount'=>$codeValue,
418 418
                 'grand_total'                     => $grand_total,  'currency'  => $currency, 'status' => $status, 'description' => $description, ]);
419 419
 
420 420
             $items = $this->createInvoiceItemsByAdmin($invoice->id, $productid,
421
-             $code, $total, $currency, $qty, $agents, $plan, $user_id, $tax_name, $tax_rate);
421
+                $code, $total, $currency, $qty, $agents, $plan, $user_id, $tax_name, $tax_rate);
422 422
             $result = $this->getMessage($items, $user_id);
423 423
         } catch (\Exception $ex) {
424 424
             app('log')->info($ex->getMessage());
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
                     } elseif ($this->tax_option->tax_enable == 0) {//if tax_enable is 0
497 497
 
498 498
                         $taxClassId = Tax::where('country', '')->where('state', 'Any State')
499
-                     ->pluck('tax_classes_id')->first(); //In case of India when
499
+                        ->pluck('tax_classes_id')->first(); //In case of India when
500 500
                         //other tax is available and tax is not enabled
501 501
                         if ($taxClassId) {
502 502
                             $rate = $this->getTotalRate($taxClassId, $productid, $taxs);
@@ -565,10 +565,10 @@  discard block
 block discarded – undo
565 565
         foreach ($taxes as $key => $tax) {
566 566
             if ($taxes[0]) {
567 567
                 $tax_attribute[$key] = ['name' => $tax->name, 'name1' => $name1,
568
-                 'name2'                       => $name2, 'name3' => $name3, 'name4' => $name4,
569
-                 'rate'                        => $value, 'rate1'=>$c_gst, 'rate2'=>$s_gst,
570
-                 'rate3'                       => $i_gst, 'rate4'=>$ut_gst, 'state'=>$state_code,
571
-                  'origin_state'               => $origin_state, ];
568
+                    'name2'                       => $name2, 'name3' => $name3, 'name4' => $name4,
569
+                    'rate'                        => $value, 'rate1'=>$c_gst, 'rate2'=>$s_gst,
570
+                    'rate3'                       => $i_gst, 'rate4'=>$ut_gst, 'state'=>$state_code,
571
+                    'origin_state'               => $origin_state, ];
572 572
 
573 573
                 $rate = $tax->rate;
574 574
 
Please login to merge, or discard this patch.