$resp = $this->instance
->chain('v3/refund/domestic/refunds')
->post(['json' => [
'transaction_id' => $transaction_id,
'out_refund_no' => $out_refund_no,
'reason' => $refund_reason,
'notify_url' => Yii::$app->params['pay_notice'],
'amount' => [
'refund' => $refund_fee,
'total' => $total_fee,
'currency' => 'CNY'
],
'funds_account' => 'OPERATION'
]]);
Client error: `POST https://api.mch.weixin.qq.com/v3/refund/domestic/refunds` resulted in a `400 Bad Request` response: {"code":"PARAM_ERROR","detail":{"location":"body","value":"OPERATION"},"message":"无法将 JSON 输入源“/body/funds (truncated...) 400 Bad Request {"code":"PARAM_ERROR","detail":{"location":"body","value":"OPERATION"},"message":"无法将 JSON 输入源“/body/funds_account”映射到目标字段“退款资金来源”中,此字段需要能映射到一个合法的“/body/funds_account”枚举"}
参考文档链接:https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_9.shtml
枚举值只有:
AVAILABLE:可用余额账户