'0','msg'=>'error']); } if ($data['action'] == 'AUTH_PASS'){//实名认证通过通知 $authFlowId = $data['authFlowId']; if ($data['authType'] == 'PSN'){ $psnId = $data['psnInfo']['psnId']; //更新数据 $info = Member::where('authType','PSN') ->where('authFlowId',$authFlowId) ->update(['realnameStatus'=>1,'psnId'=>$psnId]); }elseif ($data['authType'] == 'ORG'){ $orgId = $data['organization']['orgId']; $orgName = $data['organization']['orgName']; //更新数据 $info = Firm::where('authType','ORG') ->where('firm_name',$orgName) ->where('realnameStatus',0) ->update(['realnameStatus'=>1,'orgId'=>$orgId]); } }elseif ($data['action'] == 'AUTHORIZE_FINISH'){//授权通知 $authFlowId = $data['authFlowId']; $psnId = $data['psnId']; $orgId = $data['orgId'] ?? ''; $authorizedInfo = json_encode($data['authorizedInfo']); if($orgId){ Firm::where('authFlowId',$authFlowId)->update(['authorizeUserInfo'=>1,'realnameStatus'=>1,'orgId'=>$orgId,'authorizedInfo'=>$authorizedInfo]); //检测系统内部的企业印章信息 JobServer::creatServer()->createFirmSealJob($orgId); }else{ Member::where('authFlowId',$authFlowId)->update(['authorizeUserInfo'=>1,'realnameStatus'=>1,'psnId'=>$psnId,'authorizedInfo'=>$authorizedInfo]); //检测系统内部的企业印章信息 JobServer::creatServer()->createMemberSealJob($psnId); } }elseif ($data['action'] == 'AUTHORIZE_CHANGE'){ //授权变更通知 }elseif ($data['action'] == 'SIGN_FLOW_COMPLETE'){ //合同签署 ContractServer::creatServer()->signEnd($data['signFlowStatus'],$data['signFlowId']); }elseif ($data['action'] == 'SIGN_MISSON_COMPLETE'){ //合同签署 if(!empty($data['organization']) && !empty($data['signFlowId']))ContractServer::creatServer()->signFirmEnd($data['signResult'],$data['signFlowId'],$data['organization']); }elseif ($data['action']=='SEAL_AUTH_SIGN'){ // SealServer::creatServer()->sealNotify($data['authStatus'],$data['sealAuthBizId']); } return json_encode(['code'=>'200','msg'=>'success']); } }