Passed
Pull Request — master (#47)
by pablo
04:23
created
controllers/notifyController.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -199,8 +199,8 @@
 block discarded – undo
199 199
         $this->woocommerceOrder->save();
200 200
         if ( ! $this->woocommerceOrder->has_status($isOrderStatusValid)) { // TO CONFIRM
201 201
             $logMessage = "WARNING checkMerchantOrderStatus." . " Merchant order id:" . $this->woocommerceOrder->get_id() . " Merchant order status:"
202
-                          . $this->woocommerceOrder->get_status() . " Pagantis order id:" . $this->pagantisOrder->getStatus()
203
-                          . " Pagantis order status:" . $this->pagantisOrder->getId();
202
+                            . $this->woocommerceOrder->get_status() . " Pagantis order id:" . $this->pagantisOrder->getStatus()
203
+                            . " Pagantis order status:" . $this->pagantisOrder->getId();
204 204
 
205 205
             $this->insertLog(null, $logMessage);
206 206
             $this->woocommerceOrder->add_order_note($logMessage);
Please login to merge, or discard this patch.
controllers/paymentController.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -196,15 +196,15 @@  discard block
 block discarded – undo
196 196
                         ->setAddress($shippingAddress['address_1'] . " " . $shippingAddress['address_2']);
197 197
             $orderShippingAddress = new Address();
198 198
             $orderShippingAddress->setZipCode($shippingAddress['postcode'])
199
-                                 ->setFullName($shippingAddress['first_name'] . " " . $shippingAddress['last_name'])
200
-                                 ->setCountryCode($shippingAddress['country'] != '' ? strtoupper($shippingAddress['country'])
199
+                                    ->setFullName($shippingAddress['first_name'] . " " . $shippingAddress['last_name'])
200
+                                    ->setCountryCode($shippingAddress['country'] != '' ? strtoupper($shippingAddress['country'])
201 201
                                      : strtoupper($this->language))
202
-                                 ->setCity($shippingAddress['city'])
203
-                                 ->setAddress($shippingAddress['address_1'] . " " . $shippingAddress['address_2'])
204
-                                 ->setFixPhone($shippingAddress['phone'])
205
-                                 ->setMobilePhone($shippingAddress['phone'])
206
-                                 ->setNationalId($national_id)
207
-                                 ->setTaxId($tax_id);
202
+                                    ->setCity($shippingAddress['city'])
203
+                                    ->setAddress($shippingAddress['address_1'] . " " . $shippingAddress['address_2'])
204
+                                    ->setFixPhone($shippingAddress['phone'])
205
+                                    ->setMobilePhone($shippingAddress['phone'])
206
+                                    ->setNationalId($national_id)
207
+                                    ->setTaxId($tax_id);
208 208
             $orderBillingAddress = new Address();
209 209
             $orderBillingAddress->setZipCode($billingAddress['postcode'])
210 210
                                 ->setFullName($billingAddress['first_name'] . " " . $billingAddress['last_name'])
@@ -218,14 +218,14 @@  discard block
 block discarded – undo
218 218
                                 ->setTaxId($tax_id);
219 219
             $orderUser = new User();
220 220
             $orderUser->setAddress($userAddress)
221
-                      ->setFullName($billingAddress['first_name'] . " " . $billingAddress['last_name'])
222
-                      ->setBillingAddress($orderBillingAddress)
223
-                      ->setEmail($billingAddress['email'])
224
-                      ->setFixPhone($billingAddress['phone'])
225
-                      ->setMobilePhone($billingAddress['phone'])
226
-                      ->setShippingAddress($orderShippingAddress)
227
-                      ->setNationalId($national_id)
228
-                      ->setTaxId($tax_id);
221
+                        ->setFullName($billingAddress['first_name'] . " " . $billingAddress['last_name'])
222
+                        ->setBillingAddress($orderBillingAddress)
223
+                        ->setEmail($billingAddress['email'])
224
+                        ->setFixPhone($billingAddress['phone'])
225
+                        ->setMobilePhone($billingAddress['phone'])
226
+                        ->setShippingAddress($orderShippingAddress)
227
+                        ->setNationalId($national_id)
228
+                        ->setTaxId($tax_id);
229 229
 
230 230
             $previousOrders = $this->getOrders($order->get_user(), $billingAddress['email']);
231 231
             foreach ($previousOrders as $previousOrder) {
@@ -277,9 +277,9 @@  discard block
 block discarded – undo
277 277
 
278 278
             $orderShoppingCart = new ShoppingCart();
279 279
             $orderShoppingCart->setDetails($details)
280
-                              ->setOrderReference($order->get_id())
281
-                              ->setPromotedAmount($promotedAmount)
282
-                              ->setTotalAmount(intval(strval(100 * $order->total)));
280
+                                ->setOrderReference($order->get_id())
281
+                                ->setPromotedAmount($promotedAmount)
282
+                                ->setTotalAmount(intval(strval(100 * $order->total)));
283 283
             $orderConfigurationUrls = new Urls();
284 284
             $cancelUrl              = $this->getKoUrl($order);
285 285
             $callback_arg           = array(
@@ -298,10 +298,10 @@  discard block
 block discarded – undo
298 298
             $callback_url_notif           = add_query_arg($callback_arg_notif, home_url('/'));
299 299
 
300 300
             $orderConfigurationUrls->setCancel($cancelUrl)
301
-                                   ->setKo($callback_url_user)
302
-                                   ->setAuthorizedNotificationCallback($callback_url_notif)
303
-                                   ->setRejectedNotificationCallback(null)
304
-                                   ->setOk($callback_url_user);
301
+                                    ->setKo($callback_url_user)
302
+                                    ->setAuthorizedNotificationCallback($callback_url_notif)
303
+                                    ->setRejectedNotificationCallback(null)
304
+                                    ->setOk($callback_url_user);
305 305
             $orderChannel = new Channel();
306 306
             $orderChannel->setAssistedSale(false)->setType(Channel::ONLINE);
307 307
 
@@ -316,9 +316,9 @@  discard block
 block discarded – undo
316 316
 
317 317
             $orderApiClient = new Order();
318 318
             $orderApiClient->setConfiguration($orderConfiguration)
319
-                           ->setMetadata($metadataOrder)
320
-                           ->setShoppingCart($orderShoppingCart)
321
-                           ->setUser($orderUser);
319
+                            ->setMetadata($metadataOrder)
320
+                            ->setShoppingCart($orderShoppingCart)
321
+                            ->setUser($orderUser);
322 322
 
323 323
             if ($this->pagantis_public_key == '' || $this->pagantis_private_key == '') {
324 324
                 throw new \Exception('Public and Secret Key not found');
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
             $returnUrl = $this->getOkUrl($paymentOrder);
382 382
         } else {
383 383
             $returnUrl = $this->getKoUrl($paymentOrder);
384
-           $paymentOrder->delete($forceDelete = true);
384
+            $paymentOrder->delete($forceDelete = true);
385 385
         }
386 386
         wp_redirect($returnUrl);
387 387
         exit;
Please login to merge, or discard this patch.