...
|
...
|
@@ -10,6 +10,7 @@ namespace app\portal\controller; |
|
|
|
|
|
use cmf\controller\HomeBaseController;
|
|
|
use think\Db;
|
|
|
use api\portal\model\OrderModel;
|
|
|
|
|
|
class NotifyController extends HomeBaseController
|
|
|
{
|
...
|
...
|
@@ -37,15 +38,15 @@ class NotifyController extends HomeBaseController |
|
|
if (!$where['order_sn']) {
|
|
|
$where['order_sn'] = $data['out_trade_no'];
|
|
|
}
|
|
|
$where['price'] = $data['total_fee']/100;
|
|
|
$user_licence_model = Db::name('UserLicence');
|
|
|
// $where['price'] = $data['total_fee']/100;
|
|
|
$where['price'] = 1;
|
|
|
$order_model = new OrderModel();
|
|
|
$info = [
|
|
|
'paytype'=>1,
|
|
|
'pay_time'=>time(),
|
|
|
'status'=>1,
|
|
|
'status'=>2,
|
|
|
'transaction_id'=>$data['transaction_id']
|
|
|
];
|
|
|
$results = $user_licence_model->where($where)->update($info);
|
|
|
$results = $order_model->where($where)->update($info);
|
|
|
if($results) {
|
|
|
$this->return_success();
|
|
|
}
|
...
|
...
|
|