Skip to content

Commit

Permalink
reverted default currency and added currency merge
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulwahidsharief committed Jun 14, 2024
1 parent 098bbee commit 4e648e3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion woo-razorpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ public function getDefaultCheckoutArguments($order)
return array(
'key' => $this->getSetting('key_id'),
'name' => html_entity_decode(get_bloginfo('name'), ENT_QUOTES),
'currency' => $this->getOrderCurrency($order),
'currency' => self::INR,
'description' => $productinfo,
'notes' => array(
self::WC_ORDER_ID => $orderId,
Expand Down Expand Up @@ -1160,6 +1160,13 @@ private function getCheckoutArguments($order, $params)
{
$args = $this->getDefaultCheckoutArguments($order);

$currency = $this->getOrderCurrency($order);

if (empty($currency) === false)
{
$args['currency'] = $currency;
}

// The list of valid currencies is at https://razorpay.freshdesk.com/support/solutions/articles/11000065530-what-currencies-does-razorpay-support-

$args = array_merge($args, $params);
Expand Down

0 comments on commit 4e648e3

Please sign in to comment.