WechatPay v0.7.0 WechatPay.Utils.Signature View Source
Module to sign data
Link to this section Summary
Link to this section Functions
Generate the signature of data with API key
Example
iex> WechatPay.Utils.Signature.sign(%{...}, "wx9999")
...> "02696FC7E3E19F852A0335F2F007DD3E"
Link to this function
verify(data, apikey)
View Source
verify(map(), String.t()) :: :ok | {:error, WechatPay.Error.t()}
Verify the signature of Wechat’s response
Example
iex > WechatPay.Utils.Signature.verify(%{sign: "foobar"}, "wx9999")
... > :ok