|
@@ -180,19 +180,21 @@ class Lave extends Api
|
|
|
$where1['contract_display_account']=$contract_display_account;
|
|
|
if (cache('lave_' . $where['user_id'])) $this->error('正在处理中');
|
|
|
@file_put_contents("lave.txt", json_encode($where1));
|
|
|
+ $plan_id=$where1['plan_id'];
|
|
|
+ unset($where1['plan_id']);
|
|
|
$order = LaveModel::create($where1);
|
|
|
cache('lave_' . $where['user_id'], '1', 10);
|
|
|
if (!$order) $this->error(LaveModel::getErrorInfo());
|
|
|
$orderId = $order['order_id'];
|
|
|
$info = compact('orderId');
|
|
|
- $order['plan_id'] = $where1['plan_id'];
|
|
|
+ $order['plan_id'] = $plan_id;
|
|
|
if ($orderId) {
|
|
|
$orderInfo = LaveModel::where('order_id', $orderId)->find();
|
|
|
if (!$orderInfo || !isset($orderInfo['paid'])) $this->error('支付订单不存在!');
|
|
|
if ($orderInfo['paid']) $this->error('支付已支付!');
|
|
|
|
|
|
$plan_record=[
|
|
|
- 'plan_id'=>$where1['plan_id'],
|
|
|
+ 'plan_id'=>$plan_id,
|
|
|
'cid'=>$where['cid'],
|
|
|
'uid'=>$where['user_id'],
|
|
|
'price'=>$where['amount'],
|