Correction instabilité

This commit is contained in:
Claire DELBOS 2017-03-03 09:57:11 +01:00
parent 3b08476a4f
commit 874c7428b2
3 changed files with 10 additions and 19 deletions

View File

@ -53,8 +53,8 @@ class Achatclient_IndexController extends Zend_Controller_Action
$this->error('index','Fonction indisponible');
}
$ws = new Scores_Ws_Client('credit', '0.1');
$infocredit = $ws->infoCredit();
try {
$infocredit = $ws->infoCredit();
} catch(Exception $e) {
$this->error('index','Pas de crédit');
}
@ -168,25 +168,11 @@ class Achatclient_IndexController extends Zend_Controller_Action
}
public function pbanswerAction(){
$request = $this->getRequest();
var_dump($request);die;
$user = new Scores_Utilisateur();
$ok=$user->checkperm($this->libdroits);
if(!$ok){
$this->view->msg='Problème d\'autentification';
}
if(empty($this->view->msg)){
$this->view->msg='Annulation de votre transaction';
}
switch($answer){
case "error":
return;
break;
}
if(empty($this->view->msg)){
$this->view->msg='Annulation de votre transaction';
}
echo $user->identity->siret;die;
$ws = new Scores_Ws_Client('credit', '0.1');
$infocredit = $ws->canUse('synthese');
var_dump($infocredit);die;
}
public function errorAction(){
$request = $this->getRequest();

View File

@ -17,6 +17,7 @@ td.nbr{
<h2>Résumé de vos crédits</h2>
<div class="credit">
<div id="message"><?=$this->msg?></div>
<a href="<?=$this->url(array('controller'=>'index', 'action'=>'index'))?>">Retour</a>
</div>
</div>

View File

@ -9,6 +9,10 @@ return array(
'debug' => true,
'errorMsg' => array('MSG'),
),
'canUse' => array(
'debug' => true,
'errorMsg' => array('MSG'),
),
)
);