完结租借订单
前置条件:用户确认使用业务后。
请求参数 | 类型 | 描述 |
---|---|---|
xml | object | 声明请求的XML 数据结构 |
version | string | 接口版本号 |
appid | string | 公众账号ID |
mch_id | string | 商户号 |
sign_type | string | 签名类型 |
out_order_no | string | 商户服务订单号 |
service_id | string | 服务ID |
returned | string | 是否归还 |
real_end_time | string | 实际归还时间 |
service_end_location | string | 归还地点 |
total_amount | integer | 总金额 |
rent_fee | integer | 租金费用 |
compensation_fee | string | 赔偿金费用 |
compensation_fee_desc | string | 赔偿金费用说明 |
finish_ticket | string | 完结凭证 |
profit_sharing | string | 分账标识 |
security | boolean | 声明加载商户API证书 固定值 true |
php
$instance->v2->wxv->finishrentbill->postAsync([
'xml' => [
'version' => '1.0',
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'sign_type' => 'HMAC-SHA256',
'out_order_no' => '1234323JKHDFE1243252',
'service_id' => '',
'returned' => 'TRUE',
'real_end_time' => '20091225091010',
'service_end_location' => '嗨客时尚主题展餐厅',
'total_amount' => '40000',
'rent_fee' => '5800',
'compensation_fee' => '赔偿金费用和租金金额二者必须填写其中一个。赔偿金费用和赔偿金费用说明必须一起填写,单位:分必须>0,传入表示需要扣赔偿金传入表示需要扣赔偿金物品已归还——用户对物品产生了破坏行为造成的损失费用。物品未归还——未还物品费用。传入为0报错.',
'compensation_fee_desc' => '充电宝有轻微损坏,赔偿30%押金',
'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/finishrentbill')->postAsync([
'xml' => [
'version' => '1.0',
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'sign_type' => 'HMAC-SHA256',
'out_order_no' => '1234323JKHDFE1243252',
'service_id' => '',
'returned' => 'TRUE',
'real_end_time' => '20091225091010',
'service_end_location' => '嗨客时尚主题展餐厅',
'total_amount' => '40000',
'rent_fee' => '5800',
'compensation_fee' => '赔偿金费用和租金金额二者必须填写其中一个。赔偿金费用和赔偿金费用说明必须一起填写,单位:分必须>0,传入表示需要扣赔偿金传入表示需要扣赔偿金物品已归还——用户对物品产生了破坏行为造成的损失费用。物品未归还——未还物品费用。传入为0报错.',
'compensation_fee_desc' => '充电宝有轻微损坏,赔偿30%押金',
'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/finishrentbill']->postAsync([
'xml' => [
'version' => '1.0',
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'sign_type' => 'HMAC-SHA256',
'out_order_no' => '1234323JKHDFE1243252',
'service_id' => '',
'returned' => 'TRUE',
'real_end_time' => '20091225091010',
'service_end_location' => '嗨客时尚主题展餐厅',
'total_amount' => '40000',
'rent_fee' => '5800',
'compensation_fee' => '赔偿金费用和租金金额二者必须填写其中一个。赔偿金费用和赔偿金费用说明必须一起填写,单位:分必须>0,传入表示需要扣赔偿金传入表示需要扣赔偿金物品已归还——用户对物品产生了破坏行为造成的损失费用。物品未归还——未还物品费用。传入为0报错.',
'compensation_fee_desc' => '充电宝有轻微损坏,赔偿30%押金',
'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->finishrentbill->post([
'xml' => [
'version' => '1.0',
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'sign_type' => 'HMAC-SHA256',
'out_order_no' => '1234323JKHDFE1243252',
'service_id' => '',
'returned' => 'TRUE',
'real_end_time' => '20091225091010',
'service_end_location' => '嗨客时尚主题展餐厅',
'total_amount' => '40000',
'rent_fee' => '5800',
'compensation_fee' => '赔偿金费用和租金金额二者必须填写其中一个。赔偿金费用和赔偿金费用说明必须一起填写,单位:分必须>0,传入表示需要扣赔偿金传入表示需要扣赔偿金物品已归还——用户对物品产生了破坏行为造成的损失费用。物品未归还——未还物品费用。传入为0报错.',
'compensation_fee_desc' => '充电宝有轻微损坏,赔偿30%押金',
'finish_ticket' => '',
'profit_sharing' => 'Y',
],
'security' => true,
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/wxv/finishrentbill')->post([
'xml' => [
'version' => '1.0',
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'sign_type' => 'HMAC-SHA256',
'out_order_no' => '1234323JKHDFE1243252',
'service_id' => '',
'returned' => 'TRUE',
'real_end_time' => '20091225091010',
'service_end_location' => '嗨客时尚主题展餐厅',
'total_amount' => '40000',
'rent_fee' => '5800',
'compensation_fee' => '赔偿金费用和租金金额二者必须填写其中一个。赔偿金费用和赔偿金费用说明必须一起填写,单位:分必须>0,传入表示需要扣赔偿金传入表示需要扣赔偿金物品已归还——用户对物品产生了破坏行为造成的损失费用。物品未归还——未还物品费用。传入为0报错.',
'compensation_fee_desc' => '充电宝有轻微损坏,赔偿30%押金',
'finish_ticket' => '',
'profit_sharing' => 'Y',
],
'security' => true,
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/wxv/finishrentbill']->post([
'xml' => [
'version' => '1.0',
'appid' => 'wxd678efh567hg6787',
'mch_id' => '1230000109',
'sign_type' => 'HMAC-SHA256',
'out_order_no' => '1234323JKHDFE1243252',
'service_id' => '',
'returned' => 'TRUE',
'real_end_time' => '20091225091010',
'service_end_location' => '嗨客时尚主题展餐厅',
'total_amount' => '40000',
'rent_fee' => '5800',
'compensation_fee' => '赔偿金费用和租金金额二者必须填写其中一个。赔偿金费用和赔偿金费用说明必须一起填写,单位:分必须>0,传入表示需要扣赔偿金传入表示需要扣赔偿金物品已归还——用户对物品产生了破坏行为造成的损失费用。物品未归还——未还物品费用。传入为0报错.',
'compensation_fee_desc' => '充电宝有轻微损坏,赔偿30%押金',
'finish_ticket' => '',
'profit_sharing' => 'Y',
],
'security' => true,
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典 | 类型 | 描述 |
---|---|---|
return_code | string | 返回状态码 |
return_msg | string | 返回结果 |
sign | string | 签名 |
nonce_str | string | 随机字符串 |
result_code | string | 业务结果 |
err_code | string | 错误代码 |
err_code_des | string | 错误描述 |
appid | string | 公众账号ID |
mch_id | string | 商户号 |
out_order_no | string | 商户服务订单号 |
service_id | string | 服务ID |
order_id | string | 微信支付服务订单号 |
参阅 官方文档