Exemplo n.º 1
0
  Copyright (c) 2003 osCommerce
  Copyright (c) 2004 DevosC.com
Copyright (c) 2006 Dipl.-Ing.(TH) Winfried Kaiser (w.kaiser@fortune.de) -- Port to OL-Commerce

  Released under the GNU General Public License
*/
require 'includes/application_top.php';
define('DIR_WS_CATALOG_MODULES', DIR_WS_CATALOG_LANGUAGES . '../modules/');
$paypal_admin_dir = PAYPAL_IPN_DIR . 'admin/';
require PAYPAL_IPN_DIR . 'classes/Page/Page.class.php';
require PAYPAL_IPN_DIR . 'database_tables.inc.php';
$page = new PayPal_Page();
$page->setBaseDirectory(PAYPAL_IPN_DIR . '');
$page->setBaseURL(DIR_WS_CATALOG_MODULES . 'payment/paypal/');
$page->includeLanguageFile('admin/languages', $language, 'paypal.lng.php');
$page->addCSS('paypal.php?action=css&id=general');
$page->addCSS('paypal.php?action=css&id=stylesheet');
$page->addJavaScript(FULL_CURRENT_TEMPLATE . 'templates/js/general.js');
$action = isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '';
switch ($action) {
    case 'details':
        $page->setTitle(HEADING_DETAILS_TITLE);
        $page->includeLanguageFile('admin/languages', $language, 'TransactionDetails.lng.php');
        $page->setContentFile($paypal_admin_dir . 'TransactionDetails.inc.php');
        $page->setTemplate('popup');
        break;
    case 'itp':
        include_once PAYPAL_IPN_DIR . 'classes/IPN/IPN.class.php';
        $page->setTitle(HEADING_ITP_TITLE);
        $page->setContentFile($paypal_admin_dir . 'TestPanel/TestPanel.inc.php');
Exemplo n.º 2
0
    }
    if ($debug->enabled) {
        $debug->add(PAYPAL_AUCTION, sprintf(PAYPAL_AUCTION_MSG));
    }
} elseif ($ipn->txnType('send_money')) {
    if ($ipn->uniqueTxnID()) {
        $ipn->insert();
    }
    if ($debug->enabled) {
        $debug->add(PAYMENT_SEND_MONEY_DESCRIPTION, sprintf(PAYMENT_SEND_MONEY_DESCRIPTION_MSG, number_format($ipn->key['mc_gross'], 2), $ipn->key['mc_currency']));
    }
} elseif ($debug->enabled && $ipn->testMode('On')) {
    $debug->raiseError(TEST_INCOMPLETE, sprintf(TEST_INCOMPLETE_MSG), true);
}
if ($ipn->testMode('On')) {
    if ($ipn->validDigest()) {
        include PAYPAL_IPN_DIR . 'Classes/Page/Page.class.php';
        $page = new PayPal_Page();
        $page->setBaseDirectory(PAYPAL_DIR);
        $page->setBaseURL(PAYPAL_DIR);
        $page->includeLanguageFile('Admin/languages/', SESSION_LANGUAGE, 'paypal.lng.php');
        $page->setTitle(HEADING_ITP_RESULTS_TITLE);
        $page->setContentFile(PAYPAL_IPN_DIR . 'Admin/TestPanel/Results.inc.php');
        $css = $page->baseURL . 'templates/css/';
        $page->addCSS($css . 'general.css');
        $page->addCSS($css . 'stylesheet.css');
        $page->setTemplate('default');
        include $page->template();
    }
}
require PAYPAL_IPN_DIR . 'application_bottom.inc.php';
Copyright (c) 2006 Dipl.-Ing.(TH) Winfried Kaiser (w.kaiser@fortune.de) -- Port to OL-Commerce

Released under the GNU General Public License
*/
//W. Kaiser PayPal IPN
require 'includes/application_top.php';
if (USE_PAYPAL_IPN) {
    //define('DIR_WS_CATALOG_MODULES',DIR_WS_CATALOG_LANGUAGES.'../modules/');
    $paypal_admin_dir = PAYPAL_IPN_DIR . 'Admin/';
    require PAYPAL_IPN_DIR . 'Classes/Page/Page.class.php';
    require PAYPAL_IPN_DIR . 'database_tables.inc.php';
    $page = new PayPal_Page();
    $page->setBaseDirectory(PAYPAL_IPN_DIR);
    //$page->setBaseURL(DIR_WS_MODULES . 'payment/paypal/');
    $page->setBaseURL(PAYPAL_IPN_DIR);
    $page->includeLanguageFile('Admin/languages', SESSION_LANGUAGE, 'paypal.lng.php');
    $p = 'paypal.php?action=css&id=';
    $page->addCSS($p . 'general');
    $page->addCSS($p . 'stylesheet');
    $page->addJavaScript(FULL_CURRENT_TEMPLATE . 'templates/js/general.js');
    $action = $_GET['action'];
    switch ($action) {
        case 'details':
            $page->setTitle(HEADING_DETAILS_TITLE);
            $page->includeLanguageFile('Admin/languages', SESSION_LANGUAGE, 'TransactionDetails.lng.php');
            $page->setContentFile($paypal_admin_dir . 'TransactionDetails.inc.php');
            $page->setTemplate('olc_popup');
            break;
        case 'itp':
            include_once PAYPAL_IPN_DIR . 'Classes/Ipn/IPN.class.php';
            $page->setTitle(HEADING_ITP_TITLE);