Module: CecabankCommon
- Included in:
- ActiveMerchant::Billing::CecabankJsonGateway, ActiveMerchant::Billing::CecabankXmlGateway
- Defined in:
- lib/active_merchant/billing/gateways/cecabank/cecabank_common.rb
Constant Summary collapse
- CECA_ENCRIPTION =
CECA’s MAGIC NUMBERS
'SHA2'
- CECA_CURRENCIES_DICTIONARY =
{ 'EUR' => 978, 'USD' => 840, 'GBP' => 826 }
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Object
Creates a new CecabankGateway.
- #supports_scrubbing? ⇒ Boolean
Class Method Details
.included(base) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/active_merchant/billing/gateways/cecabank/cecabank_common.rb', line 6 def self.included(base) base.supported_countries = ['ES'] base.supported_cardtypes = %i[visa master american_express] base.homepage_url = 'http://www.ceca.es/es/' base.display_name = 'Cecabank' base.default_currency = 'EUR' base.money_format = :cents end |
Instance Method Details
#initialize(options = {}) ⇒ Object
Creates a new CecabankGateway
The gateway requires four values for connection to be passed in the options
hash.
Options
-
:merchant_id
– Cecabank’s merchant_id (REQUIRED) -
:acquirer_bin
– Cecabank’s acquirer_bin (REQUIRED) -
:terminal_id
– Cecabank’s terminal_id (REQUIRED) -
:cypher_key
– Cecabank’s cypher key (REQUIRED) -
:test
–true
orfalse
. If true, perform transactions against the test server. Otherwise, perform transactions against the production server.
28 29 30 31 |
# File 'lib/active_merchant/billing/gateways/cecabank/cecabank_common.rb', line 28 def initialize( = {}) requires!(, :merchant_id, :acquirer_bin, :terminal_id, :cypher_key) super end |
#supports_scrubbing? ⇒ Boolean
33 34 35 |
# File 'lib/active_merchant/billing/gateways/cecabank/cecabank_common.rb', line 33 def supports_scrubbing? true end |