dever 5 years ago
parent
commit
490f7b7da5
1 changed files with 4 additions and 2 deletions
  1. 4 2
      lib/Apple.php

+ 4 - 2
lib/Apple.php

@@ -9,12 +9,14 @@ class Apple extends Core
 	public function check($receipt_data, $account_id, $project_id, $uid, $username, $product_id, $name, $cash, $order_id = false)
 	{
         $this->log('苹果支付-初始化', $receipt_data);
+		$type = 'wechat';
+		$order_id = $this->createOrder($uid, $username, $account_id, $project_id, $product_id, $name, $cash, $type, $order_id);
+
 		if (strlen($receipt_data) < 20) {
             $this->updateOrder($order_id, $cash, '参数非法');
 			Dever::alert('参数非法');
 		}
-		$type = 'wechat';
-		$order_id = $this->createOrder($uid, $username, $account_id, $project_id, $product_id, $name, $cash, $type, $order_id);
+		
 		$result = $this->curl($receipt_data);
 
 		//如果是沙盒数据 则验证沙盒模式