银行服务商特约子商户指定渠道号
使用对象:银行服务商 使用说明:存量未指定渠道商的特约子商户,银行调用该API可以指定渠道商;通过该API指定渠道商后不能修改。
请求参数 | 类型 | 描述 |
---|---|---|
security | true | 声明加载商户API证书 |
nonceless | true | 声明请求的XML 无随机字符串参数 |
xml | object | 声明请求的XML 数据结构 |
appid | string | 公众账号ID |
mch_id | string | 商户号 |
sub_mch_id | string | 特约商户号 |
channel_id | string | 渠道商商户号 |
php
$instance->v2->secapi->mch->channelsetting->postAsync([
'security' => true,
'nonceless' => true,
'xml' => [
'appid' => 'wx931386123456789e',
'mch_id' => '1451234567',
'sub_mch_id' => '10000101',
'channel_id' => '10000102',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance->chain('v2/secapi/mch/channelsetting')->postAsync([
'security' => true,
'nonceless' => true,
'xml' => [
'appid' => 'wx931386123456789e',
'mch_id' => '1451234567',
'sub_mch_id' => '10000101',
'channel_id' => '10000102',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance['v2/secapi/mch/channelsetting']->postAsync([
'security' => true,
'nonceless' => true,
'xml' => [
'appid' => 'wx931386123456789e',
'mch_id' => '1451234567',
'sub_mch_id' => '10000101',
'channel_id' => '10000102',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$response = $instance->v2->secapi->mch->channelsetting->post([
'security' => true,
'nonceless' => true,
'xml' => [
'appid' => 'wx931386123456789e',
'mch_id' => '1451234567',
'sub_mch_id' => '10000101',
'channel_id' => '10000102',
],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/secapi/mch/channelsetting')->post([
'security' => true,
'nonceless' => true,
'xml' => [
'appid' => 'wx931386123456789e',
'mch_id' => '1451234567',
'sub_mch_id' => '10000101',
'channel_id' => '10000102',
],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/secapi/mch/channelsetting']->post([
'security' => true,
'nonceless' => true,
'xml' => [
'appid' => 'wx931386123456789e',
'mch_id' => '1451234567',
'sub_mch_id' => '10000101',
'channel_id' => '10000102',
],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典 | 类型 | 描述 |
---|---|---|
return_code | string | 返回状态码SUCCESS | FAIL 枚举值之一 |
return_msg | string | 返回信息 |
result_code | string | 业务结果SUCCESS | FAIL 枚举值之一 |
sign | string | 签名 |
err_code | string | 错误代码 |
err_code_des | string | 错误代码描述 |
mch_id | string | 商户号 |
result_msg | string | 处理信息 |
appid | string | 公众账号ID |
sub_mch_id | string | 子商户商户号 |
channel_id | string | 渠道商商户号 |
参阅 官方文档