diff --git a/src/Adapter/Zarinpal.php b/src/Adapter/Zarinpal.php index 0c89451..b4e0a4a 100755 --- a/src/Adapter/Zarinpal.php +++ b/src/Adapter/Zarinpal.php @@ -44,7 +44,7 @@ protected function requestToken () $sendParams = [ 'MerchantID' => $this->merchant_id, - 'Amount' => intval($this->amount), + 'Amount' => $this->getToman(), 'Description' => $this->description ? $this->description : '', 'Email' => $this->email ? $this->email : '', 'Mobile' => $this->mobile ? $this->mobile : '', @@ -113,7 +113,7 @@ protected function verifyTransaction () $sendParams = [ 'MerchantID' => $this->merchant_id, 'Authority' => $this->Authority, - 'Amount' => intval($this->amount), + 'Amount' => $this->getToman(), ]; try { @@ -163,4 +163,9 @@ public function getGatewayReferenceId() ]); return $this->Authority; } + + private function getToman() + { + return (int) ($this->amount / 10); + } }