*** empty log message ***
This commit is contained in:
parent
c007d6a9cb
commit
521d01ab34
@ -33,15 +33,15 @@ $pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
|
||||
print_barre_titre("Transactions BPLC", $page, $PHP_SELF);
|
||||
print_barre_liste("Transactions BPLC", $page, $PHP_SELF);
|
||||
|
||||
print "<TABLE border=\"1\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">";
|
||||
print "<TR class=\"liste_titre\">";
|
||||
print "<td>ip client</td><td>Num. transaction</td><td>Date</TD><td>heure</td>";
|
||||
print "<td>Réf. commande</td>";
|
||||
print "<td>ip client</td><td>Num. transaction</td><td>Date</TD><td>Heure</td>";
|
||||
print "<td>Num autorisation</td>";
|
||||
print "<td>clé acceptation</td>";
|
||||
print "<td>code retour</td>";
|
||||
print "<td>Réf. commande</td>";
|
||||
print "</TR>\n";
|
||||
|
||||
$sql = "SELECT ipclient,
|
||||
@ -67,6 +67,15 @@ if ($result) {
|
||||
$objp = $db->fetch_object( $i);
|
||||
|
||||
print "<tr>";
|
||||
|
||||
$type = substr($objp->ref_commande, strlen($objp->ref_commande) - 2 );
|
||||
$id = substr($objp->ref_commande, 0 , strlen($objp->ref_commande) - 2 );
|
||||
|
||||
if ($type == 10)
|
||||
{
|
||||
print '<td><a href="../dons/fiche.php?rowid='.$id.'&action=edit">'.$objp->ref_commande.'</a></td>';
|
||||
}
|
||||
|
||||
print "<td>$objp->ipclient</td>";
|
||||
print "<td>$objp->num_transaction</td>";
|
||||
print "<td>$objp->date_transaction</td>";
|
||||
@ -74,7 +83,7 @@ if ($result) {
|
||||
print "<td>$objp->num_autorisation</td>";
|
||||
print "<td>$objp->cle_acceptation</td>";
|
||||
print "<td>$objp->code_retour</td>";
|
||||
print "<td>$objp->ref_commande</td>";
|
||||
|
||||
|
||||
|
||||
$i++;
|
||||
|
||||
@ -20,15 +20,21 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Gestion du retour du système de Cyberpaiement
|
||||
*
|
||||
*/
|
||||
|
||||
require("../../lib/mysql.lib.php3");
|
||||
require("../../conf/conf.class.php3");
|
||||
require("../../retourbplc.class.php");
|
||||
require("../../don.class.php");
|
||||
|
||||
$conf = new Conf();
|
||||
|
||||
$db = new Db();
|
||||
|
||||
$retbplc = new Retourbplc($db, $conf);
|
||||
$retbplc = new Retourbplc($db);
|
||||
|
||||
$retbplc->num_compte = $conf->bplc->num_compte;
|
||||
|
||||
@ -45,6 +51,24 @@ $retbplc->code_retour = $CHAMP906;
|
||||
|
||||
$retbplc->ref_commande = $CHAMP200;
|
||||
|
||||
print $retbplc->insertdb();
|
||||
/*
|
||||
* Insertion de la transaction dans la base
|
||||
*/
|
||||
|
||||
$return = $retbplc->insertdb();
|
||||
|
||||
if($return)
|
||||
{
|
||||
if ($retbplc->check_key($retbplc->cle_acceptation))
|
||||
{
|
||||
|
||||
|
||||
/*
|
||||
* Validation de la commande
|
||||
*
|
||||
*/
|
||||
|
||||
$don = new Don($db);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -18,11 +18,15 @@
|
||||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
* Classe de gestion du retour RSTS du systeme de paiement en ligne
|
||||
* CyberPaiement (TM) de la Banque Populaire de Lorraine
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
class Retourbplc
|
||||
{
|
||||
var $conf;
|
||||
var $db;
|
||||
|
||||
var $ipclient;
|
||||
@ -41,23 +45,21 @@ class Retourbplc
|
||||
/*
|
||||
* Initialisation des valeurs par défaut
|
||||
*/
|
||||
Function Retourbplc($db, $conf)
|
||||
Function Retourbplc($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
}
|
||||
/*
|
||||
*
|
||||
* Insertion dans la base de donnée de la transaction
|
||||
*
|
||||
*
|
||||
*/
|
||||
Function insertdb()
|
||||
{
|
||||
|
||||
if ($this->check_key($this->cle_acceptation))
|
||||
{
|
||||
|
||||
$sql = "INSERT INTO transaction_bplc";
|
||||
$sql .= " (ipclient,
|
||||
$sql = "INSERT INTO transaction_bplc";
|
||||
$sql .= " (ipclient,
|
||||
num_transaction,
|
||||
date_transaction,
|
||||
heure_transaction,
|
||||
@ -66,31 +68,30 @@ class Retourbplc
|
||||
code_retour,
|
||||
ref_commande)";
|
||||
|
||||
$sql .= " VALUES ('$this->ipclient',
|
||||
'$this->num_transaction',
|
||||
'$this->date_transaction',
|
||||
'$this->heure_transaction',
|
||||
'$this->num_autorisation',
|
||||
'$this->cle_acceptation',
|
||||
'$this->code_retour',
|
||||
'$this->ref_commande')";
|
||||
$sql .= " VALUES ('$this->ipclient',
|
||||
'$this->num_transaction',
|
||||
'$this->date_transaction',
|
||||
'$this->heure_transaction',
|
||||
'$this->num_autorisation',
|
||||
'$this->cle_acceptation',
|
||||
'$this->code_retour',
|
||||
$this->ref_commande)";
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
|
||||
if ($result)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
print $this->db->error();
|
||||
print "<h2><br>$sql<br></h2>";
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
$result = $this->db->query($sql);
|
||||
|
||||
if ($result)
|
||||
{
|
||||
return $this->db->last_insertid();
|
||||
}
|
||||
else
|
||||
{
|
||||
print $this->db->error();
|
||||
print "<h2><br>$sql<br></h2>";
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
/*
|
||||
*
|
||||
* Verification de la validitée de la clé
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user