Commit bf96ee5b authored by zhuwei's avatar zhuwei

1

parent 4c69f602
......@@ -402,15 +402,15 @@ class AmercementService
public function cancelAmercement($id)
{
//判断是否有支付过
$payInfo = $this->isPay($id);
if ($payInfo) {//已支付 不允许取消
return ['code' => 101, 'msg' => '失败!该罚款已支付'];
} else {//无支付订单号 允许取消
$verify_pay = $this->verifyPayAmercement($id);
if ($verify_pay) {//无支付成功订单,可以取消
$data = [];
$data['id'] = $id;
$data['status'] = 2;
$this->m_amercement->updateAmercementData($data);
return ['code' => 200, 'msg' => '已取消'];
} else {//已支付
return ['code' => 101, 'msg' => '失败!该罚款已支付'];
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment