Skip to content

查询付款记录

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

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

参阅 官方文档

Published on the GitHub by TheNorthMemory