Commit a429c605 authored by clone's avatar clone

1

parent d1220128
......@@ -137,13 +137,13 @@ class Amercement extends Basic
{
$params = $this->params;
/* $params = array(
"trade_no" => "12323123123",//赵坤返回的fc开头的no
"tranflow" => "12323123123",//赵坤返回的fc开头的no
);*/
$checkResult = $this->validate($params, "AmercementValidate.getPayStatusByCurl");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
$arr["oritranflow"] = $params["trade_no"];
$arr["oritranflow"] = $params["tranflow"];
$data = json_encode($arr);
$curl = new \app\chat\utils\CurlUtil();
......@@ -169,7 +169,7 @@ class Amercement extends Basic
$status = 2;
}
$remark = $result["data"]["orirespmsg"];
$is_ok = $this->s_amercement->updatePayAmercement($params["trade_no"], $status, $remark);
$is_ok = $this->s_amercement->updatePayAmercement($params["tranflow"], $status, $remark);
if ($is_ok > 0) {
return $this->response("200", "success", ["status" => $status, "remark" => $remark]);
} else {
......
......@@ -23,6 +23,7 @@ class AmercementValidate extends Validate
'amercement_id' => 'require|number',
'trade_no' => 'require',
'tranflow' => 'require',
'pay_type' => 'require|number|in:1,2',
'pay_money' => 'require|number|gt:0',
'pay_time' => 'require',
......@@ -57,6 +58,7 @@ class AmercementValidate extends Validate
'amercement_id.number' => 'amercement_id只能为数字',
'trade_no.require' => 'trade_no为必填字段',
'tranflow.require' => 'tranflow为必填字段',
'pay_type.require' => 'pay_type为必填字段',
'pay_type.number' => 'pay_type只能为数字',
......@@ -74,6 +76,6 @@ class AmercementValidate extends Validate
'addAmercement' => ['type', 'money', 'agent_id', 'remarks'],
'getAmercementList' => ['agent_id', 'status', 'amercement_type'],
'savePayAmercement' => ['amercement_id', 'trade_no', 'pay_type', 'pay_money', 'pay_time'],
'getPayStatusByCurl' => [ 'trade_no'],
'getPayStatusByCurl' => [ 'tranflow'],
];
}
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