Skip to content

Commit

Permalink
NTR: fix checkout for 6.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitalij Mik committed Apr 22, 2024
1 parent e0d6e80 commit e1359f6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions polyfill/Shopware/Core/Checkout/Payment/PaymentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@

class PaymentException
{
public static function asyncFinalizeInterrupted(string $orderTransactionId, string $errorMessage, ?\Throwable $e = null): self
public static function asyncFinalizeInterrupted(string $orderTransactionId, string $errorMessage, ?\Throwable $e = null): AsyncPaymentFinalizeException
{
return new AsyncPaymentFinalizeException($orderTransactionId, $errorMessage, $e);
}

public static function customerCanceled(string $orderTransactionId, string $additionalInformation, ?\Throwable $e = null): self
public static function customerCanceled(string $orderTransactionId, string $additionalInformation, ?\Throwable $e = null): CustomerCanceledAsyncPaymentException
{
return new CustomerCanceledAsyncPaymentException($orderTransactionId, $additionalInformation, $e);
}
Expand Down
4 changes: 3 additions & 1 deletion src/Handler/PaymentHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
use Shopware\Core\Checkout\Order\OrderEntity;
use Shopware\Core\Checkout\Payment\Cart\AsyncPaymentTransactionStruct;
use Shopware\Core\Checkout\Payment\Cart\PaymentHandler\AsynchronousPaymentHandlerInterface;
use Shopware\Core\Checkout\Payment\Exception\AsyncPaymentFinalizeException;
use Shopware\Core\Checkout\Payment\Exception\CustomerCanceledAsyncPaymentException;
use Shopware\Core\Checkout\Payment\PaymentException;
use Shopware\Core\Framework\Validation\DataBag\RequestDataBag;
use Shopware\Core\System\SalesChannel\SalesChannelContext;
Expand Down Expand Up @@ -173,7 +175,7 @@ public function finalize(AsyncPaymentTransactionStruct $transaction, Request $re
try {
$this->finalizeFacade->finalize($transaction, $salesChannelContext);
/** @phpstan-ignore-next-line */
} catch (PaymentException $ex) {
} catch (AsyncPaymentFinalizeException|CustomerCanceledAsyncPaymentException|PaymentException $ex) {
$this->logger->error(
'Error when finalizing order ' . $transaction->getOrder()->getOrderNumber() . ', Mollie ID: ' . $molliedID . ', ' . $ex->getMessage()
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default class RefundManagerRepository {
}

/**
*
*
* @returns {Cypress.Chainable<JQuery<HTMLElement>>}
*/
getFirstRefundQuantityInput(){
Expand Down

0 comments on commit e1359f6

Please sign in to comment.