@@ -52,7 +52,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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("خطا در هنگام احراز هویت."); |