diff --git a/src/lemonway/classes/SplitpaymentDeadline.php b/src/lemonway/classes/SplitpaymentDeadline.php index 2a7e45d..db9f0d2 100644 --- a/src/lemonway/classes/SplitpaymentDeadline.php +++ b/src/lemonway/classes/SplitpaymentDeadline.php @@ -179,6 +179,7 @@ public function pay($update = false) $hpay = $kit->moneyInWithCardId($params); if ($hpay->INT_STATUS == 0) { + // Status 0 means success $this->status = SplitpaymentDeadline::STATUS_COMPLETE; /* @var $invoiceCollection PrestaShopCollectionCore */ diff --git a/src/lemonway/controllers/front/redirect.php b/src/lemonway/controllers/front/redirect.php index c1b528c..9d8c786 100644 --- a/src/lemonway/controllers/front/redirect.php +++ b/src/lemonway/controllers/front/redirect.php @@ -276,7 +276,6 @@ public function postProcess() $moneyInWeb->CARD->ID ); } - $moneyInToken = $moneyInWeb->TOKEN; @@ -309,6 +308,7 @@ public function postProcess() $hpay = $kit->moneyInWithCardId($params); if ($hpay->INT_STATUS == 0) { + // Status 0 means success if (!$cart->OrderExists()) { if ($methodInstance->isSplitPayment()) { // If split payment diff --git a/src/lemonway/controllers/front/validation.php b/src/lemonway/controllers/front/validation.php index 14ed236..b9c79d8 100644 --- a/src/lemonway/controllers/front/validation.php +++ b/src/lemonway/controllers/front/validation.php @@ -390,6 +390,9 @@ public function postProcess() $order->setCurrentState(Configuration::get("PS_OS_CANCELED")); } + if (!$this->module->isVersion17()) { + $this->warning = array(); + } array_push($this->warning, $this->module->l('You have canceled the payment.')); return $this->displayError(); default: diff --git a/src/lemonway/views/templates/front/error.tpl b/src/lemonway/views/templates/front/error.tpl index fd4c4a4..6a1138d 100644 --- a/src/lemonway/views/templates/front/error.tpl +++ b/src/lemonway/views/templates/front/error.tpl @@ -24,18 +24,18 @@

{l s='An error occurred' mod='lemonway'}:

- {if $errors|@count gt 0} + {if $errors|@count gt 0} {/if} - {if $warning|@count gt 0} + {if $warning|@count gt 0} {/if}