Class: ActiveMerchant::Billing::QvalentGateway
- Inherits:
-
Gateway
- Object
- Gateway
- ActiveMerchant::Billing::QvalentGateway
show all
- Defined in:
- lib/active_merchant/billing/gateways/qvalent.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?, #supported_countries, supported_countries, supported_countries=, supports?, #supports_network_tokenization?, #test?
#expdate, #format
Methods included from PostsData
included, #raw_ssl_request, #ssl_get, #ssl_post, #ssl_request
Constructor Details
Returns a new instance of QvalentGateway.
15
16
17
18
|
# File 'lib/active_merchant/billing/gateways/qvalent.rb', line 15
def initialize(options={})
requires!(options, :username, :password, :merchant)
super
end
|
Instance Method Details
#purchase(amount, payment_method, options = {}) ⇒ Object
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/active_merchant/billing/gateways/qvalent.rb', line 20
def purchase(amount, payment_method, options={})
post = {}
add_invoice(post, amount, options)
add_order_number(post, options)
add_payment_method(post, payment_method)
add_verification_value(post, payment_method)
add_customer_data(post, options)
commit("capture", post)
end
|
#refund(amount, authorization, options = {}) ⇒ Object
31
32
33
34
35
36
37
38
|
# File 'lib/active_merchant/billing/gateways/qvalent.rb', line 31
def refund(amount, authorization, options={})
post = {}
add_invoice(post, amount, options)
add_reference(post, authorization, options)
add_customer_data(post, options)
commit("refund", post)
end
|
#scrub(transcript) ⇒ Object
52
53
54
55
56
57
|
# File 'lib/active_merchant/billing/gateways/qvalent.rb', line 52
def scrub(transcript)
transcript.
gsub(%r((&?customer.password=)[^&]*), '\1[FILTERED]').
gsub(%r((&?card.PAN=)[^&]*), '\1[FILTERED]').
gsub(%r((&?card.CVN=)[^&]*), '\1[FILTERED]')
end
|
#store(payment_method, options = {}) ⇒ Object
40
41
42
43
44
45
46
|
# File 'lib/active_merchant/billing/gateways/qvalent.rb', line 40
def store(payment_method, options = {})
post = {}
add_payment_method(post, payment_method)
add_card_reference(post)
commit("registerAccount", post)
end
|
#supports_scrubbing? ⇒ Boolean
48
49
50
|
# File 'lib/active_merchant/billing/gateways/qvalent.rb', line 48
def supports_scrubbing?
true
end
|