From 465415b9806a2de258d12df10213601eba87d515 Mon Sep 17 00:00:00 2001 From: jessib Date: Tue, 23 Jul 2013 11:35:43 -0700 Subject: Some navigation tweaks. --- billing/app/controllers/payments_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'billing/app') diff --git a/billing/app/controllers/payments_controller.rb b/billing/app/controllers/payments_controller.rb index 99b7af8..224b78e 100644 --- a/billing/app/controllers/payments_controller.rb +++ b/billing/app/controllers/payments_controller.rb @@ -26,7 +26,7 @@ class PaymentsController < BillingBaseController def fetch_transparent_redirect - if current_user + if @user = current_user #set user for navigation if @customer = Customer.find_by_user_id(current_user.id) @customer.with_braintree_data! braintree_customer_id = @customer.braintree_customer_id @@ -38,6 +38,7 @@ class PaymentsController < BillingBaseController end # TODO: What is this supposed to do if braintree_customer_id was not set yet? + # Response: it can be used to make a payment that is not attributed to any customer (ie, a donation) @tr_data = Braintree::TransparentRedirect.transaction_data redirect_url: confirm_payment_url, transaction: { type: "sale", customer_id: braintree_customer_id, options: {submit_for_settlement: true } } end -- cgit v1.2.3