查询分账结果
发起分账请求后,可调用此接口查询分账结果;发起分账完结请求后,可调用此接口查询分账完结的执行结果。
请求参数 | 类型 | 描述 |
---|---|---|
xml | object | 声明请求的XML 数据结构 |
mch_id | string | 商户号 |
sub_mch_id | string | 子商户号 |
transaction_id | string | 微信订单号 |
out_order_no | string | 商户分账单号 |
sign_type | string | 签名类型 |
php
$instance->v2->pay->profitsharingquery->postAsync([
'xml' => [
'mch_id' => '1900000100',
'sub_mch_id' => '1900000109',
'transaction_id' => '4208450740201411110007820472',
'out_order_no' => 'P20150806125346',
'sign_type' => 'HMAC-SHA256',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance->chain('v2/pay/profitsharingquery')->postAsync([
'xml' => [
'mch_id' => '1900000100',
'sub_mch_id' => '1900000109',
'transaction_id' => '4208450740201411110007820472',
'out_order_no' => 'P20150806125346',
'sign_type' => 'HMAC-SHA256',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance['v2/pay/profitsharingquery']->postAsync([
'xml' => [
'mch_id' => '1900000100',
'sub_mch_id' => '1900000109',
'transaction_id' => '4208450740201411110007820472',
'out_order_no' => 'P20150806125346',
'sign_type' => 'HMAC-SHA256',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$response = $instance->v2->pay->profitsharingquery->post([
'xml' => [
'mch_id' => '1900000100',
'sub_mch_id' => '1900000109',
'transaction_id' => '4208450740201411110007820472',
'out_order_no' => 'P20150806125346',
'sign_type' => 'HMAC-SHA256',
],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/pay/profitsharingquery')->post([
'xml' => [
'mch_id' => '1900000100',
'sub_mch_id' => '1900000109',
'transaction_id' => '4208450740201411110007820472',
'out_order_no' => 'P20150806125346',
'sign_type' => 'HMAC-SHA256',
],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/pay/profitsharingquery']->post([
'xml' => [
'mch_id' => '1900000100',
'sub_mch_id' => '1900000109',
'transaction_id' => '4208450740201411110007820472',
'out_order_no' => 'P20150806125346',
'sign_type' => 'HMAC-SHA256',
],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典 | 类型 | 描述 |
---|---|---|
sub_appid | string | 子商户公众账号ID |
sub_mch_id | string | 子商户号 |
return_code | string | 返回状态码 |
return_msg | string | 返回信息 |
appid | string | 公众账号ID |
mch_id | string | 商户号 |
nonce_str | string | 随机字符串 |
sign | string | 签名 |
result_code | string | 业务结果 |
err_code | string | 错误代码 |
err_code_des | string | 错误代码描述 |
transaction_id | string | 微信订单号 |
out_order_no | string | 商户分账单号 |
order_id | string | 微信分账单号 |
status | string | 分账单状态 |
close_reason | string | 关单原因 |
receivers | string | +分账接收方列表;分账接收方列表,json对象详细说明见下文,仅当查询分账请求结果时,存在本字段 |
amount | integer | 分账金额 |
description | string | 分账描述 |
参阅 官方文档