From 821dc7fbce9cf8e8a6386c8cd8ad920256b9e197 Mon Sep 17 00:00:00 2001 From: Gytautas Date: Thu, 14 Mar 2024 12:31:22 +0200 Subject: [PATCH] parameter fix --- src/Service/SaferPayInitialize.php | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/src/Service/SaferPayInitialize.php b/src/Service/SaferPayInitialize.php index ddc6e217..1c8186b2 100755 --- a/src/Service/SaferPayInitialize.php +++ b/src/Service/SaferPayInitialize.php @@ -109,7 +109,7 @@ public function buildRequest( $creationAfterInitialization = $this->configuration->getAsBoolean(SaferPayConfig::SAFERPAY_ORDER_CREATION_AFTER_AUTHORIZATION); $alias = $this->saferPayCardAliasRepository->getSavedCardAliasFromId($selectedCard); - $successUrl = $this->context->link->getModuleLink( + $returnUrl = $this->context->link->getModuleLink( $this->module->name, ControllerName::RETURN_URL, [ @@ -136,29 +136,16 @@ public function buildRequest( true ); - $failUrl = $this->context->link->getModuleLink( - $this->module->name, - ControllerName::FAIL_VALIDATION, - [ - 'cartId' => $this->context->cart->id, - 'secureKey' => $this->context->cart->secure_key, - 'orderId' => $creationAfterInitialization ? 0 :Order::getOrderByCartId($cartId), - 'moduleId' => $this->module->id, - 'isBusinessLicence' => $isBusinessLicence, - ], - true - ); - $initializeRequest = $this->requestObjectCreator->create( $this->context->cart, $customerEmail, $paymentMethod, - $successUrl, + $returnUrl, $notifyUrl, - $failUrl, $this->context->cart->id_address_delivery, $this->context->cart->id_address_invoice, $this->context->cart->id_customer, + $isBusinessLicence, $alias, $fieldToken );