<?php
/***************************************************************************
- * Copyright (C) 2003-2013 Polytechnique.org *
+ * Copyright (C) 2003-2014 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
}
/* on extrait la reference de la commande */
- if (!ereg('-([0-9]+)$', Env::v('vads_order_id'), $matches)) {
+ if (!preg_match('/-([0-9]+)$/', Env::v('vads_order_id'), $matches)) {
cb_erreur("référence de commande invalide");
}
}
/* on extrait la reference de la commande */
- if (!ereg('-xorg-([0-9]+)$', $fullref, $matches)) {
+ if (!preg_match('/-xorg-([0-9]+)$/', $fullref, $matches)) {
paypal_erreur("référence de commande invalide");
}
FROM payment_transactions AS t
LEFT JOIN payments AS p ON (t.ref = p.id)
LEFT JOIN groups AS g ON (p.asso_id = g.id)
- WHERE t.recon_id IN {?}
+ WHERE t.recon_id IN {?} AND t.status = "confirmed"
GROUP BY t.ref',
$recongp_id, $recon_ids);
static public function compute_systempay_commission($line, $key, $relation) {
static $EEE_countries = array(
- 'France', 'Allemagne', 'Autriche', 'Belgique', 'Bulgarie', 'Chypre', 'Suisse',
+ 'France', 'Allemagne', 'Autriche', 'Belgique', 'Bulgarie', 'Chypre', 'Croatie',
'Danemark', 'Espagne', 'Estonie', 'Finlande', 'Grèce', 'Hongrie', 'Irlande', 'Islande', 'Italie',
'Lettonie', 'Liechtenstein', 'Lituanie', 'Luxembourg', 'Malte', 'Norvège', 'Pays-Bas', 'Pologne',
'Portugal', 'Roumanie', 'Royaume-Uni', 'Slovaquie', 'Slovénie', 'Suède', 'République Tchèque'
if (in_array($line['pays carte'], $EEE_countries)) {
return -0.20 - round($amount * 0.005, 2);
} else {
- return -0.20 - round($amount * 0.005, 2) - 0.76;
+ return -0.20 - round($amount * 0.005, 2) - 0.75;
}
}
return null;
}
$reference = self::getValue($line, 'reference', $relation['reference']);
- if (ereg('-([0-9]+)$', $reference, $matches)) {
+ if (preg_match('/-([0-9]+)$/', $reference, $matches)) {
return $matches[1];
} else {
return null;
}
}
-// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker fenc=utf-8:
?>