Beispiel #1
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';
Beispiel #2
0
        if (empty($gateway)) {
            oledrion_utils::redirect(_AM_OLEDRION_ERROR_1, $baseurl . $opRedirect, 5);
        }
        if (!oledrion_gateways::isInstalledGatewayName($gateway)) {
            oledrion_utils::redirect(_AM_OLEDRION_GATEWAYS_ERROR5, $baseurl . $opRedirect, 4);
        }
        if (oledrion_gateways::gatewayClassFileExists($gateway)) {
            if (!oledrion_gateways::loadGatewaysLanguageDefines($gateway)) {
                // Le chargement des traductions a échoué
                oledrion_utils::redirect(_AM_OLEDRION_GATEWAYS_ERROR2, $baseurl . $opRedirect, 4);
            }
            oledrion_gateways::includeGatewayClass($gateway);
            if (oledrion_gateways::gatewayClassExists($gateway)) {
                $gatewayClassName = oledrion_gateways::gatewayClassName($gateway);
                $temporaryGateway = new $gatewayClassName();
                if (!oledrion_gateways::asGoodAncestor($temporaryGateway)) {
                    oledrion_utils::redirect(_AM_OLEDRION_GATEWAYS_ERROR4, $baseurl . $opRedirect, 4);
                }
                if ($temporaryGateway->saveParametersForm($_POST)) {
                    oledrion_utils::redirect(_AM_OLEDRION_SAVE_OK, $baseurl . $opRedirect, 2);
                } else {
                    oledrion_utils::redirect(_AM_OLEDRION_SAVE_PB, $baseurl . $opRedirect, 4);
                }
            } else {
                oledrion_utils::redirect(_AM_OLEDRION_GATEWAYS_ERROR3, $baseurl . $opRedirect, 4);
            }
        } else {
            oledrion_utils::redirect(_AM_OLEDRION_GATEWAYS_ERROR1, $baseurl . $opRedirect, 4);
        }
        break;
}
Beispiel #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));
Beispiel #4
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;
}
Beispiel #5
0
     $edit = true;
     $item = $h_oledrion_payment->get($id);
     if (!is_object($item)) {
         oledrion_utils::redirect(_AM_OLEDRION_NOT_FOUND, $baseurl, 5);
     }
     $item->unsetNew();
 } else {
     $item = $h_oledrion_payment->create(true);
 }
 $opRedirect = 'payment';
 $item->setVars($_POST);
 if ($_POST['payment_type'] == 'offline') {
     $item->setVar('payment_gateway', 'offline');
 }
 if ($_POST['payment_type'] == 'online' && !in_array($_POST['payment_gateway'], oledrion_gateways::getInstalledGatewaysList())) {
     $item->setVar('payment_gateway', oledrion_gateways::getDefaultGateway());
 }
 if (isset($_POST['delpicture']) && intval($_POST['delpicture']) == 1) {
     $item->deletePicture();
 }
 $destname = '';
 $res1 = oledrion_utils::uploadFile(0, OLEDRION_PICTURES_PATH);
 if ($res1) {
     if (oledrion_utils::getModuleOption('resize_others')) {
         // Eventuellement on redimensionne l'image
         oledrion_utils::resizePicture(OLEDRION_PICTURES_PATH . DIRECTORY_SEPARATOR . $destname, OLEDRION_PICTURES_PATH . DIRECTORY_SEPARATOR . $destname, oledrion_utils::getModuleOption('images_width'), oledrion_utils::getModuleOption('images_height'), true);
     }
     $item->setVar('payment_image', basename($destname));
 } else {
     if ($res1 !== false) {
         echo $res1;