From 416ae5da6b87c78fcf49592885a916e9ce4f0904 Mon Sep 17 00:00:00 2001 From: jessib Date: Thu, 18 Apr 2013 11:51:15 -0700 Subject: Basic display of a customer's transaction information --- billing/app/controllers/customer_controller.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'billing/app/controllers/customer_controller.rb') diff --git a/billing/app/controllers/customer_controller.rb b/billing/app/controllers/customer_controller.rb index 4192f4c..d71a5e4 100644 --- a/billing/app/controllers/customer_controller.rb +++ b/billing/app/controllers/customer_controller.rb @@ -19,7 +19,15 @@ class CustomerController < BillingBaseController @tr_data = Braintree::TransparentRedirect. update_customer_data(:redirect_url => confirm_customer_url, :customer_id => params[:id]) + @subscriptions = customer.active_subscriptions(@braintree_data) + + # UGLY Braintree::ResourceCollection to array. + # might want method + @transactions = [] + @braintree_data.transactions.each do |transaction| + @transactions << transaction + end else # TODO: will want to have case for admins, presumably access_denied -- cgit v1.2.3