Skip to content

服务商商户重试扣费通知

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

请求参数类型描述
contract_idstring委托代扣协议id
jsonobject声明请求的JSON数据结构
sp_mchidstring服务商商户号
sp_appidstring服务商应用ID
sub_mchidstring子商户号
sub_appidstring子商户应用D
php
$instance->v3->partnerPapay->contracts->_contract_id_->failNotify->postAsync([
  'contract_id' => '123124412412423431',
  'json' => [
    'sp_mchid'  => '1230000109',
    'sp_appid'  => 'wxd678efh567hg6787',
    'sub_mchid' => '12345512',
    'sub_appid' => 'wxd678efh567hg6787',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance->chain('v3/partner-papay/contracts/{contract_id}/fail-notify')->postAsync([
  'contract_id' => '123124412412423431',
  'json' => [
    'sp_mchid'  => '1230000109',
    'sp_appid'  => 'wxd678efh567hg6787',
    'sub_mchid' => '12345512',
    'sub_appid' => 'wxd678efh567hg6787',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance['v3/partner-papay/contracts/{contract_id}/fail-notify']->postAsync([
  'contract_id' => '123124412412423431',
  'json' => [
    'sp_mchid'  => '1230000109',
    'sp_appid'  => 'wxd678efh567hg6787',
    'sub_mchid' => '12345512',
    'sub_appid' => 'wxd678efh567hg6787',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$response = $instance->v3->partnerPapay->contracts->_contract_id_->failNotify->post([
  'contract_id' => '123124412412423431',
  'json' => [
    'sp_mchid'  => '1230000109',
    'sp_appid'  => 'wxd678efh567hg6787',
    'sub_mchid' => '12345512',
    'sub_appid' => 'wxd678efh567hg6787',
  ],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance->chain('v3/partner-papay/contracts/{contract_id}/fail-notify')->post([
  'contract_id' => '123124412412423431',
  'json' => [
    'sp_mchid'  => '1230000109',
    'sp_appid'  => 'wxd678efh567hg6787',
    'sub_mchid' => '12345512',
    'sub_appid' => 'wxd678efh567hg6787',
  ],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance['v3/partner-papay/contracts/{contract_id}/fail-notify']->post([
  'contract_id' => '123124412412423431',
  'json' => [
    'sp_mchid'  => '1230000109',
    'sp_appid'  => 'wxd678efh567hg6787',
    'sub_mchid' => '12345512',
    'sub_appid' => 'wxd678efh567hg6787',
  ],
]);
print_r($response->getStatusCode() === 204);
返回字典类型描述
空字符串(无返回内容)

参阅 官方文档

Published on the GitHub by TheNorthMemory