wechatpay-apiv3 / wechatpay-go

微信支付 APIv3 的官方 Go Library
https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/pages/index.shtml
Apache License 2.0
1.07k stars 145 forks source link

退款回调包解析错误 #200

Closed reechou closed 1 year ago

reechou commented 1 year ago

解析退款回调包报错: Failed to obtain reader, failed to marshal fields to JSON, json: error calling MarshalJSON for type *refunddomestic.Refund: field Channel is required and must be specified in Refund

应该是微信支付那边回调协议改了,没有返回 Channel 字段,但是sdk里面确实强制检查

image
reechou commented 1 year ago

@EmmetZC

xy-peng commented 1 year ago

退款实现的原因,退款回调的契约跟回调查询返回的 Refund 并不一致,不能直接使用。以文档为准,建议用 map[string]interface{}