diff options
author | jessib <jessib@leap.se> | 2013-03-25 14:18:31 -0700 |
---|---|---|
committer | Azul <azul@leap.se> | 2013-07-17 10:46:26 +0200 |
commit | 2e05c95fab5186c40f6797d13f7858820c540cac (patch) | |
tree | e10cd606ff52e2c7056f6ebe9a03209936b1fa55 /billing | |
parent | 1d52045fe474c2e2e742477d54fe7acc8e0f9f1b (diff) |
Fix to default_credit_card method
Diffstat (limited to 'billing')
-rw-r--r-- | billing/app/models/customer.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/billing/app/models/customer.rb b/billing/app/models/customer.rb index 611b9d1..0fc3751 100644 --- a/billing/app/models/customer.rb +++ b/billing/app/models/customer.rb @@ -30,8 +30,8 @@ class Customer < CouchRest::Model::Base ##?? def default_credit_card return unless has_payment_info? - - credit_cards.find { |cc| cc.default? } + braintree_data = Braintree::Customer.find(braintree_customer_id) + braintree_data.credit_cards.find { |cc| cc.default? } end |