Skip to content

Commit

Permalink
fix: 更新退款通知处理
Browse files Browse the repository at this point in the history
  • Loading branch information
zoujingli committed Sep 25, 2024
1 parent 0f9023d commit 9f27480
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion WeChat/Contracts/BasicWePay.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public static function instance(array $config)

/**
* 获取微信支付通知
* @param string $xml
* @param string|array $xml
* @return array
* @throws \WeChat\Exceptions\InvalidResponseException
*/
Expand Down
4 changes: 2 additions & 2 deletions WePay/Refund.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ public function query(array $options)

/**
* 获取退款通知
* @param string $xml
* @param string|array $xml
* @return array
* @throws \WeChat\Exceptions\InvalidDecryptException
* @throws \WeChat\Exceptions\InvalidResponseException
*/
public function getNotify($xml = '')
{
$data = Tools::xml2arr(empty($xml) ? Tools::getRawInput() : $xml);
$data = is_array($xml) ? $xml : Tools::xml2arr(empty($xml) ? Tools::getRawInput() : $xml);
if (!isset($data['return_code']) || $data['return_code'] !== 'SUCCESS') {
throw new InvalidResponseException('获取退款通知XML失败!');
}
Expand Down

0 comments on commit 9f27480

Please sign in to comment.