Sha256: 59af8920349c9ae06df58bdd2fadc153d6354462d65557b55d385d14c73466ac

Contents?: true

Size: 703 Bytes

Versions: 5

Compression:

Stored size: 703 Bytes

Contents

require 'forwardable'

require_relative 'wayforpay/constants'
require_relative 'wayforpay/encrypt_field'
require_relative 'wayforpay/payments'
require_relative 'wayforpay/request'
require_relative 'wayforpay/util/configuration'

module Wayforpay
  extend SingleForwardable

  def_delegators :configuration, :merchant_account,
                 :merchant_domain_name, :encrypt_secret_key

  # Pre-configure with merchant_account, merchant_domain_name
  # and encrypt_secret_key.
  def self.configure(&block)
    yield configuration
  end

  private

  ##
  # Returns an existing or instantiates a new configuration object.
  def self.configuration
    @configuration ||= Util::Configuration.new
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
wayforpay-0.1.7 lib/wayforpay.rb
wayforpay-0.1.6 lib/wayforpay.rb
wayforpay-0.1.5 lib/wayforpay.rb
wayforpay-0.1.4 lib/wayforpay.rb
wayforpay-0.1.3 lib/wayforpay.rb