Commit 4c69f602 authored by clone's avatar clone

1

parent de8cc129
......@@ -734,6 +734,35 @@ class AmercementService
}
}
/**
* 验证是否支付成功,支付成功的不能取消否者能取消
*
* @param $amercement_id
* @return bool
*/
public function verifyPayAmercement($amercement_id)
{
$amercementPayModel = new OAmercementPayModel();
$where["amercement_id"] = $amercement_id;
$where["status"] = 1;
$payInfo1 = $amercementPayModel->getAmercementPayInfo($where, "id,status,trade_no");
if (count($payInfo1) > 0) {
return false;
}
$where_["amercement_id"] = $amercement_id;
$payInfo = $amercementPayModel->getAmercementPayList($where_, "id,status,trade_no");
foreach ($payInfo as $item) {
$arrCurl["oritranflow"] = $item["trade_no"];
$curlRes = $this->getPayStatusByNo($arrCurl);
if ($curlRes["code"] == 200 && $curlRes["status"] == 1) {
return false;
}
}
return true;
}
public function updatePayAmercement($trade_no, $status, $remark)
{
$amercementPayModel = new OAmercementPayModel();
......
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