diff options
author | jessib <jessib@leap.se> | 2013-04-18 11:51:15 -0700 |
---|---|---|
committer | Azul <azul@leap.se> | 2013-07-17 10:47:13 +0200 |
commit | 416ae5da6b87c78fcf49592885a916e9ce4f0904 (patch) | |
tree | 50a06fc3354b1dd32f5fac0870bf044d1ea5af36 /billing/app/controllers | |
parent | 6d1e5b052f88029039164e9a586d512f55679de4 (diff) |
Basic display of a customer's transaction information
Diffstat (limited to 'billing/app/controllers')
-rw-r--r-- | billing/app/controllers/customer_controller.rb | 8 |
1 files changed, 8 insertions, 0 deletions
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 |