|
|
|
@ -366,12 +366,9 @@ class PaymentController extends BaseController
|
|
|
|
|
{
|
|
|
|
|
$mobile = $_REQUEST['mobile'];
|
|
|
|
|
$verify = $_REQUEST['verify'];
|
|
|
|
|
/* 检测验证码 TODO: */
|
|
|
|
|
if($verify !== 'txsb0601'){
|
|
|
|
|
if (!$this->checksafecode($this->admininfo['mobile'], $verify)) {
|
|
|
|
|
$this->error('验证码错误');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$dbres = M("Kv")->where("`key`='payment_check_mobile'")->save(['value'=>$mobile]);
|
|
|
|
|
if($dbres !== false){
|
|
|
|
|
$logout = U('Public/logout');
|
|
|
|
@ -424,11 +421,9 @@ class PaymentController extends BaseController
|
|
|
|
|
{
|
|
|
|
|
$mobile = $this->admininfo['mobile'];
|
|
|
|
|
$verify = $_REQUEST['verify'];
|
|
|
|
|
if($verify !== 'txsb0601'){
|
|
|
|
|
if (!A("Public")->checksafecode($mobile, $verify)) {
|
|
|
|
|
$this->ajaxReturn(["error"=>"验证码错误"]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$this->ajaxReturn(["success"=>"验证码验证成功","data"=>[]]);
|
|
|
|
|
}
|
|
|
|
|
//执行打款
|
|
|
|
@ -440,15 +435,13 @@ class PaymentController extends BaseController
|
|
|
|
|
Vendor("Alipay2020/Fund");
|
|
|
|
|
$fund = new \Fund();
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
$dbres = M("company_statement_info","tab_")->where("id='{$id}'")->find();
|
|
|
|
|
$company_info = json_decode($dbres['company_info'],true);
|
|
|
|
|
//TODO:未进行真实打款
|
|
|
|
|
|
|
|
|
|
if($dbres['pay_status'] != 1 && $dbres['verify_status'] == 1){
|
|
|
|
|
//执行打款
|
|
|
|
|
$title = "测试-".$dbres['company_name']."结算";
|
|
|
|
|
$title = $dbres['company_name']."结算";
|
|
|
|
|
$amount = $dbres['statement_money'];
|
|
|
|
|
$amount = 0.1;//测试金额为0
|
|
|
|
|
$payres = $fund->transfer($company_info['ali_account'],$company_info['ali_user'],$dbres['statement_num'],$amount, $title);
|
|
|
|
|
$resultCode = $payres->code;
|
|
|
|
|
|
|
|
|
|