Class: ActiveMerchant::Billing::PaypalExpressGateway
- Includes:
- PaypalCommonAPI, PaypalExpressCommon, PaypalRecurringApi
- Defined in:
- lib/active_merchant/billing/gateways/paypal_express.rb
Direct Known Subclasses
Constant Summary collapse
- NON_STANDARD_LOCALE_CODES =
{ 'DK' => 'da_DK', 'IL' => 'he_IL', 'ID' => 'id_ID', 'JP' => 'jp_JP', 'NO' => 'no_NO', 'BR' => 'pt_BR', 'RU' => 'ru_RU', 'SE' => 'sv_SE', 'TH' => 'th_TH', 'TR' => 'tr_TR', 'CN' => 'zh_CN', 'HK' => 'zh_HK', 'TW' => 'zh_TW' }
Constants included from PaypalRecurringApi
ActiveMerchant::Billing::PaypalRecurringApi::API_VERSION, ActiveMerchant::Billing::PaypalRecurringApi::EBAY_NAMESPACE, ActiveMerchant::Billing::PaypalRecurringApi::PAYPAL_NAMESPACE
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::CREDIT_DEPRECATION_MESSAGE, 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
- #reference_transaction(money, options = {}) ⇒ Object
- #setup_authorization(money, options = {}) ⇒ Object
- #setup_purchase(money, options = {}) ⇒ Object
Methods included from PaypalRecurringApi
#bill_outstanding_amount, #cancel_recurring, #reactivate_recurring, #recurring, #status_recurring, #suspend_recurring, #update_recurring
Methods included from PaypalExpressCommon
included, #redirect_url, #redirect_url_for
Methods included from PaypalCommonAPI
#authorize_transaction, #balance, #capture, #credit, included, #initialize, #manage_pending_transaction, #reauthorize, #refund, #transaction_details, #transaction_search, #transfer, #void
Methods inherited from Gateway
#card_brand, card_brand, inherited, #initialize, supports?, #test?
Methods included from CreditCardFormatting
Instance Method Details
#authorize(money, options = {}) ⇒ Object
50 51 52 53 54 |
# File 'lib/active_merchant/billing/gateways/paypal_express.rb', line 50 def (money, = {}) requires!(, :token, :payer_id) commit 'DoExpressCheckoutPayment', ('Authorization', money, ) end |
#details_for(token) ⇒ Object
46 47 48 |
# File 'lib/active_merchant/billing/gateways/paypal_express.rb', line 46 def details_for(token) commit 'GetExpressCheckoutDetails', build_get_details_request(token) end |
#purchase(money, options = {}) ⇒ Object
56 57 58 59 60 |
# File 'lib/active_merchant/billing/gateways/paypal_express.rb', line 56 def purchase(money, = {}) requires!(, :token, :payer_id) commit 'DoExpressCheckoutPayment', ('Sale', money, ) end |
#reference_transaction(money, options = {}) ⇒ Object
62 63 64 65 66 |
# File 'lib/active_merchant/billing/gateways/paypal_express.rb', line 62 def reference_transaction(money, = {}) requires!(, :reference_id, :payment_type, :invoice_id, :description, :ip) commit 'DoReferenceTransaction', build_reference_transaction_request('Sale', money, ) end |
#setup_authorization(money, options = {}) ⇒ Object
34 35 36 37 38 |
# File 'lib/active_merchant/billing/gateways/paypal_express.rb', line 34 def (money, = {}) requires!(, :return_url, :cancel_return_url) commit 'SetExpressCheckout', build_setup_request('Authorization', money, ) end |
#setup_purchase(money, options = {}) ⇒ Object
40 41 42 43 44 |
# File 'lib/active_merchant/billing/gateways/paypal_express.rb', line 40 def setup_purchase(money, = {}) requires!(, :return_url, :cancel_return_url) commit 'SetExpressCheckout', build_setup_request('Sale', money, ) end |