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::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, #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.
17
18
19
20
|
# File 'lib/active_merchant/billing/gateways/first_pay.rb', line 17
def initialize(options={})
requires!(options, :transaction_center_id, :gateway_id)
super
end
|
Instance Method Details
#authorize(money, payment, options = {}) ⇒ Object
32
33
34
35
36
37
38
39
40
|
# File 'lib/active_merchant/billing/gateways/first_pay.rb', line 32
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
42
43
44
45
46
|
# File 'lib/active_merchant/billing/gateways/first_pay.rb', line 42
def capture(money, authorization, options={})
post = {}
add_reference(post, 'settle', money, authorization)
commit('settle', post)
end
|
#purchase(money, payment, options = {}) ⇒ Object
22
23
24
25
26
27
28
29
30
|
# File 'lib/active_merchant/billing/gateways/first_pay.rb', line 22
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
48
49
50
51
52
|
# File 'lib/active_merchant/billing/gateways/first_pay.rb', line 48
def refund(money, authorization, options={})
post = {}
add_reference(post, 'credit', money, authorization)
commit('credit', post)
end
|
#void(authorization, options = {}) ⇒ Object
54
55
56
57
58
|
# File 'lib/active_merchant/billing/gateways/first_pay.rb', line 54
def void(authorization, options={})
post = {}
add_reference(post, 'void', nil, authorization)
commit('void', post)
end
|