直连商户预扣费通知
如:若需要在3号扣费,则需要在1号将通知下发给用户,2号为用户的扣费等待期,用户可以选择等待扣费或关闭扣费服务,3号商户可正常发起扣费。
请求参数 | 类型 | 描述 |
---|---|---|
contract_id | string | 委托代扣协议ID |
json | object | 声明请求的JSON 数据结构 |
mchid | string | 直连商户号 |
appid | string | 公众号ID |
deduct_duration | object | 扣费持续时间 |
count | integer | 扣费持续时间数1 | 2 | 3 枚举值之一 |
unit | string | 单位DAY 枚举值 |
estimated_amount | object | 预计扣费金额信息 |
amount | number | 预计扣费金额 |
currency | string | 预计扣费货币类型 |
php
$instance->v3->papay->contracts->_contract_id_->notify->postAsync([
'contract_id' => '',
'json' => [
'mchid' => '1230000109',
'appid' => 'wxd678efh567hg6787',
'deduct_duration' => [
'count' => 1,
'unit' => 'DAY',
],
'estimated_amount' => [
'amount' => 1,
'currency' => 'CNY',
],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance->chain('v3/papay/contracts/{contract_id}/notify')->postAsync([
'contract_id' => '',
'json' => [
'mchid' => '1230000109',
'appid' => 'wxd678efh567hg6787',
'deduct_duration' => [
'count' => 1,
'unit' => 'DAY',
],
'estimated_amount' => [
'amount' => 1,
'currency' => 'CNY',
],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance['v3/papay/contracts/{contract_id}/notify']->postAsync([
'contract_id' => '',
'json' => [
'mchid' => '1230000109',
'appid' => 'wxd678efh567hg6787',
'deduct_duration' => [
'count' => 1,
'unit' => 'DAY',
],
'estimated_amount' => [
'amount' => 1,
'currency' => 'CNY',
],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r($response->getStatusCode() === 204);
})
->wait();
php
$response = $instance->v3->papay->contracts->_contract_id_->notify->post([
'contract_id' => '',
'json' => [
'mchid' => '1230000109',
'appid' => 'wxd678efh567hg6787',
'deduct_duration' => [
'count' => 1,
'unit' => 'DAY',
],
'estimated_amount' => [
'amount' => 1,
'currency' => 'CNY',
],
],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance->chain('v3/papay/contracts/{contract_id}/notify')->post([
'contract_id' => '',
'json' => [
'mchid' => '1230000109',
'appid' => 'wxd678efh567hg6787',
'deduct_duration' => [
'count' => 1,
'unit' => 'DAY',
],
'estimated_amount' => [
'amount' => 1,
'currency' => 'CNY',
],
],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance['v3/papay/contracts/{contract_id}/notify']->post([
'contract_id' => '',
'json' => [
'mchid' => '1230000109',
'appid' => 'wxd678efh567hg6787',
'deduct_duration' => [
'count' => 1,
'unit' => 'DAY',
],
'estimated_amount' => [
'amount' => 1,
'currency' => 'CNY',
],
],
]);
print_r($response->getStatusCode() === 204);
返回字典 | 类型 | 描述 |
---|---|---|
空字符串(无返回内容) |
参阅 官方文档