diff options
Diffstat (limited to 'StoneIsland/www/js/lib/account/AccountView.js')
| -rw-r--r-- | StoneIsland/www/js/lib/account/AccountView.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/StoneIsland/www/js/lib/account/AccountView.js b/StoneIsland/www/js/lib/account/AccountView.js index f76541be..116d5ba1 100644 --- a/StoneIsland/www/js/lib/account/AccountView.js +++ b/StoneIsland/www/js/lib/account/AccountView.js @@ -18,6 +18,9 @@ var AccountView = View.extend({ addresses: [], addressLookup: {}, + ccs: [], + ccLookup: {}, + listAddresses: function(cb){ sdk.address.list({ success: function(data){ @@ -64,10 +67,16 @@ var AccountView = View.extend({ populateCreditCards: function(data, cb){ console.log(data) + this.ccs = data.CreditCards + this.ccLookup = {} if (! data.CreditCards || ! data.CreditCards.length) { } else { + data.CreditCards.forEach(function(cc){ + this.ccLookup[cc.Id] = cc + }.bind(this)) app.payment.populate( data.CreditCards[0] ) + app.cart.payment.populate() } cb && cb() }, |
