Skip to content

完结租借订单

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

请求参数类型描述
securitytrue声明加载商户API证书
xmlobject声明请求的XML数据结构
versionstring接口版本号
1.0 枚举值
appidstring公众账号ID
mch_idstring商户号
sign_typestring签名类型
HMAC-SHA256 枚举值
out_order_nostring商户服务订单号
service_idstring服务ID
returnedstring是否归还
real_end_timestring实际归还时间
service_end_locationstring归还地点
total_amountinteger总金额
rent_feeinteger租金费用
compensation_feestring赔偿金费用
compensation_fee_descstring赔偿金费用说明
finish_ticketstring完结凭证
profit_sharingstring分账标识
Y | N 枚举值之一
php
$instance->v2->wxv->finishrentbill->postAsync([
  'security' => true,
  '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',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance->chain('v2/wxv/finishrentbill')->postAsync([
  'security' => true,
  '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',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance['v2/wxv/finishrentbill']->postAsync([
  'security' => true,
  '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',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$response = $instance->v2->wxv->finishrentbill->post([
  'security' => true,
  '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',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/wxv/finishrentbill')->post([
  'security' => true,
  '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',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/wxv/finishrentbill']->post([
  'security' => true,
  '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',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典类型描述
return_codestring返回状态码
SUCCESS | FAIL 枚举值之一
return_msgstring返回结果
signstring签名
nonce_strstring随机字符串
result_codestring业务结果
SUCCESS | FAIL 枚举值之一
err_codestring错误代码
err_code_desstring错误描述
appidstring公众账号ID
mch_idstring商户号
out_order_nostring商户服务订单号
service_idstring服务ID
order_idstring微信支付服务订单号

参阅 官方文档

Published on the GitHub by TheNorthMemory