diff --git a/wchat/wx/Recharge.php b/wchat/wx/Recharge.php index 2220793..d7a1221 100644 --- a/wchat/wx/Recharge.php +++ b/wchat/wx/Recharge.php @@ -46,8 +46,6 @@ class Recharge extends SmallProgram $config = $this->config; $this->request->setCallback(function ($result, $body) use ($config) { $data = Help::toArray($result); - var_dump($data, $result); - exit; if (isset($data['sign'])) { $sign = $data['sign']; unset($data['sign']); @@ -112,13 +110,13 @@ class Recharge extends SmallProgram 'trade_type' => $this->config->getTradeType(), ]; - $this->data = array_merge($data, $this->data); + $data = array_merge($data, $this->data); $key = $this->config->getKey(); $sign_type = $this->config->getSignType(); - $this->data['sign_type'] = $this->config->getSignType(); - $this->data['sign'] = Help::sign($this->data, $key, $sign_type); + $data['sign'] = Help::sign($data, $key, $sign_type); + $data['sign_type'] = $this->config->getSignType(); return Help::toXml($this->data); }