diff --git a/WePayV3/Contracts/BasicWePay.php b/WePayV3/Contracts/BasicWePay.php index 056ddf7868cbc0efd2b7c61f7b505d37a0a2e070..214e9cff33ce3df01e19180e13de72f8d54d414e 100644 --- a/WePayV3/Contracts/BasicWePay.php +++ b/WePayV3/Contracts/BasicWePay.php @@ -136,6 +136,9 @@ abstract class BasicWePay ], ]); if ($verify) { + if(empty($headers)){ + return json_decode($content, true); + } $headers = []; foreach (explode("\n", $header) as $line) { if (stripos($line, 'Wechatpay') !== false) { diff --git a/WePayV3/Refund.php b/WePayV3/Refund.php index bae2563b4e4ed5192ca5e596318173cb0e13c1cb..76ed4bf82494af46a5eea80fec2120ba479d2a24 100644 --- a/WePayV3/Refund.php +++ b/WePayV3/Refund.php @@ -36,7 +36,7 @@ class Refund extends BasicWePay */ public function create($data) { - return $this->doRequest('POST', '/v3/ecommerce/refunds/apply', json_encode($data, JSON_UNESCAPED_UNICODE), true); + return $this->doRequest('POST', '/v3/refund/domestic/refunds', json_encode($data, JSON_UNESCAPED_UNICODE), true); } /**