Skip to content

查询付款记录

用于商户的企业微信企业付款操作进行结果查询,返回付款操作详细结果。查询企业微信企业付款API只支持查询30天内的订单,30天之前的订单请登录商户平台查询。

请求参数类型描述
securitytrue声明加载商户API证书
xmlobject声明请求的XML数据结构
partner_trade_nostring商户订单号
mch_idstring商户号
appidstringAppid
php
$instance->v2->mmpaymkttransfers->promotion->querywwsptrans2pocket->postAsync([
  'security' => true,
  'xml' => [
    'partner_trade_no' => '10000098201411111234567890',
    'mch_id'           => '10000098',
    'appid'            => 'wxe062425f740d30d8',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance->chain('v2/mmpaymkttransfers/promotion/querywwsptrans2pocket')->postAsync([
  'security' => true,
  'xml' => [
    'partner_trade_no' => '10000098201411111234567890',
    'mch_id'           => '10000098',
    'appid'            => 'wxe062425f740d30d8',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance['v2/mmpaymkttransfers/promotion/querywwsptrans2pocket']->postAsync([
  'security' => true,
  'xml' => [
    'partner_trade_no' => '10000098201411111234567890',
    'mch_id'           => '10000098',
    'appid'            => 'wxe062425f740d30d8',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$response = $instance->v2->mmpaymkttransfers->promotion->querywwsptrans2pocket->post([
  'security' => true,
  'xml' => [
    'partner_trade_no' => '10000098201411111234567890',
    'mch_id'           => '10000098',
    'appid'            => 'wxe062425f740d30d8',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/mmpaymkttransfers/promotion/querywwsptrans2pocket')->post([
  'security' => true,
  'xml' => [
    'partner_trade_no' => '10000098201411111234567890',
    'mch_id'           => '10000098',
    'appid'            => 'wxe062425f740d30d8',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/mmpaymkttransfers/promotion/querywwsptrans2pocket']->post([
  'security' => true,
  'xml' => [
    'partner_trade_no' => '10000098201411111234567890',
    'mch_id'           => '10000098',
    'appid'            => 'wxe062425f740d30d8',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典类型描述
return_codestring返回状态码
SUCCESS | FAIL 枚举值之一
return_msgstring返回信息
result_codestring业务结果
SUCCESS | FAIL 枚举值之一
err_codestring错误代码
err_code_desstring错误代码描述
partner_trade_nostring商户订单号
mch_idstring商户号
detail_idstring红包单号
statusstring红包状态
SUCCESS | FAILED | PROCESSING 枚举值之一
reasonstring失败原因
transfer_namestring收款用户姓名
payment_amountinteger红包退款金额
transfer_timestring转账时间
descstring付款描述

参阅 官方文档

Published on the GitHub by TheNorthMemory