Class: ActiveMerchant::Billing::PayscoutGateway
- Inherits:
-
Gateway
- Object
- Gateway
- ActiveMerchant::Billing::PayscoutGateway
show all
- Defined in:
- lib/active_merchant/billing/gateways/payscout.rb
Constant Summary
Constants inherited
from Gateway
Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::CURRENCIES_WITHOUT_FRACTIONS, Gateway::DEBIT_CARDS
Instance Attribute Summary
Attributes inherited from Gateway
#options
Instance Method Summary
collapse
Methods inherited from Gateway
#card_brand, card_brand, inherited, supports?, #test?
#format
Constructor Details
Returns a new instance of PayscoutGateway.
14
15
16
17
|
# File 'lib/active_merchant/billing/gateways/payscout.rb', line 14
def initialize(options = {})
requires!(options, :username, :password)
super
end
|
Instance Method Details
#authorize(money, creditcard, options = {}) ⇒ Object
19
20
21
22
23
24
25
26
27
|
# File 'lib/active_merchant/billing/gateways/payscout.rb', line 19
def authorize(money, creditcard, options = {})
post = {}
add_invoice(post, options)
add_creditcard(post, creditcard)
add_currency(post, money, options)
add_address(post, options)
commit('auth', money, post)
end
|
#capture(money, authorization, options = {}) ⇒ Object
39
40
41
42
43
44
|
# File 'lib/active_merchant/billing/gateways/payscout.rb', line 39
def capture(money, authorization, options = {})
post = {}
post[:transactionid] = authorization
commit('capture', money, post)
end
|
#purchase(money, creditcard, options = {}) ⇒ Object
29
30
31
32
33
34
35
36
37
|
# File 'lib/active_merchant/billing/gateways/payscout.rb', line 29
def purchase(money, creditcard, options = {})
post = {}
add_invoice(post, options)
add_creditcard(post, creditcard)
add_currency(post, money, options)
add_address(post, options)
commit('sale', money, post)
end
|
#refund(money, authorization, options = {}) ⇒ Object
47
48
49
50
51
52
|
# File 'lib/active_merchant/billing/gateways/payscout.rb', line 47
def refund(money, authorization, options = {})
post = {}
post[:transactionid] = authorization
commit('refund', money, post)
end
|
#void(authorization, options = {}) ⇒ Object
54
55
56
57
58
59
|
# File 'lib/active_merchant/billing/gateways/payscout.rb', line 54
def void(authorization, options = {})
post = {}
post[:transactionid] = authorization
commit('void', nil, post)
end
|