Skip to content

管理用户投诉通知回调地址

创建投诉通知回调

商户通过调用此接口创建投诉通知回调URL,当用户产生新投诉且投诉状态已变更时,微信支付会通过回 调URL通知商户。对于服务商、渠道商,会收到所有子商户的投诉信息推送。

请求参数类型描述
jsonobject声明请求的JSON数据结构
urlstring通知地址
php
$instance->v3->merchantService->complaintNotifications->postAsync([
  'json' => [
    'url' => 'https://www.xxx.com/notify',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/merchant-service/complaint-notifications')->postAsync([
  'json' => [
    'url' => 'https://www.xxx.com/notify',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/merchant-service/complaint-notifications']->postAsync([
  'json' => [
    'url' => 'https://www.xxx.com/notify',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->merchantService->complaintNotifications->post([
  'json' => [
    'url' => 'https://www.xxx.com/notify',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/merchant-service/complaint-notifications')->post([
  'json' => [
    'url' => 'https://www.xxx.com/notify',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/merchant-service/complaint-notifications']->post([
  'json' => [
    'url' => 'https://www.xxx.com/notify',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
mchidstring商户号
urlstring通知地址

参阅 官方文档 官方文档

查询投诉通知回调

商户通过调用此接口查询投诉通知的回调URL。

请求参数类型描述
php
$instance->v3->merchantService->complaintNotifications->getAsync([])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/merchant-service/complaint-notifications')->getAsync([])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/merchant-service/complaint-notifications']->getAsync([])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->merchantService->complaintNotifications->get([]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/merchant-service/complaint-notifications')->get([]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/merchant-service/complaint-notifications']->get([]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
mchidstring商户号
urlstring通知地址

参阅 官方文档 官方文档

更新投诉通知回调

商户通过调用此接口更新投诉通知的回调URL。

请求参数类型描述
jsonobject声明请求的JSON数据结构
urlstring通知地址
php
$instance->v3->merchantService->complaintNotifications->putAsync([
  'json' => [
    'url' => 'https://www.xxx.com/notify',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/merchant-service/complaint-notifications')->putAsync([
  'json' => [
    'url' => 'https://www.xxx.com/notify',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/merchant-service/complaint-notifications']->putAsync([
  'json' => [
    'url' => 'https://www.xxx.com/notify',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->merchantService->complaintNotifications->put([
  'json' => [
    'url' => 'https://www.xxx.com/notify',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/merchant-service/complaint-notifications')->put([
  'json' => [
    'url' => 'https://www.xxx.com/notify',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/merchant-service/complaint-notifications']->put([
  'json' => [
    'url' => 'https://www.xxx.com/notify',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
mchidstring商户号
urlstring通知地址

参阅 官方文档 官方文档

删除投诉通知回调

当商户不再需要推送通知时,可通过调用此接口删除投诉通知的回调URL,取消通知回调。

请求参数类型描述
php
$instance->v3->merchantService->complaintNotifications->deleteAsync([])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance->chain('v3/merchant-service/complaint-notifications')->deleteAsync([])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance['v3/merchant-service/complaint-notifications']->deleteAsync([])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$response = $instance->v3->merchantService->complaintNotifications->delete([]);
print_r($response->getStatusCode() === 204);
php
$response = $instance->chain('v3/merchant-service/complaint-notifications')->delete([]);
print_r($response->getStatusCode() === 204);
php
$response = $instance['v3/merchant-service/complaint-notifications']->delete([]);
print_r($response->getStatusCode() === 204);
返回字典类型描述
空字符串(无返回内容)

参阅 官方文档 官方文档

Published on the GitHub by TheNorthMemory