Skip to content

设置商家券事件通知地址

用于设置接收商家券相关事件通知的URL,可接收商家券相关的事件通知、包括发放通知等。需要设置接收通知的URL,并在商户平台开通营销事件推送的能力,即可接收到相关通知。

请求参数类型描述
jsonobject声明请求的JSON数据结构
mchidstring商户号
notify_urlstring通知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_timestring修改时间
notify_urlstring通知URL地址
mchidstring商户号

参阅 官方文档

查询商家券事件通知地址

通过调用此接口可查询设置的通知URL。

请求参数类型描述
queryobject声明请求的查询参数
mchidstring商户号
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_urlstring通知URL地址
mchidstring商户号

参阅 官方文档

Published on the GitHub by TheNorthMemory