HitPay.API (hit_pay v0.1.2)
Utilities for interacting with the HitPay API. API Doc: https://hit-pay.com/docs.html
Link to this section Summary
Functions
In config.exs, use a string, a function or a tuple
If there's no environment config, detect based on environment. sandbox is used for non-production environment. In config.exs, use a string, a function or a tuple. Possible environments are "sandbox", "staging", "production"
In config.exs your implicit or expicit configuration is
In config.exs, use a string, a function or a tuple
Link to this section Types
body()
Specs
headers()
Specs
method()
Specs
method() :: :get | :post | :put | :delete | :patch
Link to this section Functions
api_key()
In config.exs, use a string, a function or a tuple:
config :hit_pay, api_key: System.get_env("HIT_PAY_API_KEY")
or:
config :hit_pay, api_key: {:system, "HIT_PAY_API_KEY"}
or:
config :hit_pay, api_key: {MyApp.Config, :hit_pay_api_key, []}
environment()
If there's no environment config, detect based on environment. sandbox is used for non-production environment. In config.exs, use a string, a function or a tuple. Possible environments are "sandbox", "staging", "production"
config :hit_pay, environment: "sandbox"
or:
config :hit_pay, environment: System.get_env("HIT_PAY_ENVIRONMENT")
or:
config :hit_pay, environment: {:system, "HIT_PAY_ENVIRONMENT"}
or:
config :hit_pay, environment: {MyApp.Config, :HIT_PAY_ENVIRONMENT, []}
json_library()
Specs
json_library() :: module()
In config.exs your implicit or expicit configuration is:
config ex_:crowdin, json_library: Poison # defaults to Jason but can be configured to Poison
request(path, method, body \\ %{}, headers \\ %{}, opts \\ [])
Specs
salt()
In config.exs, use a string, a function or a tuple:
config :hit_pay, salt: System.get_env("HIT_PAY_SALT")
or:
config :hit_pay, salt: {:system, "HIT_PAY_SALT"}
or:
config :hit_pay, salt: {MyApp.Config, :HIT_PAY_SALT, []}