完结支付分订单
完结微信支付分订单。用户使用服务完成后,商户可通过此接口完结订单。**前置条件:**服务订单状态为“进行中”且订单状态说明需为
请求参数 | 类型 | 描述 |
---|---|---|
out_order_no | string | 商户服务订单号 |
json | object | 声明请求的JSON 数据结构 |
appid | string | 公众账号ID |
service_id | 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 | 总金额 |
time_range | object | 实际服务时间段 |
start_time | string | 服务开始时间 |
end_time | string | 服务结束时间 |
start_time_remark | string | 服务开始时间备注 |
end_time_remark | string | 服务结束时间备注 |
location | object | 实际服务位置 |
end_location | string | 服务结束地点 |
profit_sharing | boolean | 微信支付服务分账标记 |
goods_tag | string | 订单优惠标记 |
php
$instance->v3->payscore->serviceorder->_out_order_no_->complete->postAsync([
'out_order_no' => '',
'json' => [
'appid' => 'wxd678efh567hg6787',
'service_id' => '2002000000000558128851361561536',
'post_payments' => [[
'name' => '就餐费用',
'amount' => 40000,
'description' => '就餐人均100元',
'count' => 4,
],],
'post_discounts' => [[
'name' => '满20减1元',
'description' => '不与其他优惠叠加',
'amount' => 100,
'count' => 2,
],],
'total_amount' => 50000,
'time_range' => [
'start_time' => '20091225091010',
'end_time' => '20091225121010',
'start_time_remark' => '备注1',
'end_time_remark' => '备注2',
],
'location' => [
'end_location' => '嗨客时尚主题展餐厅',
],
'profit_sharing' => true,
'goods_tag' => 'goods_tag',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/payscore/serviceorder/{out_order_no}/complete')->postAsync([
'out_order_no' => '',
'json' => [
'appid' => 'wxd678efh567hg6787',
'service_id' => '2002000000000558128851361561536',
'post_payments' => [[
'name' => '就餐费用',
'amount' => 40000,
'description' => '就餐人均100元',
'count' => 4,
],],
'post_discounts' => [[
'name' => '满20减1元',
'description' => '不与其他优惠叠加',
'amount' => 100,
'count' => 2,
],],
'total_amount' => 50000,
'time_range' => [
'start_time' => '20091225091010',
'end_time' => '20091225121010',
'start_time_remark' => '备注1',
'end_time_remark' => '备注2',
],
'location' => [
'end_location' => '嗨客时尚主题展餐厅',
],
'profit_sharing' => true,
'goods_tag' => 'goods_tag',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/payscore/serviceorder/{out_order_no}/complete']->postAsync([
'out_order_no' => '',
'json' => [
'appid' => 'wxd678efh567hg6787',
'service_id' => '2002000000000558128851361561536',
'post_payments' => [[
'name' => '就餐费用',
'amount' => 40000,
'description' => '就餐人均100元',
'count' => 4,
],],
'post_discounts' => [[
'name' => '满20减1元',
'description' => '不与其他优惠叠加',
'amount' => 100,
'count' => 2,
],],
'total_amount' => 50000,
'time_range' => [
'start_time' => '20091225091010',
'end_time' => '20091225121010',
'start_time_remark' => '备注1',
'end_time_remark' => '备注2',
],
'location' => [
'end_location' => '嗨客时尚主题展餐厅',
],
'profit_sharing' => true,
'goods_tag' => 'goods_tag',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->payscore->serviceorder->_out_order_no_->complete->post([
'out_order_no' => '',
'json' => [
'appid' => 'wxd678efh567hg6787',
'service_id' => '2002000000000558128851361561536',
'post_payments' => [[
'name' => '就餐费用',
'amount' => 40000,
'description' => '就餐人均100元',
'count' => 4,
],],
'post_discounts' => [[
'name' => '满20减1元',
'description' => '不与其他优惠叠加',
'amount' => 100,
'count' => 2,
],],
'total_amount' => 50000,
'time_range' => [
'start_time' => '20091225091010',
'end_time' => '20091225121010',
'start_time_remark' => '备注1',
'end_time_remark' => '备注2',
],
'location' => [
'end_location' => '嗨客时尚主题展餐厅',
],
'profit_sharing' => true,
'goods_tag' => 'goods_tag',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/payscore/serviceorder/{out_order_no}/complete')->post([
'out_order_no' => '',
'json' => [
'appid' => 'wxd678efh567hg6787',
'service_id' => '2002000000000558128851361561536',
'post_payments' => [[
'name' => '就餐费用',
'amount' => 40000,
'description' => '就餐人均100元',
'count' => 4,
],],
'post_discounts' => [[
'name' => '满20减1元',
'description' => '不与其他优惠叠加',
'amount' => 100,
'count' => 2,
],],
'total_amount' => 50000,
'time_range' => [
'start_time' => '20091225091010',
'end_time' => '20091225121010',
'start_time_remark' => '备注1',
'end_time_remark' => '备注2',
],
'location' => [
'end_location' => '嗨客时尚主题展餐厅',
],
'profit_sharing' => true,
'goods_tag' => 'goods_tag',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/payscore/serviceorder/{out_order_no}/complete']->post([
'out_order_no' => '',
'json' => [
'appid' => 'wxd678efh567hg6787',
'service_id' => '2002000000000558128851361561536',
'post_payments' => [[
'name' => '就餐费用',
'amount' => 40000,
'description' => '就餐人均100元',
'count' => 4,
],],
'post_discounts' => [[
'name' => '满20减1元',
'description' => '不与其他优惠叠加',
'amount' => 100,
'count' => 2,
],],
'total_amount' => 50000,
'time_range' => [
'start_time' => '20091225091010',
'end_time' => '20091225121010',
'start_time_remark' => '备注1',
'end_time_remark' => '备注2',
],
'location' => [
'end_location' => '嗨客时尚主题展餐厅',
],
'profit_sharing' => true,
'goods_tag' => 'goods_tag',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
appid | string | 公众账号ID |
mchid | string | 商户号 |
out_order_no | string | 商户服务订单号 |
service_id | string | 服务ID |
service_introduction | string | 服务信息 |
state | string | 服务订单状态 |
state_description | string | 订单状态说明 |
total_amount | number | 商户收款总金额 |
post_payments | object[] | 后付费项目 |
name | string | 付费名称 |
amount | number | 付费金额 |
description | string | 付费说明 |
count | number | 付费数量 |
post_discounts | object[] | 后付费商户优惠 |
name | string | 优惠名称 |
description | string | 优惠说明 |
amount | number | 优惠金额 |
count | number | 优惠数量 |
risk_fund | object | 服务风险金 |
name | string | 风险名称 |
amount | number | 风险金额 |
description | string | 风险说明 |
time_range | object | 服务时间段 |
start_time | string | 服务开始时间 |
end_time | string | 服务结束时间 |
start_time_remark | string | 服务开始时间备注 |
end_time_remark | string | 服务结束时间备注 |
location | object | 服务位置 |
end_location | string | 服务结束地点 |
order_id | string | 微信支付服务订单号 |
need_collection | boolean | 是否需要收款 |