Test Setup Failed
Branch development (80c362)
by Ashutosh
14:59
created
app/Http/Controllers/Front/ClientController.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -177,11 +177,13 @@
 block discarded – undo
177 177
 
178 178
                                 //if product has Update expiry date ie subscription is generated
179 179
                                 if ($updateEndDate) {
180
-                                    if ($downloadPermission['allowDownloadTillExpiry'] == 1) {//Perpetual download till expiry permission selected
180
+                                    if ($downloadPermission['allowDownloadTillExpiry'] == 1) {
181
+//Perpetual download till expiry permission selected
181 182
                                         $getDownload = $this->whenDownloadTillExpiry($updateEndDate, $productid, $versions, $clientid, $invoiceid);
182 183
 
183 184
                                         return $getDownload;
184
-                                    } elseif ($downloadPermission['allowDownloadTillExpiry'] == 0) {//When download retires after subscription
185
+                                    } elseif ($downloadPermission['allowDownloadTillExpiry'] == 0) {
186
+//When download retires after subscription
185 187
                                         $getDownload = $this->whenDownloadExpiresAfterExpiry($countExpiry, $countVersions, $updateEndDate, $productid, $versions, $clientid, $invoiceid);
186 188
 
187 189
                                         return $getDownload;
Please login to merge, or discard this patch.
app/Http/Controllers/License/LicenseController.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,7 +84,8 @@  discard block
 block discarded – undo
84 84
             $getProductId = $this->postCurl($url, "api_key_secret=$api_key_secret&api_function=search
85 85
             &search_type=product&search_keyword=$product_sku");
86 86
             $details = json_decode($getProductId);
87
-            if ($details->api_error_detected == 0 && is_array($details->page_message)) {//This is not true if Product_sku is updated
87
+            if ($details->api_error_detected == 0 && is_array($details->page_message)) {
88
+//This is not true if Product_sku is updated
88 89
                 $productId = $details->page_message[0]->product_id;
89 90
             }
90 91
 
@@ -120,7 +121,8 @@  discard block
 block discarded – undo
120 121
       &search_type=client&search_keyword=$email");
121 122
 
122 123
         $details = json_decode($getUserId);
123
-        if ($details->api_error_detected == 0 && is_array($details->page_message)) {//This is not true if email is updated
124
+        if ($details->api_error_detected == 0 && is_array($details->page_message)) {
125
+//This is not true if email is updated
124 126
             $userId = $details->page_message[0]->client_id;
125 127
         }
126 128
 
Please login to merge, or discard this patch.
app/Http/Controllers/Order/BaseInvoiceController.php 1 patch
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,7 +28,8 @@  discard block
 block discarded – undo
28 28
         $i_gst = $user_state->i_gst;
29 29
         $ut_gst = $user_state->ut_gst;
30 30
         $state_code = $user_state->state_code;
31
-        if ($state_code == $origin_state) {//If user and origin state are same
31
+        if ($state_code == $origin_state) {
32
+//If user and origin state are same
32 33
             $taxClassId = TaxClass::where('name', 'Intra State GST')
33 34
              ->pluck('id')->toArray(); //Get the class Id  of state
34 35
             if ($taxClassId) {
@@ -37,7 +38,8 @@  discard block
 block discarded – undo
37 38
             } else {
38 39
                 $taxes = [0];
39 40
             }
40
-        } elseif ($state_code != $origin_state && $ut_gst == 'NULL') {//If user is from other state
41
+        } elseif ($state_code != $origin_state && $ut_gst == 'NULL') {
42
+//If user is from other state
41 43
             $taxClassId = TaxClass::where('name', 'Inter State GST')
42 44
             ->pluck('id')->toArray(); //Get the class Id  of state
43 45
             if ($taxClassId) {
@@ -46,7 +48,8 @@  discard block
 block discarded – undo
46 48
             } else {
47 49
                 $taxes = [0];
48 50
             }
49
-        } elseif ($state_code != $origin_state && $ut_gst != 'NULL') {//if user from Union Territory
51
+        } elseif ($state_code != $origin_state && $ut_gst != 'NULL') {
52
+//if user from Union Territory
50 53
             $taxClassId = TaxClass::where('name', 'Union Territory GST')
51 54
             ->pluck('id')->toArray(); //Get the class Id  of state
52 55
             if ($taxClassId) {
@@ -71,13 +74,15 @@  discard block
 block discarded – undo
71 74
         ->pluck('tax_classes_id')->first();
72 75
         $value = '';
73 76
         $rate = '';
74
-        if ($taxClassId) { //if state equals the user State
77
+        if ($taxClassId) {
78
+//if state equals the user State
75 79
             $taxes = $cartController->getTaxByPriority($taxClassId);
76 80
 
77 81
             // $taxes = $this->cartController::getTaxByPriority($taxClassId);
78 82
             $value = $cartController->getValueForOthers($productid, $taxClassId, $taxes);
79 83
             $rate = $value;
80
-        } else {//if Tax is selected for Any State Any Country
84
+        } else {
85
+//if Tax is selected for Any State Any Country
81 86
             $taxClassId = Tax::where('country', '')->where('state', 'Any State')->pluck('tax_classes_id')->first();
82 87
             if ($taxClassId) {
83 88
                 $taxes = $cartController->getTaxByPriority($taxClassId);
@@ -228,7 +233,8 @@  discard block
 block discarded – undo
228 233
     {
229 234
         $code = '';
230 235
         $codevalue = '';
231
-        if (\Session::has('code')) {//If coupon code is applied get it here from Session
236
+        if (\Session::has('code')) {
237
+//If coupon code is applied get it here from Session
232 238
             $code = \Session::get('code');
233 239
             $codevalue = \Session::get('codevalue');
234 240
         }
Please login to merge, or discard this patch.
app/Http/Middleware/Admin.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,8 @@
 block discarded – undo
47 47
             if ($url) {
48 48
                 $content = \Cart::getContent();
49 49
                 $currency = (\Session::get('currency'));
50
-                if (\Auth::user()->currency != $currency) {//If user currency is not equal to the cart currency then redirect to default url and clear his cart items and let the customer add the Product again so that the tax could be calculated properly
50
+                if (\Auth::user()->currency != $currency) {
51
+//If user currency is not equal to the cart currency then redirect to default url and clear his cart items and let the customer add the Product again so that the tax could be calculated properly
51 52
                     foreach ($content as $key => $item) {
52 53
                         $id = $item->id;
53 54
                         Cart::remove($id);
Please login to merge, or discard this patch.
app/Http/Controllers/Product/ExtendedBaseProductController.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,8 @@
 block discarded – undo
76 76
             $file_upload = ProductUpload::find($id);
77 77
             $file_upload->where('id', $id)->update(['title'=>$request->input('title'), 'description'=>$request->input('description'), 'version'=> $request->input('version')]);
78 78
             $autoUpdateStatus = StatusSetting::pluck('update_settings')->first();
79
-            if ($autoUpdateStatus == 1) { //If License Setting Status is on,Add Product to the AutoUpdate Script
79
+            if ($autoUpdateStatus == 1) {
80
+//If License Setting Status is on,Add Product to the AutoUpdate Script
80 81
                 $productSku = $file_upload->product->product_sku;
81 82
                 $updateClassObj = new \App\Http\Controllers\AutoUpdate\AutoUpdateController();
82 83
                 $addProductToAutoUpdate = $updateClassObj->editVersion($request->input('version'), $productSku);
Please login to merge, or discard this patch.
app/Http/Controllers/RazorpayController.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,8 @@
 block discarded – undo
49 49
         $rzp_key = ApiKey::where('id', 1)->value('rzp_key');
50 50
         $rzp_secret = ApiKey::where('id', 1)->value('rzp_secret');
51 51
         $invoice = Invoice::where('id', $invoice)->first();
52
-        if (count($input) && ! empty($input['razorpay_payment_id'])) { //Verify Razorpay Payment Id and Signature
52
+        if (count($input) && ! empty($input['razorpay_payment_id'])) {
53
+//Verify Razorpay Payment Id and Signature
53 54
 
54 55
             //Fetch payment information by razorpay_payment_id
55 56
             try {
Please login to merge, or discard this patch.
app/Http/Controllers/User/AdminOrderInvoiceController.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,8 @@
 block discarded – undo
124 124
                         })
125 125
                         ->addColumn('number', function ($model) {
126 126
                             $orderLink = '<a href='.url('orders/'.$model->id).'>'.$model->number.'</a>';
127
-                            if ($model->subscription_updated_at) {//For few older clients subscription was not generated, so no updated_at column exists
127
+                            if ($model->subscription_updated_at) {
128
+//For few older clients subscription was not generated, so no updated_at column exists
128 129
                                 $orderLink = '<a href='.url('orders/'.$model->id).'>'.$model->number.'</a>'.installationStatusLabel($model->subscription_updated_at, $model->subscription_created_at);
129 130
                             }
130 131
 
Please login to merge, or discard this patch.
app/Http/Controllers/Google2FAController.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -214,7 +214,8 @@
 block discarded – undo
214 214
         try {
215 215
             $userId = $request->session()->pull('2fa:user:id');
216 216
             $this->user = User::findorFail($userId);
217
-            if ($this->user->code_usage_count == 1) {//If backup code is used already
217
+            if ($this->user->code_usage_count == 1) {
218
+//If backup code is used already
218 219
                 throw new \Exception('This code is already used once. Please use Authenticator app to enter the code or contact admin for disabling 2FA for your account.');
219 220
             }
220 221
             $rec_code = $request->input('rec_code');
Please login to merge, or discard this patch.
app/Http/Controllers/Front/CheckoutController.php 1 patch
Braces   +18 added lines, -9 removed lines patch added patch discarded remove patch
@@ -82,7 +82,8 @@  discard block
 block discarded – undo
82 82
      */
83 83
     public function checkoutForm(Request $request)
84 84
     {
85
-        if (! \Auth::user()) {//If User is not Logged in then send him to login Page
85
+        if (! \Auth::user()) {
86
+//If User is not Logged in then send him to login Page
86 87
             $url = $request->segments(); //The requested url (chekout).Save it in Session
87 88
             \Session::put('session-url', $url[0]);
88 89
             $content = Cart::getContent();
@@ -97,7 +98,8 @@  discard block
 block discarded – undo
97 98
             return redirect('login')->with('fails', 'Please login');
98 99
         }
99 100
 
100
-        if (\Cart::isEmpty()) {//During renewal when payment fails due to some reason
101
+        if (\Cart::isEmpty()) {
102
+//During renewal when payment fails due to some reason
101 103
             $invoice = \Session::get('invoice');
102 104
             if ($invoice && \Session::has('fails')) {
103 105
                 return redirect('paynow/'.$invoice->id)->with('fails', 'Payment cannot be processed. Please try the other gateway.');
@@ -110,7 +112,8 @@  discard block
 block discarded – undo
110 112
         $content = Cart::getContent();
111 113
         try {
112 114
             $domain = $request->input('domain');
113
-            if ($domain) {//Store the Domain  in session when user Logged In
115
+            if ($domain) {
116
+//Store the Domain  in session when user Logged In
114 117
                 foreach ($domain as $key => $value) {
115 118
                     \Session::put('domain'.$key, $value);
116 119
                 }
@@ -135,7 +138,8 @@  discard block
 block discarded – undo
135 138
     public function getAttributes($content)
136 139
     {
137 140
         try {
138
-            if (count($content) > 0) {//after ProductPurchase this is not true as cart is cleared
141
+            if (count($content) > 0) {
142
+//after ProductPurchase this is not true as cart is cleared
139 143
                 foreach ($content as $item) {
140 144
                     $cart_currency = $item->attributes->currency; //Get the currency of Product in the cart
141 145
                     $currency = \Auth::user()->currency != $cart_currency ? \Auth::user()->currency : $cart_currency; //If User Currency and cart currency are different the currency es set to user currency.
@@ -176,7 +180,8 @@  discard block
 block discarded – undo
176 180
             if ($invoice->user_id != \Auth::user()->id) {
177 181
                 throw new \Exception('Cannot initiate payment. Invalid modification of data');
178 182
             }
179
-            if (count($invoice->payment()->get())) {//If partial payment is made
183
+            if (count($invoice->payment()->get())) {
184
+//If partial payment is made
180 185
                 $paid = array_sum($invoice->payment()->pluck('amount')->toArray());
181 186
                 $invoice->grand_total = $invoice->grand_total - $paid;
182 187
             }
@@ -215,10 +220,12 @@  discard block
 block discarded – undo
215 220
             $paynow = $this->checkregularPaymentOrRenewal($request->input('invoice_id'));
216 221
             $cost = $request->input('cost');
217 222
             $state = $this->getState();
218
-            if ($paynow === false) {//When regular payment
223
+            if ($paynow === false) {
224
+//When regular payment
219 225
                 $invoice = $invoice_controller->generateInvoice();
220 226
                 $amount = intval(Cart::getSubTotal());
221
-                if ($amount) {//If payment is for paid product
227
+                if ($amount) {
228
+//If payment is for paid product
222 229
                     \Event::dispatch(new \App\Events\PaymentGateway(['request' => $request, 'invoice' => $invoice]));
223 230
                 } else {
224 231
                     $date = getDateHtml($invoice->date);
@@ -232,11 +239,13 @@  discard block
 block discarded – undo
232 239
 
233 240
                     return redirect('checkout')->with('success', $url);
234 241
                 }
235
-            } else {//When renewal, pending payments
242
+            } else {
243
+//When renewal, pending payments
236 244
                 $invoiceid = $request->input('invoice_id');
237 245
                 $invoice = $this->invoice->find($invoiceid);
238 246
                 $amount = intval($invoice->grand_total);
239
-                if ($amount) {//If payment is for paid product
247
+                if ($amount) {
248
+//If payment is for paid product
240 249
                     \Event::dispatch(new \App\Events\PaymentGateway(['request' => $request, 'invoice' => $invoice]));
241 250
                 } else {
242 251
                     $control = new \App\Http\Controllers\Order\RenewController();
Please login to merge, or discard this patch.