Skip to content

创建智慧零售订单

请求参数类型描述
jsonobject声明请求的JSON数据结构
appidstring公众账号ID
out_order_nostring商户服务订单号
service_idstring服务ID
service_start_timestring
service_end_timestring
service_start_locationstring
service_end_locationstring
service_introductionstring
feesobject[]
fee_namestring
fee_countinteger
fee_amountinteger
fee_descstring
discountsobject[]
discount_namestring优惠名称
discount_descstring优惠说明
risk_amountinteger
attachstring
need_user_confirmboolean
openidstring
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));
返回字典类型描述
appidstring公众账号ID
mchidstring
out_order_nostring商户服务订单号
service_idstring服务ID
order_idstring
miniprogram_businesstypestring
miniprogram_appidstring
miniprogram_pathstring
miniprogram_usernamestring
packagestring

参阅 官方文档

查询智慧零售订单

请求参数类型描述
queryobject声明请求的查询参数
service_idstring
out_order_nostring
query_idstring
appidstring
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));
返回字典类型描述
appidstring公众账号ID
mchidstring
out_order_nostring商户服务订单号
service_idstring服务ID
statestringCREATED | USER_ACCEPTED | FINISHED | USER_PAID | REVOKED | EXPIRED 枚举值之一
finish_typeinteger
service_start_timestring
service_end_timestring
real_service_start_timestring
real_service_end_timestring
pay_succ_timestring
service_start_locationstring
service_end_locationstring
real_service_start_locationstring
real_service_end_locationstring
service_introductionstring
feesobject[]
fee_namestring
fee_countinteger
fee_amountinteger
fee_descstring
discountsobject[]
discount_namestring优惠名称
discount_amountinteger
discount_descstring优惠说明
risk_amountinteger
total_amountinteger
attachstring
finish_ticketstring
finish_transaction_idstring
pay_typestring

参阅 官方文档

Published on the GitHub by TheNorthMemory