创建智慧零售订单
请求参数 | 类型 | 描述 |
---|---|---|
json | object | 声明请求的JSON 数据结构 |
appid | string | 公众账号ID |
out_order_no | string | 商户服务订单号 |
service_id | string | 服务ID |
service_start_time | string | |
service_end_time | string | |
service_start_location | string | |
service_end_location | string | |
service_introduction | string | |
fees | object[] | |
fee_name | string | |
fee_count | integer | |
fee_amount | integer | |
fee_desc | string | |
discounts | object[] | |
discount_name | string | 优惠名称 |
discount_desc | string | 优惠说明 |
risk_amount | integer | |
attach | string | |
need_user_confirm | boolean | |
openid | string |
php
$instance->v3->payscore->smartretailOrders->postAsync([
'json' => [
'appid' => 'wxd678efh567hg6787',
'out_order_no' => '1234323JKHDFE1243252',
'service_id' => '500001',
'service_start_time' => '',
'service_end_time' => '',
'service_start_location' => '',
'service_end_location' => '',
'service_introduction' => '',
'fees' => [[
'fee_name' => '',
'fee_count' => 0,
'fee_amount' => 0,
'fee_desc' => '',
],],
'discounts' => [[
'discount_name' => '满20减1元',
'discount_desc' => '不与其他优惠叠加',
],],
'risk_amount' => 0,
'attach' => '',
'need_user_confirm' => true,
'openid' => '',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/payscore/smartretail-orders')->postAsync([
'json' => [
'appid' => 'wxd678efh567hg6787',
'out_order_no' => '1234323JKHDFE1243252',
'service_id' => '500001',
'service_start_time' => '',
'service_end_time' => '',
'service_start_location' => '',
'service_end_location' => '',
'service_introduction' => '',
'fees' => [[
'fee_name' => '',
'fee_count' => 0,
'fee_amount' => 0,
'fee_desc' => '',
],],
'discounts' => [[
'discount_name' => '满20减1元',
'discount_desc' => '不与其他优惠叠加',
],],
'risk_amount' => 0,
'attach' => '',
'need_user_confirm' => true,
'openid' => '',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/payscore/smartretail-orders']->postAsync([
'json' => [
'appid' => 'wxd678efh567hg6787',
'out_order_no' => '1234323JKHDFE1243252',
'service_id' => '500001',
'service_start_time' => '',
'service_end_time' => '',
'service_start_location' => '',
'service_end_location' => '',
'service_introduction' => '',
'fees' => [[
'fee_name' => '',
'fee_count' => 0,
'fee_amount' => 0,
'fee_desc' => '',
],],
'discounts' => [[
'discount_name' => '满20减1元',
'discount_desc' => '不与其他优惠叠加',
],],
'risk_amount' => 0,
'attach' => '',
'need_user_confirm' => true,
'openid' => '',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->payscore->smartretailOrders->post([
'json' => [
'appid' => 'wxd678efh567hg6787',
'out_order_no' => '1234323JKHDFE1243252',
'service_id' => '500001',
'service_start_time' => '',
'service_end_time' => '',
'service_start_location' => '',
'service_end_location' => '',
'service_introduction' => '',
'fees' => [[
'fee_name' => '',
'fee_count' => 0,
'fee_amount' => 0,
'fee_desc' => '',
],],
'discounts' => [[
'discount_name' => '满20减1元',
'discount_desc' => '不与其他优惠叠加',
],],
'risk_amount' => 0,
'attach' => '',
'need_user_confirm' => true,
'openid' => '',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/payscore/smartretail-orders')->post([
'json' => [
'appid' => 'wxd678efh567hg6787',
'out_order_no' => '1234323JKHDFE1243252',
'service_id' => '500001',
'service_start_time' => '',
'service_end_time' => '',
'service_start_location' => '',
'service_end_location' => '',
'service_introduction' => '',
'fees' => [[
'fee_name' => '',
'fee_count' => 0,
'fee_amount' => 0,
'fee_desc' => '',
],],
'discounts' => [[
'discount_name' => '满20减1元',
'discount_desc' => '不与其他优惠叠加',
],],
'risk_amount' => 0,
'attach' => '',
'need_user_confirm' => true,
'openid' => '',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/payscore/smartretail-orders']->post([
'json' => [
'appid' => 'wxd678efh567hg6787',
'out_order_no' => '1234323JKHDFE1243252',
'service_id' => '500001',
'service_start_time' => '',
'service_end_time' => '',
'service_start_location' => '',
'service_end_location' => '',
'service_introduction' => '',
'fees' => [[
'fee_name' => '',
'fee_count' => 0,
'fee_amount' => 0,
'fee_desc' => '',
],],
'discounts' => [[
'discount_name' => '满20减1元',
'discount_desc' => '不与其他优惠叠加',
],],
'risk_amount' => 0,
'attach' => '',
'need_user_confirm' => true,
'openid' => '',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
appid | string | 公众账号ID |
mchid | string | |
out_order_no | string | 商户服务订单号 |
service_id | string | 服务ID |
order_id | string | |
miniprogram_businesstype | string | |
miniprogram_appid | string | |
miniprogram_path | string | |
miniprogram_username | string | |
package | string |
参阅 官方文档
查询智慧零售订单
请求参数 | 类型 | 描述 |
---|---|---|
query | object | 声明请求的查询参数 |
service_id | string | |
out_order_no | string | |
query_id | string | |
appid | string |
php
$instance->v3->payscore->smartretailOrders->getAsync([
'query' => [
'service_id' => '',
'out_order_no' => '',
'query_id' => '',
'appid' => '',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/payscore/smartretail-orders')->getAsync([
'query' => [
'service_id' => '',
'out_order_no' => '',
'query_id' => '',
'appid' => '',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/payscore/smartretail-orders']->getAsync([
'query' => [
'service_id' => '',
'out_order_no' => '',
'query_id' => '',
'appid' => '',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->payscore->smartretailOrders->get([
'query' => [
'service_id' => '',
'out_order_no' => '',
'query_id' => '',
'appid' => '',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/payscore/smartretail-orders')->get([
'query' => [
'service_id' => '',
'out_order_no' => '',
'query_id' => '',
'appid' => '',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/payscore/smartretail-orders']->get([
'query' => [
'service_id' => '',
'out_order_no' => '',
'query_id' => '',
'appid' => '',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
appid | string | 公众账号ID |
mchid | string | |
out_order_no | string | 商户服务订单号 |
service_id | string | 服务ID |
state | string | CREATED | USER_ACCEPTED | FINISHED | USER_PAID | REVOKED | EXPIRED 枚举值之一 |
finish_type | integer | |
service_start_time | string | |
service_end_time | string | |
real_service_start_time | string | |
real_service_end_time | string | |
pay_succ_time | string | |
service_start_location | string | |
service_end_location | string | |
real_service_start_location | string | |
real_service_end_location | string | |
service_introduction | string | |
fees | object[] | |
fee_name | string | |
fee_count | integer | |
fee_amount | integer | |
fee_desc | string | |
discounts | object[] | |
discount_name | string | 优惠名称 |
discount_amount | integer | |
discount_desc | string | 优惠说明 |
risk_amount | integer | |
total_amount | integer | |
attach | string | |
finish_ticket | string | |
finish_transaction_id | string | |
pay_type | string |
参阅 官方文档