ExWechatpay. VirtualPay. Client
(ex_wechatpay v0.4.0)
View Source
虚拟支付 xpay API 客户端
封装微信虚拟支付的服务端接口调用:
- query_balance: 查询代币余额
- query_order: 查询订单状态
- refund: 发起退款
- notify_deliver: 通知发货
- code2session: 用 code 换 session_key + openid
所有 xpay 接口自动附加 access_token 和 pay_sig。
Summary
Functions
用 code 换 session_key + openid
Functions
@spec code2session(String.t(), String.t(), String.t()) :: {:ok, map()} | {:error, ExWechatpay.Exception.t()}
用 code 换 session_key + openid
@spec notify_deliver( atom(), String.t(), String.t(), String.t(), String.t(), String.t(), integer() ) :: {:ok, map()} | {:error, ExWechatpay.Exception.t()}
通知微信已发货
@spec query_balance( atom(), String.t(), String.t(), String.t(), String.t(), String.t(), integer() ) :: {:ok, map()} | {:error, ExWechatpay.Exception.t()}
查询用户代币余额
@spec query_order( atom(), String.t(), String.t(), String.t(), String.t(), String.t(), integer() ) :: {:ok, map()} | {:error, ExWechatpay.Exception.t()}
查询订单状态
@spec refund( atom(), String.t(), String.t(), String.t(), String.t(), String.t(), integer(), integer() ) :: {:ok, map()} | {:error, ExWechatpay.Exception.t()}
发起退款