diff options
Diffstat (limited to 'StoneIsland/platforms/android/assets/www/js/lib/account/PaymentView.js')
| -rwxr-xr-x | StoneIsland/platforms/android/assets/www/js/lib/account/PaymentView.js | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/StoneIsland/platforms/android/assets/www/js/lib/account/PaymentView.js b/StoneIsland/platforms/android/assets/www/js/lib/account/PaymentView.js index 8b49ed1d..f773c05b 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/account/PaymentView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/account/PaymentView.js @@ -34,6 +34,11 @@ var PaymentView = FormView.extend({ show: function(){ if (! auth.logged_in()) { return app.router.go("intro") } + if (! navigator.onLine) { + app.closed.showElement() + app.closed.setMessage("PLEASE GO ONLINE TO CHANGE<br>YOUR PAYMENT INFO.", "") + return + } app.footer.show("SAVE") document.body.className = "payment" this.deferScrollToTop() @@ -50,8 +55,8 @@ var PaymentView = FormView.extend({ if (this.cc.data && this.cc.data.Guid) { sdk.payment.delete_credit_card({ guid: this.cc.data.Guid, - success: function(){}, - error: function(){}, + success: function(){ console.log("deleted credit card") }, + error: function(){ console.log("error deleting credit card") }, }) } @@ -67,12 +72,18 @@ var PaymentView = FormView.extend({ success: function(data){ app.curtain.show("loading") - app.account.listAddresses(function(){ - app.curtain.hide("loading") + app.account.listAddresses({ + success: function(){ + app.curtain.hide("loading") + }, + error: function(){ + app.curtain.hide("loading") + }, }) }, error: function(data){ + console.log("ERROR WITH PAYMENT") console.log(data) }, |
