From 2e05c95fab5186c40f6797d13f7858820c540cac Mon Sep 17 00:00:00 2001 From: jessib Date: Mon, 25 Mar 2013 14:18:31 -0700 Subject: Fix to default_credit_card method --- billing/app/models/customer.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'billing/app/models/customer.rb') 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 -- cgit v1.2.3