Sha256: 734f14aa7c93b013332cae9c1f5e8e603a2183c87bc70c4e71d91dfcbca5b1dc
Contents?: true
Size: 1.24 KB
Versions: 2
Compression:
Stored size: 1.24 KB
Contents
require "yaml" # :nodoc: module Veritrans # hold constants configuration define in server merchant module Config # server Veritrans - defined in gem - no change! SERVER_HOST = 'https://payments.veritrans.co.id' #'http://192.168.10.250:80' # Request Key Url - use in #get_keys - defined in gem - no change! REQUEST_KEY_URL = "/web1/commodityRegist.action" # Payment Redirect Url - defined in gem - no change! PAYMENT_REDIRECT_URL = "/web1/deviceCheck.action" # :nodoc: CUSTOMER_SPECIFICATION_FLAG = '0' #Billing same as shipping address '1' Different, manually input in Veritrans-web # Default Settlement method: SETTLEMENT_TYPE_CARD = "01" #Paymanet Type # Flag: Sales and Sales Credit, 0: only 1 credit. If not specified, 0 CARD_CAPTURE_FLAG = "1" def Config.included(mod) class <<self @@config_env = ::Object.const_defined?(:Rails) ? Rails.env : "development" @@config = File.exists?("./config/veritrans.yml") ? YAML.load_file("./config/veritrans.yml") : nil end mod.instance_eval <<CODE def self.config_env=(env) @@config_env = env end def self.config @@config[@@config_env] end CODE end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
veritrans-1.1.0 | lib/veritrans/config.rb |
veritrans-1.0.0 | lib/veritrans/config.rb |