服务商特约商户关注功能配置
注意:API只支持新增配置,配置后隔30天才能重新修改,所以配置前请确认appid是否正确。
🚫
本接口服务已于 2021.09.01
(北京时间)下线,文档仅做留存参考。
请求参数 | 类型 | 描述 |
---|---|---|
security | true | 声明加载商户API证书 |
xml | object | 声明请求的XML 数据结构 |
mch_id | string | 商户号 |
sub_mch_id | string | 子商户号 |
sub_appid | string | 特约商户APPID |
subscribe_appid | string | 推荐关注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_code | string | 返回状态码SUCCESS | FAIL 枚举值之一 |
return_msg | string | 返回信息 |
err_code | string | 错误代码 |
err_code_des | string | 错误代码描述 |
result_code | string | 业务结果SUCCESS | FAIL 枚举值之一 |
sign | string | 签名 |
参阅 官方文档