From 49f55db5494b0abdba1e993ede418a9826367ec0 Mon Sep 17 00:00:00 2001 From: Benjamin Freoua Date: Mon, 7 Aug 2023 11:59:23 +0200 Subject: [PATCH 1/2] add attribute step payment for return on cancel payment --- alma/lib/Model/PaymentData.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alma/lib/Model/PaymentData.php b/alma/lib/Model/PaymentData.php index fe5373b56..1e6a2aa31 100644 --- a/alma/lib/Model/PaymentData.php +++ b/alma/lib/Model/PaymentData.php @@ -184,7 +184,7 @@ public static function dataFromCart($cart, $context, $feePlans, $forPayment = fa 'deferred_days' => $feePlans['deferredDays'], 'deferred_months' => $feePlans['deferredMonths'], 'purchase_amount' => PriceHelper::convertPriceToCents($purchaseAmount), - 'customer_cancel_url' => $context->link->getPageLink('order'), + 'customer_cancel_url' => $context->link->getPageLink('order&step=3'), 'return_url' => $context->link->getModuleLink('alma', 'validation'), 'ipn_callback_url' => $context->link->getModuleLink('alma', 'ipn'), 'shipping_address' => [ From 36e699b45327149ea3eb48c9265f392910ed82e2 Mon Sep 17 00:00:00 2001 From: Benjamin Freoua Date: Mon, 7 Aug 2023 18:14:38 +0200 Subject: [PATCH 2/2] add escape html for validation Prestashop --- alma/views/templates/hook/_partials/displayPayment_deferred.tpl | 2 +- alma/views/templates/hook/_partials/displayPayment_pnx.tpl | 2 +- alma/views/templates/hook/payment_button_deferred.tpl | 2 +- alma/views/templates/hook/payment_button_pnx.tpl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/alma/views/templates/hook/_partials/displayPayment_deferred.tpl b/alma/views/templates/hook/_partials/displayPayment_deferred.tpl index 6268505fc..6a570404a 100644 --- a/alma/views/templates/hook/_partials/displayPayment_deferred.tpl +++ b/alma/views/templates/hook/_partials/displayPayment_deferred.tpl @@ -66,7 +66,7 @@

{if $option.isInPageEnabled} -
+
{/if} {/if} diff --git a/alma/views/templates/hook/_partials/displayPayment_pnx.tpl b/alma/views/templates/hook/_partials/displayPayment_pnx.tpl index 869b7a01f..401f6e938 100644 --- a/alma/views/templates/hook/_partials/displayPayment_pnx.tpl +++ b/alma/views/templates/hook/_partials/displayPayment_pnx.tpl @@ -67,7 +67,7 @@

{if $option.isInPageEnabled} -
+
{/if} {/if} diff --git a/alma/views/templates/hook/payment_button_deferred.tpl b/alma/views/templates/hook/payment_button_deferred.tpl index 59d298c27..a78daded8 100644 --- a/alma/views/templates/hook/payment_button_deferred.tpl +++ b/alma/views/templates/hook/payment_button_deferred.tpl @@ -25,7 +25,7 @@ {$desc|escape:'htmlall':'UTF-8'}

{if $isInPageEnabled} -
+
{else} {include file="modules/alma/views/templates/hook/_partials/deferred.tpl" plans=$plans} {/if} diff --git a/alma/views/templates/hook/payment_button_pnx.tpl b/alma/views/templates/hook/payment_button_pnx.tpl index e4ab99595..a48f6bead 100644 --- a/alma/views/templates/hook/payment_button_pnx.tpl +++ b/alma/views/templates/hook/payment_button_pnx.tpl @@ -25,7 +25,7 @@ {$desc|escape:'htmlall':'UTF-8'}

{if $isInPageEnabled} -
+
{else} {include file="modules/alma/views/templates/hook/_partials/feePlan.tpl" plans=$plans creditInfo=$creditInfo oneLiner=false} {/if}