- 'payment' => $this->make_hook('payment', AUTH_MDP),
+ 'payment' => $this->make_hook('payment', AUTH_MDP, 'payment'),
'payment/cyber_return' => $this->make_hook('cyber_return', AUTH_PUBLIC, 'user', NO_HTTPS),
'payment/cyber2_return' => $this->make_hook('cyber2_return', AUTH_PUBLIC, 'user', NO_HTTPS),
'payment/paypal_return' => $this->make_hook('paypal_return', AUTH_PUBLIC, 'user', NO_HTTPS),
'payment/cyber_return' => $this->make_hook('cyber_return', AUTH_PUBLIC, 'user', NO_HTTPS),
'payment/cyber2_return' => $this->make_hook('cyber2_return', AUTH_PUBLIC, 'user', NO_HTTPS),
'payment/paypal_return' => $this->make_hook('paypal_return', AUTH_PUBLIC, 'user', NO_HTTPS),
function handler_cyber2_return(&$page, $uid = null)
{
global $globals, $platal;
function handler_cyber2_return(&$page, $uid = null)
{
global $globals, $platal;
if (!list($conf_mail, $conf_title, $conf_text) = $res->fetchOneRow()) {
cb_erreur("référence de commande inconnue");
}
if (!list($conf_mail, $conf_title, $conf_text) = $res->fetchOneRow()) {
cb_erreur("référence de commande inconnue");
}
/* on extrait le montant */
if (Env::v('vads_currency') != "978") {
cb_erreur("monnaie autre que l'euro");
/* on extrait le montant */
if (Env::v('vads_currency') != "978") {
cb_erreur("monnaie autre que l'euro");
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 */
XDB::execute("INSERT INTO payment_transactions (id, uid, ref, fullref, amount, pkey, comment)
VALUES ({?}, {?}, {?}, {?}, {?}, {?}, {?})",
Env::v('vads_trans_date'), $user->id(), $ref, Env::v('vads_order_id'), $montant, "", Env::v('vads_order_info'));
echo "Paiement stored.\n";
/* on fait l'insertion en base de donnees */
XDB::execute("INSERT INTO payment_transactions (id, uid, ref, fullref, amount, pkey, comment)
VALUES ({?}, {?}, {?}, {?}, {?}, {?}, {?})",
Env::v('vads_trans_date'), $user->id(), $ref, Env::v('vads_order_id'), $montant, "", Env::v('vads_order_info'));
echo "Paiement stored.\n";