Class: ActiveMerchant::Billing::CardStreamModernGateway
- Inherits:
-
Gateway
- Object
- Gateway
- ActiveMerchant::Billing::CardStreamModernGateway
show all
- Defined in:
- lib/active_merchant/billing/gateways/card_stream_modern.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 CardStreamModernGateway.
12
13
14
15
16
17
18
19
20
|
# File 'lib/active_merchant/billing/gateways/card_stream_modern.rb', line 12
def initialize(options = {})
requires!(options, :login)
if(options[:threeDSRequired])
@threeDSRequired = options[:threeDSRequired]
else
@threeDSRequired = 'N'
end
super
end
|
Instance Method Details
#authorize(money, creditcard, options = {}) ⇒ Object
22
23
24
25
26
27
28
29
30
|
# File 'lib/active_merchant/billing/gateways/card_stream_modern.rb', line 22
def authorize(money, creditcard, options = {})
post = {}
add_amount(post, money, options)
add_invoice(post, creditcard, money, options)
add_creditcard(post, creditcard)
add_address(post, creditcard, options)
add_customer_data(post, options)
commit('PREAUTH', post)
end
|
#capture(money, authorization, options = {}) ⇒ Object
42
43
44
45
46
47
|
# File 'lib/active_merchant/billing/gateways/card_stream_modern.rb', line 42
def capture(money, authorization, options = {})
post = {}
add_pair(post, :xref, authorization)
add_amount(post, money, options)
commit('SALE', post)
end
|
#purchase(money, creditcard, options = {}) ⇒ Object
32
33
34
35
36
37
38
39
40
|
# File 'lib/active_merchant/billing/gateways/card_stream_modern.rb', line 32
def purchase(money, creditcard, options = {})
post = {}
add_amount(post, money, options)
add_invoice(post, creditcard, money, options)
add_creditcard(post, creditcard)
add_address(post, creditcard, options)
add_customer_data(post, options)
commit('SALE', post)
end
|
#refund(money, authorization, options = {}) ⇒ Object
49
50
51
52
53
54
|
# File 'lib/active_merchant/billing/gateways/card_stream_modern.rb', line 49
def refund(money, authorization, options = {})
post = {}
add_pair(post, :xref, authorization)
add_amount(post, money, options)
commit('REFUND', post)
end
|
#void(authorization, options = {}) ⇒ Object
56
57
58
59
60
|
# File 'lib/active_merchant/billing/gateways/card_stream_modern.rb', line 56
def void(authorization, options = {})
post = {}
add_pair(post, :xref, authorization)
commit('REFUND', post)
end
|