IPay88.Config (ipay88 v0.1.2)
Utility that handles interaction with the application's configuration
Link to this section Summary
Functions
In config.exs, use a string, a function or a tuple
In config.exs your implicit or expicit configuration is
In config.exs, use a string, a function or a tuple
In config.exs, use a string, a function or a tuple
Resolves the given key from the application's configuration returning the wrapped expanded value. If the value was a function it get's evaluated, if the value is a touple of three elements it gets applied.
In config.exs, use a string, a function or a tuple
Link to this section Functions
backend_url()
In config.exs, use a string, a function or a tuple:
config :ipay88, backend_url: System.get_env("IPAY88_BACKEND_URL")or:
config :ipay88, backend_url: {:system, "IPAY88_BACKEND_URL"}or:
config :ipay88, backend_url: {MyApp.Config, :ipay88_backend_url, []} json_library()
Specs
json_library() :: module()
In config.exs your implicit or expicit configuration is:
config :ipay88, json_library: Poison # defaults to Jason but can be configured to Poison merchant_code()
In config.exs, use a string, a function or a tuple:
config :ipay88, merchant_code: System.get_env("IPAY88_MERCHANT_CODE")or:
config :ipay88, merchant_code: {:system, "IPAY88_MERCHANT_CODE"}or:
config :ipay88, merchant_code: {MyApp.Config, :ipay88_merchant_code, []} merchant_key()
In config.exs, use a string, a function or a tuple:
config :ipay88, merchant_key: System.get_env("IPAY88_MERCHANT_KEY")or:
config :ipay88, merchant_key: {:system, "IPAY88_MERCHANT_KEY"}or:
config :ipay88, merchant_key: {MyApp.Config, :ipay88_merchant_key, []} resolve(key, default \\ nil)
Specs
Resolves the given key from the application's configuration returning the wrapped expanded value. If the value was a function it get's evaluated, if the value is a touple of three elements it gets applied.
response_url()
In config.exs, use a string, a function or a tuple:
config :ipay88, response_url: System.get_env("IPAY88_RESPONSE_URL")or:
config :ipay88, response_url: {:system, "IPAY88_RESPONSE_URL"}or:
config :ipay88, response_url: {MyApp.Config, :ipay88_response_url, []}