Test du retour

This commit is contained in:
Michael RICOIS 2013-11-18 10:19:16 +00:00
parent 2e7a4646b8
commit d52de36b19

View File

@ -9,6 +9,8 @@ class Paybox_Response
protected $errLabel = 'Impossible de valider le paiement.';
protected $values = array();
public function __construct(){}
/**
@ -24,6 +26,8 @@ class Paybox_Response
$this->setSign($values['sign']);
unset($values['sign']);
$this->values = $values;
//Concat datas with &
$this->data = '';
$i = 0;
@ -88,11 +92,12 @@ class Paybox_Response
/**
* Vérifie le code retour
* @param string $code
* @return boolean
*/
protected function checkEta($code)
protected function checkEta()
{
$code = $this->values['eta'];
if ( intval($code) === 0 ) {
return true;
}
@ -144,10 +149,9 @@ class Paybox_Response
Opération en attente de validation par lémetteur du moyen de paiement.
*/
default:
$this->errCode = 0;
$this->errLabel = 'Echec';
$this->errLabel = 'Validation du paiement incorrect';
}
return false;
@ -177,6 +181,7 @@ class Paybox_Response
//eta:E;id:R;type:P;pays:Y;mt:M;auto:A;idtrans:S;sign:K
return false;
}
/**