summaryrefslogtreecommitdiff
path: root/engines/billing/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'engines/billing/app/controllers')
-rw-r--r--engines/billing/app/controllers/payments_controller.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/engines/billing/app/controllers/payments_controller.rb b/engines/billing/app/controllers/payments_controller.rb
index b7a8e24..ece967b 100644
--- a/engines/billing/app/controllers/payments_controller.rb
+++ b/engines/billing/app/controllers/payments_controller.rb
@@ -6,13 +6,11 @@ class PaymentsController < BillingBaseController
end
def confirm
- @result = Braintree::TransparentRedirect.confirm(request.query_string)
- if @result.success?
- render :action => "confirm"
- else
- fetch_transparent_redirect
- render :action => "new"
- end
+ result = Braintree::Transaction.sale(
+ amount: params[:amount],
+ payment_method_nonce: params[:payment_method_nonce]
+ )
+ redirect_to action: :new, flash: { success: "done" }
end
def index