Skip to content

Commit

Permalink
Merge pull request #995 from mollie/PIPRES-483/canceled-payment
Browse files Browse the repository at this point in the history
PIPRES-483 canceled payment error handling
  • Loading branch information
GytisZum authored Nov 19, 2024
2 parents c61c4a3 + 0559ef8 commit 79308d9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion controllers/front/return.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,13 @@ public function initContent()
}
if (false === $data['mollie_info']) {
$data['mollie_info'] = [];
$data['msg_details'] = $this->module->l('There is no order with this ID.', self::FILE_NAME);
//NOTE: information instead of error as this might occur due to cancellation of the payment
$logger->info(sprintf('There is no order with this order number - %s', (string) $orderNumber));

$data['msg_details'] = $this->module->l('Your payment was not successful. Try again.', self::FILE_NAME);
$this->setWarning($data['msg_details']);

Tools::redirect(Context::getContext()->link->getPageLink('cart', true));
} elseif (PaymentMethod::BANKTRANSFER === $data['mollie_info']['method']
&& PaymentStatus::STATUS_OPEN === $data['mollie_info']['bank_status']
) {
Expand Down

0 comments on commit 79308d9

Please sign in to comment.