Amelioration de la gestion d'erreur
This commit is contained in:
parent
076a59c5bf
commit
75ff12b7b6
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user