Pret pour les tests
This commit is contained in:
parent
4be1e0a960
commit
ceca8dc894
@ -135,7 +135,7 @@ class ReportController extends Zend_Controller_Action
|
||||
//Passage à la page suivante
|
||||
$url = $this->view->url(array(
|
||||
'controller' => 'report',
|
||||
'action' => 'deliver', //paiement
|
||||
'action' => 'paiement', //deliver, paiement
|
||||
'id' => $form->getValue('cmdId'),
|
||||
), null, true);
|
||||
$this->redirect($url);
|
||||
|
@ -6,10 +6,6 @@
|
||||
|
||||
<?php if ( $this->CmdID ) {?>
|
||||
|
||||
<form name="commande" action="" method="">
|
||||
<input type="hidden" name="cmdId" value="<?=$this->CmdID?>" />
|
||||
<input type="hidden" name="siren" value="<?=$this->siren?>" />
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
@ -37,18 +33,20 @@
|
||||
|
||||
<?php if ($this->PayboxValues) {?>
|
||||
|
||||
<form method="" action="post">
|
||||
<form method="post" action="<?=$this->PayboxUrl?>">
|
||||
|
||||
<?php foreach ( $this->PayboxValues as $field) {?>
|
||||
<input type="hidden" name="<?=$field['name']?>" value="<?=$field['value']?>" />
|
||||
<?php }?>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<div>
|
||||
Une fois le paiement effectué merci de cliquer sur le bouton "Retour boutique" afin de
|
||||
consulter vos documents.
|
||||
</div>
|
||||
|
||||
<input type="submit" class="btn btn-primary" value="Paiement"/>
|
||||
|
||||
</form>
|
||||
|
||||
<?php }?>
|
||||
|
||||
@ -56,8 +54,6 @@
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<?php } else {?>
|
||||
|
||||
<div class="alert alert-danger"><strong>Erreur !</strong> </div>
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user