|
@@ -173,10 +173,10 @@ class Lave extends Api
|
|
|
$where1 = $where;
|
|
|
unset($where1['from']);
|
|
|
$where1['order_id'] = LaveMonthModel::getNewOrderId();
|
|
|
- $contract_display_account = User::where('id', $where1['user_id'])->value('nickname');
|
|
|
- if (empty($contract_display_account)){
|
|
|
- $this->error('用户不存在!');
|
|
|
- }
|
|
|
+// $contract_display_account = User::where('id', $where1['user_id'])->value('nickname');
|
|
|
+// if (empty($contract_display_account)){
|
|
|
+// $this->error('用户不存在!');
|
|
|
+// }
|
|
|
|
|
|
if (cache('lave_' . $where['user_id'])) $this->error('正在处理中');
|
|
|
$plan_id=$where1['plan_id'];
|
|
@@ -184,7 +184,7 @@ class Lave extends Api
|
|
|
$order = LaveMonthModel::create($where1);
|
|
|
|
|
|
$where1['contract_code'] = WechatPlanRecord::getNewCode();
|
|
|
- $where1['contract_display_account']=$contract_display_account;
|
|
|
+ $where1['contract_display_account']=$where1['name'];
|
|
|
cache('lave_' . $where['user_id'], '1', 10);
|
|
|
if (!$order) $this->error(LaveMonthModel::getErrorInfo());
|
|
|
$orderId = $order['order_id'];
|
|
@@ -192,11 +192,15 @@ class Lave extends Api
|
|
|
$order['plan_id'] = $plan_id;
|
|
|
if ($orderId) {
|
|
|
$orderInfo = LaveMonthModel::where('order_id', $orderId)->find();
|
|
|
+
|
|
|
@file_put_contents("quanju.txt", $orderId."-订单id\r\n", 8);
|
|
|
@file_put_contents("quanju.txt", json_encode($orderInfo)."-创建支付订单搜索\r\n", 8);
|
|
|
-
|
|
|
- $a=!$orderInfo;
|
|
|
- $b= !isset($orderInfo['paid']);
|
|
|
+ if (!$orderInfo){
|
|
|
+ $a=false;
|
|
|
+ }
|
|
|
+ if (!isset($orderInfo['paid'])){
|
|
|
+ $b=false;
|
|
|
+ }
|
|
|
@file_put_contents("quanju.txt", $a."-a\r\n", 8);
|
|
|
@file_put_contents("quanju.txt", $b."-b\r\n", 8);
|
|
|
if ($a || $b){
|