获取已设置的消息通知地址
用于查询已经设置的接收营销事件通知的URL。
请求参数 | 类型 | 描述 |
---|---|---|
query | object | 声明请求的查询参数 |
mchid | string | 商户号 |
php
$instance->v3->marketing->favor->callbacks->getAsync([
'query' => [
'mchid' => '9856888',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/favor/callbacks')->getAsync([
'query' => [
'mchid' => '9856888',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/favor/callbacks']->getAsync([
'query' => [
'mchid' => '9856888',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->favor->callbacks->get([
'query' => [
'mchid' => '9856888',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/favor/callbacks')->get([
'query' => [
'mchid' => '9856888',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/favor/callbacks']->get([
'query' => [
'mchid' => '9856888',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
mchid | string | 商户号 |
notify_url | string | 通知地址 |
参阅 官方文档
设置消息通知地址
用于设置接收营销事件通知的URL,可接收营销相关的事件通知,包括核销、发放、退款等。
请求参数 | 类型 | 描述 |
---|---|---|
json | object | 声明请求的JSON 数据结构 |
mchid | string | 商户号 |
notify_url | string | 通知url地址 |
switch | boolean | 回调开关 |
php
$instance->v3->marketing->favor->callbacks->postAsync([
'json' => [
'mchid' => '9856888',
'notify_url' => 'https://pay.weixin.qq.com',
'switch' => true,
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/favor/callbacks')->postAsync([
'json' => [
'mchid' => '9856888',
'notify_url' => 'https://pay.weixin.qq.com',
'switch' => true,
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/favor/callbacks']->postAsync([
'json' => [
'mchid' => '9856888',
'notify_url' => 'https://pay.weixin.qq.com',
'switch' => true,
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->favor->callbacks->post([
'json' => [
'mchid' => '9856888',
'notify_url' => 'https://pay.weixin.qq.com',
'switch' => true,
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/favor/callbacks')->post([
'json' => [
'mchid' => '9856888',
'notify_url' => 'https://pay.weixin.qq.com',
'switch' => true,
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/favor/callbacks']->post([
'json' => [
'mchid' => '9856888',
'notify_url' => 'https://pay.weixin.qq.com',
'switch' => true,
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
update_time | string | 修改时间 |
notify_url | string | 通知地址 |
参阅 官方文档