Passed
Push — master ( dbd6c1...6f8be8 )
by mahdi
02:40
created
src/Drivers/Digipay/Digipay.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     public function __construct(Invoice $invoice, $settings)
53 53
     {
54 54
         $this->invoice($invoice);
55
-        $this->settings= (object) $settings;
55
+        $this->settings = (object) $settings;
56 56
         $this->client = new Client();
57 57
         $this->oauthToken = $this->oauth();
58 58
     }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
     public function verify(): ReceiptInterface
115 115
     {
116
-        $tracingId=Request::input("trackingCode");
116
+        $tracingId = Request::input("trackingCode");
117 117
 
118 118
         $response = $this->client->request(
119 119
             'POST',
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         if ($response->getStatusCode() != 200) {
133 133
             $message = 'تراکنش تایید نشد';
134 134
 
135
-            throw new InvalidPaymentException($message, (int)$response->getStatusCode());
135
+            throw new InvalidPaymentException($message, (int) $response->getStatusCode());
136 136
         }
137 137
 
138 138
         return new Receipt('digipay', $body["trackingCode"]);
@@ -155,8 +155,8 @@  discard block
 block discarded – undo
155 155
                     "grant_type" => 'password',
156 156
                 ]
157 157
             );
158
-        if ($response->getStatusCode()!=200) {
159
-            if ($response->getStatusCode()==401) {
158
+        if ($response->getStatusCode() != 200) {
159
+            if ($response->getStatusCode() == 401) {
160 160
                 throw new PurchaseFailedException("خطا نام کاربری یا رمز عبور شما اشتباه می باشد.");
161 161
             } else {
162 162
                 throw new PurchaseFailedException("خطا در هنگام احراز هویت.");
Please login to merge, or discard this patch.