设置商家券事件通知地址
用于设置接收商家券相关事件通知的URL,可接收商家券相关的事件通知、包括发放通知等。需要设置接收通知的URL,并在商户平台开通营销事件推送的能力,即可接收到相关通知。
请求参数 | 类型 | 描述 |
---|---|---|
json | object | 声明请求的JSON 数据结构 |
mchid | string | 商户号 |
notify_url | string | 通知URL地址 |
php
$instance->v3->marketing->busifavor->callbacks->postAsync([
'json' => [
'mchid' => '10000098',
'notify_url' => 'https://pay.weixin.qq.com',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/busifavor/callbacks')->postAsync([
'json' => [
'mchid' => '10000098',
'notify_url' => 'https://pay.weixin.qq.com',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/busifavor/callbacks']->postAsync([
'json' => [
'mchid' => '10000098',
'notify_url' => 'https://pay.weixin.qq.com',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->busifavor->callbacks->post([
'json' => [
'mchid' => '10000098',
'notify_url' => 'https://pay.weixin.qq.com',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/busifavor/callbacks')->post([
'json' => [
'mchid' => '10000098',
'notify_url' => 'https://pay.weixin.qq.com',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/busifavor/callbacks']->post([
'json' => [
'mchid' => '10000098',
'notify_url' => 'https://pay.weixin.qq.com',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
update_time | string | 修改时间 |
notify_url | string | 通知URL地址 |
mchid | string | 商户号 |
参阅 官方文档
查询商家券事件通知地址
通过调用此接口可查询设置的通知URL。
请求参数 | 类型 | 描述 |
---|---|---|
query | object | 声明请求的查询参数 |
mchid | string | 商户号 |
php
$instance->v3->marketing->busifavor->callbacks->getAsync([
'query' => [
'mchid' => '10000098',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/busifavor/callbacks')->getAsync([
'query' => [
'mchid' => '10000098',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/busifavor/callbacks']->getAsync([
'query' => [
'mchid' => '10000098',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->busifavor->callbacks->get([
'query' => [
'mchid' => '10000098',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/busifavor/callbacks')->get([
'query' => [
'mchid' => '10000098',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/busifavor/callbacks']->get([
'query' => [
'mchid' => '10000098',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
notify_url | string | 通知URL地址 |
mchid | string | 商户号 |
参阅 官方文档