Completed
Push — master ( 00b00f...785aa1 )
by PROSPER
13s queued 11s
created
src/Paystack.php 2 patches
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,6 @@
 block discarded – undo
102 102
 
103 103
 
104 104
     /**
105
-
106 105
      * Initiate a payment request to Paystack
107 106
      * Included the option to pass the payload to this method for situations
108 107
      * when the payload is built on the fly (not passed to the controller from a view)
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      */
87 87
     private function setRequestOptions()
88 88
     {
89
-        $authBearer = 'Bearer ' . $this->secretKey;
89
+        $authBearer = 'Bearer '.$this->secretKey;
90 90
 
91 91
         $this->client = new Client(
92 92
             [
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                 "first_name" => request()->first_name,
124 124
                 "last_name" => request()->last_name,
125 125
                 "callback_url" => request()->callback_url,
126
-                "currency" => (request()->currency != ""  ? request()->currency : "NGN"),
126
+                "currency" => (request()->currency != "" ? request()->currency : "NGN"),
127 127
 
128 128
                 /*
129 129
                     Paystack allows for transactions to be split into a subaccount -
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         }
195 195
 
196 196
         $this->response = $this->client->{strtolower($method)}(
197
-            $this->baseUrl . $relativeUrl,
197
+            $this->baseUrl.$relativeUrl,
198 198
             ["body" => json_encode($body)]
199 199
         );
200 200
 
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 
239 239
         $relativeUrl = "/transaction/verify/{$transactionRef}";
240 240
 
241
-        $this->response = $this->client->get($this->baseUrl . $relativeUrl, []);
241
+        $this->response = $this->client->get($this->baseUrl.$relativeUrl, []);
242 242
     }
243 243
 
244 244
     /**
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
     public function fetchPlan($plan_code)
386 386
     {
387 387
         $this->setRequestOptions();
388
-        return $this->setHttpResponse('/plan/' . $plan_code, 'GET', [])->getResponse();
388
+        return $this->setHttpResponse('/plan/'.$plan_code, 'GET', [])->getResponse();
389 389
     }
390 390
 
391 391
     /**
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
         ];
407 407
 
408 408
         $this->setRequestOptions();
409
-        return $this->setHttpResponse('/plan/' . $plan_code, 'PUT', $data)->getResponse();
409
+        return $this->setHttpResponse('/plan/'.$plan_code, 'PUT', $data)->getResponse();
410 410
     }
411 411
 
412 412
     /**
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
     public function fetchCustomer($customer_id)
436 436
     {
437 437
         $this->setRequestOptions();
438
-        return $this->setHttpResponse('/customer/' . $customer_id, 'GET', [])->getResponse();
438
+        return $this->setHttpResponse('/customer/'.$customer_id, 'GET', [])->getResponse();
439 439
     }
440 440
 
441 441
     /**
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
         ];
456 456
 
457 457
         $this->setRequestOptions();
458
-        return $this->setHttpResponse('/customer/' . $customer_id, 'PUT', $data)->getResponse();
458
+        return $this->setHttpResponse('/customer/'.$customer_id, 'PUT', $data)->getResponse();
459 459
     }
460 460
 
461 461
     /**
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
     {
512 512
         $this->setRequestOptions();
513 513
 
514
-        return $this->setHttpResponse('/subscription?customer=' . $customer_id, 'GET', [])->getData();
514
+        return $this->setHttpResponse('/subscription?customer='.$customer_id, 'GET', [])->getData();
515 515
     }
516 516
 
517 517
     /**
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
     {
525 525
         $this->setRequestOptions();
526 526
 
527
-        return $this->setHttpResponse('/subscription?plan=' . $plan_id, 'GET', [])->getData();
527
+        return $this->setHttpResponse('/subscription?plan='.$plan_id, 'GET', [])->getData();
528 528
     }
529 529
 
530 530
     /**
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
     public function fetchSubscription($subscription_id)
566 566
     {
567 567
         $this->setRequestOptions();
568
-        return $this->setHttpResponse('/subscription/' . $subscription_id, 'GET', [])->getResponse();
568
+        return $this->setHttpResponse('/subscription/'.$subscription_id, 'GET', [])->getResponse();
569 569
     }
570 570
 
571 571
     /**
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
     public function fetchPage($page_id)
602 602
     {
603 603
         $this->setRequestOptions();
604
-        return $this->setHttpResponse('/page/' . $page_id, 'GET', [])->getResponse();
604
+        return $this->setHttpResponse('/page/'.$page_id, 'GET', [])->getResponse();
605 605
     }
606 606
 
607 607
     /**
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
         ];
619 619
 
620 620
         $this->setRequestOptions();
621
-        return $this->setHttpResponse('/page/' . $page_id, 'PUT', $data)->getResponse();
621
+        return $this->setHttpResponse('/page/'.$page_id, 'PUT', $data)->getResponse();
622 622
     }
623 623
 
624 624
     /**
@@ -666,7 +666,7 @@  discard block
 block discarded – undo
666 666
     {
667 667
 
668 668
         $this->setRequestOptions();
669
-        return $this->setHttpResponse("/subaccount/?perPage=" . (int) $per_page . "&page=" . (int) $page, "GET")->getResponse();
669
+        return $this->setHttpResponse("/subaccount/?perPage=".(int) $per_page."&page=".(int) $page, "GET")->getResponse();
670 670
     }
671 671
 
672 672
 
Please login to merge, or discard this patch.