class PayCertify::Gateway

Constants

CREDENTIALS_PATH

Attributes

api_key[RW]
mode[RW]
vendor[RW]

Public Class Methods

configure() { |self| ... } click to toggle source
# File lib/paycertify/gateway.rb, line 19
def configure(&block)
  yield self if block_given?

  client = PayCertify::Gateway::Client.new(api_key: api_key, mode: mode)
  response = client.get(path: CREDENTIALS_PATH)
  
  self.vendor = response['response']['vendor']

  return {
    api_key: api_key,
    mode: mode,
    vendor: vendor
  }
end