summaryrefslogtreecommitdiff
path: root/billing
diff options
context:
space:
mode:
Diffstat (limited to 'billing')
-rw-r--r--billing/app/controllers/customers_controller.rb2
-rw-r--r--billing/app/controllers/payments_controller.rb4
-rw-r--r--billing/app/controllers/subscriptions_controller.rb2
3 files changed, 4 insertions, 4 deletions
diff --git a/billing/app/controllers/customers_controller.rb b/billing/app/controllers/customers_controller.rb
index e62472f..3479448 100644
--- a/billing/app/controllers/customers_controller.rb
+++ b/billing/app/controllers/customers_controller.rb
@@ -16,7 +16,7 @@ class CustomersController < BillingBaseController
def new
if customer = Customer.find_by_user_id(current_user.id)
- redirect_to edit_customer_path(customer.braintree_customer_id)
+ redirect_to edit_customer_path(customer.braintree_customer_id), :notice => 'Here is your saved customer data'
else
@tr_data = Braintree::TransparentRedirect.
create_customer_data(:redirect_url => confirm_customer_url)
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
diff --git a/billing/app/controllers/subscriptions_controller.rb b/billing/app/controllers/subscriptions_controller.rb
index 9735527..b248be5 100644
--- a/billing/app/controllers/subscriptions_controller.rb
+++ b/billing/app/controllers/subscriptions_controller.rb
@@ -7,7 +7,7 @@ class SubscriptionsController < ApplicationController
customer = Customer.find_by_user_id(current_user.id)
if subscription = customer.single_subscription
- redirect_to subscription_path(subscription.id)
+ redirect_to subscription_path(subscription.id), :notice => 'You already have an active subscription'
else
credit_card = customer.default_credit_card #safe to assume default?
@payment_method_token = credit_card.token