Amelioration de la gestion d'erreur

This commit is contained in:
Claire DELBOS 2017-02-28 17:44:00 +01:00
parent 076a59c5bf
commit 75ff12b7b6

View File

@ -66,7 +66,7 @@ class Achatclient_IndexController extends Zend_Controller_Action
$this->error('index','Fonction indisponible pour ce client');
}
$infos=array('user' => $user,'tranches' => $this->tranches[$user->getIdClient()]);
$infos['balance']=array();
$infos['balance']=array('balance'=>0);
foreach($infocredit->balance as $k => $v){
$infos['balance'][$v->key]=$v->value;
}
@ -139,7 +139,7 @@ class Achatclient_IndexController extends Zend_Controller_Action
$params->ligneCredit = json_encode($ligneCredit);
$stage = $ws->payCredit($params);
} catch(Exception $e) {
echo $e->getMessage();
$this->error('paiement', 'Impossible d\'enregistrer la commande');
}
//Paybox
Zend_Loader::loadClass('Paybox_Config');
@ -187,9 +187,8 @@ class Achatclient_IndexController extends Zend_Controller_Action
switch($ligne){
case "index":
case "paiement":
$this->view->msg=$message;
//$this->redirect( $this->view->url(array('action'=>'pbanswer')));
//break;
$this->redirect("http://".$request->getHttpHost()."/achatclient/?message=".$message);
break;
default:
echo $ligne.' : '.$message;die;
}