diff --git a/metadata.php b/metadata.php
index 9976a9d2..7320da3f 100755
--- a/metadata.php
+++ b/metadata.php
@@ -138,8 +138,8 @@
'@osc_paypal/frontend/shared/applepay.tpl' => 'views/smarty/frontend/shared/applepay.tpl',
//PSPAYPAL-680 Vaulting
- '@osc_paypal/frontend/shared/account_vaulting_paypal.tpl' => 'views/smarty/frontend/shared/page/account/account_vaulting_paypal.tpl',
- '@osc_paypal/frontend/shared/account_vaulting_card.tpl' => 'views/smarty/frontend/shared/page/account/account_vaulting_card.tpl',
+ '@osc_paypal/frontend/account_vaulting_paypal.tpl' => 'views/smarty/frontend/shared/page/account/account_vaulting_paypal.tpl',
+ '@osc_paypal/frontend/account_vaulting_card.tpl' => 'views/smarty/frontend/shared/page/account/account_vaulting_card.tpl',
'@osc_paypal/frontend/shared/vaultedpaymentsources.tpl' => 'views/smarty/frontend/shared/vaultedpaymentsources.tpl',
'@osc_paypal/frontend/flow/vaultedpaymentsources.tpl' => 'views/smarty/frontend/flow/vaulting/vaultedpaymentsources.tpl',
'@osc_paypal/frontend/wave/vaultedpaymentsources.tpl' => 'views/smarty/frontend/wave/vaulting/vaultedpaymentsources.tpl',
diff --git a/src/Controller/PayPalVaultingCardController.php b/src/Controller/PayPalVaultingCardController.php
index 3b02826e..61341907 100644
--- a/src/Controller/PayPalVaultingCardController.php
+++ b/src/Controller/PayPalVaultingCardController.php
@@ -21,7 +21,7 @@ public function render()
$this->_aViewData['vaultingUserId'] = oxNew(Config::class)->getUserIdForVaulting();
$moduleSettings = $this->getServiceFromContainer(ModuleSettings::class);
if ($moduleSettings->isVaultingAllowedForACDC()) {
- $this->_sThisTemplate = '@osc_paypal/frontend/shared/account_vaulting_card';
+ $this->_sThisTemplate = '@osc_paypal/frontend/account_vaulting_card';
}
return parent::render();
diff --git a/src/Controller/PayPalVaultingController.php b/src/Controller/PayPalVaultingController.php
index 7708e767..dbb89349 100644
--- a/src/Controller/PayPalVaultingController.php
+++ b/src/Controller/PayPalVaultingController.php
@@ -21,7 +21,7 @@ public function render()
$this->_aViewData['vaultingUserId'] = oxNew(Config::class)->getUserIdForVaulting();
$moduleSettings = $this->getServiceFromContainer(ModuleSettings::class);
if ($moduleSettings->isVaultingAllowedForPayPal()) {
- $this->_sThisTemplate = '@osc_paypal/frontend/shared/account_vaulting_paypal';
+ $this->_sThisTemplate = '@osc_paypal/frontend/account_vaulting_paypal';
}
return parent::render();
diff --git a/views/smarty/frontend/blocks/page/account/account_vaulting_card.tpl b/views/smarty/frontend/blocks/page/account/account_vaulting_card.tpl
deleted file mode 100644
index ad44237b..00000000
--- a/views/smarty/frontend/blocks/page/account/account_vaulting_card.tpl
+++ /dev/null
@@ -1,102 +0,0 @@
-[{capture append="oxidBlock_content"}]
- [{assign var="template_title" value="OSC_PAYPAL_VAULTING_MENU_CARD"|oxmultilangassign}]
-
-
-
-
-
-
-
[{oxmultilang ident="OSC_PAYPAL_VAULTING_SUCCESS"}]
-
[{oxmultilang ident="OSC_PAYPAL_VAULTING_ERROR"}]
-
-
-
-
-
-
-
-
-
-
-
-
-
- [{include file="@osc_paypal/frontend/shared/vaultedpaymentsources.tpl"}]
-
- [{insert name="oxid_tracker" title=$template_title}]
-[{/capture}]
-
-[{capture append="oxidBlock_sidebar"}]
- [{include file="page/account/inc/account_menu.tpl" active_link="oscPayPalVaultingCard"}]
-[{/capture}]
-[{include file="layout/page.tpl" sidebar="Left"}]
\ No newline at end of file
diff --git a/views/smarty/frontend/blocks/page/account/account_vaulting_paypal.tpl b/views/smarty/frontend/blocks/page/account/account_vaulting_paypal.tpl
deleted file mode 100644
index 4eb45776..00000000
--- a/views/smarty/frontend/blocks/page/account/account_vaulting_paypal.tpl
+++ /dev/null
@@ -1,67 +0,0 @@
-[{capture append="oxidBlock_content"}]
- [{assign var="template_title" value="OSC_PAYPAL_VAULTING_MENU"|oxmultilangassign}]
-
-
-
-
-
-
-
[{oxmultilang ident="OSC_PAYPAL_VAULTING_SUCCESS"}]
-
[{oxmultilang ident="OSC_PAYPAL_VAULTING_ERROR"}]
-
-
-
-
-
- [{include file="@osc_paypal/frontend/shared/vaultedpaymentsources.tpl"}]
-
- [{insert name="oxid_tracker" title=$template_title}]
-[{/capture}]
-
-[{capture append="oxidBlock_sidebar"}]
- [{include file="page/account/inc/account_menu.tpl" active_link="oscPayPalVaulting"}]
-[{/capture}]
-[{include file="layout/page.tpl" sidebar="Left"}]
\ No newline at end of file
diff --git a/views/smarty/frontend/shared/page/account/account_vaulting_paypal.tpl b/views/smarty/frontend/shared/page/account/account_vaulting_paypal.tpl
index 4eb45776..63583fe0 100644
--- a/views/smarty/frontend/shared/page/account/account_vaulting_paypal.tpl
+++ b/views/smarty/frontend/shared/page/account/account_vaulting_paypal.tpl
@@ -16,34 +16,34 @@
+
+
+
+ {% include "@osc_paypal/frontend/vaultedpaymentsources.html.twig" %}
+ {% endblock %}
+
+ {{ insert_tracker({title: template_title}) }}
+{% endcapture %}
+
+{% include "layout/page.html.twig" %}
\ No newline at end of file
diff --git a/views/twig/frontend/account_vaulting_paypal.html.twig b/views/twig/frontend/account_vaulting_paypal.html.twig
new file mode 100644
index 00000000..30aa1924
--- /dev/null
+++ b/views/twig/frontend/account_vaulting_paypal.html.twig
@@ -0,0 +1,74 @@
+{% capture append = "oxidBlock_content" %}
+ {% set template_title = "OSC_PAYPAL_VAULTING_MENU"|translate %}
+
+
+
+
+ {% include "page/account/inc/account_menu.html.twig" with {active_link: "oscPayPalVaulting"} %}
+
+
+ {% block account_vaulting_paypal %}
+
+
+
+
+
{{ translate({ ident: "OSC_PAYPAL_VAULTING_SUCCESS" }) }}
+
{{ translate({ ident: "OSC_PAYPAL_VAULTING_ERROR" }) }}
+
+
+
+
+
+ {% include "@osc_paypal/frontend/vaultedpaymentsources.html.twig" %}
+
+ {% endblock %}
+
+ {{ insert_tracker({title: template_title}) }}
+{% endcapture %}
+
+{% include "layout/page.html.twig" %}
\ No newline at end of file
diff --git a/views/twig/frontend/acdc.html.twig b/views/twig/frontend/acdc.html.twig
index 0a78f84d..4f143247 100644
--- a/views/twig/frontend/acdc.html.twig
+++ b/views/twig/frontend/acdc.html.twig
@@ -18,8 +18,8 @@
{% if oscpaypal_isVaultingPossible %}
-
-
+
+
{% endif %}
@@ -54,14 +54,13 @@
let downloadableProductAgreement = (document.getElementById('oxdownloadableproductsagreement') && document.getElementById('oxdownloadableproductsagreement').checked) ? 1 : 0;
let serviceProductAgreement = (document.getElementById('oxserviceproductsagreement') && document.getElementById('oxserviceproductsagreement').checked) ? 1 : 0;
let vaultPayment = document.getElementById("oscPayPalVaultPaymentCheckbox")?.checked ?? false;
- let url = '{{ sSelfLink|raw }}' +
- "cl=order&fnc=createAcdcOrder&ord_agb=" + ordAgb +
- "&oxdownloadableproductsagreement=" + downloadableProductAgreement +
- "&oxserviceproductsagreement=" + serviceProductAgreement +
- "&stoken=" + '{{ oViewConf.getSessionChallengeToken() }}' +
- "&sDeliveryAddressMD5=" + '{{ oView.getDeliveryAddressMD5() }}' +
- '&vaultPayment=' + vaultPayment +
- '&oscPayPalPaymentTypeForVaulting=' + 'oscpaypal_acdc'
+ let url = "{{ sSelfLink }}cl=order&fnc=createAcdcOrder&ord_agb=" + ordAgb
+ + "&oxdownloadableproductsagreement=" + downloadableProductAgreement
+ + "&oxserviceproductsagreement="+ serviceProductAgreement
+ + "&stoken=" + "{{ oViewConf.getSessionChallengeToken() }}"
+ + "&sDeliveryAddressMD5=" + "{{ oView.getDeliveryAddressMD5() }}"
+ + "&vaultPayment=" + vaultPayment
+ + "&oscPayPalPaymentTypeForVaulting=oscpaypal_acdc"
;
return fetch(url, {
method: 'post',
diff --git a/views/twig/frontend/paypal.html.twig b/views/twig/frontend/paypal.html.twig
new file mode 100644
index 00000000..16b13c4b
--- /dev/null
+++ b/views/twig/frontend/paypal.html.twig
@@ -0,0 +1,6 @@
+{% if oscpaypal_isVaultingPossible %}
+
+
+
+
+{% endif %}
\ No newline at end of file
diff --git a/views/twig/frontend/pui_flow.html.twig b/views/twig/frontend/pui.html.twig
similarity index 100%
rename from views/twig/frontend/pui_flow.html.twig
rename to views/twig/frontend/pui.html.twig
diff --git a/views/twig/frontend/vaultedpaymentsources.html.twig b/views/twig/frontend/vaultedpaymentsources.html.twig
new file mode 100644
index 00000000..83a55b53
--- /dev/null
+++ b/views/twig/frontend/vaultedpaymentsources.html.twig
@@ -0,0 +1,38 @@
+{% set vaultedPaymentSources = oViewConf.getVaultPaymentTokens() %}
+
+{% if vaultedPaymentSources %}
+
+
+
+
+ {% for paymentToken in vaultedPaymentSources %}
+ -
+
+
+ {% endfor %}
+
+
+
+{% endif %}