From db24ca48f21996746ae272f5ee850f9957ecf130 Mon Sep 17 00:00:00 2001 From: Lukman Bello Date: Thu, 8 Jun 2023 11:24:35 +0100 Subject: [PATCH 1/2] add support for EGP, KES --- class-gf-paystack.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/class-gf-paystack.php b/class-gf-paystack.php index 73a74a4..f28b6c1 100644 --- a/class-gf-paystack.php +++ b/class-gf-paystack.php @@ -1976,6 +1976,34 @@ public function add_paystack_currencies($currencies) 'code' => 'KES' ); } + // Check if the currency is already registered. + if (!array_key_exists('XOF', $currencies)) { + // Add KES to the list of supported currencies. + $currencies['XOF'] = array( + 'name' => 'West African CFA Franc', + 'symbol_left' => 'CFA', + 'symbol_right' => '', + 'symbol_padding' => ' ', + 'thousand_separator' => ',', + 'decimal_separator' => '.', + 'decimals' => 2, + 'code' => 'XOF' + ); + } + // Check if the currency is already registered. + if (!array_key_exists('EGP', $currencies)) { + // Add KES to the list of supported currencies. + $currencies['EGP'] = array( + 'name' => 'Egyptian Pound', + 'symbol_left' => 'EGP', + 'symbol_right' => '', + 'symbol_padding' => ' ', + 'thousand_separator' => ',', + 'decimal_separator' => '.', + 'decimals' => 2, + 'code' => 'EGP' + ); + } return $currencies; } From cfe565b6cbf883a16b8c776f7e334297a739a78a Mon Sep 17 00:00:00 2001 From: Lukman Bello Date: Thu, 8 Jun 2023 11:26:47 +0100 Subject: [PATCH 2/2] add support for USD --- class-gf-paystack.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/class-gf-paystack.php b/class-gf-paystack.php index f28b6c1..f82528f 100644 --- a/class-gf-paystack.php +++ b/class-gf-paystack.php @@ -1995,7 +1995,7 @@ public function add_paystack_currencies($currencies) // Add KES to the list of supported currencies. $currencies['EGP'] = array( 'name' => 'Egyptian Pound', - 'symbol_left' => 'EGP', + 'symbol_left' => '£', 'symbol_right' => '', 'symbol_padding' => ' ', 'thousand_separator' => ',', @@ -2004,6 +2004,20 @@ public function add_paystack_currencies($currencies) 'code' => 'EGP' ); } + // Check if the currency is already registered. + if (!array_key_exists('USD', $currencies)) { + // Add KES to the list of supported currencies. + $currencies['USD'] = array( + 'name' => 'US Dollars', + 'symbol_left' => '$', + 'symbol_right' => '', + 'symbol_padding' => ' ', + 'thousand_separator' => ',', + 'decimal_separator' => '.', + 'decimals' => 2, + 'code' => 'USD' + ); + } return $currencies; }