summaryrefslogtreecommitdiff
path: root/billing/app/controllers/payments_controller.rb
diff options
context:
space:
mode:
authorjessib <jessib@leap.se>2013-05-02 10:53:42 -0700
committerAzul <azul@leap.se>2013-07-17 10:47:13 +0200
commitfe0ac266a797523492fe3b2c750e7862f51b152f (patch)
treecf83a73fd7e6f1361a088ee080db281445c26f64 /billing/app/controllers/payments_controller.rb
parent7eab7e33730e12eeb460d2b3965a8712320aff54 (diff)
Added notices to redirects.
Diffstat (limited to 'billing/app/controllers/payments_controller.rb')
-rw-r--r--billing/app/controllers/payments_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/billing/app/controllers/payments_controller.rb b/billing/app/controllers/payments_controller.rb
index 41b7b3e..49a0c8a 100644
--- a/billing/app/controllers/payments_controller.rb
+++ b/billing/app/controllers/payments_controller.rb
@@ -6,7 +6,8 @@ class PaymentsController < ApplicationController
@default_cc = @customer.default_credit_card(@braintree_data)
@tr_data = transparent_redirect(@customer.braintree_customer_id)
else
- redirect_to new_customer_path
+ # TODO: this requires user to add self to vault before making payment. Is that desired functionality?
+ redirect_to new_customer_path, :notice => 'Before making payment, please add your customer data'
end
else
# anonymous payment not attributed to any user (ie, donation)
@@ -29,7 +30,6 @@ class PaymentsController < ApplicationController
def transparent_redirect(braintree_customer_id = nil)
Braintree::TransparentRedirect.transaction_data(:redirect_url => confirm_payment_url,
:transaction => {:type => "sale", :customer_id => braintree_customer_id, :options => {:submit_for_settlement => true } })
-
end