function get_payment_name($payment_method, $order_id = '') { if (file_exists(DIR_FS_CATALOG . 'lang/' . $_SESSION['language'] . '/modules/payment/' . $payment_method . '.php')) { include DIR_FS_CATALOG . 'lang/' . $_SESSION['language'] . '/modules/payment/' . $payment_method . '.php'; $text = ''; if ($payment_method == 'paypalplus' && (int) $order_id > 0) { require_once DIR_FS_EXTERNAL . 'paypal/classes/PayPalInfo.php'; $paypal = new PayPalInfo($payment_method); $payment_array = $paypal->get_payment_data($order_id); if (count($payment_array) > 0 && $payment_array['payment_method'] == 'pay_upon_invoice') { $text = ' - ' . MODULE_PAYMENT_PAYPALPLUS_INVOICE; } } $payment_method = constant(strtoupper('MODULE_PAYMENT_' . $payment_method . '_TEXT_TITLE')) . $text; } return $payment_method; }
<?php /* ----------------------------------------------------------------------------------------- $Id: orders_paypal.php 10430 2016-11-23 15:02:20Z GTB $ modified eCommerce Shopsoftware http://www.modified-shop.org Copyright (c) 2009 - 2013 [www.modified-shop.org] ----------------------------------------------------------------------------------------- Released under the GNU General Public License ---------------------------------------------------------------------------------------*/ if (isset($order) && is_object($order)) { if ($order->info['payment_method'] == 'paypalclassic' || $order->info['payment_method'] == 'paypalcart' || $order->info['payment_method'] == 'paypalplus' || $order->info['payment_method'] == 'paypallink' || $order->info['payment_method'] == 'paypalpluslink' || $order->info['payment_method'] == 'paypalinstallment') { require_once DIR_FS_EXTERNAL . 'paypal/classes/PayPalInfo.php'; $paypal = new PayPalInfo($order->info['payment_method']); // action if ($_SERVER['REQUEST_METHOD'] == 'POST') { if ($_POST['cmd'] == 'refund') { if ($_POST['refund_price'] > 0) { $paypal->refund_payment($order->info['order_id'], $_POST['refund_price'], $_POST['refund_comment']); } else { $_SESSION['pp_error'] = TEXT_PAYPAL_ERROR_AMOUNT; } } if ($_POST['cmd'] == 'capture') { if ($_POST['capture_price'] > 0) { $paypal->capture_payment_admin($order->info['order_id'], $_POST['capture_price'], isset($_POST['final_capture'])); } else { $_SESSION['pp_error'] = TEXT_PAYPAL_ERROR_AMOUNT; }
<?php /* ----------------------------------------------------------------------------------------- $Id$ modified eCommerce Shopsoftware http://www.modified-shop.org Copyright (c) 2009 - 2013 [www.modified-shop.org] ----------------------------------------------------------------------------------------- Released under the GNU General Public License ---------------------------------------------------------------------------------------*/ require 'includes/application_top.php'; // include needed classes require_once DIR_FS_EXTERNAL . 'paypal/classes/PayPalInfo.php'; $paypal = new PayPalInfo('paypal'); //display per page $cfg_max_display_results_key = 'MAX_DISPLAY_PAYPAL_PAYMENTS_RESULTS'; $page_max_display_results = xtc_cfg_save_max_display_results($cfg_max_display_results_key); $page_max_display_results = $page_max_display_results > 10 ? '10' : $page_max_display_results; require DIR_WS_INCLUDES . 'head.php'; ?> <link rel="stylesheet" type="text/css" href="../includes/external/paypal/css/stylesheet.css"> </head> <body> <!-- header //--> <?php require DIR_WS_INCLUDES . 'header.php'; ?> <!-- header_eof //-->
// --- bof -- ipdfbill -------- $d = make_billnr($order->info['ibn_billdate'], $order->info['ibn_billnr']); $smarty->assign('IBN_BILLNUMBER', $d); $smarty->assign('IBN_BILLDATE', xtc_date_short($order->info['ibn_billdate'] . ' 00:00:00')); // --- eof -- ipdfbill -------- // assign language to template for caching $languages_query = xtc_db_query("select code, language_charset from " . TABLE_LANGUAGES . " WHERE directory ='" . $order->info['language'] . "'"); $langcode = xtc_db_fetch_array($languages_query); $smarty->assign('langcode', $langcode['code']); $smarty->assign('charset', $langcode['language_charset']); $smarty->assign('language', $order->info['language']); $smarty->assign('logo_path', HTTP_SERVER . DIR_WS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/img/'); $smarty->assign('oID', $order->info['order_id']); if ($order->info['payment_method'] != '' && $order->info['payment_method'] != 'no_payment') { include DIR_FS_CATALOG . 'lang/' . $_SESSION['language'] . '/modules/payment/' . $order->info['payment_method'] . '.php'; $payment_method = constant(strtoupper('MODULE_PAYMENT_' . $order->info['payment_method'] . '_TEXT_TITLE')); $smarty->assign('PAYMENT_METHOD', $payment_method); if (strpos($order->info['payment_method'], 'paypalplus') !== false) { require_once DIR_FS_EXTERNAL . 'paypal/classes/PayPalInfo.php'; $paypal = new PayPalInfo($order->info['payment_method']); $smarty->assign('PAYMENT_INFO', $paypal->success($order->info['order_id'])); } } $smarty->assign('COMMENTS', $order->info['comments']); $smarty->assign('DATE', xtc_date_long($order->info['date_purchased'])); // dont allow cache $smarty->caching = false; $smarty->template_dir = DIR_FS_CATALOG . 'templates'; $smarty->compile_dir = DIR_FS_CATALOG . 'templates_c'; $smarty->config_dir = DIR_FS_CATALOG . 'lang'; $smarty->display(CURRENT_TEMPLATE . '/admin/print_order.html');