Class: ActiveMerchant::Billing::PayflowExpressGateway
Constant Summary
collapse
- LIVE_REDIRECT_URL =
'https://www.paypal.com/cgibin/webscr?cmd=_express-checkout&token='
- TEST_REDIRECT_URL =
'https://test-expresscheckout.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token='
ActiveMerchant::Billing::PayflowCommonAPI::CARD_MAPPING, ActiveMerchant::Billing::PayflowCommonAPI::LIVE_URL, ActiveMerchant::Billing::PayflowCommonAPI::TEST_URL, ActiveMerchant::Billing::PayflowCommonAPI::XMLNS
Instance Attribute Summary
Attributes inherited from Gateway
#options
Instance Method Summary
collapse
#capture, included, #initialize, #test?, #void
Methods inherited from Gateway
gateway, #initialize, supported_cardtypes, supports?, #test?
#requires!
Methods included from PostsData
#included?, #ssl_post
Instance Method Details
#authorize(money, options = {}) ⇒ Object
20
21
22
23
24
|
# File 'lib/active_merchant/billing/gateways/payflow_express.rb', line 20
def authorize(money, options = {})
requires!(options, :token, :payer_id)
request = build_sale_or_authorization_request('Authorization', money, options)
commit(request)
end
|
#details_for(token) ⇒ Object
46
47
48
49
|
# File 'lib/active_merchant/billing/gateways/payflow_express.rb', line 46
def details_for(token)
request = build_get_express_details_request(token)
commit(request)
end
|
#purchase(money, options = {}) ⇒ Object
26
27
28
29
30
|
# File 'lib/active_merchant/billing/gateways/payflow_express.rb', line 26
def purchase(money, options = {})
requires!(options, :token, :payer_id)
request = build_sale_or_authorization_request('Sale', money, options)
commit(request)
end
|
#redirect_url_for(token) ⇒ Object
16
17
18
|
# File 'lib/active_merchant/billing/gateways/payflow_express.rb', line 16
def redirect_url_for(token)
"#{redirect_url}#{token}"
end
|
#setup_authorization(money, options = {}) ⇒ Object
32
33
34
35
36
37
|
# File 'lib/active_merchant/billing/gateways/payflow_express.rb', line 32
def setup_authorization(money, options = {})
requires!(options, :return_url, :cancel_return_url)
request = build_setup_express_sale_or_authorization_request('Authorization', money, options)
commit(request)
end
|
#setup_purchase(money, options = {}) ⇒ Object
39
40
41
42
43
44
|
# File 'lib/active_merchant/billing/gateways/payflow_express.rb', line 39
def setup_purchase(money, options = {})
requires!(options, :return_url, :cancel_return_url)
request = build_setup_express_sale_or_authorization_request('Sale', money, options)
commit(request)
end
|