method | 说明 | 参数 | 返回值 |
---|---|---|---|
query | 支付订单查询 | string $orderSn | Collection |
queryRefund | 退款查询 | string $orderSn | Collection |
queryTransfer | 转账查询 | array $order | Collection |
支付订单
$pay = new \fengkui\Pay\Wechat($wechatConfig);
$orderSn = 'order_snxxxxxxxx'; // 商户订单号
$result = $pay->query($orderSn); // 默认使用false商户订单号查询订单
$transactionId = 'transaction_idxxxxxxxx'; // 微信支付订单号
$result = $pay->query($transactionId, true); // 商户订单号查询订单
支付返回参数
相关返回参数说明,请参考这里,查看「返回参数」一栏。
返回示例
{
"amount": {
"currency": "CNY",
"payer_currency": "CNY",
"payer_total": 1,
"total": 1
},
"appid": "wxdace645e0bc2cXXX",
"attach": "",
"bank_type": "OTHERS",
"mchid": "1900006XXX",
"out_trade_no": "44_2126281063_5504",
"payer": {
"openid": "o4GgauJP_mgWEWictzA15WT15XXX"
},
"promotion_detail": [],
"success_time": "2021-03-22T10:29:05+08:00",
"trade_state": "SUCCESS",
"trade_state_desc": "支付成功",
"trade_type": "JSAPI",
"transaction_id": "4200000891202103228088184743"
}
退款订单
$pay = new \fengkui\Pay\Wechat($wechatConfig);
$refundSn = 'refund_snxxxxxxxx'; // 商户退款单号
$result = $pay->queryRefund($refundSn); // 默认使用false商户订单号查询订单
退款返回参数
相关返回参数说明,请参考这里,查看「返回参数」一栏。
返回示例
{
"refund_id": "50000000382019052709732678859",
"out_refund_no": "1217752501201407033233368018",
"transaction_id": "1217752501201407033233368018",
"out_trade_no": "1217752501201407033233368018",
"channel": "ORIGINAL",
"user_received_account": "招商银行信用卡0403",
"success_time": "2020-12-01T16:18:12+08:00",
"create_time": "2020-12-01T16:18:12+08:00",
"status": "SUCCESS",
"funds_account": "UNSETTLED",
"amount": {
"total": 100,
"refund": 100,
"from": [
{
"account": "AVAILABLE",
"amount": 444
}
],
"payer_total": 90,
"payer_refund": 90,
"settlement_refund": 100,
"settlement_total": 100,
"discount_refund": 10,
"currency": "CNY"
},
"promotion_detail": [
{
"promotion_id": "109519",
"scope": "SINGLE",
"type": "DISCOUNT",
"amount": 5,
"refund_amount": 100,
"goods_detail": [
{
"merchant_goods_id": "1217752501201407033233368018",
"wechatpay_goods_id": "1001",
"goods_name": "iPhone6s 16G",
"unit_price": 528800,
"refund_amount": 528800,
"refund_quantity": 1
}
]
}
]
}
转账查询
$pay = new \fengkui\Pay\Wechat($wechatConfig);
$order = [
'order_sn' => '', // 商家批次单号(微信批次单号)
'detail_sn' => , // 商家明细单号查询明细单A(微信明细单号查询明细单)
]; // 商户订单号
$result = $pay->queryTransfer($order); // 默认使用false商家批次单号查询
$result = $pay->queryTransfer($order, true); // 微信批次单号查询
退款返回参数
相关返回参数说明,请参考这里,查看「返回参数」一栏。