@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | public function __construct(Invoice $invoice, $settings) |
| 59 | 59 | { |
| 60 | 60 | $this->invoice($invoice); |
| 61 | - $this->settings = (object)$settings; |
|
| 61 | + $this->settings = (object) $settings; |
|
| 62 | 62 | |
| 63 | 63 | if ($this->settings->currency == 'T') { // convert amount to rial, payment gateways need rial |
| 64 | 64 | $this->invoice->amount($this->invoice->getAmount() * 10); |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | 'localInvoiceId' => $this->invoice->getUuid(), |
| 201 | 201 | 'amountInRials' => $this->invoice->getAmount(), |
| 202 | 202 | 'localDate' => $this->getTime()['content'], |
| 203 | - 'callbackURL' => $this->settings->callbackUrl . "?" . http_build_query(['invoice' => $this->invoice->getUuid()]), |
|
| 203 | + 'callbackURL' => $this->settings->callbackUrl."?".http_build_query(['invoice' => $this->invoice->getUuid()]), |
|
| 204 | 204 | 'paymentId' => "0", |
| 205 | 205 | 'additionalData' => '', |
| 206 | 206 | ]); |
@@ -214,8 +214,8 @@ discard block |
||
| 214 | 214 | public function reverse(): array |
| 215 | 215 | { |
| 216 | 216 | return $this->callApi('POST', self::ReverseURL, [ |
| 217 | - 'merchantConfigurationId' => (int)$this->settings->merchantConfigID, |
|
| 218 | - 'payGateTranId' => (int)$this->invoice->getUuid() |
|
| 217 | + 'merchantConfigurationId' => (int) $this->settings->merchantConfigID, |
|
| 218 | + 'payGateTranId' => (int) $this->invoice->getUuid() |
|
| 219 | 219 | ]); |
| 220 | 220 | } |
| 221 | 221 | |
@@ -227,8 +227,8 @@ discard block |
||
| 227 | 227 | public function cancel(): array |
| 228 | 228 | { |
| 229 | 229 | return $this->callApi('POST', self::CancelURL, [ |
| 230 | - 'merchantConfigurationId' => (int)$this->settings->merchantConfigID, |
|
| 231 | - 'payGateTranId' => (int)$this->payGateTransactionId |
|
| 230 | + 'merchantConfigurationId' => (int) $this->settings->merchantConfigID, |
|
| 231 | + 'payGateTranId' => (int) $this->payGateTransactionId |
|
| 232 | 232 | ]); |
| 233 | 233 | } |
| 234 | 234 | |
@@ -240,8 +240,8 @@ discard block |
||
| 240 | 240 | public function verifyTransaction(): array |
| 241 | 241 | { |
| 242 | 242 | return $this->callApi('POST', self::VerifyURL, [ |
| 243 | - 'merchantConfigurationId' => (int)$this->settings->merchantConfigID, |
|
| 244 | - 'payGateTranId' => (int)$this->payGateTransactionId |
|
| 243 | + 'merchantConfigurationId' => (int) $this->settings->merchantConfigID, |
|
| 244 | + 'payGateTranId' => (int) $this->payGateTransactionId |
|
| 245 | 245 | ]); |
| 246 | 246 | } |
| 247 | 247 | |
@@ -253,8 +253,8 @@ discard block |
||
| 253 | 253 | public function settlement(): array |
| 254 | 254 | { |
| 255 | 255 | return $this->callApi('POST', self::SettlementURL, [ |
| 256 | - 'merchantConfigurationId' => (int)$this->settings->merchantConfigID, |
|
| 257 | - 'payGateTranId' => (int)$this->payGateTransactionId |
|
| 256 | + 'merchantConfigurationId' => (int) $this->settings->merchantConfigID, |
|
| 257 | + 'payGateTranId' => (int) $this->payGateTransactionId |
|
| 258 | 258 | ]); |
| 259 | 259 | } |
| 260 | 260 | |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | */ |
| 266 | 266 | public function cardHash(): array |
| 267 | 267 | { |
| 268 | - return $this->callApi('GET', self::CardHashURL . '?merchantConfigurationId=' . $this->settings->merchantConfigID . '&localInvoiceId=' . $this->invoice->getTransactionId(), []); |
|
| 268 | + return $this->callApi('GET', self::CardHashURL.'?merchantConfigurationId='.$this->settings->merchantConfigID.'&localInvoiceId='.$this->invoice->getTransactionId(), []); |
|
| 269 | 269 | } |
| 270 | 270 | |
| 271 | 271 | /** |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | */ |
| 276 | 276 | public function transactionResult(): array |
| 277 | 277 | { |
| 278 | - return $this->callApi('GET', self::TranResultURL . '?merchantConfigurationId=' . $this->settings->merchantConfigID . '&localInvoiceId=' . $this->invoice->getTransactionId(), []); |
|
| 278 | + return $this->callApi('GET', self::TranResultURL.'?merchantConfigurationId='.$this->settings->merchantConfigID.'&localInvoiceId='.$this->invoice->getTransactionId(), []); |
|
| 279 | 279 | } |
| 280 | 280 | |
| 281 | 281 | /** |