summaryrefslogtreecommitdiff
path: root/engines/billing/app/controllers
diff options
context:
space:
mode:
authorclaucece <soficeli0@gmail.com>2015-09-15 17:49:35 -0500
committerclaucece <soficeli0@gmail.com>2015-10-05 22:34:21 -0500
commit027086fc7be10607d27a56fa18f905b696f917d4 (patch)
tree9a0e94da16ae7867a42a5b871f4c876cda4e4567 /engines/billing/app/controllers
parentd11768e58b98312c95a8ac5e9c18e3069b4d76dc (diff)
add donate button, bitcoin, payment_method
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