Passed
Push — master ( 15b078...f1c78e )
by mahdi
03:05 queued 16s
created
src/Drivers/Toman/Toman.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,17 +34,17 @@  discard block
 block discarded – undo
34 34
         $this->base_url = $this->settings->base_url;
35 35
         $this->shop_slug = $this->settings->shop_slug;
36 36
         $this->auth_code = $this->settings->auth_code;
37
-        $this->code = $this->shop_slug . ':' . $this->auth_code;
38
-        $this->auth_token  = base64_encode($this->code);
37
+        $this->code = $this->shop_slug.':'.$this->auth_code;
38
+        $this->auth_token = base64_encode($this->code);
39 39
     }
40 40
 
41 41
     // Purchase the invoice, save its transactionId and finaly return it.
42 42
     public function purchase()
43 43
     {
44
-        $url = $this->base_url . "/users/me/shops/" . $this->shop_slug . "/deals";
44
+        $url = $this->base_url."/users/me/shops/".$this->shop_slug."/deals";
45 45
         $data = $this->settings->data;
46 46
 
47
-        $response =  Http::withHeaders([
47
+        $response = Http::withHeaders([
48 48
             'Authorization' => "Basic {$this->auth_token}",
49 49
             "Content-Type" => 'application/json'
50 50
         ])->post($url, $data);
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     public function pay(): RedirectionForm
64 64
     {
65 65
         $transactionId = $this->invoice->getTransactionId();
66
-        $redirect_url = $this->base_url . '/deals/' . $transactionId . '/redirect';
66
+        $redirect_url = $this->base_url.'/deals/'.$transactionId.'/redirect';
67 67
 
68 68
         return $this->redirectWithForm($redirect_url, [], 'GET');
69 69
     }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         $state = Request::input('state');
75 75
 
76 76
         $transactionId = $this->invoice->getTransactionId();
77
-        $verifyUrl = $this->base_url . "/users/me/shops/" . $this->shop_slug . "/deals/" . $transactionId . "/verify";
77
+        $verifyUrl = $this->base_url."/users/me/shops/".$this->shop_slug."/deals/".$transactionId."/verify";
78 78
 
79 79
         if ($state != 'funded') {
80 80
             throw new InvalidPaymentException('پرداخت انجام نشد');
Please login to merge, or discard this patch.