Class: ActiveMerchant::Billing::PaypalExpressGateway
- Includes:
- PaypalCommonAPI, PaypalExpressCommon
- Defined in:
- lib/active_merchant/billing/gateways/paypal_express.rb
Constant Summary
Constants included from PaypalCommonAPI
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::CURRENCIES_WITHOUT_FRACTIONS, Gateway::DEBIT_CARDS
Instance Attribute Summary
Attributes inherited from Gateway
Instance Method Summary collapse
- #authorize(money, options = {}) ⇒ Object
- #details_for(token) ⇒ Object
- #purchase(money, options = {}) ⇒ Object
- #setup_authorization(money, options = {}) ⇒ Object
- #setup_purchase(money, options = {}) ⇒ Object
Methods included from PaypalExpressCommon
included, #redirect_url, #redirect_url_for
Methods included from PaypalCommonAPI
#capture, #credit, included, #initialize, #reauthorize, #test?, #transfer, #void
Methods inherited from Gateway
#card_brand, card_brand, inherited, #initialize, supports?, #test?
Methods included from Utils
Methods included from CreditCardFormatting
Methods included from RequiresParameters
Methods included from PostsData
included, #raw_ssl_request, #ssl_get, #ssl_post, #ssl_request
Instance Method Details
#authorize(money, options = {}) ⇒ Object
32 33 34 35 36 |
# File 'lib/active_merchant/billing/gateways/paypal_express.rb', line 32 def (money, = {}) requires!(, :token, :payer_id) commit 'DoExpressCheckoutPayment', ('Authorization', money, ) end |
#details_for(token) ⇒ Object
28 29 30 |
# File 'lib/active_merchant/billing/gateways/paypal_express.rb', line 28 def details_for(token) commit 'GetExpressCheckoutDetails', build_get_details_request(token) end |
#purchase(money, options = {}) ⇒ Object
38 39 40 41 42 |
# File 'lib/active_merchant/billing/gateways/paypal_express.rb', line 38 def purchase(money, = {}) requires!(, :token, :payer_id) commit 'DoExpressCheckoutPayment', ('Sale', money, ) end |
#setup_authorization(money, options = {}) ⇒ Object
16 17 18 19 20 |
# File 'lib/active_merchant/billing/gateways/paypal_express.rb', line 16 def (money, = {}) requires!(, :return_url, :cancel_return_url) commit 'SetExpressCheckout', build_setup_request('Authorization', money, ) end |
#setup_purchase(money, options = {}) ⇒ Object
22 23 24 25 26 |
# File 'lib/active_merchant/billing/gateways/paypal_express.rb', line 22 def setup_purchase(money, = {}) requires!(, :return_url, :cancel_return_url) commit 'SetExpressCheckout', build_setup_request('Sale', money, ) end |