Class: ActiveMerchant::Billing::BankFrickGateway
- Defined in:
- lib/active_merchant/billing/gateways/bank_frick.rb
Overview
For more information visit Bank Frick Acquiring Services
Written by Piers Chambers (Varyonic.com)
Constant Summary collapse
- SUPPORTED_TRANSACTIONS =
The set of supported transactions for this gateway. More operations are supported by the gateway itself, but are not supported in this library.
{ 'sale' => 'CC.DB', 'authonly' => 'CC.PA', 'capture' => 'CC.CP', 'refund' => 'CC.RF', 'void' => 'CC.RV' }
Constants inherited from Gateway
Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::RECURRING_DEPRECATION_MESSAGE, Gateway::STANDARD_ERROR_CODE
Instance Attribute Summary
Attributes inherited from Gateway
Instance Method Summary collapse
- #authorize(money, payment, options = {}) ⇒ Object
- #capture(money, authorization, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ BankFrickGateway
constructor
A new instance of BankFrickGateway.
- #purchase(money, payment, options = {}) ⇒ Object
- #refund(money, authorization, options = {}) ⇒ Object
- #verify(credit_card, options = {}) ⇒ Object
- #void(authorization, options = {}) ⇒ Object
Methods inherited from Gateway
#add_field_to_post_if_present, #add_fields_to_post_if_present, #card_brand, card_brand, #generate_unique_id, inherited, #scrub, #supported_countries, supported_countries, supported_countries=, supports?, #supports_network_tokenization?, #supports_scrubbing?, #test?
Methods included from CreditCardFormatting
#expdate, #format, #strftime_yyyymm
Methods included from PostsData
included, #raw_ssl_request, #ssl_get, #ssl_post, #ssl_request
Constructor Details
#initialize(options = {}) ⇒ BankFrickGateway
Returns a new instance of BankFrickGateway.
30 31 32 33 |
# File 'lib/active_merchant/billing/gateways/bank_frick.rb', line 30 def initialize( = {}) requires!(, :sender, :channel, :userid, :userpwd) super end |
Instance Method Details
#authorize(money, payment, options = {}) ⇒ Object
45 46 47 48 49 50 51 52 53 |
# File 'lib/active_merchant/billing/gateways/bank_frick.rb', line 45 def (money, payment, = {}) post = {} add_invoice(post, money, ) add_payment(post, payment) add_address(post, payment, ) add_customer_data(post, ) commit('authonly', post) end |
#capture(money, authorization, options = {}) ⇒ Object
55 56 57 58 59 60 61 |
# File 'lib/active_merchant/billing/gateways/bank_frick.rb', line 55 def capture(money, , = {}) post = {} post[:authorization] = add_invoice(post, money, ) commit('capture', post) end |
#purchase(money, payment, options = {}) ⇒ Object
35 36 37 38 39 40 41 42 43 |
# File 'lib/active_merchant/billing/gateways/bank_frick.rb', line 35 def purchase(money, payment, = {}) post = {} add_invoice(post, money, ) add_payment(post, payment) add_address(post, payment, ) add_customer_data(post, ) commit('sale', post) end |
#refund(money, authorization, options = {}) ⇒ Object
63 64 65 66 67 68 69 |
# File 'lib/active_merchant/billing/gateways/bank_frick.rb', line 63 def refund(money, , = {}) post = {} post[:authorization] = add_invoice(post, money, ) commit('refund', post) end |
#verify(credit_card, options = {}) ⇒ Object
78 79 80 81 82 83 |
# File 'lib/active_merchant/billing/gateways/bank_frick.rb', line 78 def verify(credit_card, = {}) MultiResponse.run(:use_first_response) do |r| r.process { (100, credit_card, ) } r.process(:ignore_result) { void(r., ) } end end |
#void(authorization, options = {}) ⇒ Object
71 72 73 74 75 76 |
# File 'lib/active_merchant/billing/gateways/bank_frick.rb', line 71 def void(, = {}) post = {} post[:authorization] = commit('void', post) end |