Skip to content

服务商特约商户关注功能配置

注意:API只支持新增配置,配置后隔30天才能重新修改,所以配置前请确认appid是否正确。

🚫

本接口服务已于 2021.09.01 (北京时间)下线,文档仅做留存参考。

请求参数类型描述
securitytrue声明加载商户API证书
xmlobject声明请求的XML数据结构
mch_idstring商户号
sub_mch_idstring子商户号
sub_appidstring特约商户APPID
subscribe_appidstring推荐关注APPID
php
$instance->v2->secapi->mkt->addrecommendconf->postAsync([
  'security' => true,
  'xml' => [
    'mch_id'          => '1900000109',
    'sub_mch_id'      => '1900000100',
    'sub_appid'       => 'wx8888888888888888',
    'subscribe_appid' => 'wx931386123456789e',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance->chain('v2/secapi/mkt/addrecommendconf')->postAsync([
  'security' => true,
  'xml' => [
    'mch_id'          => '1900000109',
    'sub_mch_id'      => '1900000100',
    'sub_appid'       => 'wx8888888888888888',
    'subscribe_appid' => 'wx931386123456789e',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance['v2/secapi/mkt/addrecommendconf']->postAsync([
  'security' => true,
  'xml' => [
    'mch_id'          => '1900000109',
    'sub_mch_id'      => '1900000100',
    'sub_appid'       => 'wx8888888888888888',
    'subscribe_appid' => 'wx931386123456789e',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$response = $instance->v2->secapi->mkt->addrecommendconf->post([
  'security' => true,
  'xml' => [
    'mch_id'          => '1900000109',
    'sub_mch_id'      => '1900000100',
    'sub_appid'       => 'wx8888888888888888',
    'subscribe_appid' => 'wx931386123456789e',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/secapi/mkt/addrecommendconf')->post([
  'security' => true,
  'xml' => [
    'mch_id'          => '1900000109',
    'sub_mch_id'      => '1900000100',
    'sub_appid'       => 'wx8888888888888888',
    'subscribe_appid' => 'wx931386123456789e',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/secapi/mkt/addrecommendconf']->post([
  'security' => true,
  'xml' => [
    'mch_id'          => '1900000109',
    'sub_mch_id'      => '1900000100',
    'sub_appid'       => 'wx8888888888888888',
    'subscribe_appid' => 'wx931386123456789e',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典类型描述
return_codestring返回状态码
SUCCESS | FAIL 枚举值之一
return_msgstring返回信息
err_codestring错误代码
err_code_desstring错误代码描述
result_codestring业务结果
SUCCESS | FAIL 枚举值之一
signstring签名

参阅 官方文档

Published on the GitHub by TheNorthMemory