diff --git a/WePayV3/Contracts/BasicWePay.php b/WePayV3/Contracts/BasicWePay.php index 6010099..8368957 100644 --- a/WePayV3/Contracts/BasicWePay.php +++ b/WePayV3/Contracts/BasicWePay.php @@ -166,6 +166,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 e14ecb5..102e033 100644 --- a/WePayV3/Refund.php +++ b/WePayV3/Refund.php @@ -38,7 +38,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); } /**