@@ -1,6 +1,6 @@ |
||
| 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 | }); |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | style='color:white;'> </i> 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') |
@@ -49,17 +49,17 @@ discard block |
||
| 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 |
||
| 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> 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 |
||
| 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()); |
@@ -80,7 +80,8 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
@@ -266,9 +269,11 @@ discard block |
||
| 266 | 269 | \Event::fire(new \App\Events\PaymentGateway(['request' => $request, 'cart' => Cart::getContent(), 'order' => $invoice])); |
| 267 | 270 | } |
| 268 | 271 | } else { |
| 269 | - if ($paynow == false) {//Regular Payment for free Product |
|
| 272 | + if ($paynow == false) { |
|
| 273 | +//Regular Payment for free Product |
|
| 270 | 274 | $action = $this->checkoutAction($invoice); |
| 271 | - } else {//Renewal Payment for free Product |
|
| 275 | + } else { |
|
| 276 | +//Renewal Payment for free Product |
|
| 272 | 277 | $control = new \App\Http\Controllers\Order\RenewController(); |
| 273 | 278 | $control->successRenew($invoice); |
| 274 | 279 | $payment = new \App\Http\Controllers\Order\InvoiceController(); |