From e3831ad4d83f5ddeff48e41d47f029d694ca2763 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 21 May 2020 16:12:20 +0800 Subject: [PATCH] add clear --- wchat/common/HttpClient.php | 2 +- wchat/wx/Recharge.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/wchat/common/HttpClient.php b/wchat/common/HttpClient.php index ce37bb6..e5a828a 100644 --- a/wchat/common/HttpClient.php +++ b/wchat/common/HttpClient.php @@ -709,7 +709,7 @@ class HttpClient } else if (strpos($type, 'json') !== false) { return json_decode($body, true); } else if (strpos($type, 'xml') !== false) { - return Help::toArray($body); + return Help::xmlToArray($body); } else if (strpos($type, 'plain') !== false) { return Help::toArray($body); } diff --git a/wchat/wx/Recharge.php b/wchat/wx/Recharge.php index 3332562..67ba4d7 100644 --- a/wchat/wx/Recharge.php +++ b/wchat/wx/Recharge.php @@ -153,8 +153,7 @@ class Recharge extends SmallProgram $array['sign'] = Help::sign($array, $key, $sign_type); $this->request->setCallback(function ($data) { - echo $data;exit; - $array = Help::xmlToArray($data); + $array = Help::toArray($data); if ($array['return_code'] != 'SUCCESS') { $data = ['code' => $array['return_code'], 'message' => $array['return_msg']]; } else if ($array['result_code'] != 'SUCCESS') {