Skip to content

修改子商户

用于机构子商户创建成功后,接口提供子商户信息修改。

请求参数类型描述
modifyinstitutionsubstring固定值modifyInstitutionsub
securitytrue声明加载商户API证书
noncelesstrue声明请求的XML无随机字符串参数
xmlobject声明请求的XML数据结构
app_idstring机构appid
mch_idstring机构商户号
sub_mch_idstring子商户号
merchant_namestring子商户全称
channel_idstring渠道编号
merchant_shortnamestring子商户简称
merchant_country_codestring注册国家或区域
merchant_typestring商户类型
mccstringMCC码
registration_certificate_numberstring公司注册文件编号
registration_certificate_datestring公司注册文件过期时间
registration_certificate_copystring公司注册文件照片
business_typestring业务类型
app_downloadstringAPP下载链接
business_websitestring业务网站
office_accountstring公众号
mini_programstring小程序
store_addressstring门店地址
store_photosstring门店照片
media_idstring[]门店照片列表
director_namestring董事姓名
director_id_numberstring董事证件号码
principal_namestring负责人姓名
principal_id_numberstring负责人证件号
office_phonestring公司电话
contact_namestring联系人姓名
contact_phonestring联系人电话
contact_emailstring联系人邮箱
settlement_bank_numberstring子商户结算银行账户
apply_h5_paymentstring是否申请H5支付权限
YES | NO 枚举值之一
h5_website_urlstringH5经营网址
h5_domainsstringH5支付域名
domainstring[]域名列表
php
$instance->v2->secapi->mch->_modifyinstitutionsub_->postAsync([
  'modifyinstitutionsub' => 'modifyInstitutionsub', // 固定参数(URI上有大写字符)
  'security' => true,
  'nonceless' => true,
  'xml' => [
    'app_id'                          => 'wx8888888888888888',
    'mch_id'                          => '3200000001',
    'sub_mch_id'                      => '12345678',
    'merchant_name'                   => 'Merchantname',
    'channel_id'                      => '101',
    'merchant_shortname'              => 'Merchantshortname',
    'merchant_country_code'           => '344',
    'merchant_type'                   => 'ENTERPRISE',
    'mcc'                             => '4214',
    'registration_certificate_number' => '5555-8888',
    'registration_certificate_date'   => '2020-10-16',
    'registration_certificate_copy'   => 'aoGhHuxkrIaqB4GzPCeo963zXKcO2hDVD8AjXIpgrj',
    'business_type'                   => 'BOTH',
    'app_download'                    => 'https://download.qq.com',
    'business_website'                => 'https://www.qq.com',
    'office_account'                  => 'wx8888888888888888',
    'mini_program'                    => 'wx8888888888888888',
    'store_address'                   => '广东省深圳市南山区科技中一道10000号',
    'store_photos'                    => '[Media_id1,Media_id2,Media_id3]',
    'director_name'                   => 'BobZhang',
    'director_id_number'              => '5555—8888',
    'principal_name'                  => 'BobZhang',
    'principal_id_number'             => '5555—8888',
    'office_phone'                    => '075586010000',
    'contact_name'                    => '李先生',
    'contact_phone'                   => '075586010000',
    'contact_email'                   => 'test@test.com',
    'settlement_bank_number'          => '555588889999',
    'apply_h5_payment'                => 'YES',
    'h5_website_url'                  => 'https://qq.com',
    'h5_domains'                      => '["www.qq.com","www.weixin.com"]',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance->chain('v2/secapi/mch/{modifyinstitutionsub}')->postAsync([
  'modifyinstitutionsub' => 'modifyInstitutionsub', // 固定参数(URI上有大写字符)
  'security' => true,
  'nonceless' => true,
  'xml' => [
    'app_id'                          => 'wx8888888888888888',
    'mch_id'                          => '3200000001',
    'sub_mch_id'                      => '12345678',
    'merchant_name'                   => 'Merchantname',
    'channel_id'                      => '101',
    'merchant_shortname'              => 'Merchantshortname',
    'merchant_country_code'           => '344',
    'merchant_type'                   => 'ENTERPRISE',
    'mcc'                             => '4214',
    'registration_certificate_number' => '5555-8888',
    'registration_certificate_date'   => '2020-10-16',
    'registration_certificate_copy'   => 'aoGhHuxkrIaqB4GzPCeo963zXKcO2hDVD8AjXIpgrj',
    'business_type'                   => 'BOTH',
    'app_download'                    => 'https://download.qq.com',
    'business_website'                => 'https://www.qq.com',
    'office_account'                  => 'wx8888888888888888',
    'mini_program'                    => 'wx8888888888888888',
    'store_address'                   => '广东省深圳市南山区科技中一道10000号',
    'store_photos'                    => '[Media_id1,Media_id2,Media_id3]',
    'director_name'                   => 'BobZhang',
    'director_id_number'              => '5555—8888',
    'principal_name'                  => 'BobZhang',
    'principal_id_number'             => '5555—8888',
    'office_phone'                    => '075586010000',
    'contact_name'                    => '李先生',
    'contact_phone'                   => '075586010000',
    'contact_email'                   => 'test@test.com',
    'settlement_bank_number'          => '555588889999',
    'apply_h5_payment'                => 'YES',
    'h5_website_url'                  => 'https://qq.com',
    'h5_domains'                      => '["www.qq.com","www.weixin.com"]',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance['v2/secapi/mch/{modifyinstitutionsub}']->postAsync([
  'modifyinstitutionsub' => 'modifyInstitutionsub', // 固定参数(URI上有大写字符)
  'security' => true,
  'nonceless' => true,
  'xml' => [
    'app_id'                          => 'wx8888888888888888',
    'mch_id'                          => '3200000001',
    'sub_mch_id'                      => '12345678',
    'merchant_name'                   => 'Merchantname',
    'channel_id'                      => '101',
    'merchant_shortname'              => 'Merchantshortname',
    'merchant_country_code'           => '344',
    'merchant_type'                   => 'ENTERPRISE',
    'mcc'                             => '4214',
    'registration_certificate_number' => '5555-8888',
    'registration_certificate_date'   => '2020-10-16',
    'registration_certificate_copy'   => 'aoGhHuxkrIaqB4GzPCeo963zXKcO2hDVD8AjXIpgrj',
    'business_type'                   => 'BOTH',
    'app_download'                    => 'https://download.qq.com',
    'business_website'                => 'https://www.qq.com',
    'office_account'                  => 'wx8888888888888888',
    'mini_program'                    => 'wx8888888888888888',
    'store_address'                   => '广东省深圳市南山区科技中一道10000号',
    'store_photos'                    => '[Media_id1,Media_id2,Media_id3]',
    'director_name'                   => 'BobZhang',
    'director_id_number'              => '5555—8888',
    'principal_name'                  => 'BobZhang',
    'principal_id_number'             => '5555—8888',
    'office_phone'                    => '075586010000',
    'contact_name'                    => '李先生',
    'contact_phone'                   => '075586010000',
    'contact_email'                   => 'test@test.com',
    'settlement_bank_number'          => '555588889999',
    'apply_h5_payment'                => 'YES',
    'h5_website_url'                  => 'https://qq.com',
    'h5_domains'                      => '["www.qq.com","www.weixin.com"]',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$response = $instance->v2->secapi->mch->_modifyinstitutionsub_->post([
  'modifyinstitutionsub' => 'modifyInstitutionsub', // 固定参数(URI上有大写字符)
  'security' => true,
  'nonceless' => true,
  'xml' => [
    'app_id'                          => 'wx8888888888888888',
    'mch_id'                          => '3200000001',
    'sub_mch_id'                      => '12345678',
    'merchant_name'                   => 'Merchantname',
    'channel_id'                      => '101',
    'merchant_shortname'              => 'Merchantshortname',
    'merchant_country_code'           => '344',
    'merchant_type'                   => 'ENTERPRISE',
    'mcc'                             => '4214',
    'registration_certificate_number' => '5555-8888',
    'registration_certificate_date'   => '2020-10-16',
    'registration_certificate_copy'   => 'aoGhHuxkrIaqB4GzPCeo963zXKcO2hDVD8AjXIpgrj',
    'business_type'                   => 'BOTH',
    'app_download'                    => 'https://download.qq.com',
    'business_website'                => 'https://www.qq.com',
    'office_account'                  => 'wx8888888888888888',
    'mini_program'                    => 'wx8888888888888888',
    'store_address'                   => '广东省深圳市南山区科技中一道10000号',
    'store_photos'                    => '[Media_id1,Media_id2,Media_id3]',
    'director_name'                   => 'BobZhang',
    'director_id_number'              => '5555—8888',
    'principal_name'                  => 'BobZhang',
    'principal_id_number'             => '5555—8888',
    'office_phone'                    => '075586010000',
    'contact_name'                    => '李先生',
    'contact_phone'                   => '075586010000',
    'contact_email'                   => 'test@test.com',
    'settlement_bank_number'          => '555588889999',
    'apply_h5_payment'                => 'YES',
    'h5_website_url'                  => 'https://qq.com',
    'h5_domains'                      => '["www.qq.com","www.weixin.com"]',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/secapi/mch/{modifyinstitutionsub}')->post([
  'modifyinstitutionsub' => 'modifyInstitutionsub', // 固定参数(URI上有大写字符)
  'security' => true,
  'nonceless' => true,
  'xml' => [
    'app_id'                          => 'wx8888888888888888',
    'mch_id'                          => '3200000001',
    'sub_mch_id'                      => '12345678',
    'merchant_name'                   => 'Merchantname',
    'channel_id'                      => '101',
    'merchant_shortname'              => 'Merchantshortname',
    'merchant_country_code'           => '344',
    'merchant_type'                   => 'ENTERPRISE',
    'mcc'                             => '4214',
    'registration_certificate_number' => '5555-8888',
    'registration_certificate_date'   => '2020-10-16',
    'registration_certificate_copy'   => 'aoGhHuxkrIaqB4GzPCeo963zXKcO2hDVD8AjXIpgrj',
    'business_type'                   => 'BOTH',
    'app_download'                    => 'https://download.qq.com',
    'business_website'                => 'https://www.qq.com',
    'office_account'                  => 'wx8888888888888888',
    'mini_program'                    => 'wx8888888888888888',
    'store_address'                   => '广东省深圳市南山区科技中一道10000号',
    'store_photos'                    => '[Media_id1,Media_id2,Media_id3]',
    'director_name'                   => 'BobZhang',
    'director_id_number'              => '5555—8888',
    'principal_name'                  => 'BobZhang',
    'principal_id_number'             => '5555—8888',
    'office_phone'                    => '075586010000',
    'contact_name'                    => '李先生',
    'contact_phone'                   => '075586010000',
    'contact_email'                   => 'test@test.com',
    'settlement_bank_number'          => '555588889999',
    'apply_h5_payment'                => 'YES',
    'h5_website_url'                  => 'https://qq.com',
    'h5_domains'                      => '["www.qq.com","www.weixin.com"]',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/secapi/mch/{modifyinstitutionsub}']->post([
  'modifyinstitutionsub' => 'modifyInstitutionsub', // 固定参数(URI上有大写字符)
  'security' => true,
  'nonceless' => true,
  'xml' => [
    'app_id'                          => 'wx8888888888888888',
    'mch_id'                          => '3200000001',
    'sub_mch_id'                      => '12345678',
    'merchant_name'                   => 'Merchantname',
    'channel_id'                      => '101',
    'merchant_shortname'              => 'Merchantshortname',
    'merchant_country_code'           => '344',
    'merchant_type'                   => 'ENTERPRISE',
    'mcc'                             => '4214',
    'registration_certificate_number' => '5555-8888',
    'registration_certificate_date'   => '2020-10-16',
    'registration_certificate_copy'   => 'aoGhHuxkrIaqB4GzPCeo963zXKcO2hDVD8AjXIpgrj',
    'business_type'                   => 'BOTH',
    'app_download'                    => 'https://download.qq.com',
    'business_website'                => 'https://www.qq.com',
    'office_account'                  => 'wx8888888888888888',
    'mini_program'                    => 'wx8888888888888888',
    'store_address'                   => '广东省深圳市南山区科技中一道10000号',
    'store_photos'                    => '[Media_id1,Media_id2,Media_id3]',
    'director_name'                   => 'BobZhang',
    'director_id_number'              => '5555—8888',
    'principal_name'                  => 'BobZhang',
    'principal_id_number'             => '5555—8888',
    'office_phone'                    => '075586010000',
    'contact_name'                    => '李先生',
    'contact_phone'                   => '075586010000',
    'contact_email'                   => 'test@test.com',
    'settlement_bank_number'          => '555588889999',
    'apply_h5_payment'                => 'YES',
    'h5_website_url'                  => 'https://qq.com',
    'h5_domains'                      => '["www.qq.com","www.weixin.com"]',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典类型描述
return_codestring返回状态码
SUCCESS | FAIL 枚举值之一
return_msgstring返回信息
result_codestring业务返回码
SUCCESS | FAIL 枚举值之一
err_codestring错误编码
err_code_desstring错误描述
sub_mch_idstring子商户号
signstring签名
verification_statusstring验证状态
h5_authorization_statestringH5支付权限状态
APPROVED | UNAUTHORIZED | UNDER_REVIEW | REJECTED | UNDER_PUNISHMENT | APPLICATION_FAILED 枚举值之一

参阅 官方文档

Published on the GitHub by TheNorthMemory