Sha256: 1067918345ab5f2ad1986e3c7029be939130b816d4eaba10d344b6d7b40f6ac9

Contents?: true

Size: 1.18 KB

Versions: 1

Compression:

Stored size: 1.18 KB

Contents

module CecabankCommon
  #### CECA's MAGIC NUMBERS
  CECA_ENCRIPTION = 'SHA2'
  CECA_CURRENCIES_DICTIONARY = { 'EUR' => 978, 'USD' => 840, 'GBP' => 826 }

  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

  # Creates a new CecabankGateway
  #
  # The gateway requires four values for connection to be passed
  # in the +options+ hash.
  #
  # ==== Options
  #
  # * <tt>:merchant_id</tt>  -- Cecabank's merchant_id (REQUIRED)
  # * <tt>:acquirer_bin</tt> -- Cecabank's acquirer_bin (REQUIRED)
  # * <tt>:terminal_id</tt>  -- Cecabank's terminal_id (REQUIRED)
  # * <tt>:cypher_key</tt>   -- Cecabank's cypher key (REQUIRED)
  # * <tt>:test</tt>         -- +true+ or +false+. If true, perform transactions against the test server.
  #   Otherwise, perform transactions against the production server.
  def initialize(options = {})
    requires!(options, :merchant_id, :acquirer_bin, :terminal_id, :cypher_key)
    super
  end

  def supports_scrubbing?
    true
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activemerchant-1.137.0 lib/active_merchant/billing/gateways/cecabank/cecabank_common.rb