创建用户的签约计划详情对应的服务订单
根据用户签约的计划和对应要服务的计划详情序号,创建服务订单。
请求参数 | 类型 | 描述 |
---|---|---|
json | object | 声明请求的JSON 数据结构 |
service_id | string | 支付分服务ID |
sign_plan_id | string | 待创建服务订单对应的用户的签约计划 |
plan_detail_no | number | 待创建服务订单对应的用户的签约计划详情序号 |
appid | string | 商户的AppID |
openid | string | 商户公众号下的用户标识 |
notify_url | string | 商户扣款成功回调通知的地址 |
service_introduction | string | 服务信息 |
time_range | object | 服务时间 |
start_time | string | 服务开始时间 |
end_time | string | 服务结束时间 |
start_time_remark | string | 服务开始时间备注 |
end_time_remark | string | 服务结束时间备注 |
location | object | 服务位置 |
start_location | string | 服务开始地点 |
end_location | string | 服务结束地点 |
attach | string | 附加数据 |
out_trade_no | string | 商户侧订单号 |
php
$instance->v3->payscore->signPlan->serviceorder->postAsync([
'json' => [
'service_id' => '2002000000000558128851361561536',
'sign_plan_id' => '01000033210000324638000000376258',
'plan_detail_no' => 2,
'appid' => 'wxd678efh567hg6787',
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'notify_url' => 'https://api.test.com',
'service_introduction' => '羽毛球课基础练习课程',
'time_range' => [
'start_time' => '20091225091010',
'end_time' => '20091225121010',
'start_time_remark' => '备注1',
'end_time_remark' => '备注2',
],
'location' => [
'start_location' => '嗨客时尚主题展餐厅',
'end_location' => '嗨客时尚主题展餐厅',
],
'attach' => 'Easdfowealsdkjfnlaksjdlfkwqoi&wl3l2sald',
'out_trade_no' => '1514323JSVDFE1243252',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/payscore/sign-plan/serviceorder')->postAsync([
'json' => [
'service_id' => '2002000000000558128851361561536',
'sign_plan_id' => '01000033210000324638000000376258',
'plan_detail_no' => 2,
'appid' => 'wxd678efh567hg6787',
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'notify_url' => 'https://api.test.com',
'service_introduction' => '羽毛球课基础练习课程',
'time_range' => [
'start_time' => '20091225091010',
'end_time' => '20091225121010',
'start_time_remark' => '备注1',
'end_time_remark' => '备注2',
],
'location' => [
'start_location' => '嗨客时尚主题展餐厅',
'end_location' => '嗨客时尚主题展餐厅',
],
'attach' => 'Easdfowealsdkjfnlaksjdlfkwqoi&wl3l2sald',
'out_trade_no' => '1514323JSVDFE1243252',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/payscore/sign-plan/serviceorder']->postAsync([
'json' => [
'service_id' => '2002000000000558128851361561536',
'sign_plan_id' => '01000033210000324638000000376258',
'plan_detail_no' => 2,
'appid' => 'wxd678efh567hg6787',
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'notify_url' => 'https://api.test.com',
'service_introduction' => '羽毛球课基础练习课程',
'time_range' => [
'start_time' => '20091225091010',
'end_time' => '20091225121010',
'start_time_remark' => '备注1',
'end_time_remark' => '备注2',
],
'location' => [
'start_location' => '嗨客时尚主题展餐厅',
'end_location' => '嗨客时尚主题展餐厅',
],
'attach' => 'Easdfowealsdkjfnlaksjdlfkwqoi&wl3l2sald',
'out_trade_no' => '1514323JSVDFE1243252',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->payscore->signPlan->serviceorder->post([
'json' => [
'service_id' => '2002000000000558128851361561536',
'sign_plan_id' => '01000033210000324638000000376258',
'plan_detail_no' => 2,
'appid' => 'wxd678efh567hg6787',
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'notify_url' => 'https://api.test.com',
'service_introduction' => '羽毛球课基础练习课程',
'time_range' => [
'start_time' => '20091225091010',
'end_time' => '20091225121010',
'start_time_remark' => '备注1',
'end_time_remark' => '备注2',
],
'location' => [
'start_location' => '嗨客时尚主题展餐厅',
'end_location' => '嗨客时尚主题展餐厅',
],
'attach' => 'Easdfowealsdkjfnlaksjdlfkwqoi&wl3l2sald',
'out_trade_no' => '1514323JSVDFE1243252',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/payscore/sign-plan/serviceorder')->post([
'json' => [
'service_id' => '2002000000000558128851361561536',
'sign_plan_id' => '01000033210000324638000000376258',
'plan_detail_no' => 2,
'appid' => 'wxd678efh567hg6787',
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'notify_url' => 'https://api.test.com',
'service_introduction' => '羽毛球课基础练习课程',
'time_range' => [
'start_time' => '20091225091010',
'end_time' => '20091225121010',
'start_time_remark' => '备注1',
'end_time_remark' => '备注2',
],
'location' => [
'start_location' => '嗨客时尚主题展餐厅',
'end_location' => '嗨客时尚主题展餐厅',
],
'attach' => 'Easdfowealsdkjfnlaksjdlfkwqoi&wl3l2sald',
'out_trade_no' => '1514323JSVDFE1243252',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/payscore/sign-plan/serviceorder']->post([
'json' => [
'service_id' => '2002000000000558128851361561536',
'sign_plan_id' => '01000033210000324638000000376258',
'plan_detail_no' => 2,
'appid' => 'wxd678efh567hg6787',
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'notify_url' => 'https://api.test.com',
'service_introduction' => '羽毛球课基础练习课程',
'time_range' => [
'start_time' => '20091225091010',
'end_time' => '20091225121010',
'start_time_remark' => '备注1',
'end_time_remark' => '备注2',
],
'location' => [
'start_location' => '嗨客时尚主题展餐厅',
'end_location' => '嗨客时尚主题展餐厅',
],
'attach' => 'Easdfowealsdkjfnlaksjdlfkwqoi&wl3l2sald',
'out_trade_no' => '1514323JSVDFE1243252',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
out_order_no | string | 商户订单号 |
service_id | string | 服务ID |
appid | string | 商户公众号ID |
mchid | string | 商户号 |
service_introduction | string | 服务信息 |
state | string | 服务订单状态 |
state_description | string | 订单状态说明 |
post_payments | object[] | 后付费项目 |
name | string | 付费名称 |
amount | number | 付费金额 |
description | string | 付费说明 |
post_discounts | object[] | 商户优惠 |
name | string | 优惠名称 |
amount | number | 优惠金额 |
risk_fund | object | 服务风险金 |
amount | number | 风险金额 |
time_range | object | 服务时间 |
start_time | string | 服务开始时间 |
end_time | string | 服务结束时间 |
start_time_remark | string | 服务开始时间备注 |
end_time_remark | string | 服务结束时间备注 |
location | object | 服务位置 |
start_location | string | 服务开始地点 |
end_location | string | 服务结束地点 |
attach | string | 附加数据 |
notify_url | string | 商户回调地址 |
order_id | string | 微信支付服务订单号 |
参阅 官方文档