@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | public function __construct(Invoice $invoice, $settings) |
50 | 50 | { |
51 | 51 | $this->invoice($invoice); |
52 | - $this->settings = (object)$settings; |
|
52 | + $this->settings = (object) $settings; |
|
53 | 53 | $this->client = new Client( |
54 | 54 | [ |
55 | 55 | 'base_uri' => $this->settings->apiPurchaseUrl, |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $referenceId = hexdec(uniqid()); |
108 | 108 | $amount = $this->invoice->getAmount(); |
109 | 109 | |
110 | - $callback = $this->settings->callbackUrl . "?referenceId=" . $referenceId . "&price=" . $amount . "&mobile=" . $mobile; |
|
110 | + $callback = $this->settings->callbackUrl."?referenceId=".$referenceId."&price=".$amount."&mobile=".$mobile; |
|
111 | 111 | |
112 | 112 | $data = [ |
113 | 113 | 'referenceId' => $referenceId, |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | public function verify(): ReceiptInterface |
163 | 163 | { |
164 | 164 | $data = [ |
165 | - 'referenceId' => (int)$this->getInvoice()->getTransactionId(), |
|
165 | + 'referenceId' => (int) $this->getInvoice()->getTransactionId(), |
|
166 | 166 | 'header' => '', |
167 | 167 | 'content' => http_build_query($_POST), |
168 | 168 | ]; |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | if ($message) { |
295 | 295 | throw new InvalidPaymentException($message); |
296 | 296 | } else { |
297 | - throw new InvalidPaymentException('خطای ناشناخته ای رخ داده است.' . $method); |
|
297 | + throw new InvalidPaymentException('خطای ناشناخته ای رخ داده است.'.$method); |
|
298 | 298 | } |
299 | 299 | } |
300 | 300 | |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | { |
303 | 303 | $header[] = 'Content-Type: application/json'; |
304 | 304 | if ($forAuth) { |
305 | - $header[] = 'Authorization: Bearer ' . $this->auth(); |
|
305 | + $header[] = 'Authorization: Bearer '.$this->auth(); |
|
306 | 306 | } |
307 | 307 | $ch = curl_init($url); |
308 | 308 | curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST'); |