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 );