Class: ActiveMerchant::Billing::FirstPayGateway
- Inherits:
-
Gateway
- Object
- Gateway
- ActiveMerchant::Billing::FirstPayGateway
show all
- Defined in:
- lib/active_merchant/billing/gateways/first_pay.rb
Constant Summary
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 inherited from Gateway
#card_brand, card_brand, #generate_unique_id, inherited, non_fractional_currency?, #scrub, supported_countries, #supported_countries, supported_countries=, supports?, #supports_network_tokenization?, #supports_scrubbing?, #test?
#expdate, #format
Methods included from PostsData
included, #raw_ssl_request, #ssl_get, #ssl_post, #ssl_request
Constructor Details
Returns a new instance of FirstPayGateway.
16
17
18
19
|
# File 'lib/active_merchant/billing/gateways/first_pay.rb', line 16
def initialize(options={})
requires!(options, :transaction_center_id, :gateway_id)
super
end
|
Instance Method Details
#authorize(money, payment, options = {}) ⇒ Object
31
32
33
34
35
36
37
38
39
|
# File 'lib/active_merchant/billing/gateways/first_pay.rb', line 31
def authorize(money, payment, options={})
post = {}
add_invoice(post, money, options)
add_payment(post, payment)
add_address(post, payment, options)
add_customer_data(post, options)
commit('auth', post)
end
|
#capture(money, authorization, options = {}) ⇒ Object
41
42
43
44
45
|
# File 'lib/active_merchant/billing/gateways/first_pay.rb', line 41
def capture(money, authorization, options={})
post = {}
add_reference(post, 'settle', money, authorization)
commit('settle', post)
end
|
#purchase(money, payment, options = {}) ⇒ Object
21
22
23
24
25
26
27
28
29
|
# File 'lib/active_merchant/billing/gateways/first_pay.rb', line 21
def purchase(money, payment, options={})
post = {}
add_invoice(post, money, options)
add_payment(post, payment)
add_address(post, payment, options)
add_customer_data(post, options)
commit('sale', post)
end
|
#refund(money, authorization, options = {}) ⇒ Object
47
48
49
50
51
|
# File 'lib/active_merchant/billing/gateways/first_pay.rb', line 47
def refund(money, authorization, options={})
post = {}
add_reference(post, 'credit', money, authorization)
commit('credit', post)
end
|
#void(authorization, options = {}) ⇒ Object
53
54
55
56
57
|
# File 'lib/active_merchant/billing/gateways/first_pay.rb', line 53
def void(authorization, options={})
post = {}
add_reference(post, 'void', nil, authorization)
commit('void', post)
end
|