Class: ActiveMerchant::Billing::KushkiGateway
- Defined in:
- lib/active_merchant/billing/gateways/kushki.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
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ KushkiGateway
constructor
A new instance of KushkiGateway.
- #purchase(amount, payment_method, options = {}) ⇒ Object
- #scrub(transcript) ⇒ Object
- #supports_scrubbing? ⇒ Boolean
- #void(authorization, options = {}) ⇒ Object
Methods inherited from Gateway
#card_brand, card_brand, #generate_unique_id, inherited, supported_countries, #supported_countries, supported_countries=, supports?, #supports_network_tokenization?, #test?
Methods included from CreditCardFormatting
Methods included from PostsData
included, #raw_ssl_request, #ssl_get, #ssl_post, #ssl_request
Constructor Details
#initialize(options = {}) ⇒ KushkiGateway
Returns a new instance of KushkiGateway.
15 16 17 18 |
# File 'lib/active_merchant/billing/gateways/kushki.rb', line 15 def initialize(={}) requires!(, :public_merchant_id, :private_merchant_id) super end |
Instance Method Details
#purchase(amount, payment_method, options = {}) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/active_merchant/billing/gateways/kushki.rb', line 20 def purchase(amount, payment_method, ={}) MultiResponse.run() do |r| r.process { tokenize(amount, payment_method, ) } r.process { charge(amount, r., ) } end end |
#scrub(transcript) ⇒ Object
40 41 42 43 44 45 |
# File 'lib/active_merchant/billing/gateways/kushki.rb', line 40 def scrub(transcript) transcript. gsub(%r((Private-Merchant-Id: )\d+), '\1[FILTERED]'). gsub(%r((\"card\\\":{\\\"number\\\":\\\")\d+), '\1[FILTERED]'). gsub(%r((\"cvv\\\":\\\")\d+), '\1[FILTERED]') end |
#supports_scrubbing? ⇒ Boolean
36 37 38 |
# File 'lib/active_merchant/billing/gateways/kushki.rb', line 36 def supports_scrubbing? true end |
#void(authorization, options = {}) ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/active_merchant/billing/gateways/kushki.rb', line 27 def void(, ={}) action = "void" post = {} post[:ticketNumber] = commit(action, post) end |