Skip to content

完结速住订单

前置条件:用户确认使用业务后。

请求参数类型描述
xmlobject声明请求的XML数据结构
versionstring接口版本号
appidstring公众账号ID
mch_idstring商户号
sign_typestring签名类型
out_order_nostring商户服务订单号
service_idstring服务ID
checked_inboolean是否入住
real_end_timestring实际离店时间
other_feeinteger其他费用金额
cancel_feeinteger取消费用
compensation_feeinteger赔偿金费用
compensation_fee_descstring赔偿金说明
room_rateinteger房费
overdue_fineinteger延迟退房费用
overdue_fine_descstring延迟退房说明
total_amountinteger总金额
finish_ticketstring完结凭证
profit_sharingstring分账标识
securityboolean声明加载商户API证书
固定值true
php
$instance->v2->wxv->finishhotelbill->postAsync([
  'xml' => [
    'version' => '1.0',
    'appid' => 'wxd678efh567hg6787',
    'mch_id' => '1230000109',
    'sign_type' => 'HMAC-SHA256',
    'out_order_no' => '1234323JKHDFE1243252',
    'service_id' => '',
    'checked_in' => 'TRUE',
    'real_end_time' => '20091225091010',
    'other_fee' => '10000',
    'cancel_fee' => '10000',
    'compensation_fee' => '6000',
    'compensation_fee_desc' => '打破房间杯子一个',
    'room_rate' => '5000',
    'overdue_fine' => '5000',
    'overdue_fine_desc' => '延迟退房2小时,增加50元房费',
    'total_amount' => '40000',
    'finish_ticket' => '',
    'profit_sharing' => 'Y',
  ],
  'security' => true,
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance->chain('v2/wxv/finishhotelbill')->postAsync([
  'xml' => [
    'version' => '1.0',
    'appid' => 'wxd678efh567hg6787',
    'mch_id' => '1230000109',
    'sign_type' => 'HMAC-SHA256',
    'out_order_no' => '1234323JKHDFE1243252',
    'service_id' => '',
    'checked_in' => 'TRUE',
    'real_end_time' => '20091225091010',
    'other_fee' => '10000',
    'cancel_fee' => '10000',
    'compensation_fee' => '6000',
    'compensation_fee_desc' => '打破房间杯子一个',
    'room_rate' => '5000',
    'overdue_fine' => '5000',
    'overdue_fine_desc' => '延迟退房2小时,增加50元房费',
    'total_amount' => '40000',
    'finish_ticket' => '',
    'profit_sharing' => 'Y',
  ],
  'security' => true,
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance['v2/wxv/finishhotelbill']->postAsync([
  'xml' => [
    'version' => '1.0',
    'appid' => 'wxd678efh567hg6787',
    'mch_id' => '1230000109',
    'sign_type' => 'HMAC-SHA256',
    'out_order_no' => '1234323JKHDFE1243252',
    'service_id' => '',
    'checked_in' => 'TRUE',
    'real_end_time' => '20091225091010',
    'other_fee' => '10000',
    'cancel_fee' => '10000',
    'compensation_fee' => '6000',
    'compensation_fee_desc' => '打破房间杯子一个',
    'room_rate' => '5000',
    'overdue_fine' => '5000',
    'overdue_fine_desc' => '延迟退房2小时,增加50元房费',
    'total_amount' => '40000',
    'finish_ticket' => '',
    'profit_sharing' => 'Y',
  ],
  'security' => true,
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$response = $instance->v2->wxv->finishhotelbill->post([
  'xml' => [
    'version' => '1.0',
    'appid' => 'wxd678efh567hg6787',
    'mch_id' => '1230000109',
    'sign_type' => 'HMAC-SHA256',
    'out_order_no' => '1234323JKHDFE1243252',
    'service_id' => '',
    'checked_in' => 'TRUE',
    'real_end_time' => '20091225091010',
    'other_fee' => '10000',
    'cancel_fee' => '10000',
    'compensation_fee' => '6000',
    'compensation_fee_desc' => '打破房间杯子一个',
    'room_rate' => '5000',
    'overdue_fine' => '5000',
    'overdue_fine_desc' => '延迟退房2小时,增加50元房费',
    'total_amount' => '40000',
    'finish_ticket' => '',
    'profit_sharing' => 'Y',
  ],
  'security' => true,
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/wxv/finishhotelbill')->post([
  'xml' => [
    'version' => '1.0',
    'appid' => 'wxd678efh567hg6787',
    'mch_id' => '1230000109',
    'sign_type' => 'HMAC-SHA256',
    'out_order_no' => '1234323JKHDFE1243252',
    'service_id' => '',
    'checked_in' => 'TRUE',
    'real_end_time' => '20091225091010',
    'other_fee' => '10000',
    'cancel_fee' => '10000',
    'compensation_fee' => '6000',
    'compensation_fee_desc' => '打破房间杯子一个',
    'room_rate' => '5000',
    'overdue_fine' => '5000',
    'overdue_fine_desc' => '延迟退房2小时,增加50元房费',
    'total_amount' => '40000',
    'finish_ticket' => '',
    'profit_sharing' => 'Y',
  ],
  'security' => true,
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/wxv/finishhotelbill']->post([
  'xml' => [
    'version' => '1.0',
    'appid' => 'wxd678efh567hg6787',
    'mch_id' => '1230000109',
    'sign_type' => 'HMAC-SHA256',
    'out_order_no' => '1234323JKHDFE1243252',
    'service_id' => '',
    'checked_in' => 'TRUE',
    'real_end_time' => '20091225091010',
    'other_fee' => '10000',
    'cancel_fee' => '10000',
    'compensation_fee' => '6000',
    'compensation_fee_desc' => '打破房间杯子一个',
    'room_rate' => '5000',
    'overdue_fine' => '5000',
    'overdue_fine_desc' => '延迟退房2小时,增加50元房费',
    'total_amount' => '40000',
    'finish_ticket' => '',
    'profit_sharing' => 'Y',
  ],
  'security' => true,
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典类型描述
return_codestring返回状态码
return_msgstring返回结果
signstring签名
nonce_strstring随机字符串
result_codestring业务结果
err_codestring错误代码
err_code_desstring错误描述
appidstring公众账号ID
mch_idstring商户号
out_order_nostring商户服务订单号
service_idstring服务ID
order_idstring微信支付服务订单号

参阅 官方文档

Published on the GitHub by TheNorthMemory