Skip to content

Commit c65ed78

Browse files
author
Daniil Tkachev
committed
PSPAYPAL-877 Updated success message and added autoreload -= draft =-
1 parent 66f1879 commit c65ed78

5 files changed

Lines changed: 17 additions & 8 deletions

File tree

out/src/js/paypal-frontend.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/build/js/paypal-frontend-paypal-vault-checkout.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ function deselectRadioButtons(selector) {
66
}
77

88
function registerClickListenerForPaymentMethodsRadioButtons() {
9-
const paymentMethodsRadioButtons = document.getElementById('payment').querySelectorAll('[type="radio"]');
9+
const paymentMethodsRadioButtons = document.querySelectorAll(".vaulting_paymentsource");
10+
11+
if (!paymentMethodsRadioButtons) {
12+
return;
13+
}
14+
1015
paymentMethodsRadioButtons.forEach(function(paymentMethod) {
1116
paymentMethod.onclick = function() {
1217
if (paymentMethod.checked) {
@@ -70,4 +75,4 @@ document.addEventListener("DOMContentLoaded", function() {
7075
registerClickListenerForPaymentMethodsRadioButtons();
7176
registerClickListenerForSavedVaultRadioButtons();
7277
registerClickListenerForTheVaultCheckoutButton();
73-
});
78+
});

translations/de/oscpaypal_de_lang.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
'OSC_PAYPAL_VAULTING_SAVE_INSTRUCTION_CARD' => 'Speichern Sie hier Ihre Karte für einen schnelleren Checkout.',
5252
'OSC_PAYPAL_VAULTING_VAULTED_PAYMENTS' => 'Gespeicherte Zahlungsarten',
5353
'OSC_PAYPAL_VAULTING_ERROR' => 'Beim Speichern Ihrer Zahlart ist etwas schiefgelaufen.',
54-
'OSC_PAYPAL_VAULTING_SUCCESS' => 'Ihre Zahlart wurde erfolgreich gespeichert. Sie finden Ihre gespeicherten Zahlungsarten im "Mein Konto" Bereich.',
54+
'OSC_PAYPAL_VAULTING_SUCCESS' => 'Ihre Zahlart wurde erfolgreich gespeichert. Bitte aktualisieren Sie die Seite, wenn Sie keine von ihren Zahlungsarten sehen da.',
5555
'OSC_PAYPAL_VAULTING_SAVE' => 'Zahlart speichern',
5656
'OSC_PAYPAL_VAULTING_DELETE' => 'Zahlart löschen',
5757
'OSC_PAYPAL_CONTINUE_TO_NEXT_STEP' => 'Weiter mit gespeicherter Zahlungsart',

translations/en/oscpaypal_en_lang.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
'OSC_PAYPAL_VAULTING_SAVE_INSTRUCTION_CARD' => 'Save your Card here for a faster checkout.',
5252
'OSC_PAYPAL_VAULTING_VAULTED_PAYMENTS' => 'Saved payments',
5353
'OSC_PAYPAL_VAULTING_ERROR' => 'There was an error saving your payment method.',
54-
'OSC_PAYPAL_VAULTING_SUCCESS' => 'Your payment method was saved successfully. You will find your saved payments in your Account area.',
54+
'OSC_PAYPAL_VAULTING_SUCCESS' => 'Your payment method was saved successfully. Please refresh this page after 60 seconds if you do not see your saved methods here',
5555
'OSC_PAYPAL_VAULTING_SAVE' => 'Save payment',
5656
'OSC_PAYPAL_VAULTING_DELETE' => 'Delete payment',
5757
'OSC_PAYPAL_CONTINUE_TO_NEXT_STEP' => 'Continue with saved payment method',

views/tpl/shared/page/account/account_vaulting_card.tpl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,12 @@
8080
});
8181
8282
function showSuccessMessage() {
83-
$('#payPalVaultingCardContainer').hide();
84-
$('#PayPalVaultingSuccess').show();
83+
document.getElementById('payPalVaultingCardContainer').style.display = 'none';
84+
document.getElementById('PayPalVaultingSuccess').style.display = 'block';
85+
86+
setTimeout(function() {
87+
location.reload();
88+
}, 30000);
8589
}
8690
8791
function showFailureMessage() {
@@ -99,4 +103,4 @@
99103
[{capture append="oxidBlock_sidebar"}]
100104
[{include file="page/account/inc/account_menu.tpl" active_link="oscPayPalVaultingCard"}]
101105
[{/capture}]
102-
[{include file="layout/page.tpl" sidebar="Left"}]
106+
[{include file="layout/page.tpl" sidebar="Left"}]

0 commit comments

Comments
 (0)