|
@@ -185,14 +185,14 @@ class Lave extends Api
|
|
|
if (!$order) $this->error(LaveModel::getErrorInfo());
|
|
|
$orderId = $order['order_id'];
|
|
|
$info = compact('orderId');
|
|
|
- $order['plan_id'] = WechatPlan::where('cid', $where['cid'])->value('plan_id');
|
|
|
+ $order['plan_id'] = $where1['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'=>WechatPlan::where('price', $where['amount'])->value('plan_id'),
|
|
|
+ 'plan_id'=>$where1['plan_id'],
|
|
|
'cid'=>$where['cid'],
|
|
|
'uid'=>$where['user_id'],
|
|
|
'price'=>$where['amount'],
|