|
|
|
@ -145,6 +145,13 @@ class ExcelPaymentController extends BaseController
|
|
|
|
|
$v['company_type'] = 2;
|
|
|
|
|
$v['create_time'] = time();
|
|
|
|
|
$v['statement_num'] = "JS_".date('Ymd').date('His').$v['company_id'].sp_random_string(5);
|
|
|
|
|
$dm = [
|
|
|
|
|
"mobile"=>$this->admininfo['mobile'],
|
|
|
|
|
"real_name"=>$this->admininfo['real_name'],
|
|
|
|
|
"time"=>date("Y-m-d H:i:s")
|
|
|
|
|
];
|
|
|
|
|
$v['document_maker'] = json_encode($dm,JSON_UNESCAPED_UNICODE);
|
|
|
|
|
|
|
|
|
|
if(!isset($company_info['ali_user']) || !isset($company_info['ali_account']) || $company_info['ali_user'] == '' || $company_info['ali_account'] == ''){
|
|
|
|
|
M('ExcelStatementInfo',"tab_")->where("batch_num = '{$v['batch_num']}'")->delete();
|
|
|
|
|
$this->ajaxReturn(["status"=>0,"msg"=>"支付宝真实姓名及登陆账号不允许为空"]);
|
|
|
|
@ -312,11 +319,10 @@ class ExcelPaymentController extends BaseController
|
|
|
|
|
//执行打款
|
|
|
|
|
$title = $remark;
|
|
|
|
|
$amount = $dbres['statement_money'];
|
|
|
|
|
$amount = 0.1;
|
|
|
|
|
$amount = 0.1; //测试金额必须去除
|
|
|
|
|
$payres = $fund->transfer($company_info['ali_account'],$company_info['ali_user'],$dbres['statement_num'],$amount, $title);
|
|
|
|
|
$resultCode = $payres->code;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$savedata = ["id"=>$dbres['id']];
|
|
|
|
|
if(!empty($resultCode)&&$resultCode == 10000){
|
|
|
|
|
$savedata["pay_status"]=1;
|
|
|
|
@ -329,6 +335,12 @@ class ExcelPaymentController extends BaseController
|
|
|
|
|
|
|
|
|
|
$savedata["pay_info"] = json_encode($payres,JSON_UNESCAPED_UNICODE);
|
|
|
|
|
$savedata["pay_time"]=time();
|
|
|
|
|
$pu = [
|
|
|
|
|
"mobile"=>$this->admininfo['mobile'],
|
|
|
|
|
"real_name"=>$this->admininfo['real_name'],
|
|
|
|
|
"time"=>date("Y-m-d H:i:s")
|
|
|
|
|
];
|
|
|
|
|
$savedata['payment_user'] = json_encode($pu,JSON_UNESCAPED_UNICODE);
|
|
|
|
|
}
|
|
|
|
|
M("ExcelStatementInfo","tab_")->save($savedata);
|
|
|
|
|
$this->ajaxReturn(["success"=>"打款成功","data"=>[]]);
|
|
|
|
|