@@ -37,18 +33,20 @@
PayboxValues) {?>
-
-
+
Une fois le paiement effectué merci de cliquer sur le bouton "Retour boutique" afin de
consulter vos documents.
+
+
+
+
+
@@ -56,8 +54,6 @@
-
-
Erreur !
diff --git a/library/Paybox/Config.php b/library/Paybox/Config.php
index 4417db4..ac0fd59 100644
--- a/library/Paybox/Config.php
+++ b/library/Paybox/Config.php
@@ -11,6 +11,8 @@ class Paybox_Config
protected $SERVER;
+ protected $URL_PAIEMENT;
+
public function __construct()
{
if (APPLICATION_ENV == 'production') {
@@ -47,7 +49,7 @@ class Paybox_Config
if($server_status == "OK"){
//Le serveur est prêt et les services opérationnels
$serveurOK = $serveur;
- $this->PAIEMENT_URL = $serveur['url'];
+ $this->URL_PAIEMENT = $serveur['url'];
return true;
break;
}
diff --git a/library/Paybox/Response.php b/library/Paybox/Response.php
index 9120fa0..ba5cb03 100644
--- a/library/Paybox/Response.php
+++ b/library/Paybox/Response.php
@@ -5,9 +5,9 @@ class Paybox_Response
protected $sign;
- protected $errCode;
+ protected $errCode = 0;
- protected $errLabel;
+ protected $errLabel = 'Erreur inconnue.';
public function __construct(){}
@@ -17,6 +17,9 @@ class Paybox_Response
*/
public function setData($values)
{
+ if ( !array_key_exists('sign', $values) )
+ return;
+
//Set and remove the sign
$this->setSign($values['sign']);
unset($values['sign']);
@@ -48,6 +51,12 @@ class Paybox_Response
*/
protected function isDataSign()
{
+ if ($this->data === null)
+ return false;
+
+ if ($this->sign === null)
+ return false;
+
$fp = fopen(__DIR__ . '/pubkey.pem', 'r');
$cert = fread($fp, 8192);
fclose($fp);
@@ -76,7 +85,7 @@ class Paybox_Response
*/
protected function checkEta($code)
{
- if ( intval($code) == 0 ) {
+ if ( intval($code) === 0 ) {
return true;
}
diff --git a/library/Paybox/System.php b/library/Paybox/System.php
index c99ec34..36a7953 100644
--- a/library/Paybox/System.php
+++ b/library/Paybox/System.php
@@ -149,8 +149,6 @@ class Paybox_System extends Paybox_Config
'PBX_TIME',
);
- protected $URL_PAIEMENT;
-
protected $URL_PARAMETERS;
public function __construct() {
@@ -219,12 +217,12 @@ class Paybox_System extends Paybox_Config
{
if ( !empty($withReturnUrl) ) {
$this->setReturnUrl($withReturnUrl);
- $this->stackfields = $this->stackfields + array(
+ $this->stackfields = array_merge($this->stackfields, array(
'PBX_EFFECTUE',
'PBX_REFUSE',
'PBX_ATTENTE',
'PBX_ANNULE',
- );
+ ));
}
$dateTime = date('c');
@@ -258,7 +256,7 @@ class Paybox_System extends Paybox_Config
{
$this->checkservers();
- if ( !empty($this->URL_PAEIMENT) ) {
+ if ( !empty($this->URL_PAIEMENT) ) {
return $this->URL_PAIEMENT;
}