fix: 微信商家批次单号查询批次单时 query 参数不正确 (#690)

* 微信商家批次单号查询批次单时 query 参数不正确

* 删除空行

* fix: 商家批次单号查询批次单时 query 参数不正确

Co-authored-by: yansongda <me@yansongda.cn>
This commit is contained in:
Xiaohe 2022-09-28 12:03:34 +08:00 committed by GitHub
parent cc77cfd279
commit 6187ae6474
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 4 deletions

View File

@ -1,3 +1,9 @@
## v3.2.8
### fixed
- fix: 商家批次单号查询批次单时 query 参数不正确(#690)
## v3.2.7
### fixed

View File

@ -35,7 +35,11 @@ class QueryOutBatchNoPlugin extends GeneralPlugin
throw new InvalidParamsException(Exception::MISSING_NECESSARY_PARAMS);
}
return 'v3/transfer/batches/out-batch-no/'.$payload->get('out_batch_no').
$outBatchNo = $payload->get('out_batch_no');
$payload->forget('out_batch_no');
return 'v3/transfer/batches/out-batch-no/'.$outBatchNo.
'?'.$payload->query();
}
@ -50,7 +54,11 @@ class QueryOutBatchNoPlugin extends GeneralPlugin
throw new InvalidParamsException(Exception::MISSING_NECESSARY_PARAMS);
}
return 'v3/partner-transfer/batches/out-batch-no/'.$payload->get('out_batch_no').
$outBatchNo = $payload->get('out_batch_no');
$payload->forget('out_batch_no');
return 'v3/partner-transfer/batches/out-batch-no/'.$outBatchNo.
'?'.$payload->query();
}
}

View File

@ -34,7 +34,7 @@ class QueryOutBatchNoPluginTest extends TestCase
$url = $radar->getUri();
self::assertEquals('/v3/transfer/batches/out-batch-no/123', $url->getPath());
self::assertStringContainsString('need_query_detail=0', $url->getQuery());
self::assertEquals('need_query_detail=0', $url->getQuery());
self::assertEquals('GET', $radar->getMethod());
}
@ -71,7 +71,7 @@ class QueryOutBatchNoPluginTest extends TestCase
$url = $radar->getUri();
self::assertEquals('/v3/partner-transfer/batches/out-batch-no/123', $url->getPath());
self::assertStringContainsString('need_query_detail=0', $url->getQuery());
self::assertEquals('need_query_detail=0', $url->getQuery());
self::assertEquals('GET', $radar->getMethod());
}