summaryrefslogtreecommitdiff
path: root/engines/billing/app/controllers/payments_controller.rb
diff options
context:
space:
mode:
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