feat: 微信退款fix
This commit is contained in:
parent
24c0c6d36a
commit
cacfbccbcf
|
@ -8,8 +8,9 @@ import (
|
|||
)
|
||||
|
||||
var RefundWayList = map[int]func(commonRefundInfo *paymentService.OrderRefundRequest, channel *paychannelmodel.PayChannel) error{
|
||||
common.PAY_CHANNEL_WECHAT_H5: WechatH5Refund,
|
||||
common.PAY_CHANNEL_ALIPAY_WEB: AlipayWebRefund,
|
||||
common.PAY_CHANNEL_WECHAT_H5: WechatH5Refund,
|
||||
common.PAY_CHANNEL_ALIPAY_WEB: AlipayWebRefund,
|
||||
common.PAY_CHANNEL_WECHAT_JSAPI: WechatJSAPIRefund,
|
||||
}
|
||||
|
||||
func WechatH5Refund(commonRefundInfo *paymentService.OrderRefundRequest, channel *paychannelmodel.PayChannel) error {
|
||||
|
@ -31,3 +32,13 @@ func AlipayWebRefund(commonRefundInfo *paymentService.OrderRefundRequest, channe
|
|||
commonRefundInfo.Ali.AppId = channel.AppId
|
||||
return nil
|
||||
}
|
||||
|
||||
func WechatJSAPIRefund(commonRefundInfo *paymentService.OrderRefundRequest, channel *paychannelmodel.PayChannel) error {
|
||||
commonRefundInfo.PayChannel = common.PAY_CHANNLE_TYPE_WECHAT
|
||||
err := sonic.Unmarshal([]byte(channel.ExtJson), &commonRefundInfo.Wx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
commonRefundInfo.Wx.AppId = channel.AppId
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue