Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Rinor12010 committed Oct 30, 2023
1 parent 0ab2741 commit 76a678f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
7 changes: 4 additions & 3 deletions buckaroo3.php
Original file line number Diff line number Diff line change
Expand Up @@ -557,11 +557,12 @@ public function isPaymentModeActive($method)
{
$isLive = (int) \Configuration::get(Config::BUCKAROO_TEST);
$configArray = $this->getBuckarooConfigService()->getConfigArrayForMethod($method);
if (!empty($configArray)) {

if (!empty($configArray) && isset($configArray['mode'])) {
if ($isLive === 0) {
return isset($configArray['mode']) && $configArray['mode'] === 'test';
return $configArray['mode'] === 'test';
} elseif ($isLive === 1) {
return isset($configArray['mode']) && $configArray['mode'] === 'live';
return $configArray['mode'] === 'live';
}
}
return false;
Expand Down
12 changes: 5 additions & 7 deletions controllers/front/ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,14 @@ public function postProcess()
$currency = $this->context->currency;

$locale = \Tools::getContextLocale($this->context);

$action = Tools::getValue('action');
switch ($action) {
case 'getTotalCartPrice':
$this->getTotalCartPrice($currency,$locale);
break;
default:

if($action == 'getTotalCartPrice'){
$this->getTotalCartPrice($locale,$currency);
}
}
private function getTotalCartPrice($currency,$locale){
function getTotalCartPrice($locale,$currency){
//ToDo Refactor this
$cart = $this->context->cart;
$paymentFee = Tools::getValue('paymentFee');
if (!$paymentFee) {
Expand Down
2 changes: 1 addition & 1 deletion views/js/buckaroo.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 76a678f

Please sign in to comment.