Skip to content

银行特约商户录入/银行特约商户资料查询

银行服务商接入微信支付前需要将下属特约商户基本资料信息报备给微信,在微信支付侧生成特约商户识别码后方可提交微信支付。特约商户识别码是区分子商户交易、结算和清分的标志。提供给银行服务商报备后的商户查询。通过MCHID(识别码),返回商户全部资料信息。

请求参数类型描述
securitytrue声明加载商户API证书
xmlobject声明请求的XML数据结构
appidstring公众账号ID
mch_idstring商户号
merchant_namestring商户名称
sub_mch_idstring商户识别码
page_indexstring页码
page_sizestring展示资料个数
queryobject声明请求的查询参数
actionstringadd | query 枚举值之一
php
$instance->v2->secapi->mch->submchmanage->postAsync([
  'security' => true,
  'xml' => [
    'appid'         => 'wxd678efh567hg6787',
    'mch_id'        => '1230000109',
    'merchant_name' => '商户名称',
    'sub_mch_id'    => '1230000109',
    'page_index'    => '1',
    'page_size'     => '10',
  ],
  'query' => [
    'action' => 'add',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance->chain('v2/secapi/mch/submchmanage')->postAsync([
  'security' => true,
  'xml' => [
    'appid'         => 'wxd678efh567hg6787',
    'mch_id'        => '1230000109',
    'merchant_name' => '商户名称',
    'sub_mch_id'    => '1230000109',
    'page_index'    => '1',
    'page_size'     => '10',
  ],
  'query' => [
    'action' => 'add',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance['v2/secapi/mch/submchmanage']->postAsync([
  'security' => true,
  'xml' => [
    'appid'         => 'wxd678efh567hg6787',
    'mch_id'        => '1230000109',
    'merchant_name' => '商户名称',
    'sub_mch_id'    => '1230000109',
    'page_index'    => '1',
    'page_size'     => '10',
  ],
  'query' => [
    'action' => 'add',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$response = $instance->v2->secapi->mch->submchmanage->post([
  'security' => true,
  'xml' => [
    'appid'         => 'wxd678efh567hg6787',
    'mch_id'        => '1230000109',
    'merchant_name' => '商户名称',
    'sub_mch_id'    => '1230000109',
    'page_index'    => '1',
    'page_size'     => '10',
  ],
  'query' => [
    'action' => 'add',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/secapi/mch/submchmanage')->post([
  'security' => true,
  'xml' => [
    'appid'         => 'wxd678efh567hg6787',
    'mch_id'        => '1230000109',
    'merchant_name' => '商户名称',
    'sub_mch_id'    => '1230000109',
    'page_index'    => '1',
    'page_size'     => '10',
  ],
  'query' => [
    'action' => 'add',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/secapi/mch/submchmanage']->post([
  'security' => true,
  'xml' => [
    'appid'         => 'wxd678efh567hg6787',
    'mch_id'        => '1230000109',
    'merchant_name' => '商户名称',
    'sub_mch_id'    => '1230000109',
    'page_index'    => '1',
    'page_size'     => '10',
  ],
  'query' => [
    'action' => 'add',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典类型描述
return_codestring返回状态码
SUCCESS | FAIL 枚举值之一
return_msgstring返回信息
result_codestring业务结果
SUCCESS | FAIL 枚举值之一
result_msgstring业务结果描述
totalstring总记录数
mchinfoobject[]商户信息列表
appidstring公众账号ID
mch_idstring商户号
merchant_namestring商户名称
merchant_shortnamestring商户简称
service_phonestring客服电话
contactstring联系人
contact_phonestring联系电话
contact_emailstring联系邮箱
businessstring经营类目
channel_idstring渠道商商户号
channel_namestring渠道商名称

参阅 官方文档 官方文档

Published on the GitHub by TheNorthMemory