diff --git a/Controller/Payment/Setup.php b/Controller/Payment/Setup.php index 128c6b7..7c328c7 100644 --- a/Controller/Payment/Setup.php +++ b/Controller/Payment/Setup.php @@ -51,7 +51,7 @@ protected function processAuthorization(\Magento\Sales\Model\Order $order) { $tranx = $this->paystackClient->initializeTransaction([ 'first_name' => $order->getCustomerFirstname(), 'last_name' => $order->getCustomerLastname(), - 'amount' => $order->getGrandTotal() * 100, // in kobo + 'amount' => (int) round($order->getGrandTotal() * 100), // in kobo (integer, subunit) 'email' => $order->getCustomerEmail(), // unique to customers 'reference' => $order->getIncrementId(), // unique to transactions 'currency' => $order->getCurrency(),