查询红包记录
用于商户对已发放的红包进行查询红包的具体信息,可支持普通红包和裂变包。
请求参数 | 类型 | 描述 |
---|---|---|
xml | object | 声明请求的XML 数据结构 |
mch_billno | string | 商户订单号 |
mch_id | string | 商户号 |
appid | string | Appid |
bill_type | string | 订单类型 |
security | boolean | 声明加载商户API证书 固定值 true |
php
$instance->v2->mmpaymkttransfers->gethbinfo->postAsync([
'xml' => [
'mch_billno' => '10000098201411111234567890',
'mch_id' => '10000098',
'appid' => 'wxe062425f740d30d8',
'bill_type' => 'MCHT',
],
'security' => true,
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance->chain('v2/mmpaymkttransfers/gethbinfo')->postAsync([
'xml' => [
'mch_billno' => '10000098201411111234567890',
'mch_id' => '10000098',
'appid' => 'wxe062425f740d30d8',
'bill_type' => 'MCHT',
],
'security' => true,
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance['v2/mmpaymkttransfers/gethbinfo']->postAsync([
'xml' => [
'mch_billno' => '10000098201411111234567890',
'mch_id' => '10000098',
'appid' => 'wxe062425f740d30d8',
'bill_type' => 'MCHT',
],
'security' => true,
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$response = $instance->v2->mmpaymkttransfers->gethbinfo->post([
'xml' => [
'mch_billno' => '10000098201411111234567890',
'mch_id' => '10000098',
'appid' => 'wxe062425f740d30d8',
'bill_type' => 'MCHT',
],
'security' => true,
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/mmpaymkttransfers/gethbinfo')->post([
'xml' => [
'mch_billno' => '10000098201411111234567890',
'mch_id' => '10000098',
'appid' => 'wxe062425f740d30d8',
'bill_type' => 'MCHT',
],
'security' => true,
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/mmpaymkttransfers/gethbinfo']->post([
'xml' => [
'mch_billno' => '10000098201411111234567890',
'mch_id' => '10000098',
'appid' => 'wxe062425f740d30d8',
'bill_type' => 'MCHT',
],
'security' => true,
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典 | 类型 | 描述 |
---|---|---|
return_code | string | 返回状态码 |
return_msg | string | 返回信息 |
result_code | string | 业务结果 |
err_code | string | 错误代码 |
err_code_des | string | 错误代码描述 |
mch_billno | string | 商户订单号 |
mch_id | string | 商户号 |
detail_id | string | 红包单号 |
status | string | 红包状态 |
send_type | string | 发放类型 |
hb_type | string | 红包类型 |
total_num | integer | 红包个数 |
total_amount | integer | 红包金额 |
reason | string | 失败原因 |
send_time | string | 红包发送时间 |
refund_time | string | 红包退款时间 |
refund_amount | integer | 红包退款金额 |
wishing | string | 祝福语 |
remark | string | 活动描述 |
act_name | string | 活动名称 |
hblist | object | 红包领取记录 |
hbinfo | object[] | 裂变红包领取列表 |
openid | string | 领取红包的Openid |
amount | integer | 金额 |
rcv_time | string | 接收时间 |
参阅 官方文档