diff options
Diffstat (limited to 'billing/app/controllers/payments_controller.rb')
-rw-r--r-- | billing/app/controllers/payments_controller.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/billing/app/controllers/payments_controller.rb b/billing/app/controllers/payments_controller.rb index 49a0c8a..89fdeb0 100644 --- a/billing/app/controllers/payments_controller.rb +++ b/billing/app/controllers/payments_controller.rb @@ -1,4 +1,6 @@ class PaymentsController < ApplicationController + before_filter :authorize, :only => [:index] + def new if current_user if @customer = Customer.find_by_user_id(current_user.id) @@ -25,6 +27,12 @@ class PaymentsController < ApplicationController end end + def index + customer = Customer.find_by_user_id(current_user.id) + braintree_data = Braintree::Customer.find(customer.braintree_customer_id) + @transactions = braintree_data.transactions + end + protected def transparent_redirect(braintree_customer_id = nil) |