summaryrefslogtreecommitdiff
path: root/billing/app/controllers/payments_controller.rb
diff options
context:
space:
mode:
authorjessib <jessib@riseup.net>2013-07-23 11:35:43 -0700
committerjessib <jessib@riseup.net>2013-07-23 11:35:43 -0700
commit465415b9806a2de258d12df10213601eba87d515 (patch)
treeb56e4585b53feea5cc9106c2b8105afb1998b11a /billing/app/controllers/payments_controller.rb
parent67e75f797f1e057f2984eb134faef4e19af0a356 (diff)
Some navigation tweaks.
Diffstat (limited to 'billing/app/controllers/payments_controller.rb')
-rw-r--r--billing/app/controllers/payments_controller.rb3
1 files changed, 2 insertions, 1 deletions
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