下面是支付请求时的参数,支付成功,且回调也收到了:
{
description: '450-500g | 香菜-小把*1',
out_trade_no: '2501132241510718',
notify_url: 'https://xxx.xxx.ink/api/wxpay/notify',
amount: { total: 50, currency: 'CNY' },
payer: { openid: 'ohaCk7ax9rN1Xl4BmBdofTX93xxx' }
}
下面是申请退款时的参数:
{
out_trade_no: '2501132241510718',
out_refund_no: '4',
reason: '用户主动取消订单',
notify_url: 'https://xxx.xxx.ink/api/wxpay/notify',
amount: { refund: 50, total: 50, currency: 'CNY' }
}
直接报错了,很明显,上述币种、订单金额和退款金额是一致的,有人遇到过这种情况吗?:
{"code":"INVALID_REQUEST","message":"订单金额或退款金额与之前请求不一致,请核实后再试"}
检查一下你的out_refund_no是不是重复用了
感谢感谢,之前退款单号偷懒直接用的退款单ID,数据结构调整后数据清过1次,于是退款单号就和之前的重复了