From 2a8d2c7f5e7a28489a45cd903f450aebe20d2fd2 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 17 Feb 2020 06:52:00 +1100 Subject: [PATCH] additional fixes for Checkout --- .../CheckoutComPaymentDriver.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/app/Ninja/PaymentDrivers/CheckoutComPaymentDriver.php b/app/Ninja/PaymentDrivers/CheckoutComPaymentDriver.php index 47eed79ab921..3664e1d6739c 100644 --- a/app/Ninja/PaymentDrivers/CheckoutComPaymentDriver.php +++ b/app/Ninja/PaymentDrivers/CheckoutComPaymentDriver.php @@ -6,8 +6,24 @@ class CheckoutComPaymentDriver extends BasePaymentDriver { public function createTransactionToken() { + if( $this->invoice()->getCurrencyCode() == 'BHD') + { + $amount = $this->invoice()->getRequestedAmount()/10; + } + elseif($this->invoice()->getCurrencyCode() == 'KWD') + { + $amount = $this->invoice()->getRequestedAmount()*10; + + } + elseif($this->invoice()->getCurrencyCode() == 'OMR') + { + $amount = $this->invoice()->getRequestedAmount(); + } + else + $amount = $this->invoice()->getRequestedAmount(); + $response = $this->gateway()->purchase([ - 'amount' => $this->invoice()->getRequestedAmount(), + 'amount' => $amount, 'currency' => $this->client()->getCurrencyCode(), ])->send();