下发服务预扣费消息
商户系统请求支付分系统,下发服务预扣费消息; 一笔服务订单仅可以发送一次下发服务预扣费消息;
请求参数 | 类型 | 描述 |
---|---|---|
out_order_no | string | 商户服务订单号 |
json | object | 声明请求的JSON 数据结构 |
service_id | string | 服务ID |
sub_mchid | string | 子商户商户号 |
post_payments | object[] | 后付费项目 |
name | string | 付费名称 |
amount | number | 付费金额 |
description | string | 付费说明 |
count | number | 付费数量 |
post_discounts | object[] | 商户优惠 |
name | string | 优惠名称 |
description | string | 优惠说明 |
amount | number | 优惠金额 |
count | number | 优惠数量 |
total_amount | number | 总金额 |
prepaid_time | string | 预计扣费时间 |
php
$instance->v3->payscore->partner->serviceorder->_out_order_no_->sendPrepaidmessage->postAsync([
'out_order_no' => '',
'json' => [
'service_id' => '2002000000000558128851361561536',
'sub_mchid' => '1900000109',
'post_payments' => [[
'name' => '就餐费用',
'amount' => 40000,
'description' => '就餐人均100元',
'count' => 4,
],],
'post_discounts' => [[
'name' => '满20减1元',
'description' => '不与其他优惠叠加',
'amount' => 100,
'count' => 2,
],],
'total_amount' => 50000,
'prepaid_time' => '20231218',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r($response->getStatusCode() === 204);
})
->wait();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
php
$instance->chain('v3/payscore/partner/serviceorder/{out_order_no}/send-prepaidmessage')->postAsync([
'out_order_no' => '',
'json' => [
'service_id' => '2002000000000558128851361561536',
'sub_mchid' => '1900000109',
'post_payments' => [[
'name' => '就餐费用',
'amount' => 40000,
'description' => '就餐人均100元',
'count' => 4,
],],
'post_discounts' => [[
'name' => '满20减1元',
'description' => '不与其他优惠叠加',
'amount' => 100,
'count' => 2,
],],
'total_amount' => 50000,
'prepaid_time' => '20231218',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r($response->getStatusCode() === 204);
})
->wait();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
php
$instance['v3/payscore/partner/serviceorder/{out_order_no}/send-prepaidmessage']->postAsync([
'out_order_no' => '',
'json' => [
'service_id' => '2002000000000558128851361561536',
'sub_mchid' => '1900000109',
'post_payments' => [[
'name' => '就餐费用',
'amount' => 40000,
'description' => '就餐人均100元',
'count' => 4,
],],
'post_discounts' => [[
'name' => '满20减1元',
'description' => '不与其他优惠叠加',
'amount' => 100,
'count' => 2,
],],
'total_amount' => 50000,
'prepaid_time' => '20231218',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r($response->getStatusCode() === 204);
})
->wait();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
php
$response = $instance->v3->payscore->partner->serviceorder->_out_order_no_->sendPrepaidmessage->post([
'out_order_no' => '',
'json' => [
'service_id' => '2002000000000558128851361561536',
'sub_mchid' => '1900000109',
'post_payments' => [[
'name' => '就餐费用',
'amount' => 40000,
'description' => '就餐人均100元',
'count' => 4,
],],
'post_discounts' => [[
'name' => '满20减1元',
'description' => '不与其他优惠叠加',
'amount' => 100,
'count' => 2,
],],
'total_amount' => 50000,
'prepaid_time' => '20231218',
],
]);
print_r($response->getStatusCode() === 204);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
php
$response = $instance->chain('v3/payscore/partner/serviceorder/{out_order_no}/send-prepaidmessage')->post([
'out_order_no' => '',
'json' => [
'service_id' => '2002000000000558128851361561536',
'sub_mchid' => '1900000109',
'post_payments' => [[
'name' => '就餐费用',
'amount' => 40000,
'description' => '就餐人均100元',
'count' => 4,
],],
'post_discounts' => [[
'name' => '满20减1元',
'description' => '不与其他优惠叠加',
'amount' => 100,
'count' => 2,
],],
'total_amount' => 50000,
'prepaid_time' => '20231218',
],
]);
print_r($response->getStatusCode() === 204);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
php
$response = $instance['v3/payscore/partner/serviceorder/{out_order_no}/send-prepaidmessage']->post([
'out_order_no' => '',
'json' => [
'service_id' => '2002000000000558128851361561536',
'sub_mchid' => '1900000109',
'post_payments' => [[
'name' => '就餐费用',
'amount' => 40000,
'description' => '就餐人均100元',
'count' => 4,
],],
'post_discounts' => [[
'name' => '满20减1元',
'description' => '不与其他优惠叠加',
'amount' => 100,
'count' => 2,
],],
'total_amount' => 50000,
'prepaid_time' => '20231218',
],
]);
print_r($response->getStatusCode() === 204);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
返回字典 | 类型 | 描述 |
---|---|---|
空字符串(无返回内容) |
参阅 官方文档