合单查单 
所有微信支付订单的查询,商户可以通过查询订单接口主动查询订单状态,完成下一步的业务逻辑。**合单查单api只能使用合单单号combine_out_trade_no来查询,如果要使用子订单号查询,请使用公众api中的查单接口。**
🔐
本接口服务已于 2021.09.01 (北京时间)停止开放,新接口见这里,此文档仅做留存参考。
| 请求参数 | 类型 | 描述 | 
|---|---|---|
| xml | object | 声明请求的XML数据结构 | 
| combine_appid | string | 合单appid | 
| combine_mch_id | string | 合单商户号 | 
| sign_type | string | 签名类型HMAC-SHA256 枚举值 | 
| combine_out_trade_no | string | 合单商户订单号 | 
php
$instance->v2->pay->querycombinedorder->postAsync([
  'xml' => [
    'combine_appid'        => 'wx8888888888888888',
    'combine_mch_id'       => '1900000109',
    'sign_type'            => 'HMAC-SHA256',
    'combine_out_trade_no' => '1217752501201407033233368018',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();php
$instance->chain('v2/pay/querycombinedorder')->postAsync([
  'xml' => [
    'combine_appid'        => 'wx8888888888888888',
    'combine_mch_id'       => '1900000109',
    'sign_type'            => 'HMAC-SHA256',
    'combine_out_trade_no' => '1217752501201407033233368018',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();php
$instance['v2/pay/querycombinedorder']->postAsync([
  'xml' => [
    'combine_appid'        => 'wx8888888888888888',
    'combine_mch_id'       => '1900000109',
    'sign_type'            => 'HMAC-SHA256',
    'combine_out_trade_no' => '1217752501201407033233368018',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();php
$response = $instance->v2->pay->querycombinedorder->post([
  'xml' => [
    'combine_appid'        => 'wx8888888888888888',
    'combine_mch_id'       => '1900000109',
    'sign_type'            => 'HMAC-SHA256',
    'combine_out_trade_no' => '1217752501201407033233368018',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));php
$response = $instance->chain('v2/pay/querycombinedorder')->post([
  'xml' => [
    'combine_appid'        => 'wx8888888888888888',
    'combine_mch_id'       => '1900000109',
    'sign_type'            => 'HMAC-SHA256',
    'combine_out_trade_no' => '1217752501201407033233368018',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));php
$response = $instance['v2/pay/querycombinedorder']->post([
  'xml' => [
    'combine_appid'        => 'wx8888888888888888',
    'combine_mch_id'       => '1900000109',
    'sign_type'            => 'HMAC-SHA256',
    'combine_out_trade_no' => '1217752501201407033233368018',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));| 返回字典 | 类型 | 描述 | 
|---|---|---|
| return_code | string | 返回状态码SUCCESS | FAIL 枚举值之一 | 
| return_msg | string | 返回信息 | 
| combine_appid | string | 合单appid | 
| combine_mch_id | string | 合单商户号 | 
| nonce_str | string | 随机字符串 | 
| device_info | string | 设备号 | 
| combine_openid | string | 合单用户标识 | 
| combine_out_trade_no | string | 合单商户订单号 | 
| sign | string | 签名 | 
| result_code | string | 业务结果SUCCESS | FAIL 枚举值之一 | 
| result_msg | string | 业务结果描述 | 
| trade_state | string | 交易状态SUCCESS | REFUND | NOTPAY | CLOSED | REVOKED | USERPAYING | PAYERROR | ACCEPT 枚举值之一 | 
| trade_state_desc | string | 交易状态描述 | 
| err_code | string | 错误代码 | 
| err_code_des | string | 错误代码描述 | 
| sub_order_list | string | 子单信息JSON格式字符串 | 
| order_num | number | 子订单数 | 
| order_list | object[] | 子订单信息 | 
| mchid | string | 子单商户号 | 
| trade_type | string | 交易类型NATIVE | JSAPI | APP | MWEB 枚举值之一 | 
| attach | string | 附加数据 | 
| amount | object | 订单金额 | 
| total_amount | number | 标价金额 | 
| currency | string | 标价币种 | 
| transaction_id | string | 微信订单号 | 
| out_trade_no | string | 子单商户订单号 | 
| goods_tag | string | 订单优惠标记 | 
| description | string | 商品描述 | 
| promotion_detail | object | 营销详情 | 
| promotion_id | string | 券ID | 
| name | string | 优惠名称 | 
| scope | string | 优惠范围GLOBAL | SINGLE 枚举值之一 | 
| type | string | 优惠类型COUPON | DISCOUNT 枚举值之一 | 
| amount | string | 优惠券面额 | 
| activity_id | string | 活动ID | 
| wxpay_contribute | string | 微信出资 | 
| merchant_contribute | string | 商户出资 | 
| other_contribute | string | 其他出资 | 
| goods_detail | object[] | 单品列表 | 
| goods_id | string | 商品编码 | 
| wxpay_goods_id | string | 微信支付商品编码 | 
| goods_name | string | 商品名称 | 
| quantity | number | 商品数量 | 
| price | number | 商品单价 | 
参阅 官方合单支付文档