Skip to content

查询红包记录

用于商户对已发放的红包进行查询红包的具体信息,可支持普通红包和裂变包。

请求参数类型描述
xmlobject声明请求的XML数据结构
mch_billnostring商户订单号
mch_idstring商户号
appidstringAppid
bill_typestring订单类型
securityboolean声明加载商户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_codestring返回状态码
return_msgstring返回信息
result_codestring业务结果
err_codestring错误代码
err_code_desstring错误代码描述
mch_billnostring商户订单号
mch_idstring商户号
detail_idstring红包单号
statusstring红包状态
send_typestring发放类型
hb_typestring红包类型
total_numinteger红包个数
total_amountinteger红包金额
reasonstring失败原因
send_timestring红包发送时间
refund_timestring红包退款时间
refund_amountinteger红包退款金额
wishingstring祝福语
remarkstring活动描述
act_namestring活动名称
hblistobject红包领取记录
hbinfoobject[]裂变红包领取列表
openidstring领取红包的Openid
amountinteger金额
rcv_timestring接收时间

参阅 官方文档

Published on the GitHub by TheNorthMemory