X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fpayment.php;h=48c9144568c038b41c8822413b1135ffebc705fe;hb=e46cf8c46341b447cc3701c8afcc9baec3da11e5;hp=13c853c0a6af40383bb5c481cfe5ff2041281d87;hpb=1831341c5d0280c21a032e4c2cad30f80b56f5bf;p=platal.git diff --git a/modules/payment.php b/modules/payment.php index 13c853c..48c9144 100644 --- a/modules/payment.php +++ b/modules/payment.php @@ -217,6 +217,16 @@ class PaymentModule extends PLModule VALUES ({?}, {?}, {?}, {?}, {?}, {?}, {?})", $champ901, $user->id(), $ref, $champ200, $montant, $champ905, Env::v('comment')); + // We check if it is an Xnet payment and then update the related ML. + $res = XDB::query('SELECT eid + FROM groupex.evenements + WHERE paiement_id = {?}', $ref); + if ($eid = $res->fetchOneCell()) { + $this->load('xnetevents.inc.php'); + $evt = get_event_detail($eid); + subscribe_lists_event(0, $uid, $evt, $montant, true); + } + /* on genere le mail de confirmation */ $conf_text = str_replace( array('', '', '', '', '', '', 'comment>'), @@ -301,6 +311,16 @@ class PaymentModule extends PLModule VALUES ({?}, {?}, {?}, {?}, {?}, {?}, {?})", $no_transaction, $user->id(), $ref, $fullref, $montant, $clef, Env::v('comment')); + // We check if it is an Xnet payment and then update the related ML. + $res = XDB::query('SELECT eid + FROM groupex.evenements + WHERE paiement_id = {?}', $ref); + if ($eid = $res->fetchOneCell()) { + $this->load('xnetevents.inc.php'); + $evt = get_event_detail($eid); + subscribe_lists_event(0, $uid, $evt, $montant, true); + } + /* on genere le mail de confirmation */ $conf_text = str_replace(array('', '', '', '', '', ''), array($user->firstName(), $user->lastName(), $user->promo(), $montant,