================================================================================
+VERSION 1.1.0 XX XX XXXX
+
++================================================================================
+ VERSION 1.0.2 XX XX XXXX
================================================================================
VERSION 1.0.1 26 10 2010
}
$ref = $matches[1];
- $res = XDB::query("SELECT mail, text, confirmation
+ $res = XDB::query('SELECT mail, text, confirmation
FROM payments
- WHERE id = {?}', $ref);
- if (!list($conf_mail, $conf_title, $conf_text) = $res->fetchOneRow()) {
+ WHERE id={?}", $ref);
+ if ($res->numRows() != 1) {
cb_erreur("référence de commande inconnue");
}
+ list($conf_mail, $conf_title, $conf_text) = $res->fetchOneRow();
/* on extrait le montant */
- if (Env::v('vads_currency') != "978") {
+ if (Env::v('vads_currency') != '978') {
cb_erreur("monnaie autre que l'euro");
}
- $montant = sprintf("%.02f", ((float)Env::v('vads_amount')) / 100) . ' EUR';
+ $amount = ((float)Env::i('vads_amount')) / 100;
+ $montant = sprintf("%.02f EUR", $amount);
/* on extrait le code de retour */
- if (Env::v('vads_result') != "00") {
- cb_erreur("erreur lors du paiement : ?? (".Env::v('vads_result').")");
+ if (Env::v('vads_result') != '00') {
+ cb_erreur('erreur lors du paiement : ?? (' . Env::v('vads_result') . ')');
}
/* on fait l'insertion en base de donnees */