完结速住订单
前置条件:用户确认使用业务后。
| 请求参数 | 类型 | 描述 |
|---|---|---|
| security | true | 声明加载商户API证书 |
| xml | object | 声明请求的XML数据结构 |
| version | string | 接口版本号1.0 枚举值 |
| appid | string | 公众账号ID |
| mch_id | string | 商户号 |
| sign_type | string | 签名类型HMAC-SHA256 枚举值 |
| out_order_no | string | 商户服务订单号 |
| service_id | string | 服务ID |
| checked_in | boolean | 是否入住 |
| real_end_time | string | 实际离店时间 |
| other_fee | integer | 其他费用金额 |
| cancel_fee | integer | 取消费用 |
| compensation_fee | integer | 赔偿金费用 |
| compensation_fee_desc | string | 赔偿金说明 |
| room_rate | integer | 房费 |
| overdue_fine | integer | 延迟退房费用 |
| overdue_fine_desc | string | 延迟退房说明 |
| total_amount | integer | 总金额 |
| finish_ticket | string | 完结凭证 |
| profit_sharing | string | 分账标识Y | N 枚举值之一 |
php
$instance->v2->wxv->finishhotelbill->postAsync([
'security' => true,
'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',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();php
$instance->chain('v2/wxv/finishhotelbill')->postAsync([
'security' => true,
'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',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();php
$instance['v2/wxv/finishhotelbill']->postAsync([
'security' => true,
'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',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();php
$response = $instance->v2->wxv->finishhotelbill->post([
'security' => true,
'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',
],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));php
$response = $instance->chain('v2/wxv/finishhotelbill')->post([
'security' => true,
'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',
],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));php
$response = $instance['v2/wxv/finishhotelbill']->post([
'security' => true,
'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',
],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));| 返回字典 | 类型 | 描述 |
|---|---|---|
| return_code | string | 返回状态码SUCCESS | FAIL 枚举值之一 |
| return_msg | string | 返回结果 |
| sign | string | 签名 |
| nonce_str | string | 随机字符串 |
| result_code | string | 业务结果SUCCESS | FAIL 枚举值之一 |
| err_code | string | 错误代码 |
| err_code_des | string | 错误描述 |
| appid | string | 公众账号ID |
| mch_id | string | 商户号 |
| out_order_no | string | 商户服务订单号 |
| service_id | string | 服务ID |
| order_id | string | 微信支付服务订单号 |
参阅 官方文档