Esempio n. 1
0
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
 * oledrion
 *
 * @copyright   The XOOPS Project http://sourceforge.net/projects/xoops/
 * @license     http://www.fsf.org/copyleft/gpl.html GNU public license
 * @author      Hervé Thouzard (http://www.herve-thouzard.com/)
 * @version     $Id: gateway-notify.php 12290 2014-02-07 11:05:17Z beckmi $
 */
/**
 * Page appelée par la passerelle de paiement dans le cas de l'utilisation de l'IPN (ou d'une méthode similaire)
 * Dialogue entre le site et la passerelle
 */
@error_reporting(0);
@($xoopsLogger->activated = false);
require 'header.php';
@error_reporting(0);
@($xoopsLogger->activated = false);
$gateway = oledrion_gateways::getCurrentGateway();
$temporaryGateway = null;
$temporaryGateway = oledrion_gateways::getGatewayObject();
if (is_object($temporaryGateway)) {
    if (!file_exists(OLEDRION_GATEWAY_LOG_PATH)) {
        file_put_contents(OLEDRION_GATEWAY_LOG_PATH, '<?php exit(); ?>');
    }
    $user_log = $temporaryGateway->gatewayNotify(OLEDRION_GATEWAY_LOG_PATH);
    unset($temporaryGateway);
    echo $user_log;
}
Esempio n. 2
0
 * @author 			Hervé Thouzard of Instant Zero (http://www.instant-zero.com)
 *
 * Version : $Id:
 * ****************************************************************************
 */
/**
 * Page appelée par la passerelle après le paiement en ligne
 */
require 'header.php';
$GLOBALS['current_category'] = -1;
$success = true;
$xoopsOption['template_main'] = 'oledrion_thankyou.html';
require_once XOOPS_ROOT_PATH . '/header.php';
$h_oledrion_caddy->emptyCart();
// On donne la possibilité à la passerelle de traiter la commande
$gateway = null;
$gateway = oledrion_gateways::getGatewayObject();
if (is_object($gateway) && method_exists($gateway, 'thankYou')) {
    if (!file_exists(OLEDRION_GATEWAY_LOG_PATH)) {
        file_put_contents(OLEDRION_GATEWAY_LOG_PATH, '<?php exit(); ?>');
    }
    $gateway->thankYou(OLEDRION_GATEWAY_LOG_PATH);
    unset($gateway);
}
$xoopsTpl->assign('success', $success);
$xoopsTpl->assign('global_advert', oledrion_utils::getModuleOption('advertisement'));
$xoopsTpl->assign('breadcrumb', oledrion_utils::breadcrumb(array(OLEDRION_URL . basename(__FILE__) => _OLEDRION_PURCHASE_FINSISHED)));
$title = _OLEDRION_PURCHASE_FINSISHED . ' - ' . oledrion_utils::getModuleName();
oledrion_utils::setMetas($title, $title);
oledrion_utils::setCSS();
require_once XOOPS_ROOT_PATH . '/footer.php';
Esempio n. 3
0
 $text = $registry->getfile(OLEDRION_TEXTFILE7);
 $xoopsTpl->assign('text', xoops_trim($text));
 if ($checkout_level == 1) {
     $text = $registry->getfile(OLEDRION_TEXTFILE4);
     $xoopsTpl->append('text', "<br />" . xoops_trim($text));
     $payURL = OLEDRION_URL . 'invoice.php?id=' . $commande->getVar('cmd_id') . '&pass='******'cmd_password');
     $sform = new XoopsThemeForm(_OLEDRION_FINISH, 'payform', $payURL, 'post');
 } else {
     if (!isset($payment) || $payment['payment_type'] == 'offline' || $commandAmountTTC == 0) {
         $text = $registry->getfile(OLEDRION_TEXTFILE4);
         $xoopsTpl->append('text', "<br />" . xoops_trim($text));
         $payURL = OLEDRION_URL . 'invoice.php?id=' . $commande->getVar('cmd_id') . '&pass='******'cmd_password');
         $sform = new XoopsThemeForm(_OLEDRION_FINISH, 'payform', $payURL, 'post');
     } else {
         // Set gateway
         $gateway = oledrion_gateways::getGatewayObject($payment['payment_gateway']);
         if (!is_object($gateway)) {
             die(_OLEDRION_ERROR20);
         }
         if (is_object($gateway)) {
             $payURL = $gateway->getRedirectURL($commande->getVar('cmd_total'), $commande->getVar('cmd_id'));
         } else {
             $payURL = OLEDRION_URL . 'invoice.php?id=' . $commande->getVar('cmd_id') . '&pass='******'cmd_password');
         }
         $sform = new XoopsThemeForm(_OLEDRION_PAY_GATEWAY, 'payform', $payURL, 'post');
         $elements = array();
         if (is_object($gateway)) {
             $elements = $gateway->getCheckoutFormContent($commande);
         }
         foreach ($elements as $key => $value) {
             $sform->addElement(new XoopsFormHidden($key, $value));