Skip to content

查询企业向微信用户个人付款

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

请求参数类型描述
securitytrue声明加载商户API证书
xmlobject声明请求的XML数据结构
partner_trade_nostring商户订单号
mch_idstring商户号
appidstringAppid
php
$instance->v2->mmpaymkttransfers->gettransferinfo->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/gettransferinfo')->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/gettransferinfo']->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->gettransferinfo->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/gettransferinfo')->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/gettransferinfo']->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商户单号
appidstringAppid
mch_idstring商户号
detail_idstring付款单号
statusstring转账状态
SUCCESS | FAILED | PROCESSING 枚举值之一
reasonstring失败原因
openidstring收款用户openid
transfer_namestring收款用户姓名
payment_amountinteger付款金额
transfer_timestring转账时间
payment_timestring付款成功时间
descstring企业付款备注

参阅 官方文档

Published on the GitHub by TheNorthMemory