Skip to content

Commit

Permalink
Merge pull request #153 from Invertus/SL-222/parameter-issue-fix
Browse files Browse the repository at this point in the history
SL-222/ Parameter and naming fix
  • Loading branch information
GytisZum authored Mar 14, 2024
2 parents 5fda3f3 + 821dc7f commit 4263151
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions src/Service/SaferPayInitialize.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
[
Expand All @@ -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
);
Expand Down

0 comments on commit 4263151

Please sign in to comment.