diff --git a/www/assets/js/account.js b/www/assets/js/account.js index 92bb351..a3f630c 100644 --- a/www/assets/js/account.js +++ b/www/assets/js/account.js @@ -116,6 +116,8 @@ function displayAccountInfo() { if (success.payments_setup === false) { $("#addPaymentMethodBox").css("display", ""); + } else { + $("#addPaymentMethodBox").css("display", "none"); } $("#accountupdateform input#name").val(success.name); @@ -278,9 +280,17 @@ function openCheckoutWindowToSaveCard(onaccountpage) { // on get message from browser // only message we should get is "kill me" if (params.data.msg == "kill me") { - initAccountPage(); closeBrowser(); } + initAccountPage(); } ); + + // refresh a bit while user adds card + setTimeout(initAccountPage, 1000 * 10); + setTimeout(initAccountPage, 1000 * 20); + setTimeout(initAccountPage, 1000 * 30); + setTimeout(initAccountPage, 1000 * 40); + setTimeout(initAccountPage, 1000 * 50); + setTimeout(initAccountPage, 1000 * 60); } \ No newline at end of file