*** empty log message ***

This commit is contained in:
Rodolphe Quiedeville 2002-12-28 14:57:29 +00:00
parent c007d6a9cb
commit 521d01ab34
3 changed files with 69 additions and 35 deletions

View File

@ -33,15 +33,15 @@ $pageprev = $page - 1;
$pagenext = $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 "<TABLE border=\"1\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">";
print "<TR class=\"liste_titre\">"; 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>Num autorisation</td>";
print "<td>clé acceptation</td>"; print "<td>clé acceptation</td>";
print "<td>code retour</td>"; print "<td>code retour</td>";
print "<td>Réf. commande</td>";
print "</TR>\n"; print "</TR>\n";
$sql = "SELECT ipclient, $sql = "SELECT ipclient,
@ -67,6 +67,15 @@ if ($result) {
$objp = $db->fetch_object( $i); $objp = $db->fetch_object( $i);
print "<tr>"; 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->ipclient</td>";
print "<td>$objp->num_transaction</td>"; print "<td>$objp->num_transaction</td>";
print "<td>$objp->date_transaction</td>"; print "<td>$objp->date_transaction</td>";
@ -74,7 +83,7 @@ if ($result) {
print "<td>$objp->num_autorisation</td>"; print "<td>$objp->num_autorisation</td>";
print "<td>$objp->cle_acceptation</td>"; print "<td>$objp->cle_acceptation</td>";
print "<td>$objp->code_retour</td>"; print "<td>$objp->code_retour</td>";
print "<td>$objp->ref_commande</td>";
$i++; $i++;

View File

@ -20,15 +20,21 @@
* *
*/ */
/*
* Gestion du retour du système de Cyberpaiement
*
*/
require("../../lib/mysql.lib.php3"); require("../../lib/mysql.lib.php3");
require("../../conf/conf.class.php3"); require("../../conf/conf.class.php3");
require("../../retourbplc.class.php"); require("../../retourbplc.class.php");
require("../../don.class.php");
$conf = new Conf(); $conf = new Conf();
$db = new Db(); $db = new Db();
$retbplc = new Retourbplc($db, $conf); $retbplc = new Retourbplc($db);
$retbplc->num_compte = $conf->bplc->num_compte; $retbplc->num_compte = $conf->bplc->num_compte;
@ -45,6 +51,24 @@ $retbplc->code_retour = $CHAMP906;
$retbplc->ref_commande = $CHAMP200; $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);
}
}

View File

@ -18,11 +18,15 @@
* $Id$ * $Id$
* $Source$ * $Source$
* *
* Classe de gestion du retour RSTS du systeme de paiement en ligne
* CyberPaiement (TM) de la Banque Populaire de Lorraine
*
*
*
*/ */
class Retourbplc class Retourbplc
{ {
var $conf;
var $db; var $db;
var $ipclient; var $ipclient;
@ -41,23 +45,21 @@ class Retourbplc
/* /*
* Initialisation des valeurs par défaut * Initialisation des valeurs par défaut
*/ */
Function Retourbplc($db, $conf) Function Retourbplc($db)
{ {
$this->db = $db; $this->db = $db;
} }
/* /*
* * Insertion dans la base de donnée de la transaction
* *
* *
*/ */
Function insertdb() Function insertdb()
{ {
if ($this->check_key($this->cle_acceptation))
{
$sql = "INSERT INTO transaction_bplc"; $sql = "INSERT INTO transaction_bplc";
$sql .= " (ipclient, $sql .= " (ipclient,
num_transaction, num_transaction,
date_transaction, date_transaction,
heure_transaction, heure_transaction,
@ -66,31 +68,30 @@ class Retourbplc
code_retour, code_retour,
ref_commande)"; ref_commande)";
$sql .= " VALUES ('$this->ipclient', $sql .= " VALUES ('$this->ipclient',
'$this->num_transaction', '$this->num_transaction',
'$this->date_transaction', '$this->date_transaction',
'$this->heure_transaction', '$this->heure_transaction',
'$this->num_autorisation', '$this->num_autorisation',
'$this->cle_acceptation', '$this->cle_acceptation',
'$this->code_retour', '$this->code_retour',
'$this->ref_commande')"; $this->ref_commande)";
$result = $this->db->query($sql); $result = $this->db->query($sql);
if ($result) if ($result)
{ {
return 1; return $this->db->last_insertid();
} }
else else
{ {
print $this->db->error(); print $this->db->error();
print "<h2><br>$sql<br></h2>"; print "<h2><br>$sql<br></h2>";
return 0; return 0;
}
} }
} }
/* /*
* * Verification de la validitée de la clé
* *
* *
*/ */