Skip to content

完结先享后付订单

请求参数类型描述
out_order_nostring商户服务订单号
jsonobject声明请求的JSON数据结构
appidstring公众账号ID
service_idstring服务ID
finish_typeinteger标识用户订单使用情况
1 | 2 枚举值之一
cancel_reasonstring取消订单的原因
real_service_start_timestring实际服务开始时间
real_service_end_timestring服务结束时间
real_service_end_locationstring实际结束使用服务的地点
feesobject[]后付费,描述付费项目列表
fee_namestring付费项目名称
fee_countinteger付费项目数量
fee_amountinteger付费项目总金额
fee_descstring描述计费规则
discountsobject[]商户优惠,最多包含5条商户优惠
discount_namestring优惠名称
discount_amountinteger商品优惠金额
discount_descstring优惠说明
total_amountinteger总金额(大于等于0的数字,单位为分)
finish_ticketstring完结凭证
profit_sharingboolean是否指定商户分账
php
$instance->v3->payscore->payafterOrders->_out_order_no_->complete->postAsync([
  'out_order_no' => '',
  'json' => [
    'appid'                     => 'wxd678efh567hg6787',
    'service_id'                => '500001',
    'finish_type'               => 0,
    'cancel_reason'             => '',
    'real_service_start_time'   => '',
    'real_service_end_time'     => '',
    'real_service_end_location' => '',
    'fees'                      => [[
      'fee_name'   => '',
      'fee_count'  => 0,
      'fee_amount' => 0,
      'fee_desc'   => '',
    ],],
    'discounts'                 => [[
      'discount_name'   => '满20减1元',
      'discount_amount' => 0,
      'discount_desc'   => '不与其他优惠叠加',
    ],],
    'total_amount'              => 0,
    'finish_ticket'             => '',
    'profit_sharing'            => true,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/payscore/payafter-orders/{out_order_no}/complete')->postAsync([
  'out_order_no' => '',
  'json' => [
    'appid'                     => 'wxd678efh567hg6787',
    'service_id'                => '500001',
    'finish_type'               => 0,
    'cancel_reason'             => '',
    'real_service_start_time'   => '',
    'real_service_end_time'     => '',
    'real_service_end_location' => '',
    'fees'                      => [[
      'fee_name'   => '',
      'fee_count'  => 0,
      'fee_amount' => 0,
      'fee_desc'   => '',
    ],],
    'discounts'                 => [[
      'discount_name'   => '满20减1元',
      'discount_amount' => 0,
      'discount_desc'   => '不与其他优惠叠加',
    ],],
    'total_amount'              => 0,
    'finish_ticket'             => '',
    'profit_sharing'            => true,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/payscore/payafter-orders/{out_order_no}/complete']->postAsync([
  'out_order_no' => '',
  'json' => [
    'appid'                     => 'wxd678efh567hg6787',
    'service_id'                => '500001',
    'finish_type'               => 0,
    'cancel_reason'             => '',
    'real_service_start_time'   => '',
    'real_service_end_time'     => '',
    'real_service_end_location' => '',
    'fees'                      => [[
      'fee_name'   => '',
      'fee_count'  => 0,
      'fee_amount' => 0,
      'fee_desc'   => '',
    ],],
    'discounts'                 => [[
      'discount_name'   => '满20减1元',
      'discount_amount' => 0,
      'discount_desc'   => '不与其他优惠叠加',
    ],],
    'total_amount'              => 0,
    'finish_ticket'             => '',
    'profit_sharing'            => true,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->payscore->payafterOrders->_out_order_no_->complete->post([
  'out_order_no' => '',
  'json' => [
    'appid'                     => 'wxd678efh567hg6787',
    'service_id'                => '500001',
    'finish_type'               => 0,
    'cancel_reason'             => '',
    'real_service_start_time'   => '',
    'real_service_end_time'     => '',
    'real_service_end_location' => '',
    'fees'                      => [[
      'fee_name'   => '',
      'fee_count'  => 0,
      'fee_amount' => 0,
      'fee_desc'   => '',
    ],],
    'discounts'                 => [[
      'discount_name'   => '满20减1元',
      'discount_amount' => 0,
      'discount_desc'   => '不与其他优惠叠加',
    ],],
    'total_amount'              => 0,
    'finish_ticket'             => '',
    'profit_sharing'            => true,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/payscore/payafter-orders/{out_order_no}/complete')->post([
  'out_order_no' => '',
  'json' => [
    'appid'                     => 'wxd678efh567hg6787',
    'service_id'                => '500001',
    'finish_type'               => 0,
    'cancel_reason'             => '',
    'real_service_start_time'   => '',
    'real_service_end_time'     => '',
    'real_service_end_location' => '',
    'fees'                      => [[
      'fee_name'   => '',
      'fee_count'  => 0,
      'fee_amount' => 0,
      'fee_desc'   => '',
    ],],
    'discounts'                 => [[
      'discount_name'   => '满20减1元',
      'discount_amount' => 0,
      'discount_desc'   => '不与其他优惠叠加',
    ],],
    'total_amount'              => 0,
    'finish_ticket'             => '',
    'profit_sharing'            => true,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/payscore/payafter-orders/{out_order_no}/complete']->post([
  'out_order_no' => '',
  'json' => [
    'appid'                     => 'wxd678efh567hg6787',
    'service_id'                => '500001',
    'finish_type'               => 0,
    'cancel_reason'             => '',
    'real_service_start_time'   => '',
    'real_service_end_time'     => '',
    'real_service_end_location' => '',
    'fees'                      => [[
      'fee_name'   => '',
      'fee_count'  => 0,
      'fee_amount' => 0,
      'fee_desc'   => '',
    ],],
    'discounts'                 => [[
      'discount_name'   => '满20减1元',
      'discount_amount' => 0,
      'discount_desc'   => '不与其他优惠叠加',
    ],],
    'total_amount'              => 0,
    'finish_ticket'             => '',
    'profit_sharing'            => true,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
appidstring公众账号ID
mchidstring商户号
out_order_nostring商户服务订单号
service_idstring服务ID
order_idstring微信支付服务订单号

参阅 官方文档

Published on the GitHub by TheNorthMemory