创建速住订单
创建订单后如果超过一小时用户没有进行确认订单操作
请求参数 | 类型 | 描述 |
---|---|---|
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 |
room | string | 房间 |
start_time | string | 入住时间 |
end_time | string | 预定离店时间 |
service_location | string | 酒店 |
deposit_amount | integer | 押金金额 |
room_rate | integer | 房费 |
room_rate_desc | string | 房费说明 |
attach | string | 回调数据包 |
cancel_rule | string | 取消规则标签 |
cancel_rule_desc | string | 取消规则描述 |
cert_serial_no | string | 平台证书序列号 |
openid | string | 用户标识 |
name | string | 用户姓名 |
phone | string | 用户手机号 |
userid | string | 用户身份证ID |
address | string | 用户收货地址 |
php
$instance->v2->wxv->createhotelbill->postAsync([
'security' => true,
'xml' => [
'version' => '1.0',
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'sign_type' => 'HMAC-SHA256',
'out_order_no' => '1234323JKHDFE1243252',
'service_id' => '',
'room' => '几木双床房2间',
'start_time' => '20091225091010',
'end_time' => '20091225091010',
'service_location' => '北京亦庄亚朵酒店',
'deposit_amount' => '80000',
'room_rate' => '20000',
'room_rate_desc' => '共住3晚,每晚100元',
'attach' => '',
'cancel_rule' => '',
'cancel_rule_desc' => '',
'cert_serial_no' => '45233302',
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'name' => '',
'phone' => '',
'userid' => '',
'address' => '',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance->chain('v2/wxv/createhotelbill')->postAsync([
'security' => true,
'xml' => [
'version' => '1.0',
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'sign_type' => 'HMAC-SHA256',
'out_order_no' => '1234323JKHDFE1243252',
'service_id' => '',
'room' => '几木双床房2间',
'start_time' => '20091225091010',
'end_time' => '20091225091010',
'service_location' => '北京亦庄亚朵酒店',
'deposit_amount' => '80000',
'room_rate' => '20000',
'room_rate_desc' => '共住3晚,每晚100元',
'attach' => '',
'cancel_rule' => '',
'cancel_rule_desc' => '',
'cert_serial_no' => '45233302',
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'name' => '',
'phone' => '',
'userid' => '',
'address' => '',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance['v2/wxv/createhotelbill']->postAsync([
'security' => true,
'xml' => [
'version' => '1.0',
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'sign_type' => 'HMAC-SHA256',
'out_order_no' => '1234323JKHDFE1243252',
'service_id' => '',
'room' => '几木双床房2间',
'start_time' => '20091225091010',
'end_time' => '20091225091010',
'service_location' => '北京亦庄亚朵酒店',
'deposit_amount' => '80000',
'room_rate' => '20000',
'room_rate_desc' => '共住3晚,每晚100元',
'attach' => '',
'cancel_rule' => '',
'cancel_rule_desc' => '',
'cert_serial_no' => '45233302',
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'name' => '',
'phone' => '',
'userid' => '',
'address' => '',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$response = $instance->v2->wxv->createhotelbill->post([
'security' => true,
'xml' => [
'version' => '1.0',
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'sign_type' => 'HMAC-SHA256',
'out_order_no' => '1234323JKHDFE1243252',
'service_id' => '',
'room' => '几木双床房2间',
'start_time' => '20091225091010',
'end_time' => '20091225091010',
'service_location' => '北京亦庄亚朵酒店',
'deposit_amount' => '80000',
'room_rate' => '20000',
'room_rate_desc' => '共住3晚,每晚100元',
'attach' => '',
'cancel_rule' => '',
'cancel_rule_desc' => '',
'cert_serial_no' => '45233302',
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'name' => '',
'phone' => '',
'userid' => '',
'address' => '',
],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/wxv/createhotelbill')->post([
'security' => true,
'xml' => [
'version' => '1.0',
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'sign_type' => 'HMAC-SHA256',
'out_order_no' => '1234323JKHDFE1243252',
'service_id' => '',
'room' => '几木双床房2间',
'start_time' => '20091225091010',
'end_time' => '20091225091010',
'service_location' => '北京亦庄亚朵酒店',
'deposit_amount' => '80000',
'room_rate' => '20000',
'room_rate_desc' => '共住3晚,每晚100元',
'attach' => '',
'cancel_rule' => '',
'cancel_rule_desc' => '',
'cert_serial_no' => '45233302',
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'name' => '',
'phone' => '',
'userid' => '',
'address' => '',
],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/wxv/createhotelbill']->post([
'security' => true,
'xml' => [
'version' => '1.0',
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'sign_type' => 'HMAC-SHA256',
'out_order_no' => '1234323JKHDFE1243252',
'service_id' => '',
'room' => '几木双床房2间',
'start_time' => '20091225091010',
'end_time' => '20091225091010',
'service_location' => '北京亦庄亚朵酒店',
'deposit_amount' => '80000',
'room_rate' => '20000',
'room_rate_desc' => '共住3晚,每晚100元',
'attach' => '',
'cancel_rule' => '',
'cancel_rule_desc' => '',
'cert_serial_no' => '45233302',
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'name' => '',
'phone' => '',
'userid' => '',
'address' => '',
],
]);
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 | 微信支付服务订单号 |
miniprogram_appid | string | 小程序跳转appid |
miniprogram_path | string | 小程序跳转路径 |
miniprogram_username | string | 小程序跳转username |
package | string | 跳转微信侧小程序订单数据 |
参阅 官方文档