Skip to content

重试扣费通知

若在可扣费期内扣费失败,商户在可通知时间段可以选择性调用「重试扣费通知」接口,提醒用户补足余额待下次扣费。

请求参数类型描述
contract_idstring委托代扣协议ID
jsonobject声明请求的JSON数据结构
mchidstring直连商户号
appidstring公众号ID
php
$instance->v3->papay->contracts->_contract_id_->failNotify->postAsync([
  'contract_id' => '123124412412423431',
  'json' => [
    'mchid' => '1230000109',
    'appid' => 'wxd678efh567hg6787',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance->chain('v3/papay/contracts/{contract_id}/fail-notify')->postAsync([
  'contract_id' => '123124412412423431',
  'json' => [
    'mchid' => '1230000109',
    'appid' => 'wxd678efh567hg6787',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance['v3/papay/contracts/{contract_id}/fail-notify']->postAsync([
  'contract_id' => '123124412412423431',
  'json' => [
    'mchid' => '1230000109',
    'appid' => 'wxd678efh567hg6787',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$response = $instance->v3->papay->contracts->_contract_id_->failNotify->post([
  'contract_id' => '123124412412423431',
  'json' => [
    'mchid' => '1230000109',
    'appid' => 'wxd678efh567hg6787',
  ],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance->chain('v3/papay/contracts/{contract_id}/fail-notify')->post([
  'contract_id' => '123124412412423431',
  'json' => [
    'mchid' => '1230000109',
    'appid' => 'wxd678efh567hg6787',
  ],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance['v3/papay/contracts/{contract_id}/fail-notify']->post([
  'contract_id' => '123124412412423431',
  'json' => [
    'mchid' => '1230000109',
    'appid' => 'wxd678efh567hg6787',
  ],
]);
print_r($response->getStatusCode() === 204);
返回字典类型描述
空字符串(无返回内容)

参阅 官方文档

Published on the GitHub by TheNorthMemory