订单附加信息提交接口
以下为财付通的海关备案信息,财付通10位海关注册编码 4403169D3W
请求参数 | 类型 | 描述 |
---|---|---|
xml | object | 声明请求的XML 数据结构 |
appid | string | 公众账号ID |
mch_id | string | 商户号 |
out_trade_no | string | 商户订单号 |
transaction_id | string | 微信支付订单号 |
customs | string | 海关 |
mch_customs_no | string | 商户海关备案号 |
duty | integer | 关税 |
action_type | string | 报关类型 |
sub_order_no | string | 商户子订单号 |
fee_type | string | 币种 |
order_fee | integer | 应付金额 |
transport_fee | integer | 物流费 |
product_fee | integer | 商品价格 |
cert_type | string | 证件类型 |
cert_id | string | 证件号码 |
name | string | 姓名 |
nonceless | boolean | 声明请求的XML 无随机字符串参数固定值 true |
php
$instance->v2->cgiBin->mch->customs->customdeclareorder->postAsync([
'xml' => [
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'out_trade_no' => '20150806125346',
'transaction_id' => '1000320306201511078440737890',
'customs' => 'SHANGHAI',
'mch_customs_no' => '123456',
'duty' => '888',
'action_type' => 'ADD',
'sub_order_no' => '20150806125346',
'fee_type' => 'CNY',
'order_fee' => '888',
'transport_fee' => '888',
'product_fee' => '888',
'cert_type' => 'IDCARD',
'cert_id' => '330821198809085211',
'name' => '张三',
],
'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/customdeclareorder')->postAsync([
'xml' => [
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'out_trade_no' => '20150806125346',
'transaction_id' => '1000320306201511078440737890',
'customs' => 'SHANGHAI',
'mch_customs_no' => '123456',
'duty' => '888',
'action_type' => 'ADD',
'sub_order_no' => '20150806125346',
'fee_type' => 'CNY',
'order_fee' => '888',
'transport_fee' => '888',
'product_fee' => '888',
'cert_type' => 'IDCARD',
'cert_id' => '330821198809085211',
'name' => '张三',
],
'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/customdeclareorder']->postAsync([
'xml' => [
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'out_trade_no' => '20150806125346',
'transaction_id' => '1000320306201511078440737890',
'customs' => 'SHANGHAI',
'mch_customs_no' => '123456',
'duty' => '888',
'action_type' => 'ADD',
'sub_order_no' => '20150806125346',
'fee_type' => 'CNY',
'order_fee' => '888',
'transport_fee' => '888',
'product_fee' => '888',
'cert_type' => 'IDCARD',
'cert_id' => '330821198809085211',
'name' => '张三',
],
'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->customdeclareorder->post([
'xml' => [
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'out_trade_no' => '20150806125346',
'transaction_id' => '1000320306201511078440737890',
'customs' => 'SHANGHAI',
'mch_customs_no' => '123456',
'duty' => '888',
'action_type' => 'ADD',
'sub_order_no' => '20150806125346',
'fee_type' => 'CNY',
'order_fee' => '888',
'transport_fee' => '888',
'product_fee' => '888',
'cert_type' => 'IDCARD',
'cert_id' => '330821198809085211',
'name' => '张三',
],
'nonceless' => true,
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/cgi-bin/mch/customs/customdeclareorder')->post([
'xml' => [
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'out_trade_no' => '20150806125346',
'transaction_id' => '1000320306201511078440737890',
'customs' => 'SHANGHAI',
'mch_customs_no' => '123456',
'duty' => '888',
'action_type' => 'ADD',
'sub_order_no' => '20150806125346',
'fee_type' => 'CNY',
'order_fee' => '888',
'transport_fee' => '888',
'product_fee' => '888',
'cert_type' => 'IDCARD',
'cert_id' => '330821198809085211',
'name' => '张三',
],
'nonceless' => true,
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/cgi-bin/mch/customs/customdeclareorder']->post([
'xml' => [
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'out_trade_no' => '20150806125346',
'transaction_id' => '1000320306201511078440737890',
'customs' => 'SHANGHAI',
'mch_customs_no' => '123456',
'duty' => '888',
'action_type' => 'ADD',
'sub_order_no' => '20150806125346',
'fee_type' => 'CNY',
'order_fee' => '888',
'transport_fee' => '888',
'product_fee' => '888',
'cert_type' => 'IDCARD',
'cert_id' => '330821198809085211',
'name' => '张三',
],
'nonceless' => true,
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典 | 类型 | 描述 |
---|---|---|
return_code | string | 返回状态码 |
return_msg | string | 返回信息 |
sign_type | string | 签名类型 |
sign | string | 签名 |
appid | string | 公众账号ID |
mch_id | string | 商户号 |
result_code | string | 业务结果 |
err_code | string | 错误代码 |
err_code_des | string | 错误代码描述 |
state | string | 状态码 |
transaction_id | string | 微信支付订单号 |
out_trade_no | string | 商户订单号 |
sub_order_no | string | 商户子订单号 |
sub_order_id | string | 微信子订单号 |
modify_time | string | 最后更新时间 |
cert_check_result | string | 订购人和支付人身份信息校验结果 |
verify_department | string | 验核机构 |
verify_department_trade_id | string | 验核机构交易流水号 |
参阅 官方文档