class EasyPayULatam::Configuration

Attributes

account_id[RW]
api_key[RW]
currency_precision[RW]
merchant_id[RW]
payu_url[RW]
placeholder[RW]
root_url[RW]
test_account_id[RW]
test_api_key[RW]
test_merchan_id[RW]
test_payu_url[RW]
test_root_url[RW]
testing[RW]

Public Class Methods

new() click to toggle source
# File lib/easy_pay_u_latam/Configuration.rb, line 5
def initialize
  # Path for PayU responses
  @currency_precision = 0
  @root_url = nil
  @test_root_url = nil

  @placeholder = nil

  # For production
  @api_key = nil
  @merchant_id = nil
  @account_id = nil
  @payu_url = "https://gateway.payulatam.com/ppp-web-gateway/"

  # For testing
  @test_api_key = "4Vj8eK4rloUd272L48hsrarnUA"
  @test_merchant_id = "508029"
  @test_account_id = "512321"
  @test_payu_url = "https://sandbox.checkout.payulatam.com/ppp-web-gateway-payu"

  @testing = false
end

Public Instance Methods

get_account_id() click to toggle source
# File lib/easy_pay_u_latam/Configuration.rb, line 44
def get_account_id
  if @testing == true
    @test_account_id
  else
    @account_id
  end
end
get_api_key() click to toggle source
# File lib/easy_pay_u_latam/Configuration.rb, line 28
def get_api_key
  if @testing == true
    @test_api_key
  else
    @api_key
  end
end
get_merchant_id() click to toggle source
# File lib/easy_pay_u_latam/Configuration.rb, line 36
def get_merchant_id
  if @testing == true
    @test_merchant_id
  else
    @merchant_id
  end
end
get_payu_url() click to toggle source
# File lib/easy_pay_u_latam/Configuration.rb, line 52
def get_payu_url
  if @testing == true
    @test_payu_url
  else
    @payu_url
  end
end
get_root_url() click to toggle source
# File lib/easy_pay_u_latam/Configuration.rb, line 60
def get_root_url
  if @testing == true
    @test_root_url
  else
    @root_url
  end
end