订单附加信息查询接口
商户通过订单号查询提交的订单附加信息。如果是微信收集的实名信息,查询接口不返回实名信息内容
请求参数 | 类型 | 描述 |
---|---|---|
xml | object | 声明请求的XML 数据结构 |
sign_type | string | 签名类型 |
appid | string | 公众账号ID |
mch_id | string | 商户号 |
out_trade_no | string | 商户订单号 |
transaction_id | string | 微信支付订单号 |
sub_order_no | string | 商户子订单号 |
sub_order_id | string | 微信子订单号 |
customs | string | 海关 |
nonceless | boolean | 声明请求的XML 无随机字符串参数固定值 true |
php
$instance->v2->cgiBin->mch->customs->customdeclarequery->postAsync([
'xml' => [
'sign_type' => 'MD5',
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'out_trade_no' => '20150806125346',
'transaction_id' => '1000320306201511078440737890',
'sub_order_no' => '20150806125346',
'sub_order_id' => '20150806125346',
'customs' => 'SHANGHAI',
],
'nonceless' => true,
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance->chain('v2/cgi-bin/mch/customs/customdeclarequery')->postAsync([
'xml' => [
'sign_type' => 'MD5',
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'out_trade_no' => '20150806125346',
'transaction_id' => '1000320306201511078440737890',
'sub_order_no' => '20150806125346',
'sub_order_id' => '20150806125346',
'customs' => 'SHANGHAI',
],
'nonceless' => true,
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance['v2/cgi-bin/mch/customs/customdeclarequery']->postAsync([
'xml' => [
'sign_type' => 'MD5',
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'out_trade_no' => '20150806125346',
'transaction_id' => '1000320306201511078440737890',
'sub_order_no' => '20150806125346',
'sub_order_id' => '20150806125346',
'customs' => 'SHANGHAI',
],
'nonceless' => true,
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$response = $instance->v2->cgiBin->mch->customs->customdeclarequery->post([
'xml' => [
'sign_type' => 'MD5',
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'out_trade_no' => '20150806125346',
'transaction_id' => '1000320306201511078440737890',
'sub_order_no' => '20150806125346',
'sub_order_id' => '20150806125346',
'customs' => 'SHANGHAI',
],
'nonceless' => true,
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/cgi-bin/mch/customs/customdeclarequery')->post([
'xml' => [
'sign_type' => 'MD5',
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'out_trade_no' => '20150806125346',
'transaction_id' => '1000320306201511078440737890',
'sub_order_no' => '20150806125346',
'sub_order_id' => '20150806125346',
'customs' => 'SHANGHAI',
],
'nonceless' => true,
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/cgi-bin/mch/customs/customdeclarequery']->post([
'xml' => [
'sign_type' => 'MD5',
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'out_trade_no' => '20150806125346',
'transaction_id' => '1000320306201511078440737890',
'sub_order_no' => '20150806125346',
'sub_order_id' => '20150806125346',
'customs' => 'SHANGHAI',
],
'nonceless' => true,
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典 | 类型 | 描述 |
---|---|---|
return_code | string | 返回状态码 |
return_msg | string | 返回信息 |
sign | string | 签名 |
appid | string | 公众账号ID |
mch_id | string | 商户号 |
result_code | string | 业务结果 |
err_code | string | 错误代码 |
err_code_des | string | 错误代码描述 |
transaction_id | string | 微信支付订单号 |
count | integer | 笔数 |
sub_order_no_$n | string | 商户子订单号 |
sub_order_id_$n | string | 微信子订单号 |
mch_customs_no_$n | string | 商户海关备案号 |
customs_$n | string | 海关 |
fee_type_$n | string | 币种 |
order_fee_$n | integer | 应付金额 |
duty_$n | integer | 关税 |
transport_fee_$n | integer | 物流费 |
product_fee_$n | integer | 商品价格 |
state_$n | string | 状态码 |
explanation_$n | string | 申报结果说明 |
modify_time_$n | string | 最后更新时间 |
cert_check_result_$n | string | 订购人和支付人身份信息校验结果 |
verify_department | string | 验核机构 |
verify_department_trade_id | string | 验核机构交易流水号 |
参阅 官方文档