Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 21 additions & 10 deletions catalog/model/extension/payment/paystack.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,41 @@ 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')),
[
'NGN',
'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;
}
Expand Down