Module: PayFu::PaypalHelper
- Defined in:
- app/helpers/pay_fu/paypal_helper.rb
Instance Method Summary collapse
Instance Method Details
#redirect_to_paypal_gateway(options = {}) ⇒ Object
3 4 5 6 |
# File 'app/helpers/pay_fu/paypal_helper.rb', line 3 def redirect_to_paypal_gateway(={}) host = ActiveMerchant::Billing::Base.mode == "test" ? "www.sandbox.paypal.com" : "www.paypal.com" redirect_to URI.encode("https://#{host}/cgi-bin/webscr?cmd=_ext-enter&redirect_cmd=_xclick&charset=utf-8&business=#{PayFu::CONFIGS["paypal"]["email"]}¤ct_code=USD&item_name=#{[:item_name]}&amount=#{[:amount]}") end |