From 69272c5bb3cdda1b8c3ff9f737cf355a4f1a8b73 Mon Sep 17 00:00:00 2001 From: Ram Prakash Singh <45222925+ramth05@users.noreply.github.com> Date: Thu, 2 Dec 2021 11:58:27 +0530 Subject: [PATCH] Removed Display Currency , As order API will take care. --- pay.php | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/pay.php b/pay.php index 944cbe42..55df1c4d 100755 --- a/pay.php +++ b/pay.php @@ -17,7 +17,7 @@ $orderData = [ 'receipt' => 3456, 'amount' => 2000 * 100, // 2000 rupees in paise - 'currency' => 'INR', + 'currency' => $displayCurrency, 'payment_capture' => 1 // auto capture ]; @@ -29,13 +29,6 @@ $displayAmount = $amount = $orderData['amount']; -if ($displayCurrency !== 'INR') -{ - $url = "https://api.fixer.io/latest?symbols=$displayCurrency&base=INR"; - $exchange = json_decode(file_get_contents($url), true); - - $displayAmount = $exchange['rates'][$displayCurrency] * $amount / 100; -} $checkout = 'automatic'; @@ -65,11 +58,6 @@ "order_id" => $razorpayOrderId, ]; -if ($displayCurrency !== 'INR') -{ - $data['display_currency'] = $displayCurrency; - $data['display_amount'] = $displayAmount; -} $json = json_encode($data);