This commit is contained in:
2023-12-06 16:56:09 +08:00
parent 8af14d1b3b
commit 7550d6dcfc
+4 -6
View File
@@ -73,12 +73,10 @@ trait WxV3PaymentTait
*/ */
public function searchByOutTradeNo(string $orderNo): array public function searchByOutTradeNo(string $orderNo): array
{ {
$config = $this->getPayConfig(); $config = $this->getPayConfig();
$parseUrl = '/v3/pay/transactions/out-trade-no/' . $orderNo;
$parseUrl = '/v3/pay/transactions/out-trade-no/' . $orderNo . '?mchid=' . $config->pay->wx->mchId; $sign = $this->signature('POST', $parseUrl, $json = json_encode(['mchid' => $config->pay->wx->mchId]));
$sign = $this->signature('POST', urlencode($parseUrl), ""); $client = $this->createClient($sign, $json);
$client = $this->createClient($sign, "");
$client->get($parseUrl); $client->get($parseUrl);
$client->close(); $client->close();