Skip to content

Commit

Permalink
UNZER-544 Remove order confirmation email on abort payment
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniil Tkachev committed Feb 17, 2025
1 parent f55b5cf commit 1653eb7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Model/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ public function finalizeUnzerOrderAfterRedirect(
Registry::getSession()->setVariable('orderCancellationProcessed', true);
}
$isError = $unzerPaymentStatus === PaymentService::STATUS_ERROR;
if (!$isError && !isset($params['finalizeCancellation'])) {
$cancelled = $unzerPaymentStatus === PaymentService::STATUS_CANCELED;
if (!$isError && !$cancelled && !isset($params['finalizeCancellation'])) {
$this->sendOrderConfirmationEmail($oUser, $oBasket, $oUserPayment);
}
if (!$isError) {
Expand Down

0 comments on commit 1653eb7

Please sign in to comment.