@@ -36,15 +36,15 @@ discard block |
||
| 36 | 36 | $this->base_url = $this->settings->base_url; |
| 37 | 37 | $this->shop_slug = $this->settings->shop_slug; |
| 38 | 38 | $this->auth_code = $this->settings->auth_code; |
| 39 | - $this->code = $this->shop_slug . ':' . $this->auth_code; |
|
| 40 | - $this->auth_token = base64_encode($this->code); |
|
| 39 | + $this->code = $this->shop_slug.':'.$this->auth_code; |
|
| 40 | + $this->auth_token = base64_encode($this->code); |
|
| 41 | 41 | $this->client = new Client(); |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | // Purchase the invoice, save its transactionId and finaly return it. |
| 45 | 45 | public function purchase() |
| 46 | 46 | { |
| 47 | - $url = $this->base_url . "/users/me/shops/" . $this->shop_slug . "/deals"; |
|
| 47 | + $url = $this->base_url."/users/me/shops/".$this->shop_slug."/deals"; |
|
| 48 | 48 | $data = $this->settings->data; |
| 49 | 49 | |
| 50 | 50 | $response = $this->client |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | public function pay(): RedirectionForm |
| 75 | 75 | { |
| 76 | 76 | $transactionId = $this->invoice->getTransactionId(); |
| 77 | - $redirect_url = $this->base_url . '/deals/' . $transactionId . '/redirect'; |
|
| 77 | + $redirect_url = $this->base_url.'/deals/'.$transactionId.'/redirect'; |
|
| 78 | 78 | |
| 79 | 79 | return $this->redirectWithForm($redirect_url, [], 'GET'); |
| 80 | 80 | } |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | $state = Request::input('state'); |
| 86 | 86 | |
| 87 | 87 | $transactionId = $this->invoice->getTransactionId(); |
| 88 | - $verifyUrl = $this->base_url . "/users/me/shops/" . $this->shop_slug . "/deals/" . $transactionId . "/verify"; |
|
| 88 | + $verifyUrl = $this->base_url."/users/me/shops/".$this->shop_slug."/deals/".$transactionId."/verify"; |
|
| 89 | 89 | |
| 90 | 90 | if ($state != 'funded') { |
| 91 | 91 | throw new InvalidPaymentException('پرداخت انجام نشد'); |