Module: StripeWrapper::StripeWrapperHelper

Included in:
ApplicationController
Defined in:
app/helpers/stripe_wrapper/stripe_wrapper_helper.rb

Instance Method Summary collapse

Instance Method Details

#stripe_get_amountObject



12
13
14
# File 'app/helpers/stripe_wrapper/stripe_wrapper_helper.rb', line 12

def stripe_get_amount
  session[:stripe_payment_amount].to_i
end

#stripe_pay(route_url) ⇒ Object



3
4
5
# File 'app/helpers/stripe_wrapper/stripe_wrapper_helper.rb', line 3

def stripe_pay(route_url)
  render partial: 'stripe_wrapper/charges/pay', locals:{redirect_url: route_url}
end

#stripe_set_amount(amount) ⇒ Object



9
10
11
# File 'app/helpers/stripe_wrapper/stripe_wrapper_helper.rb', line 9

def stripe_set_amount(amount)
  session[:stripe_payment_amount] = @amount.to_i
end

#stripe_wrapper_pathObject



6
7
8
# File 'app/helpers/stripe_wrapper/stripe_wrapper_helper.rb', line 6

def stripe_wrapper_path
  return StripeWrapper::Engine.routes.url_helpers
end