diff --git a/catalog/model/extension/payment/paystack.php b/catalog/model/extension/payment/paystack.php index 2d3bf41..c0df4c9 100755 --- a/catalog/model/extension/payment/paystack.php +++ b/catalog/model/extension/payment/paystack.php @@ -17,7 +17,7 @@ public function getMethod($address, $total) $status = false; } - // Paystack only switches NGN, GHS, USD, and ZAR for now + // Paystack only switches NGN, GHS, USD, ZAR, KES, EGP, and CIV for now if ($status && (!in_array( strtoupper($this->config->get('config_currency')), [ @@ -25,22 +25,33 @@ public function getMethod($address, $total) 'GHS', 'USD', 'ZAR' + 'KES', + 'EGP', + 'CIV' ] )) ) { $status = true; } - $method_data = array(); - if ($status) { - $method_data = array( - 'code' => 'paystack', - 'title' => $this->language->get('text_title'), - 'terms' => '', - 'sort_order' => $this->config->get('payment_paystack_sort_order') - ); - } + $method_data = []; + $option_data = []; + + + if ($status) { + $option_data['paystack'] = [ + 'code' => 'paystack.paystack', + 'name' => $this->language->get('heading_title') + ]; + + $method_data = [ + 'code' => 'paystack', + 'name' => $this->language->get('heading_title'), + 'option' => $option_data, + 'sort_order' => $this->config->get('payment_paystack_sort_order') + ]; + } return $method_data; }