Class: ActiveMerchant::Billing::PaypalExpressGateway
Constant Summary
ActiveMerchant::Billing::PaypalCommonAPI::API_VERSION, ActiveMerchant::Billing::PaypalCommonAPI::AUSTRALIAN_STATES, ActiveMerchant::Billing::PaypalCommonAPI::CREDENTIALS_NAMESPACES, ActiveMerchant::Billing::PaypalCommonAPI::EBAY_NAMESPACE, ActiveMerchant::Billing::PaypalCommonAPI::ENVELOPE_NAMESPACES, ActiveMerchant::Billing::PaypalCommonAPI::FRAUD_REVIEW_CODE, ActiveMerchant::Billing::PaypalCommonAPI::PAYPAL_NAMESPACE, ActiveMerchant::Billing::PaypalCommonAPI::SUCCESS_CODES, ActiveMerchant::Billing::PaypalCommonAPI::URLS
Constants inherited
from Gateway
Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::CURRENCIES_WITHOUT_FRACTIONS, Gateway::DEBIT_CARDS
Instance Attribute Summary
Attributes inherited from Gateway
#options
Instance Method Summary
collapse
included, #redirect_url, #redirect_url_for
#capture, #credit, included, #initialize, #reauthorize, #refund, #test?, #transfer, #void
Methods inherited from Gateway
#card_brand, card_brand, inherited, #initialize, supports?, #test?
#format
Instance Method Details
#authorize(money, options = {}) ⇒ Object
34
35
36
37
38
|
# File 'lib/active_merchant/billing/gateways/paypal_express.rb', line 34
def authorize(money, options = {})
requires!(options, :token, :payer_id)
commit 'DoExpressCheckoutPayment', build_sale_or_authorization_request('Authorization', money, options)
end
|
#details_for(token) ⇒ Object
30
31
32
|
# File 'lib/active_merchant/billing/gateways/paypal_express.rb', line 30
def details_for(token)
commit 'GetExpressCheckoutDetails', build_get_details_request(token)
end
|
#purchase(money, options = {}) ⇒ Object
40
41
42
43
44
|
# File 'lib/active_merchant/billing/gateways/paypal_express.rb', line 40
def purchase(money, options = {})
requires!(options, :token, :payer_id)
commit 'DoExpressCheckoutPayment', build_sale_or_authorization_request('Sale', money, options)
end
|
#reference_transaction(money, options = {}) ⇒ Object
46
47
48
49
50
|
# File 'lib/active_merchant/billing/gateways/paypal_express.rb', line 46
def reference_transaction(money, options = {})
requires!(options, :reference_id, :payment_type, :invoice_id, :description, :ip)
commit 'DoReferenceTransaction', build_reference_transaction_request('Sale', money, options)
end
|
#setup_authorization(money, options = {}) ⇒ Object
18
19
20
21
22
|
# File 'lib/active_merchant/billing/gateways/paypal_express.rb', line 18
def setup_authorization(money, options = {})
requires!(options, :return_url, :cancel_return_url)
commit 'SetExpressCheckout', build_setup_request('Authorization', money, options)
end
|
#setup_purchase(money, options = {}) ⇒ Object
24
25
26
27
28
|
# File 'lib/active_merchant/billing/gateways/paypal_express.rb', line 24
def setup_purchase(money, options = {})
requires!(options, :return_url, :cancel_return_url)
commit 'SetExpressCheckout', build_setup_request('Sale', money, options)
end
|