Skip to content

银行服务商特约子商户指定渠道号

使用对象:银行服务商 使用说明:存量未指定渠道商的特约子商户,银行调用该API可以指定渠道商;通过该API指定渠道商后不能修改。

请求参数类型描述
securitytrue声明加载商户API证书
noncelesstrue声明请求的XML无随机字符串参数
xmlobject声明请求的XML数据结构
appidstring公众账号ID
mch_idstring商户号
sub_mch_idstring特约商户号
channel_idstring渠道商商户号
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_codestring返回状态码
SUCCESS | FAIL 枚举值之一
return_msgstring返回信息
result_codestring业务结果
SUCCESS | FAIL 枚举值之一
signstring签名
err_codestring错误代码
err_code_desstring错误代码描述
mch_idstring商户号
result_msgstring处理信息
appidstring公众账号ID
sub_mch_idstring子商户商户号
channel_idstring渠道商商户号

参阅 官方文档

Published on the GitHub by TheNorthMemory