dever 6 years ago
parent
commit
e609855cfa
2 changed files with 5 additions and 4 deletions
  1. 3 2
      lib/Core.php
  2. 2 2
      lib/Wechat.php

+ 3 - 2
lib/Core.php

@@ -36,7 +36,7 @@ class Core
 				$notify = Dever::config('base', 'project')->pay_notify;
 				$key = md5($notify);
 			}
-			
+
 			if ($notify && $key) {
 				$this->log($notify, $param);
 				$send = array();
@@ -75,7 +75,7 @@ class Core
 	/**
 	 * 创建订单
 	 */
-	protected function createOrder($uid, $username, $account_id, $product_id, $name, $cash, $type, $order_id = false)
+	protected function createOrder($uid, $username, $account_id, $project_id, $product_id, $name, $cash, $type, $order_id = false)
 	{
 		$db = Dever::db('pay/order');
 		if (!$order_id) {
@@ -89,6 +89,7 @@ class Core
 			$add['uid'] = $uid;
 			$add['username'] = $username;
 			$add['account_id'] = $account_id;
+			$add['project_id'] = $project_id;
 			$add['name'] = $name;
 			$add['cash'] = $cash;
 			$add['type'] = $type;

+ 2 - 2
lib/Wechat.php

@@ -33,10 +33,10 @@ class Wechat extends Core
 	/**
 	 * 获取统一下单的基本信息
 	 */
-	public function order($account_id, $uid, $username, $product_id, $name, $cash, $openid = false, $type = 1, $order_id = false)
+	public function order($account_id, $project_id, $uid, $username, $product_id, $name, $cash, $openid = false, $type = 1, $order_id = false)
 	{
 		$trade_type = $this->getType($type);
-		$order_id = $this->createOrder($uid, $username, $account_id, $product_id, $name, $cash, $this->config->GetType(), $order_id);
+		$order_id = $this->createOrder($uid, $username, $account_id, $project_id, $product_id, $name, $cash, $this->config->GetType(), $order_id);
 		$tools = new \JsApiPay($this->config);
 		$openid = $openid ? $openid : $tools->GetOpenid();
 		$input = new \WxPayUnifiedOrder();