WechatPay v0.9.0 WechatPay.Client View Source
API client.
Link to this section Summary
Link to this section Types
Specs
Link to this section Functions
Specs
new(Enum.t()) :: {:ok, WechatPay.Client.t()} | {:error, binary()}
Build a new client from options
Example
iex>WechatPay.Client.new(app_id: "APP_ID", mch_id: "MCH_ID", api_key: "API_KEY", sign_type: :sha256)
{:ok,
%WechatPay.Client{
api_host: "https://api.mch.weixin.qq.com/",
api_key: "API_KEY",
app_id: "APP_ID",
mch_id: "MCH_ID",
sign_type: :sha256,
ssl: nil
}}