dever 6 years ago
parent
commit
e87eed2ea6
3 changed files with 5 additions and 3 deletions
  1. 2 2
      lib/Core.php
  2. 0 1
      lib/Wechat.php
  3. 3 0
      src/Api.php

+ 2 - 2
lib/Core.php

@@ -27,13 +27,13 @@ class Core
 	/**
 	 * 更新订单的支付信息
 	 */
-	protected function updateOrderParam($order_id, $param)
+	protected function updateOrderParam($order_id, $data)
 	{
 		$db = Dever::db('pay/order');
 		$info = $db->one(array('order_id' => $order_id, 'status' => 1));
 		if ($info) {
 			$param['where_id'] = $info['id'];
-			$param['param'] = Dever::array_encode($param);
+			$param['param'] = Dever::array_encode($data);
 			$db->update($param);
 		}
 	}

+ 0 - 1
lib/Wechat.php

@@ -50,7 +50,6 @@ class Wechat extends Core
 		$input->SetTrade_type($trade_type);
 		$input->SetProduct_id($product_id);
 		$input->SetOpenid($openid);
-
 		if ($type == 1) {
 			$order = \WxPayApi::unifiedOrder($this->config, $input);
 			# 下单信息

+ 3 - 0
src/Api.php

@@ -11,6 +11,9 @@ class Api
 	 */
 	public function get($type = 1, $param = array())
 	{
+		if (!$type) {
+			$type = 1;
+		}
 		$this->init($param);
 		if ($this->order_id > 0) {
 			$pay = Dever::db('pay/order')->one(array('order_id' => $this->order_id));