View Source WeChat.Pay.Refund (wechat v0.13.1)

微信支付-退款

Summary

Types

商户退款单号

退款原因

Types

@type out_refund_no() :: String.t()

商户退款单号

商户系统内部的退款单号,商户系统内部唯一,只能是数字、大小写字母_-|*@ ,同一退款单号多次请求只退一笔

@type reason() :: String.t()

退款原因

若商户传入,会在下发给用户的退款消息中体现退款原因

Functions

@spec refund(WeChat.client(), body()) :: WeChat.response()

退款申请 - 官方文档

当交易发生之后一段时间内,由于买家或者卖家的原因需要退款时,卖家可以通过退款接口将支付款退还给买家, 微信支付将在收到退款请求并且验证成功之后,按照退款规则将支付款按原路退到买家帐号上。

Link to this function

refund_by_id(client, transaction_id, out_refund_no, refund_amount, total_amount, notify_url, reason \\ "系统退回")

View Source

same as refund/2

Link to this function

refund_by_out_trade_no(client, out_trade_no, out_refund_no, refund_amount, total_amount, notify_url, reason \\ "系统退回")

View Source

same as refund/2