diff --git a/src/Gateway.php b/src/Gateway.php index 29b60b1..32cd145 100644 --- a/src/Gateway.php +++ b/src/Gateway.php @@ -53,7 +53,7 @@ public function process_payment( $order_id ): array { [ 'reference' => $reference, 'amount' => [ - 'value' => $order->get_total() * 100, + 'value' => (int) round($order->get_total() * 100) , 'currency' => $order->get_currency(), ], 'paymentMethod' => [ @@ -105,7 +105,7 @@ public function process_refund( $order_id, $amount = null, $reason = '' ): bool| [ $isSuccessful, $refund ] = $client->refund( $paymentKey, [ 'amount' => [ - 'value' => $amount * 100, + 'value' => (int) round($amount * 100), 'currency' => $order->get_currency(), ], 'reference' => $reason,