Module: MerbMerchant::Billing::PaypalExpressCommon
- Included in:
- PayflowExpressGateway, PaypalExpressGateway
- Defined in:
- lib/merb_merchant/billing/gateways/paypal_express_common.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 7 8 |
# File 'lib/merb_merchant/billing/gateways/paypal_express_common.rb', line 4 def self.included(base) base.cattr_accessor :test_redirect_url base.cattr_accessor :live_redirect_url base.live_redirect_url = 'https://www.paypal.com/cgibin/webscr?cmd=_express-checkout&token=' end |
Instance Method Details
#redirect_url ⇒ Object
10 11 12 |
# File 'lib/merb_merchant/billing/gateways/paypal_express_common.rb', line 10 def redirect_url test? ? test_redirect_url : live_redirect_url end |
#redirect_url_for(token, options = {}) ⇒ Object
14 15 16 17 |
# File 'lib/merb_merchant/billing/gateways/paypal_express_common.rb', line 14 def redirect_url_for(token, = {}) = {:review => true}.update() [:review] ? "#{redirect_url}#{token}" : "#{redirect_url}#{token}&useraction=commit" end |