@@ -16,10 +16,10 @@ |
||
| 16 | 16 | class Digipay extends Driver |
| 17 | 17 | { |
| 18 | 18 | /** |
| 19 | - * Digipay Client. |
|
| 20 | - * |
|
| 21 | - * @var object |
|
| 22 | - */ |
|
| 19 | + * Digipay Client. |
|
| 20 | + * |
|
| 21 | + * @var object |
|
| 22 | + */ |
|
| 23 | 23 | protected $client; |
| 24 | 24 | |
| 25 | 25 | /** |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | public function __construct(Invoice $invoice, $settings) |
| 53 | 53 | { |
| 54 | 54 | $this->invoice($invoice); |
| 55 | - $this->settings=$settings; |
|
| 55 | + $this->settings = $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', |
@@ -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("خطا در هنگام احراز هویت."); |