Class: ActiveMerchant::Billing::PayflowExpressGateway

Inherits:
Gateway
  • Object
show all
Includes:
PayflowCommonAPI, PaypalExpressCommon
Defined in:
lib/active_merchant/billing/gateways/payflow_express.rb

Direct Known Subclasses

PayflowExpressUkGateway

Constant Summary

Constants included from PayflowCommonAPI

ActiveMerchant::Billing::PayflowCommonAPI::CARD_MAPPING, ActiveMerchant::Billing::PayflowCommonAPI::CVV_CODE, ActiveMerchant::Billing::PayflowCommonAPI::TRANSACTIONS, ActiveMerchant::Billing::PayflowCommonAPI::XMLNS

Constants inherited from Gateway

Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::CURRENCIES_WITHOUT_FRACTIONS, Gateway::DEBIT_CARDS, Gateway::RECURRING_DEPRECATION_MESSAGE, Gateway::STANDARD_ERROR_CODE

Instance Attribute Summary

Attributes inherited from Gateway

#options

Instance Method Summary collapse

Methods included from PaypalExpressCommon

included, #redirect_url, #redirect_url_for

Methods included from PayflowCommonAPI

#capture, included, #initialize, #void

Methods inherited from Gateway

#card_brand, card_brand, #generate_unique_id, inherited, #initialize, non_fractional_currency?, #scrub, supported_countries, #supported_countries, supported_countries=, supports?, #supports_network_tokenization?, #supports_scrubbing?, #test?

Methods included from CreditCardFormatting

#expdate, #format

Methods included from PostsData

included, #raw_ssl_request, #ssl_get, #ssl_post, #ssl_request

Instance Method Details

#authorize(money, options = {}) ⇒ Object



72
73
74
75
76
# File 'lib/active_merchant/billing/gateways/payflow_express.rb', line 72

def authorize(money, options = {})
  requires!(options, :token, :payer_id)
  request = build_sale_or_authorization_request('Authorization', money, options)
  commit(request, options)
end

#credit(money, identification, options = {}) ⇒ Object



89
90
91
92
# File 'lib/active_merchant/billing/gateways/payflow_express.rb', line 89

def credit(money, identification, options = {})
  ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE
  refund(money, identification, options)
end

#details_for(token) ⇒ Object



108
109
110
111
# File 'lib/active_merchant/billing/gateways/payflow_express.rb', line 108

def details_for(token)
  request = build_get_express_details_request(token)
  commit(request, options)
end

#purchase(money, options = {}) ⇒ Object



78
79
80
81
82
# File 'lib/active_merchant/billing/gateways/payflow_express.rb', line 78

def purchase(money, options = {})
  requires!(options, :token, :payer_id)
  request = build_sale_or_authorization_request('Sale', money, options)
  commit(request, options)
end

#refund(money, identification, options = {}) ⇒ Object



84
85
86
87
# File 'lib/active_merchant/billing/gateways/payflow_express.rb', line 84

def refund(money, identification, options = {})
  request = build_reference_request(:credit, money, identification, options)
  commit(request, options)
end

#setup_authorization(money, options = {}) ⇒ Object



94
95
96
97
98
99
# File 'lib/active_merchant/billing/gateways/payflow_express.rb', line 94

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, options)
end

#setup_purchase(money, options = {}) ⇒ Object



101
102
103
104
105
106
# File 'lib/active_merchant/billing/gateways/payflow_express.rb', line 101

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, options)
end