} 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';
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'); $page->setTemplate('default'); $page->setOnLoad('javascript:window.focus();document.ipn.txn_id.select();'); break; case 'itp-help': $page->setTitle(HEADING_ITP_HELP_TITLE); $page->setContentLangaugeFile($paypal_admin_dir . 'TestPanel/languages', $language, 'Help.inc.php'); $page->setOnLoad('javascript:window.focus();');