Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PIPRES-483 canceled payment error handling #995

Merged
merged 2 commits into from
Nov 19, 2024
Merged
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
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
Loading