From 027086fc7be10607d27a56fa18f905b696f917d4 Mon Sep 17 00:00:00 2001 From: claucece Date: Tue, 15 Sep 2015 17:49:35 -0500 Subject: add donate button, bitcoin, payment_method --- engines/billing/app/controllers/payments_controller.rb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'engines/billing/app/controllers') 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 -- cgit v1.2.3