summaryrefslogtreecommitdiff
path: root/engines/billing/app/controllers/payments_controller.rb
diff options
context:
space:
mode:
authorclaucece <soficeli0@gmail.com>2015-09-21 23:27:05 -0500
committerclaucece <soficeli0@gmail.com>2015-10-05 22:39:30 -0500
commit2e1d21f53f0f96fba544b592fde84af2f4879a24 (patch)
treefc7d512c67002774ac8135dee16cc7f7ccd1919e /engines/billing/app/controllers/payments_controller.rb
parentf55fd33542c68fc8fc4519d622a41ef9517ebee3 (diff)
subscriptions, haml and translations
Diffstat (limited to 'engines/billing/app/controllers/payments_controller.rb')
-rw-r--r--engines/billing/app/controllers/payments_controller.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/engines/billing/app/controllers/payments_controller.rb b/engines/billing/app/controllers/payments_controller.rb
index 6ea149f..4a047ad 100644
--- a/engines/billing/app/controllers/payments_controller.rb
+++ b/engines/billing/app/controllers/payments_controller.rb
@@ -9,6 +9,7 @@ class PaymentsController < BillingBaseController
end
end
+# not sure if this should be kept
def index
access_denied unless admin? or (@user == current_user)
customer = Customer.find_by_user_id(@user.id)
@@ -27,12 +28,15 @@ class PaymentsController < BillingBaseController
redirect_to action: :new, locale: params[:locale]
end
+
private
def make_transaction
- unless current_user.has_payment_info?
- transact_with_user_info
- else
+ if current_user.has_payment_info?
transact_without_user_info
+ elsif current_user.is_anonymous?
+ transact_without_user_info
+ else
+ transact_with_user_info
end
end