订单附加信息重推接口
重点注意:请求接口前请先在以下页面提交您的海关信息,所有你需要报关的海关信息都需要提交,且信息真实有效。
请求参数 | 类型 | 描述 |
---|---|---|
nonceless | true | 声明请求的XML 无随机字符串参数 |
xml | object | 声明请求的XML 数据结构 |
sign_type | string | 签名类型MD5 枚举值 |
appid | string | 公众账号ID |
mch_id | string | 商户号 |
out_trade_no | string | 商户订单号 |
transaction_id | string | 微信支付订单号 |
sub_order_no | string | 商户子订单号 |
sub_order_id | string | 微信子订单号 |
customs | string | 海关GUANGZHOU_ZS | HANGZHOU_ZS | NINGBO | ZHENGZHOU_BS | CHONGQING | SHANGHAI_ZS | SHENZHEN | ZHENGZHOU_ZH_ZS | TIANJIN 枚举值之一 |
mch_customs_no | string | 商户海关备案号 |
php
$instance->v2->cgiBin->mch->newcustoms->customdeclareredeclare->postAsync([
'nonceless' => true,
'xml' => [
'sign_type' => 'MD5',
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'out_trade_no' => '20150806125346',
'transaction_id' => '1000320306201511078440737890',
'sub_order_no' => '20150806125346',
'sub_order_id' => '1000320306201511078440737891',
'customs' => 'SHANGHAI',
'mch_customs_no' => '123456',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance->chain('v2/cgi-bin/mch/newcustoms/customdeclareredeclare')->postAsync([
'nonceless' => true,
'xml' => [
'sign_type' => 'MD5',
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'out_trade_no' => '20150806125346',
'transaction_id' => '1000320306201511078440737890',
'sub_order_no' => '20150806125346',
'sub_order_id' => '1000320306201511078440737891',
'customs' => 'SHANGHAI',
'mch_customs_no' => '123456',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance['v2/cgi-bin/mch/newcustoms/customdeclareredeclare']->postAsync([
'nonceless' => true,
'xml' => [
'sign_type' => 'MD5',
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'out_trade_no' => '20150806125346',
'transaction_id' => '1000320306201511078440737890',
'sub_order_no' => '20150806125346',
'sub_order_id' => '1000320306201511078440737891',
'customs' => 'SHANGHAI',
'mch_customs_no' => '123456',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$response = $instance->v2->cgiBin->mch->newcustoms->customdeclareredeclare->post([
'nonceless' => true,
'xml' => [
'sign_type' => 'MD5',
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'out_trade_no' => '20150806125346',
'transaction_id' => '1000320306201511078440737890',
'sub_order_no' => '20150806125346',
'sub_order_id' => '1000320306201511078440737891',
'customs' => 'SHANGHAI',
'mch_customs_no' => '123456',
],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/cgi-bin/mch/newcustoms/customdeclareredeclare')->post([
'nonceless' => true,
'xml' => [
'sign_type' => 'MD5',
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'out_trade_no' => '20150806125346',
'transaction_id' => '1000320306201511078440737890',
'sub_order_no' => '20150806125346',
'sub_order_id' => '1000320306201511078440737891',
'customs' => 'SHANGHAI',
'mch_customs_no' => '123456',
],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/cgi-bin/mch/newcustoms/customdeclareredeclare']->post([
'nonceless' => true,
'xml' => [
'sign_type' => 'MD5',
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'out_trade_no' => '20150806125346',
'transaction_id' => '1000320306201511078440737890',
'sub_order_no' => '20150806125346',
'sub_order_id' => '1000320306201511078440737891',
'customs' => 'SHANGHAI',
'mch_customs_no' => '123456',
],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典 | 类型 | 描述 |
---|---|---|
return_code | string | 返回状态码SUCCESS | FAIL 枚举值之一 |
return_msg | string | 返回信息 |
sign_type | string | 签名类型MD5 枚举值 |
sign | string | 签名 |
appid | string | 公众账号ID |
mch_id | string | 商户号 |
result_code | string | 业务结果SUCCESS | FAIL 枚举值之一 |
err_code | string | 错误代码 |
err_code_des | string | 错误代码描述 |
state | string | 状态码UNDECLARED | SUBMITTED | PROCESSING | SUCCESS | FAIL | EXCEPT 枚举值之一 |
transaction_id | string | 微信支付订单号 |
out_trade_no | string | 商户订单号 |
sub_order_no | string | 商户子订单号 |
sub_order_id | string | 微信子订单号 |
modify_time | string | 最后更新时间 |
explanation | string | 申报结果说明 |
参阅 官方文档