wechatpay-apiv3 / wechatpay-php

微信支付 APIv3 的官方 PHP Library,同时也支持 APIv2
Apache License 2.0
475 stars 98 forks source link

查询转账批次单接口out_batch_no参数和detail_status参数异常 #126

Closed lbnnbs closed 9 months ago

lbnnbs commented 9 months ago

运行环境

- OS: CentOS7.9
- PHP: 7.4
- wechatpay-php: 1.4.8

描述你的问题现象

通过微信批次单号查询批次单接口:

$resp = $client->chain("v3/transfer/batches/batch-id/131000408014801208440892023091104084497174?need_query_detail=true&detail_status=ALL")->get();

接口报错

400 Bad Request

{"code":"PARAM_ERROR","message":"传入的转账明细状态无效"}

查看生成请求地址和参数为:v3/transfer/batches/batch-id/131000408014801208440892023091104084497174?need_query_detail=true&detail_status=-a-l-l

通过商家批次单号查询批次单

$resp = $client->chain("v3/transfer/batches/out-batch-no/CT620000000?need_query_detail=true&detail_status=ALL")->get();

接口报错 400 Bad Request

{"code":"PARAM_ERROR","detail":{"location":"uri_template","value":"-c-t620000000"},"message":"输入源“/uri_template/out_batch_no”映射到值字段“商家批次单号”字符串规则校验失败,字符串只能是数字和字母"}

查看生成请求地址和参数为:v3/transfer/batches/out-batch-no/-c-t620000000?need_query_detail=true&detail_status=-a-l-l