Ejemplo n.º 1
0
 function query($order_id)
 {
     global $db;
     $order = $db->Execute("select cc_cvv, customers_name, customers_company, customers_street_address,\n                                    customers_suburb, customers_city, customers_postcode, customers_id,\n                                    customers_state, customers_country, customers_telephone,\n                                    customers_email_address, customers_address_format_id, delivery_name,\n                                    delivery_company, delivery_street_address, delivery_suburb,\n                                    delivery_city, delivery_postcode, delivery_state, delivery_country,\n                                    delivery_address_format_id, billing_name, billing_company,\n                                    billing_street_address, billing_suburb, billing_city, billing_postcode,\n                                    billing_state, billing_country, billing_address_format_id,\n                                    coupon_code, payment_method, payment_module_code, shipping_method, shipping_module_code,\n                                    cc_type, cc_owner, cc_number, cc_expires, currency,\n                                    currency_value, date_purchased, orders_status, last_modified,\n                                    order_total, order_tax, ip_address\n                             from " . TABLE_ORDERS . "\n                             where orders_id = '" . (int) $order_id . "'");
     $totals = $db->Execute("select title, text, class, value\n                              from " . TABLE_ORDERS_TOTAL . "\n                              where orders_id = '" . (int) $order_id . "'\n                              order by sort_order");
     while (!$totals->EOF) {
         if ($totals->fields['class'] == 'ot_coupon') {
             $coupon_link_query = "SELECT coupon_id\n                  from " . TABLE_COUPONS . "\n                  where coupon_code ='" . zen_db_input($order->fields['coupon_code']) . "'";
             $coupon_link = $db->Execute($coupon_link_query);
             $zc_coupon_link = '<a href="javascript:couponpopupWindow(\'' . zen_catalog_href_link(FILENAME_POPUP_COUPON_HELP, 'cID=' . $coupon_link->fields['coupon_id']) . '\')">';
         }
         $this->totals[] = array('title' => $totals->fields['class'] == 'ot_coupon' ? $zc_coupon_link . $totals->fields['title'] . '</a>' : $totals->fields['title'], 'text' => $totals->fields['text'], 'value' => $totals->fields['value'], 'class' => $totals->fields['class']);
         $totals->MoveNext();
     }
     $this->info = array('currency' => $order->fields['currency'], 'currency_value' => $order->fields['currency_value'], 'payment_method' => $order->fields['payment_method'], 'payment_module_code' => $order->fields['payment_module_code'], 'shipping_method' => $order->fields['shipping_method'], 'shipping_module_code' => $order->fields['shipping_module_code'], 'coupon_code' => $order->fields['coupon_code'], 'cc_type' => $order->fields['cc_type'], 'cc_owner' => $order->fields['cc_owner'], 'cc_number' => $order->fields['cc_number'], 'cc_cvv' => $order->fields['cc_cvv'], 'cc_expires' => $order->fields['cc_expires'], 'date_purchased' => $order->fields['date_purchased'], 'orders_status' => $order->fields['orders_status'], 'total' => $order->fields['order_total'], 'tax' => $order->fields['order_tax'], 'last_modified' => $order->fields['last_modified'], 'ip_address' => $order->fields['ip_address']);
     $this->customer = array('name' => $order->fields['customers_name'], 'id' => $order->fields['customers_id'], 'company' => $order->fields['customers_company'], 'street_address' => $order->fields['customers_street_address'], 'suburb' => $order->fields['customers_suburb'], 'city' => $order->fields['customers_city'], 'postcode' => $order->fields['customers_postcode'], 'state' => $order->fields['customers_state'], 'country' => $order->fields['customers_country'], 'format_id' => $order->fields['customers_address_format_id'], 'telephone' => $order->fields['customers_telephone'], 'email_address' => $order->fields['customers_email_address']);
     $this->delivery = array('name' => $order->fields['delivery_name'], 'company' => $order->fields['delivery_company'], 'street_address' => $order->fields['delivery_street_address'], 'suburb' => $order->fields['delivery_suburb'], 'city' => $order->fields['delivery_city'], 'postcode' => $order->fields['delivery_postcode'], 'state' => $order->fields['delivery_state'], 'country' => $order->fields['delivery_country'], 'format_id' => $order->fields['delivery_address_format_id']);
     $this->billing = array('name' => $order->fields['billing_name'], 'company' => $order->fields['billing_company'], 'street_address' => $order->fields['billing_street_address'], 'suburb' => $order->fields['billing_suburb'], 'city' => $order->fields['billing_city'], 'postcode' => $order->fields['billing_postcode'], 'state' => $order->fields['billing_state'], 'country' => $order->fields['billing_country'], 'format_id' => $order->fields['billing_address_format_id']);
     $index = 0;
     $orders_products = $db->Execute("select orders_products_id, products_id, products_name, products_model,\n                                              products_price, products_tax, products_quantity,\n                                              final_price, onetime_charges,\n                                              product_is_free\n                                       from " . TABLE_ORDERS_PRODUCTS . "\n                                       where orders_id = '" . (int) $order_id . "'\n                                       order by orders_products_id");
     while (!$orders_products->EOF) {
         // convert quantity to proper decimals - account history
         if (QUANTITY_DECIMALS != 0) {
             $fix_qty = $orders_products->fields['products_quantity'];
             switch (true) {
                 case !strstr($fix_qty, '.'):
                     $new_qty = $fix_qty;
                     break;
                 default:
                     $new_qty = preg_replace('/[0]+$/', '', $orders_products->fields['products_quantity']);
                     break;
             }
         } else {
             $new_qty = $orders_products->fields['products_quantity'];
         }
         $new_qty = round($new_qty, QUANTITY_DECIMALS);
         if ($new_qty == (int) $new_qty) {
             $new_qty = (int) $new_qty;
         }
         $this->products[$index] = array('qty' => $new_qty, 'id' => $orders_products->fields['products_id'], 'name' => $orders_products->fields['products_name'], 'model' => $orders_products->fields['products_model'], 'tax' => $orders_products->fields['products_tax'], 'price' => $orders_products->fields['products_price'], 'onetime_charges' => $orders_products->fields['onetime_charges'], 'final_price' => $orders_products->fields['final_price'], 'product_is_free' => $orders_products->fields['product_is_free']);
         $subindex = 0;
         // START "Stock by Attributes" added to array products_options_values_id and 'value_id' => $attributes->fields['products_options_values_id'],
         $attributes = $db->Execute("select products_options, products_options_values, options_values_price,\n                                           price_prefix, products_options_values_id,\n                                           product_attribute_is_free\n                                    from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . "\n                                    where orders_id = '" . (int) $order_id . "'\n                                    and orders_products_id = '" . (int) $orders_products->fields['orders_products_id'] . "'");
         if ($attributes->RecordCount() > 0) {
             while (!$attributes->EOF) {
                 $this->products[$index]['attributes'][$subindex] = array('option' => $attributes->fields['products_options'], 'value' => $attributes->fields['products_options_values'], 'value_id' => $attributes->fields['products_options_values_id'], 'prefix' => $attributes->fields['price_prefix'], 'price' => $attributes->fields['options_values_price'], 'product_attribute_is_free' => $attributes->fields['product_attribute_is_free']);
                 // END "Stock by Attributes"
                 $subindex++;
                 $attributes->MoveNext();
             }
         }
         $index++;
         $orders_products->MoveNext();
     }
 }
function email_latest_status($oID)
{
    require DIR_WS_LANGUAGES . $_SESSION['language'] . '/' . 'order_status_email.php';
    global $db;
    $orders_status_array = array();
    $orders_status = $db->Execute("select orders_status_id, orders_status_name\n                                 from " . TABLE_ORDERS_STATUS . "\n                                 where language_id = '" . (int) $_SESSION['languages_id'] . "'");
    while (!$orders_status->EOF) {
        $orders_status_array[$orders_status->fields['orders_status_id']] = $orders_status->fields['orders_status_name'];
        $orders_status->MoveNext();
    }
    $customer_info = $db->Execute("SELECT customers_name, customers_email_address, date_purchased\n                                 FROM " . TABLE_ORDERS . "\n                                 WHERE orders_id = '" . $oID . "'");
    $status_info = $db->Execute("SELECT orders_status_id, comments\n                               FROM " . TABLE_ORDERS_STATUS_HISTORY . "\n                               WHERE orders_id = '" . $oID . "'\n                               ORDER BY date_added Desc limit 1");
    $status = $status_info->fields['orders_status_id'];
    if ($_POST['notify_comments'] == 'on' && zen_not_null($status_info->fields['comments']) && $status_info->fields['comments'] != '') {
        $notify_comments = EMAIL_TEXT_COMMENTS_UPDATE . $status_info->fields['comments'] . "\n\n";
    }
    // send email to customer
    $message = STORE_NAME . " " . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n\n" . EMAIL_TEXT_INVOICE_URL . ' ' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($customer_info->fields['date_purchased']) . "\n\n" . strip_tags($notify_comments) . EMAIL_TEXT_STATUS_UPDATED . sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status]) . EMAIL_TEXT_STATUS_PLEASE_REPLY;
    $html_msg['EMAIL_CUSTOMERS_NAME'] = $customer_info->fields['customers_name'];
    $html_msg['EMAIL_TEXT_ORDER_NUMBER'] = EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID;
    $html_msg['EMAIL_TEXT_INVOICE_URL'] = '<a href="' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . '">' . str_replace(':', '', EMAIL_TEXT_INVOICE_URL) . '</a>';
    $html_msg['EMAIL_TEXT_DATE_ORDERED'] = EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($customer_info->fields['date_purchased']);
    $html_msg['EMAIL_TEXT_STATUS_COMMENTS'] = nl2br($notify_comments);
    $html_msg['EMAIL_TEXT_STATUS_UPDATED'] = str_replace('\\n', '', EMAIL_TEXT_STATUS_UPDATED);
    $html_msg['EMAIL_TEXT_STATUS_LABEL'] = str_replace('\\n', '', sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status]));
    $html_msg['EMAIL_TEXT_NEW_STATUS'] = $orders_status_array[$status];
    $html_msg['EMAIL_TEXT_STATUS_PLEASE_REPLY'] = str_replace('\\n', '', EMAIL_TEXT_STATUS_PLEASE_REPLY);
    $html_msg['EMAIL_PAYPAL_TRANSID'] = '';
    // End Zen Cart v1.5 Modified Core Code
    zen_mail($customer_info->fields['customers_name'], $customer_info->fields['customers_email_address'], EMAIL_TEXT_SUBJECT . ' #' . $oID, $message, STORE_NAME, EMAIL_FROM, $html_msg, 'order_status');
    // PayPal Trans ID, if any
    $sql = "select txn_id, parent_txn_id from " . TABLE_PAYPAL . " where order_id = :orderID order by last_modified DESC, date_added DESC, parent_txn_id DESC, paypal_ipn_id DESC ";
    $sql = $db->bindVars($sql, ':orderID', $oID, 'integer');
    $result = $db->Execute($sql);
    if ($result->RecordCount() > 0) {
        $message .= "\n\n" . ' PayPal Trans ID: ' . $result->fields['txn_id'];
        $html_msg['EMAIL_PAYPAL_TRANSID'] = $result->fields['txn_id'];
    }
    // End Zen Cart v1.5 Modified Core Code
    // send extra emails
    if (SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO_STATUS == '1' and SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO != '') {
        zen_mail('', SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO, SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO_SUBJECT . ' ' . EMAIL_TEXT_SUBJECT . ' #' . $oID, $message, STORE_NAME, EMAIL_FROM, $html_msg, 'order_status_extra');
    }
    //_TODO accept an optional array of additional recipients
}
Ejemplo n.º 3
0
 function install()
 {
     global $db;
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable PayPal Module', 'MODULE_PAYMENT_PAYPAL_STATUS', 'True', 'Do you want to accept PayPal payments?', '6', '0', 'zen_cfg_select_option(array(\\'True\\', \\'False\\'), ', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Business ID', 'MODULE_PAYMENT_PAYPAL_BUSINESS_ID','" . STORE_OWNER_EMAIL_ADDRESS . "', 'Primary email address for your PayPal account', '6', '2', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Currency', 'MODULE_PAYMENT_PAYPAL_CURRENCY', 'Selected Currency', 'Choose the currency/currencies you want to accept', '6', '3', 'zen_cfg_select_option(array(\\'Selected Currency\\',\\'Only USD\\',\\'Only CAD\\',\\'Only EUR\\',\\'Only GBP\\',\\'Only JPY\\',\\'Only AUD\\'), ', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_PAYPAL_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '4', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Pending Notification Status', 'MODULE_PAYMENT_PAYPAL_PROCESSING_STATUS_ID', '" . DEFAULT_ORDERS_STATUS_ID . "', 'Set the status of orders made with this payment module that are not yet completed to this value<br />(\\'Pending\\' recommended)', '6', '5', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID', '2', 'Set the status of orders made with this payment module that have completed payment to this value<br />(\\'Processing\\' recommended)', '6', '6', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Refund Order Status', 'MODULE_PAYMENT_PAYPAL_REFUND_ORDER_STATUS_ID', '1', 'Set the status of orders that have been refunded made with this payment module to this value<br />(\\'Pending\\' recommended)', '6', '7', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_PAYPAL_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '8', now())");
     //     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Handling Charge', 'MODULE_PAYMENT_PAYPAL_HANDLING', '0', 'The cost of handling. This is not quantity specific. The same handling will be charged regardless of the number of items purchased. If omitted or 0, no handling charges will be assessed.', '6', '15', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Address override', 'MODULE_PAYMENT_PAYPAL_ADDRESS_OVERRIDE', '', 'If set to 1 the address passed in via Zen Cart will override the users paypal-stored address. The user will be shown the Zen Cart address, but will not be able to edit it. If the address is not valid (i.e. missing required fields, including country) or not included, then no address will be shown.<br />Empty=No Override<br />1=Passed-in Address overrides users paypal-stored address', '6', '18', 'zen_cfg_select_option(array(\\'\\',\\'1\\'), ', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Shipping Address Options', 'MODULE_PAYMENT_PAYPAL_ADDRESS_REQUIRED', '1', 'The buyers shipping address. If set to 0 your customer will be prompted to include a shipping address. If set to 1 your customer will not be asked for a shipping address. If set to 2 your customer will be required to provide a shipping address.<br />0=Prompt<br />1=Not Asked<br />2=Required<br /><br /><strong>NOTE: If you allow your customers to enter their own shipping address, then MAKE SURE you check the paypal confirmation details to verify the proper address when filling orders. Zen Cart does not know if they choose an alternate shipping address compared to the one entered when placing an order.</strong>', '6', '20', 'zen_cfg_select_option(array(\\'0\\',\\'1\\',\\'2\\'), ', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Continue Button Text', 'MODULE_PAYMENT_PAYPAL_CBT', '', 'Sets the text for the Continue button on the PayPal Payment Complete page. Requires Return URL to be set.', '6', '22', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Image URL', 'MODULE_PAYMENT_PAYPAL_IMAGE_URL', '', 'The internet URL of the 150x50-pixel image you would like to use as your logo. If omitted, the customer will see your Business name if you have a Business account, or your email address if you have premier account.', '6', '24', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Page Style', 'MODULE_PAYMENT_PAYPAL_PAGE_STYLE', 'paypal', 'Sets the Custom Payment Page Style for payment pages. The value of page_style is the same as the Page Style Name you chose when adding or editing the page style. You can add and edit Custom Payment Page Styles from the Profile subtab of the My Account tab on the paypal site. If you would like to always reference your Primary style, set this to \"primary.\" If you would like to reference the default PayPal page style, set this to \"paypal\".', '6', '25', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Debug Email Notifications', 'MODULE_PAYMENT_PAYPAL_IPN_DEBUG', 'No', 'Enable debug email notifications', '6', '71', 'zen_cfg_select_option(array(\\'Yes\\',\\'No\\'), ', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Debug E-Mail Address', 'MODULE_PAYMENT_PAYPAL_DEBUG_EMAIL_ADDRESS','" . STORE_OWNER_EMAIL_ADDRESS . "', 'The e-mail address to use for paypal debugging', '6', '72', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Mode for PayPal web services<br /><br />Default:<br /><code>www.paypal.com/cgi-bin/webscr</code><br />or<br /><code>www.paypal.com/us/cgi-bin/webscr</code>', 'MODULE_PAYMENT_PAYPAL_HANDLER', 'www.paypal.com/cgi-bin/webscr', 'Choose the URL for PayPal live processing', '6', '73', '', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('<font color=red>NOTE: On www.paypal.com</font>,<br />set your PayPal IPN Return URL to:', 'MODULE_PAYMENT_PAYPAL_IPN_RETURN_URL','" . zen_catalog_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', false) . "', '<font color=red><strong>DO NOT EDIT.</strong></font><br />This is the URL that PayPal needs to be configured to return to.', '6', '99', 'zen_cfg_select_option(array(\\'" . zen_catalog_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', false) . "\\'), ',now())");
 }
Ejemplo n.º 4
0
<?php

/**
 * @package languageDefines
 * @copyright Copyright 2003-2011 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: paypal.php 19085 2011-07-13 05:26:23Z drbyte $
 */
define('MODULE_PAYMENT_PAYPAL_TEXT_ADMIN_TITLE', 'PayPal Website Payments Standard - IPN');
define('MODULE_PAYMENT_PAYPAL_TEXT_CATALOG_TITLE', 'PayPal');
if (IS_ADMIN_FLAG === true) {
    define('MODULE_PAYMENT_PAYPAL_TEXT_DESCRIPTION', '<strong>PayPal Website Payments Standard (IPN)</strong> (Basic PayPal service)<br /><a href="http://www.zen-cart.com/partners/paypal-std" target="_blank">Manage your PayPal account.</a><br /><br /><font color="green">Configuration Instructions:</font><br />1. <a href="http://www.zen-cart.com/partners/paypal-std" target="_blank">Sign up for your PayPal account - click here.</a><br />2. In your PayPal account, under "Profile",<ul><li>set your <strong>Instant Payment Notification Preferences</strong> URL to:<br /><nobr><pre>' . str_replace('index.php?main_page=index', 'ipn_main_handler.php', zen_catalog_href_link(FILENAME_DEFAULT, '', 'SSL')) . '</pre></nobr><br />(If another valid URL is already entered, you may leave it alone.)<br /><span class="alert">Be sure that the Checkbox to enable IPN is checked!</span><br /><br /></li><li>in <strong>Website Payments Preferences</strong> set your <strong>Automatic Return URL</strong> to:<br /><nobr><pre>' . zen_catalog_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', false) . '</pre></nobr></li>' . (defined('MODULE_PAYMENT_PAYPALSTD_STATUS') ? '' : '<li>... and click "install" above to enable PayPal Standard support... and "edit" to tell Zen Cart your PayPal settings.</li>') . '</ul><font color="green"><hr /><strong>Requirements:</strong></font><br /><hr />*<strong>PayPal Account</strong> (<a href="http://www.zen-cart.com/partners/paypal-std" target="_blank">click to signup</a>)<br />*<strong>*<strong>Port 80</strong> is used for bidirectional communication with the gateway, so must be open on your host\'s router/firewall<br />*<strong>Settings</strong> must be configured as described above.');
} else {
    define('MODULE_PAYMENT_PAYPAL_TEXT_DESCRIPTION', '<strong>PayPal</strong>');
}
// to show the PayPal logo as the payment option name, use this:  https://www.paypal.com/en_US/i/logo/PayPal_mark_37x23.gif
// to show CC icons with PayPal, use this instead:  https://www.paypal.com/en_US/i/bnr/horizontal_solution_PPeCheck.gif
// You should only use choices listed on this page: https://ppmts.custhelp.com/app/answers/detail/a_id/632
define('MODULE_PAYMENT_PAYPAL_MARK_BUTTON_IMG', 'https://www.paypal.com/en_US/i/logo/PayPal_mark_37x23.gif');
define('MODULE_PAYMENT_PAYPAL_MARK_BUTTON_ALT', 'Checkout with PayPal');
define('MODULE_PAYMENT_PAYPAL_ACCEPTANCE_MARK_TEXT', 'Save time. Check out securely. <br />Pay without sharing your financial information.');
define('MODULE_PAYMENT_PAYPAL_TEXT_CATALOG_LOGO', '<img src="' . MODULE_PAYMENT_PAYPAL_MARK_BUTTON_IMG . '" alt="' . MODULE_PAYMENT_PAYPAL_MARK_BUTTON_ALT . '" title="' . MODULE_PAYMENT_PAYPAL_MARK_BUTTON_ALT . '" /> &nbsp;' . '<span class="smallText">' . MODULE_PAYMENT_PAYPAL_ACCEPTANCE_MARK_TEXT . '</span>');
define('MODULE_PAYMENT_PAYPAL_ENTRY_FIRST_NAME', 'First Name:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_LAST_NAME', 'Last Name:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_BUSINESS_NAME', 'Business Name:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_NAME', 'Address Name:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_STREET', 'Address Street:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_CITY', 'Address City:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_STATE', 'Address State:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_ZIP', 'Address Zip:');
Ejemplo n.º 5
0
/**
 * select email template based on 'module' (supplied as param to function)
 * selectively go thru each template tag and substitute appropriate text
 * finally, build full html content as "return" output from class
**/
function zen_build_html_email_from_template($module = 'default', $content = '')
{
    global $messageStack, $current_page_base;
    $block = array();
    if (is_array($content)) {
        $block = $content;
    } else {
        $block['EMAIL_MESSAGE_HTML'] = $content;
    }
    // Identify and Read the template file for the type of message being sent
    $langfolder = strtolower($_SESSION['languages_code']) == 'en' ? '' : strtolower($_SESSION['languages_code']) . '/';
    $template_filename_base = DIR_FS_EMAIL_TEMPLATES . $langfolder . "email_template_";
    $template_filename = DIR_FS_EMAIL_TEMPLATES . $langfolder . "email_template_" . $current_page_base . ".html";
    if (!file_exists($template_filename)) {
        if (isset($block['EMAIL_TEMPLATE_FILENAME']) && $block['EMAIL_TEMPLATE_FILENAME'] != '' && file_exists($block['EMAIL_TEMPLATE_FILENAME'] . '.html')) {
            $template_filename = $block['EMAIL_TEMPLATE_FILENAME'] . '.html';
        } elseif (file_exists($template_filename_base . str_replace(array('_extra', '_admin'), '', $module) . '.html')) {
            $template_filename = $template_filename_base . str_replace(array('_extra', '_admin'), '', $module) . '.html';
        } elseif (file_exists($template_filename_base . 'default' . '.html')) {
            $template_filename = $template_filename_base . 'default' . '.html';
        } else {
            $messageStack->add('header', 'ERROR: The email template file for (' . $template_filename_base . ') or (' . $template_filename . ') cannot be found.', 'caution');
            return '';
            // couldn't find template file, so return an empty string for html message.
        }
    }
    if (!($fh = fopen($template_filename, 'rb'))) {
        // note: the 'b' is for compatibility with Windows systems
        $messageStack->add('header', 'ERROR: The email template file (' . $template_filename_base . ') or (' . $template_filename . ') cannot be opened', 'caution');
    }
    $file_holder = fread($fh, filesize($template_filename));
    fclose($fh);
    //strip linebreaks and tabs out of the template
    //  $file_holder = str_replace(array("\r\n", "\n", "\r", "\t"), '', $file_holder);
    $file_holder = str_replace(array("\t"), ' ', $file_holder);
    if (!defined('HTTP_CATALOG_SERVER')) {
        define('HTTP_CATALOG_SERVER', HTTP_SERVER);
    }
    //check for some specifics that need to be included with all messages
    if ($block['EMAIL_STORE_NAME'] == '') {
        $block['EMAIL_STORE_NAME'] = STORE_NAME;
    }
    if ($block['EMAIL_STORE_URL'] == '') {
        $block['EMAIL_STORE_URL'] = '<a href="' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . '">' . STORE_NAME . '</a>';
    }
    if ($block['EMAIL_STORE_OWNER'] == '') {
        $block['EMAIL_STORE_OWNER'] = STORE_OWNER;
    }
    if ($block['EMAIL_FOOTER_COPYRIGHT'] == '') {
        $block['EMAIL_FOOTER_COPYRIGHT'] = EMAIL_FOOTER_COPYRIGHT;
    }
    if ($block['EMAIL_DISCLAIMER'] == '') {
        $block['EMAIL_DISCLAIMER'] = sprintf(EMAIL_DISCLAIMER, '<a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">' . STORE_OWNER_EMAIL_ADDRESS . ' </a>');
    }
    if ($block['EMAIL_SPAM_DISCLAIMER'] == '') {
        $block['EMAIL_SPAM_DISCLAIMER'] = EMAIL_SPAM_DISCLAIMER;
    }
    if ($block['BASE_HREF'] == '') {
        $block['BASE_HREF'] = HTTP_SERVER . DIR_WS_CATALOG;
    }
    if ($block['EMAIL_DATE_SHORT'] == '') {
        $block['EMAIL_DATE_SHORT'] = zen_date_short(date("Y-m-d"));
    }
    if ($block['EMAIL_DATE_LONG'] == '') {
        $block['EMAIL_DATE_LONG'] = zen_date_long(date("Y-m-d"));
    }
    if ($block['CHARSET'] == '') {
        $block['CHARSET'] = CHARSET;
    }
    //  if ($block['EMAIL_STYLESHEET']=='')       $block['EMAIL_STYLESHEET']       = str_replace(array("\r\n", "\n", "\r"), "",@file_get_contents(DIR_FS_EMAIL_TEMPLATES.'stylesheet.css'));
    if (!isset($block['EXTRA_INFO'])) {
        $block['EXTRA_INFO'] = '';
    }
    if (substr($module, -6) != '_extra' && $module != 'contact_us') {
        $block['EXTRA_INFO'] = '';
    }
    $block['COUPON_BLOCK'] = '';
    if ($block['COUPON_TEXT_VOUCHER_IS'] && $block['COUPON_TEXT_TO_REDEEM']) {
        $block['COUPON_BLOCK'] = '<div class="coupon-block">' . $block['COUPON_TEXT_VOUCHER_IS'] . $block['COUPON_DESCRIPTION'] . '<br />' . $block['COUPON_TEXT_TO_REDEEM'] . '<span class="coupon-code">' . $block['COUPON_CODE'] . '</span></div>';
    }
    $block['GV_BLOCK'] = '';
    if ($block['GV_WORTH'] && $block['GV_REDEEM'] && $block['GV_CODE_URL']) {
        $block['GV_BLOCK'] = '<div class="gv-block">' . $block['GV_WORTH'] . '<br />' . $block['GV_REDEEM'] . $block['GV_CODE_URL'] . '<br />' . $block['GV_LINK_OTHER'] . '</div>';
    }
    //prepare the "unsubscribe" link:
    if (IS_ADMIN_FLAG === true) {
        // is this admin version, or catalog?
        $block['UNSUBSCRIBE_LINK'] = str_replace("\n", '', TEXT_UNSUBSCRIBE) . ' <a href="' . zen_catalog_href_link(FILENAME_UNSUBSCRIBE, "addr=" . $block['EMAIL_TO_ADDRESS']) . '">' . zen_catalog_href_link(FILENAME_UNSUBSCRIBE, "addr=" . $block['EMAIL_TO_ADDRESS']) . '</a>';
    } else {
        $block['UNSUBSCRIBE_LINK'] = str_replace("\n", '', TEXT_UNSUBSCRIBE) . ' <a href="' . zen_href_link(FILENAME_UNSUBSCRIBE, "addr=" . $block['EMAIL_TO_ADDRESS']) . '">' . zen_href_link(FILENAME_UNSUBSCRIBE, "addr=" . $block['EMAIL_TO_ADDRESS']) . '</a>';
    }
    //now replace the $BLOCK_NAME items in the template file with the values passed to this function's array
    foreach ($block as $key => $value) {
        $file_holder = str_replace('$' . $key, $value, $file_holder);
    }
    //DEBUG -- to display preview on-screen
    if (EMAIL_SYSTEM_DEBUG == 'preview') {
        echo $file_holder;
    }
    return $file_holder;
}
Ejemplo n.º 6
0
 $resultMeta = ep_query($sqlMeta);
 $rowMeta = mysql_fetch_array($resultMeta);
 $row['v_metatags_title_' . $lid] = $rowMeta['metatags_title'];
 $row['v_metatags_keywords_' . $lid] = $rowMeta['metatags_keywords'];
 $row['v_metatags_description_' . $lid] = $rowMeta['metatags_description'];
 // metaData end
 // for each language, get the description and set the vals
 $sql2 = "SELECT * FROM " . TABLE_PRODUCTS_DESCRIPTION . " WHERE\n\t\t\t\t\tproducts_id = " . $row['v_products_id'] . " AND\n\t\t\t\t\tlanguage_id = '" . $lid . "' LIMIT 1 ";
 $result2 = ep_query($sql2);
 $row2 = mysql_fetch_array($result2);
 // I'm only doing this for the first language, since right now froogle is US only.. Fix later! langer - is this still relevant?
 // adding url for froogle, but it should be available no matter what
 if ($num_of_langs == 1) {
     $row['v_froogle_products_url_' . $lid] = zen_catalog_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $row['v_products_id']);
 } else {
     $row['v_froogle_products_url_' . $lid] = zen_catalog_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $row['v_products_id'] . '&language=' . $lid);
 }
 $row['v_products_name_' . $lid] = $row2['products_name'];
 $row['v_products_description_' . $lid] = $row2['products_description'];
 if ($ep_supported_mods['psd'] == true) {
     $row['v_products_short_desc_' . $lid] = $row2['products_short_desc'];
 }
 $row['v_products_url_' . $lid] = $row2['products_url'];
 // froogle advanced format needs the quotes around the name and desc
 $row['v_froogle_products_name_' . $lid] = '"' . html_entity_decode(strip_tags(str_replace('"', '""', $row2['products_name']))) . '"';
 $row['v_froogle_products_description_' . $lid] = '"' . html_entity_decode(strip_tags(str_replace('"', '""', $row2['products_description']))) . '"';
 /*
  * $row['v_froogle_products_name_' . $lid] = '"' . html_entity_decode(removeTags(str_replace('"','""',$row2['products_name']))) . '"'; $row['v_froogle_products_description_' . $lid] = '"' . html_entity_decode(removeTags(str_replace('"','""',$row2['products_description']))) . '"';
  */
 // support for Linda's Header Controller 2.0 here
 if (isset($filelayout['v_products_head_title_tag_' . $lid])) {
Ejemplo n.º 7
0
                    if (isset($_POST['notify']) && $_POST['notify'] == '1') {
                        $customer_notified = '1';
                    }
                    // Here we check to see if we have clicked on the Hide RadioButton and if so, set the Variable to -1
                    if (isset($_POST['notify']) && $_POST['notify'] == '-1') {
                        // hide comment
                        $customer_notified = '-1';
                    }
                    // OK, we have our Customer Notified Status Number, now update the Order Status History Table
                    update_status($oID, $status, $customer_notified, $comments);
                    //   Send E-Mail to Customer if they should be notified. Send comments if append comments is checked.
                    if ($customer_notified == '1') {
                        if (isset($_POST['notify_comments'])) {
                            $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $_POST[comments]) . "\n\n";
                        }
                        $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' <a href="' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . '">' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "</a>\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($check_status->fields['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]);
                        $html_msg['EMAIL_MESSAGE_HTML'] = str_replace('
', '<br />', $email);
                        zen_mail($check_status->fields['customers_name'], $check_status->fields['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_NAME, STORE_OWNER_EMAIL_ADDRESS, $html_msg, NULL);
                    }
                }
                // Update Products
                $RunningSubTotal = 0;
                $RunningTax = 0;
                $update_products = $_POST['update_products'];
                foreach ($update_products as $orders_products_id => $products_details) {
                    $AddedOptionsPrice = 0;
                    $AddedOptionsPrice_OneTime = 0;
                    // Update orders_products Table
                    //UPDATE_INVENTORY_QUANTITY_START##############################################################################################################
                    #$order = zen_db_fetch_array($order_query);
 }
 $order_updated = false;
 $check_status = $db->Execute("select customers_name, customers_email_address, orders_status,\n                                      date_purchased from " . TABLE_ORDERS . "\n                                      where orders_id = '" . (int) $oID . "'");
 if ($check_status->fields['orders_status'] != $status || zen_not_null($comments)) {
     $db->Execute("update " . TABLE_ORDERS . "\n                        set orders_status = '" . zen_db_input($status) . "', last_modified = now()\n                        where orders_id = '" . (int) $oID . "'");
     $customer_notified = '0';
     if (isset($_POST['notify']) && $_POST['notify'] == '1') {
         $notify_comments = '';
         if (isset($_POST['notify_comments']) && $_POST['notify_comments'] == 'on' && zen_not_null($comments)) {
             $notify_comments = EMAIL_TEXT_COMMENTS_UPDATE . $comments . "\n\n";
         }
         //send emails
         $message = EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n\n" . EMAIL_TEXT_INVOICE_URL . ' ' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($check_status->fields['date_purchased']) . "\n\n" . strip_tags($notify_comments) . EMAIL_TEXT_STATUS_UPDATED . sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status]) . EMAIL_TEXT_STATUS_PLEASE_REPLY;
         $html_msg['EMAIL_CUSTOMERS_NAME'] = $check_status->fields['customers_name'];
         $html_msg['EMAIL_TEXT_ORDER_NUMBER'] = EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID;
         $html_msg['EMAIL_TEXT_INVOICE_URL'] = '<a href="' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . '">' . str_replace(':', '', EMAIL_TEXT_INVOICE_URL) . '</a>';
         $html_msg['EMAIL_TEXT_DATE_ORDERED'] = EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($check_status->fields['date_purchased']);
         $html_msg['EMAIL_TEXT_STATUS_COMMENTS'] = nl2br($notify_comments);
         $html_msg['EMAIL_TEXT_STATUS_UPDATED'] = str_replace('\\n', '', EMAIL_TEXT_STATUS_UPDATED);
         $html_msg['EMAIL_TEXT_STATUS_LABEL'] = str_replace('\\n', '', sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status]));
         $html_msg['EMAIL_TEXT_NEW_STATUS'] = $orders_status_array[$status];
         $html_msg['EMAIL_TEXT_STATUS_PLEASE_REPLY'] = str_replace('\\n', '', EMAIL_TEXT_STATUS_PLEASE_REPLY);
         $html_msg['EMAIL_PAYPAL_TRANSID'] = '';
         zen_mail($check_status->fields['customers_name'], $check_status->fields['customers_email_address'], EMAIL_TEXT_SUBJECT . ' #' . $oID, $message, STORE_NAME, EMAIL_FROM, $html_msg, 'order_status');
         $customer_notified = '1';
         // PayPal Trans ID, if any
         $sql = "select txn_id, parent_txn_id from " . TABLE_PAYPAL . " where order_id = :orderID order by last_modified DESC, date_added DESC, parent_txn_id DESC, paypal_ipn_id DESC ";
         $sql = $db->bindVars($sql, ':orderID', $oID, 'integer');
         $result = $db->Execute($sql);
         if ($result->RecordCount() > 0) {
             $message .= "\n\n" . ' PayPal Trans ID: ' . $result->fields['txn_id'];
Ejemplo n.º 9
0
<?php

/**
 * @package languageDefines
 * @copyright Copyright 2003-2012 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version GIT: $Id: Author: DrByte  Thu Aug 16 01:57:33 2012 -0400 Modified in v1.5.1 $
 */
define('MODULE_PAYMENT_PAYPAL_TEXT_ADMIN_TITLE', 'Paiements PayPal Standard');
define('MODULE_PAYMENT_PAYPAL_TEXT_ADMIN_TITLE_NONUSA', 'Paiements PayPal Standard sur site Web');
define('MODULE_PAYMENT_PAYPAL_TEXT_CATALOG_TITLE', 'PayPal');
if (IS_ADMIN_FLAG === true) {
    define('MODULE_PAYMENT_PAYPAL_TEXT_DESCRIPTION', '<strong>Paiements PayPal Standard sur site Web (IPN)</strong> (Service de base PayPal)<br /><a href="http://www.zen-cart.com/partners/paypal-std" target="_blank">Gérer votre compte PayPal.</a><br /><br /><font color="green">Instructions de configuration:</font><br />1. <a href="http://www.zen-cart.com/partners/paypal-std" target="_blank">Créez votre compte PayPal - Cliquez ici.</a><br />2. Dans votre compte PayPal, sous "Profile",<ul><li>définissez votre URL <strong>Instant Payment Notification Preferences</strong> à:<br /><nobr><pre>' . str_replace('index.php?main_page=index', 'ipn_main_handler.php', zen_catalog_href_link(FILENAME_DEFAULT, '', 'SSL')) . '</pre></nobr><br />(Si une autre URL valide est déjà entrée, vous devez la laisser.)<br /><span class="alert">Assurez-vous que la case autorisant IPN soit cochée !</span><br /><br /></li><li>Dans <strong>Website Payments Preferences</strong>, définissez votre <strong>Automatic Return URL</strong> à:<br /><nobr><pre>' . zen_catalog_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', false) . '</pre></nobr></li>' . (defined('MODULE_PAYMENT_PAYPALSTD_STATUS') ? '' : '<li>... puis cliquez &quot;Installer&quot; ci-dessus pour activer le support PayPal Standard ... puis &quot;Éditer&quot; pour informer Zen Cart de vos paramètres PayPal.</li>') . '</ul><font color="green"><hr /><strong>Pré-requis:</strong></font><br /><hr />*<strong>Un compte PayPal</strong> (<a href="http://www.zen-cart.com/partners/paypal-std" target="_blank">cliquez pour créer</a>)<br />*<strong>*<strong>Le port 80</strong> est utilisé pour la communication bidirectionnelle avec le portail, donc il faut qu\'il soit ouvert sur le routeur/firewall de votre hôte.<br />*<strong>Les paramètres</strong> doivent être configurés comme décrit ci-dessus.');
} else {
    define('MODULE_PAYMENT_PAYPAL_TEXT_DESCRIPTION', '<strong>PayPal</strong>');
}
// to show the PayPal logo as the payment option name, use this:  https://www.paypal.com/en_US/i/logo/PayPal_mark_37x23.gif
// to show CC icons with PayPal, use this instead:  https://www.paypal.com/en_US/i/bnr/horizontal_solution_PPeCheck.gif
// You should only use choices listed on this page: https://ppmts.custhelp.com/app/answers/detail/a_id/632
define('MODULE_PAYMENT_PAYPAL_MARK_BUTTON_IMG', 'https://www.paypal.com/en_US/i/logo/PayPal_mark_37x23.gif');
define('MODULE_PAYMENT_PAYPAL_MARK_BUTTON_ALT', 'Encaisser avec PayPal');
define('MODULE_PAYMENT_PAYPAL_ACCEPTANCE_MARK_TEXT', 'Gagnez du temps. Encaissez en toute sécurité. <br />Payez sans dévoiler vos informations financières.');
define('MODULE_PAYMENT_PAYPAL_TEXT_CATALOG_LOGO', '<img src="' . MODULE_PAYMENT_PAYPAL_MARK_BUTTON_IMG . '" alt="' . MODULE_PAYMENT_PAYPAL_MARK_BUTTON_ALT . '" title="' . MODULE_PAYMENT_PAYPAL_MARK_BUTTON_ALT . '" /> &nbsp;' . '<span class="smallText">' . MODULE_PAYMENT_PAYPAL_ACCEPTANCE_MARK_TEXT . '</span>');
define('MODULE_PAYMENT_PAYPAL_ENTRY_FIRST_NAME', 'Prénom : ');
define('MODULE_PAYMENT_PAYPAL_ENTRY_LAST_NAME', 'Nom : ');
define('MODULE_PAYMENT_PAYPAL_ENTRY_BUSINESS_NAME', 'Raison sociale : ');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_NAME', 'Adresse nom : ');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_STREET', 'Adresse : ');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_CITY', 'Ville : ');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_STATE', 'Région/Département : ');
function email_latest_status($oID)
{
    require DIR_WS_LANGUAGES . $_SESSION['language'] . '/' . 'order_status_email.php';
    global $db;
    $orders_status_array = array();
    $orders_status = $db->Execute("select orders_status_id, orders_status_name\n                                 from " . TABLE_ORDERS_STATUS . "\n                                 where language_id = '" . (int) $_SESSION['languages_id'] . "'");
    while (!$orders_status->EOF) {
        $orders_status_array[$orders_status->fields['orders_status_id']] = $orders_status->fields['orders_status_name'];
        $orders_status->MoveNext();
    }
    $customer_info = $db->Execute("SELECT customers_name, customers_email_address, date_purchased\n                                 FROM " . TABLE_ORDERS . "\n                                 WHERE orders_id = '" . $oID . "'");
    $status_info = $db->Execute("SELECT orders_status_id, comments\n                               FROM " . TABLE_ORDERS_STATUS_HISTORY . "\n                               WHERE orders_id = '" . $oID . "'\n                               ORDER BY date_added Desc limit 1");
    $status = $status_info->fields['orders_status_id'];
    if (zen_not_null($status_info->fields['comments']) && $status_info->fields['comments'] != '') {
        $notify_comments = EMAIL_TEXT_COMMENTS_UPDATE . $status_info->fields['comments'] . "\n\n";
    }
    // send email to customer
    $message = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n\n" . EMAIL_TEXT_INVOICE_URL . ' ' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($customer_info->fields['date_purchased']) . "\n\n" . strip_tags($notify_comments) . EMAIL_TEXT_STATUS_UPDATED . sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status]) . EMAIL_TEXT_STATUS_PLEASE_REPLY;
    $html_msg['EMAIL_CUSTOMERS_NAME'] = $customer_info->fields['customers_name'];
    $html_msg['EMAIL_TEXT_ORDER_NUMBER'] = EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID;
    $html_msg['EMAIL_TEXT_INVOICE_URL'] = '<a href="' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . '">' . str_replace(':', '', EMAIL_TEXT_INVOICE_URL) . '</a>';
    $html_msg['EMAIL_TEXT_DATE_ORDERED'] = EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($customer_info->fields['date_purchased']);
    $html_msg['EMAIL_TEXT_STATUS_COMMENTS'] = $notify_comments;
    $html_msg['EMAIL_TEXT_STATUS_UPDATED'] = str_replace('\\n', '', EMAIL_TEXT_STATUS_UPDATED);
    $html_msg['EMAIL_TEXT_STATUS_LABEL'] = str_replace('\\n', '', sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status]));
    $html_msg['EMAIL_TEXT_NEW_STATUS'] = $orders_status_array[$status];
    $html_msg['EMAIL_TEXT_STATUS_PLEASE_REPLY'] = str_replace('\\n', '', EMAIL_TEXT_STATUS_PLEASE_REPLY);
    zen_mail($customer_info->fields['customers_name'], $customer_info->fields['customers_email_address'], EMAIL_TEXT_SUBJECT . ' #' . $oID, $message, STORE_NAME, EMAIL_FROM, $html_msg, 'order_status');
    // send extra emails
    if (SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO_STATUS == '1' and SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO != '') {
        zen_mail('', SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO, SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO_SUBJECT . ' ' . EMAIL_TEXT_SUBJECT . ' #' . $oID, $message, STORE_NAME, EMAIL_FROM, $html_msg, 'order_status_extra');
    }
    //_TODO accept an optional array of additional recipients
}
Ejemplo n.º 11
0
<?php

/**
 * @package languageDefines
 * @copyright Copyright 2003-2012 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version GIT: $Id: Author: DrByte  Thu Aug 16 01:57:33 2012 -0400 Modified in v1.5.1 $
 */
define('MODULE_PAYMENT_PAYPAL_TEXT_ADMIN_TITLE', 'PayPal Payments Standard');
define('MODULE_PAYMENT_PAYPAL_TEXT_ADMIN_TITLE_NONUSA', 'PayPal Website Payments Standard');
define('MODULE_PAYMENT_PAYPAL_TEXT_CATALOG_TITLE', 'PayPal');
if (IS_ADMIN_FLAG === true) {
    define('MODULE_PAYMENT_PAYPAL_TEXT_DESCRIPTION', '<span class="alert">请严格遵守</span> <a href="https://cms.paypal.com/c2/cgi-bin/?cmd=_render-content&content_ID=ua/AcceptableUse_full&locale.x=zh_XC" target="_blank">PayPal合理使用规则</a><br /><br /><strong>PayPal Payments Standard</strong> (Older PayPal service, less reliable than Express Checkout)<br /><a href="https://www.paypal.com" target="_blank">Manage your PayPal account.</a><br /><br /><font color="green">Configuration Instructions:</font><br />1. <a href="https://www.paypal.com/c2/mrb/pal=GR5QUVVL9AFGN&MRB=R-4DM17246PS436904F" target="_blank">Sign up for your PayPal account - click here.</a><br />2. In your PayPal account, under "Profile",<ul><li>set your <strong>Instant Payment Notification Preferences</strong> URL to:<br /><nobr><pre>' . str_replace('index.php?main_page=index', 'ipn_main_handler.php', zen_catalog_href_link(FILENAME_DEFAULT, '', 'SSL')) . '</pre></nobr><br />(If another valid URL is already entered, you may leave it alone.)<br /><span class="alert">Be sure that the Checkbox to enable IPN is checked!</span><br /><br /></li><li>in <strong>Website Payments Preferences</strong> set your <strong>Automatic Return URL</strong> to:<br /><nobr><pre>' . zen_catalog_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', false) . '</pre></nobr></li>' . (defined('MODULE_PAYMENT_PAYPALSTD_STATUS') ? '' : '<li>... and click "install" above to enable PayPal Standard support... and "edit" to tell Zen Cart your PayPal settings.</li>') . '</ul><font color="green"><hr /><strong>Requirements:</strong></font><br /><hr />*<strong>PayPal Account</strong> (<a href="https://www.paypal.com/c2/mrb/pal=GR5QUVVL9AFGN&MRB=R-4DM17246PS436904F" target="_blank">click to setup/configure</a>)<br />*<strong>CURL with SSL</strong> is strongly recommended<br />*<strong>Port 80 (and port 443 if SSL is enabled)</strong> is used for <strong>*bidirectional*</strong> communication with the gateway, so must be open on your host\'s router/firewall.<br />*<strong>Settings</strong> within your PayPal account must be configured as described above.');
} else {
    define('MODULE_PAYMENT_PAYPAL_TEXT_DESCRIPTION', '<strong>PayPal</strong>');
}
// to show the PayPal logo as the payment option name, use this: https://www.paypal.com/en_US/i/logo/PayPal_mark_37x23.gif
// to show CC icons with PayPal, use this instead: https://www.paypal.com/en_US/i/bnr/horizontal_solution_PPeCheck.gif
// You should only use choices listed on this page: https://ppmts.custhelp.com/app/answers/detail/a_id/632
define('MODULE_PAYMENT_PAYPAL_MARK_BUTTON_IMG', 'https://www.paypal.com/en_US/i/logo/PayPal_mark_37x23.gif');
define('MODULE_PAYMENT_PAYPAL_MARK_BUTTON_ALT', 'Checkout with PayPal');
define('MODULE_PAYMENT_PAYPAL_ACCEPTANCE_MARK_TEXT', '<a href="https://www.paypal.com/cgi-bin/webscr?cmd=xpt/Marketing/general/what-is-paypal-outside" target="_blank">What is PayPal?</a>');
define('MODULE_PAYMENT_PAYPAL_TEXT_CATALOG_LOGO', '<img src="' . MODULE_PAYMENT_PAYPAL_MARK_BUTTON_IMG . '" alt="' . MODULE_PAYMENT_PAYPAL_MARK_BUTTON_ALT . '" title="' . MODULE_PAYMENT_PAYPAL_MARK_BUTTON_ALT . '" /> &nbsp;' . '<span class="smallText">' . MODULE_PAYMENT_PAYPAL_ACCEPTANCE_MARK_TEXT . '</span>');
define('MODULE_PAYMENT_PAYPAL_ENTRY_FIRST_NAME', 'First Name:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_LAST_NAME', 'Last Name:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_BUSINESS_NAME', 'Business Name:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_NAME', 'Address Name:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_STREET', 'Address Street:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_CITY', 'Address City:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_STATE', 'Address State:');
Ejemplo n.º 12
0
<?php

/**
 * @package languageDefines
 * @copyright Copyright 2003-2012 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version GIT: $Id: Author: DrByte  Thu Aug 16 01:57:33 2012 -0400 Modified in v1.5.1 $
 */
define('MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_EC', 'PayPal Express Checkout');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_PRO20', 'PayPal Express Checkout (Pro 2.0 Payflow Edition) (UK)');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_PF_EC', 'PayPal Payflow Pro - Gateway');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_PF_GATEWAY', 'PayPal Express Checkout via Payflow Pro');
if (IS_ADMIN_FLAG === true) {
    define('MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_DESCRIPTION', '<span class="alert">请严格遵守</span> <a href="https://cms.paypal.com/c2/cgi-bin/?cmd=_render-content&content_ID=ua/AcceptableUse_full&locale.x=zh_XC" target="_blank">PayPal合理使用规则</a><br /><br /><strong>PayPal Express Checkout</strong>%s<br />' . (substr(MODULE_PAYMENT_PAYPALWPP_MODULE_MODE, 0, 7) == 'Payflow' ? '<a href="https://manager.paypal.com/loginPage.do?partner=ZenCart" target="_blank">Manage your PayPal account.</a>' : '<a href="https://www.paypal.com" target="_blank">Manage your PayPal account.</a>') . '<br /><br /><font color="green">Configuration Instructions:</font><br /><span class="alert">1. </span><a href="https://www.paypal.com/c2/mrb/pal=GR5QUVVL9AFGN&MRB=R-4DM17246PS436904F" target="_blank">Sign up for your PayPal account - click here.</a><br />' . (defined('MODULE_PAYMENT_PAYPALWPP_STATUS') ? '' : '... and click "install" above to enable PayPal Express Checkout support.<br />') . (MODULE_PAYMENT_PAYPALWPP_MODULE_MODE == 'PayPal' && (!defined('MODULE_PAYMENT_PAYPALWPP_APISIGNATURE') || MODULE_PAYMENT_PAYPALWPP_APISIGNATURE == '') ? '<br /><span class="alert">2. </span><strong>API credentials</strong> from the API Credentials option in your PayPal Profile Settings area. (Click <a href="https://www.paypal.com/us/cgi-bin/webscr?cmd=_get-api-signature&generic-flow=true" target="_blank">here for API credentials</a>.) <br />This module uses the <strong>API Signature</strong> option -- you will need the username, password and signature to enter in the fields below.' : (substr(MODULE_PAYMENT_PAYPALWPP_MODULE_MODE, 0, 7) == 'Payflow' && (!defined('MODULE_PAYMENT_PAYPALWPP_PFUSER') || MODULE_PAYMENT_PAYPALWPP_PFUSER == '') ? '<span class="alert">2. </span><strong>PAYFLOW credentials</strong> This module needs your <strong>PAYFLOW Partner+Vendor+User+Password settings</strong> entered in the 4 fields below. These will be used to communicate with the Payflow system and authorize transactions to your account.' : '<span class="alert">2. </span>Ensure you have entered the appropriate security data for username/pwd etc, below.')) . (MODULE_PAYMENT_PAYPALWPP_MODULE_MODE == 'PayPal' ? '<br /><br /><span class="alert">3. </span>In your PayPal account, enable <strong>Instant Payment Notification</strong>:<br />under "Profile", select <em>Instant Payment Notification Preferences</em><ul style="margin-top: 0.5;"><li>click the checkbox to enable IPN</li><li>if there is not already a URL specified, set the URL to:<br /><nobr><pre>' . str_replace('index.php?main_page=index', 'ipn_main_handler.php', zen_catalog_href_link(FILENAME_DEFAULT, '', 'SSL')) . '</pre></nobr></li></ul>' : '') . '<font color="green"><hr /><strong>Requirements:</strong></font><br /><hr />*<strong>CURL</strong> is used for outbound communication with the gateway over ports 80 and 443, so must be active on your hosting server and able to use SSL.<br /><hr />');
}
define('MODULE_PAYMENT_PAYPALWPP_TEXT_DESCRIPTION', '<strong>PayPal</strong>');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_TITLE', 'Credit Card');
define('MODULE_PAYMENT_PAYPALWPP_EC_TEXT_TITLE', 'PayPal');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_EC_HEADER', 'Fast, Secure Checkout with PayPal:');
define('MODULE_PAYMENT_PAYPALWPP_EC_TEXT_TYPE', 'PayPal Express Checkout');
define('MODULE_PAYMENT_PAYPALWPP_DP_TEXT_TYPE', 'PayPal Direct Payment');
define('MODULE_PAYMENT_PAYPALWPP_PF_TEXT_TYPE', 'Credit Card');
// (used for payflow transactions)
define('MODULE_PAYMENT_PAYPALWPP_ERROR_HEADING', 'We\'re sorry, but we were unable to process your credit card.');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CARD_ERROR', 'The credit card information you entered contains an error.  Please check it and try again.');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_FIRSTNAME', 'Credit Card First Name:');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_LASTNAME', 'Credit Card Last Name:');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_OWNER', 'Cardholder Name:');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_TYPE', 'Credit Card Type:');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_NUMBER', 'Credit Card Number:');
 echo '<tr><td class="dataTableContent"><b>' . TABLE_TEXT_NUMBER_OF_CLICKS . '</b> ' . $lt_row->fields['num_clicks'] . '</td></tr>';
 echo '<tr><td class="dataTableContent"><b>' . TABLE_TEXT_ADDED_CART . '</b> ' . $lt_row->fields['added_cart'] . '</td></tr>';
 echo '<tr><td class="dataTableContent"><b>' . TABLE_TEXT_COMPLETED_PURCHASE . '</b> ' . $lt_row->fields['completed_purchase'] . '</td></tr>';
 if ($lt_row->fields['completed_purchase'] == 'true') {
     $order_result = $db->Execute("SELECT ot.text AS order_total FROM " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot WHERE o.orders_id=ot.orders_id AND o.orders_id = '" . $lt_row->fields['order_id'] . "' AND ot.class='ot_total'");
     if ($order_result->RecordCount() > 0) {
         echo '<tr><td class="dataTableContent">' . TABLE_TEXT_ORDER_VALUE . $order_result->fields['order_total'] . '</td></tr>';
     }
 }
 $categories_viewed = unserialize($lt_row->fields['categories_viewed']);
 if (!empty($categories_viewed)) {
     $cat_string = '';
     foreach ($categories_viewed as $cat_id => $val) {
         $cat_row = $db->Execute("SELECT cd.categories_name FROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd WHERE c.categories_id=cd.categories_id AND c.categories_id='" . $cat_id . "' AND cd.language_id=" . $_SESSION['languages_id']);
         //          $cat_string .= $cat_row->fields['categories_name'] . ', ';
         $cat_string .= '<a href="' . zen_catalog_href_link(FILENAME_DEFAULT, 'cPath=' . $cat_id) . '" target="_blank" title="' . $cat_row->fields['categories_name'] . '">' . $cat_row->fields['categories_name'] . '</a>' . ', ';
     }
     $cat_string = rtrim($cat_string, ', ');
     //        var_dump($need_tr, $col, THUMB_COLS);echo '<br />';
     echo '<tr><td class="dataTableContent"><strong>' . TABLE_TEXT_CATEGORIES . '</strong>' . $cat_string . '</td></tr>';
 }
 define('THUMB_IMAGE_WIDTH', SMALL_IMAGE_WIDTH / 2);
 define('THUMB_IMAGE_HEIGHT', SMALL_IMAGE_HEIGHT / 2);
 define('THUMB_COLS', 9);
 define('THUMB_STRLEN', 60);
 if ($lt_row->fields['products_viewed'] != '') {
     echo '<tr><td class="dataTableContent"><strong>' . TABLE_TEXT_PRODUCTS . ' </strong><table cellspacing=0 cellpadding=2 border=0 width="100%">';
     $prod_view_array = explode('*', $lt_row->fields['products_viewed']);
     $col = 0;
     foreach ($prod_view_array as $key => $product_id) {
         $product_id = rtrim($product_id, '?');
 }
 // if ($ep_dltype ...
 // CATEGORIES EXPORT
 // chadd - 12-13-2010 - logic change. $max_categories no longer required. better to loop back to root category and
 // concatenate the entire categories path into one string with $category_delimiter for separater.
 if ($ep_dltype == 'full' || $ep_dltype == 'category') {
     // chadd - 12-02-2010 fixed error: missing parenthesis
     // NEW While-loop for unlimited category depth
     $category_delimiter = "^";
     $thecategory_id = $row['v_categories_id'];
     // starting category_id
     if ($ep_dltype == 'full' && EASYPOPULATE_4_CONFIG_EXPORT_URI != '0') {
         $sql_type = "SELECT type_handler FROM " . TABLE_PRODUCT_TYPES . " WHERE type_id = " . (int) zen_get_products_type($row['v_products_id']);
         $sql_typename = $db->Execute($sql_type);
         //        $row['v_html_uri'] = zen_href_link(FILENAME_DEFAULT, 'main_page=' . $sql_typename->fields['type_handler'] . '_info&cPath=' . zen_get_generated_category_path_ids($row['v_master_categories_id']) . '&products_id=' . $row['v_products_id'],'NONSSL', false, true, false, true); //This generates an admin folder like link/reference not a catalog version.
         $row['v_html_uri'] = zen_catalog_href_link($sql_typename->fields['type_handler'] . '_info', 'cPath=' . zen_get_generated_category_path_ids($row['v_master_categories_id']) . '&products_id=' . $row['v_products_id'], 'NONSSL');
         //zen_catalog_href_link($page = '', $parameters = '', $connection = 'NONSSL')        //FILENAME_DEFAULT . '?main_page=' . zen_get_products_type($row['products_id'])
         //function zen_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true)
     }
     // $fullcategory = array(); // this will have the entire category path separated by $category_delimiter
     // if parent_id is not null ('0'), then follow it up.
     while (!empty($thecategory_id)) {
         // mult-lingual categories start - for each language, get category description and name
         $sql2 = 'SELECT * FROM ' . TABLE_CATEGORIES_DESCRIPTION . ' WHERE categories_id = ' . $thecategory_id . ' ORDER BY language_id';
         $result2 = ep_4_query($sql2);
         while ($row2 = $ep_uses_mysqli ? mysqli_fetch_array($result2) : mysql_fetch_array($result2)) {
             $lid = $row2['language_id'];
             $row['v_categories_name_' . $lid] = $row2['categories_name'] . $category_delimiter . $row['v_categories_name_' . $lid];
         }
         // look for parent categories ID
         $sql3 = 'SELECT parent_id FROM ' . TABLE_CATEGORIES . ' WHERE categories_id = ' . $thecategory_id;
Ejemplo n.º 15
0
<?php

/**
* Paymentwall language class
*
* @package paymentMethod
* @copyright Copyright 2014 Paymentwall Inc.
* @version v1.0.0
*/
define('MODULE_PAYMENT_PAYMENTWALL_TEXT_TITLE', 'Paymentwall');
if (IS_ADMIN_FLAG === true) {
    define('MODULE_PAYMENT_PAYMENTWALLTEXT_DESCRIPTION', '<strong>Paymentwall</strong><br /><a href="https://www.paymentwall.com" target="_blank">Manage your Paymentwall account.</a><br /><br />Configuration Instructions:<br />1. <a href="http://www.paymentwall.com/pwaccount/singin" target="_blank">Sign up for your Paymentwall account</a><br />2. In your Paymentwall account",<ul><li>set your pingback URL in <strong>application settings</strong>  to:<br /><nobr><pre>' . str_replace('index.php?main_page=index', 'paymentwall_pingback.php', zen_catalog_href_link(FILENAME_DEFAULT, '', 'SSL')) . '</pre></nobr><br />');
} else {
    define('MODULE_PAYMENT_PAYMENTWALLTEXT_DESCRIPTION', '<strong>Paymentwall</strong>');
}
Ejemplo n.º 16
0
 $tmp_image_file_medium = $tmp_image_medium->get_local();
 $tmp_image_file_medium_full = DIR_FS_CATALOG . $tmp_image_file_medium;
 $tmp_image_medium_preview = new ih_image($tmp_image_file_medium, IMAGE_SHOPPING_CART_WIDTH, IMAGE_SHOPPING_CART_HEIGHT);
 $tmp_image_large = new ih_image($image_file_large, $ihConf['large']['width'], $ihConf['large']['height']);
 $tmp_image_file_large = $tmp_image_large->get_local();
 $tmp_image_file_large_full = DIR_FS_CATALOG . $tmp_image_file_large;
 $tmp_image_large_preview = new ih_image($tmp_image_file_large, IMAGE_SHOPPING_CART_WIDTH, IMAGE_SHOPPING_CART_HEIGHT);
 // Get file details
 $text_default_size = get_image_details_string($tmp_image_file_full);
 $text_medium_size = get_image_details_string($tmp_image_file_medium_full);
 $text_large_size = get_image_details_string($tmp_image_file_large_full);
 if ($first == 1) {
     $tmp_image_link = zen_catalog_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $pInfo->products_id);
     $first = 0;
 } else {
     $tmp_image_link = zen_catalog_href_link(FILENAME_POPUP_IMAGE_ADDITIONAL, 'pID=' . $pInfo->products_id . '&pic=' . $i . '&products_image_large_additional=' . $tmp_image_file_large);
 }
 if ($_GET['imgName'] == $tmp_image_name) {
     // an image is selected, highlight it
     echo '<tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_IMAGE_HANDLER, 'products_filter=' . $_GET['products_filter'] . '&imgName=' . $tmp_image_name . '&action=layout_edit') . '\'">' . "\n";
     // set some details for later usage
     $selected_image_file = DIR_WS_CATALOG . $tmp_image_file_medium;
     $selected_image_file_large = DIR_WS_CATALOG . $tmp_image_file_large;
     $selected_image_link = $tmp_image_link;
     $selected_image_name = $tmp_image_name;
     $selected_image_suffix = preg_replace("/^" . $products_image_base . "/", '', $tmp_image_name);
     $selected_image_extension = $products_image_extension;
 } else {
     echo '<tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_IMAGE_HANDLER, 'products_filter=' . $_GET['products_filter'] . '&imgName=' . $tmp_image_name . '&action=layout_info') . '\'">' . "\n";
 }
 ?>
Ejemplo n.º 17
0
<?php

/**
 * @package languageDefines
 * @copyright Copyright 2003-2010 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: paypal.php 15555 2010-02-22 06:12:26Z drbyte $
 * @Simplified Chinese version   http://www.zen-cart.cn
 */
define('MODULE_PAYMENT_PAYPAL_TEXT_ADMIN_TITLE', 'PayPal Website Payments Standard - IPN');
define('MODULE_PAYMENT_PAYPAL_TEXT_CATALOG_TITLE', 'PayPal');
if (IS_ADMIN_FLAG === true) {
    define('MODULE_PAYMENT_PAYPAL_TEXT_DESCRIPTION', '<strong>PayPal Website Payments Standard (IPN)</strong> (PayPal基本方式)<br /><a href="http://www.zen-cart.com/partners/paypal-std" target="_blank">管理PayPal帐号。</a><br /><br /><font color="green">安装说明:</font><br />1. <a href="http://www.zen-cart.com/partners/paypal-std" target="_blank">注册PayPal帐号 - 点这里。</a><br />2. In your PayPal account, under "Profile",<ul><li>设置<strong>Instant Payment Notification Preferences</strong>的URL为:<br /><nobr><pre>' . str_replace('index.php?main_page=index', 'ipn_main_handler.php', zen_catalog_href_link(FILENAME_DEFAULT, '', 'SSL')) . '</pre></nobr><br />(如果已有URL,就不用修改。)<br /><span class="alert">确认IPN要选中!</span><br /><br /></li><li>在<strong>Website Payments Preferences</strong>中设置<strong>Automatic Return URL</strong>为:<br /><nobr><pre>' . zen_catalog_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', false) . '</pre></nobr></li>' . (defined('MODULE_PAYMENT_PAYPALSTD_STATUS') ? '' : '<li>... 并点击"安装"打开PayPal模块... 选择"编辑"设置PayPal。</li>') . '</ul><font color="green"><hr /><strong>要求:</strong></font><br /><hr />*<strong>PayPal帐号</strong> (<a href="http://www.zen-cart.com/partners/paypal-std" target="_blank">点击注册</a>)<br />*<strong>*<strong>端口 80</strong>用于网关间双向通讯,必须在主机的路由器/防火墙上打开<br />*一定要按照上面的说明<strong>设置</strong>。');
} else {
    define('MODULE_PAYMENT_PAYPAL_TEXT_DESCRIPTION', '<strong>PayPal</strong>');
}
// to show the PayPal logo as the payment option name, use this:  https://www.paypal.com/en_US/i/logo/PayPal_mark_37x23.gif
// to show CC icons with PayPal, use this instead:  https://www.paypal.com/en_US/i/bnr/horizontal_solution_PPeCheck.gif
define('MODULE_PAYMENT_PAYPAL_MARK_BUTTON_IMG', 'https://www.paypal.com/en_US/i/logo/PayPal_mark_37x23.gif');
define('MODULE_PAYMENT_PAYPAL_MARK_BUTTON_ALT', '通过PayPal付款');
define('MODULE_PAYMENT_PAYPAL_ACCEPTANCE_MARK_TEXT', '无需提供私人账户信息付款,安全而且简单');
define('MODULE_PAYMENT_PAYPAL_TEXT_CATALOG_LOGO', '<img src="' . MODULE_PAYMENT_PAYPAL_MARK_BUTTON_IMG . '" alt="' . MODULE_PAYMENT_PAYPAL_MARK_BUTTON_ALT . '" title="' . MODULE_PAYMENT_PAYPAL_MARK_BUTTON_ALT . '" /> &nbsp;' . '<span class="smallText">' . MODULE_PAYMENT_PAYPAL_ACCEPTANCE_MARK_TEXT . '</span>');
define('MODULE_PAYMENT_PAYPAL_ENTRY_FIRST_NAME', '名字:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_LAST_NAME', '姓氏:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_BUSINESS_NAME', '公司名称:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_NAME', '详细地址:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_STREET', '');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_CITY', '城市:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_STATE', '省份:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_ZIP', '邮编:');
Ejemplo n.º 18
0
echo sprintf(TEXT_SITEMAPXML_INSTRUCTIONS_STEP1, "\"javascript:(void 0)\" class=\"splitPageLink\" onClick=\"javascript:window.open('" . zen_catalog_href_link(FILENAME_SITEMAPXML) . "', 'sitemapGen', 'resizable=1,statusbar=5,width=700,height=400,top=0,left=50,scrollbars=yes')\"");
?>
                <?php 
echo sprintf(TEXT_SITEMAPXML_INSTRUCTIONS_STEP2, "\"javascript:(void 0)\" class=\"splitPageLink\" onClick=\"javascript:window.open('" . zen_catalog_href_link(FILENAME_SITEMAPXML, 'genxml=no&ping=yes') . "', 'sitemapGen', 'resizable=1,statusbar=5,width=600,height=400,top=0,left=50,scrollbars=yes')\"");
?>
<!--
                <fieldset>
                  <legend><?php 
echo TEXT_SITEMAPXML_CHOOSE_CRAWLER;
?>
</legend>
                  <form name="pingSE" action="<?php 
echo zen_catalog_href_link(FILENAME_SITEMAPXML);
?>
" method="get" id="pingSE" target="_blank" onsubmit="javascript:window.open('<?php 
echo zen_catalog_href_link(FILENAME_SITEMAPXML);
?>
'+getFormFields(this), 'sitemapPing', 'resizable=1,statusbar=5,width=700,height=400,top=0,left=50,scrollbars=yes');return false;">
                    <?php 
echo zen_draw_hidden_field('genxml', 'no');
?>
                    <label for="pingSE-Google"><?php 
echo 'Google';
?>
</label>
                    <?php 
echo zen_draw_checkbox_field('pinggoogle', 'yes', true, '', 'id="pingSE-Google"');
?>
                    <label for="pingSE-Yahoo"><?php 
echo 'Yahoo!';
?>
Ejemplo n.º 19
0
 /**
  * Install the payment module and its configuration settings
  *
  */
 function install()
 {
     global $db;
     // javascript
     $script = '<script type="text/javascript">' . "\n" . "<!--\n" . "window.onload = function() {\n" . "  init();\n" . "  var radio = document.getElementsByName('configuration[MODULE_PAYMENT_PAYPAL_SETTLEMENT_TYPE]');\n" . "  for (var i=0; i<radio.length; i++) {\n" . "    if (radio[i].value == 'ExpressCheckout')\n" . "      radio[i].onclick = function() { config_show('EC_div'); config_hide('WPP_div'); }\n" . "    else\n" . "      radio[i].onclick = function() { config_show('WPP_div'); config_hide('EC_div'); }\n" . "  }\n" . "}\n" . "function config_hide(div_id) {\n" . "  var element = document.getElementById(div_id);\n" . "  if (!element) return;\n" . "  element.style.display = 'none';\n" . "}\n" . "\n" . "function config_show(div_id) {\n" . "  var element = document.getElementById(div_id);\n" . "  if (!element) return;\n" . "  element.style.display = 'block';\n" . "}\n" . "// -->\n" . "</script>\n";
     $script = str_replace("'", "\\'", $script);
     $script = str_replace('"', '\\"', $script);
     define('MODULE_PAYMENT_PAYPAL_TEXT_STATUS', 'PayPal を有効にする');
     define('MODULE_PAYMENT_PAYPAL_DESC_STATUS', 'PayPal を有効にする');
     define('MODULE_PAYMENT_PAYPAL_TEXT_SETTLEMENT_TYPE', '処理タイプ');
     define('MODULE_PAYMENT_PAYPAL_DESC_SETTLEMENT_TYPE', '処理タイプを選択してください' . $script);
     define('MODULE_PAYMENT_PAYPAL_TEXT_ZONE', '適用地域');
     define('MODULE_PAYMENT_PAYPAL_DESC_ZONE', '適用地域を選択すると、選択した地域のみで利用可能となります。');
     define('MODULE_PAYMENT_PAYPAL_TEXT_ORDER_STATUS_ID', '初期注文ステータス');
     define('MODULE_PAYMENT_PAYPAL_DESC_ORDER_STATUS_ID', '設定したステータスが受注時に適用されます。');
     define('MODULE_PAYMENT_PAYPAL_TEXT_SORT_ORDER', '表示の整列順');
     define('MODULE_PAYMENT_PAYPAL_DESC_SORT_ORDER', '表示の整列順を設定できます。数字が小さいほど上位に表示されます');
     define('MODULE_PAYMENT_PAYPAL_TEXT_SELECTOPTION', '');
     define('MODULE_PAYMENT_PAYPAL_DESC_SELECTOPTION', 'WebPaymentPlusは、決済画面のカスタマイズ、PayPal/クレジットカード決済の利用可能です。');
     // for Express Checkout
     define('MODULE_PAYMENT_PAYPAL_EC_TEXT_BUSINESS_ID', 'PayPal ビジネスアカウントのID');
     define('MODULE_PAYMENT_PAYPAL_EC_DESC_BUSINESS_ID', 'PayPal ビジネスアカウントのIDを入力してください。');
     define('MODULE_PAYMENT_PAYPAL_EC_TEXT_BUSINESS_PASS', 'PayPal ビジネスアカウントのパスワード');
     define('MODULE_PAYMENT_PAYPAL_EC_DESC_BUSINESS_PASS', 'PayPal ビジネスアカウントのパスワードを入力してください。');
     define('MODULE_PAYMENT_PAYPAL_EC_TEXT_BUSINESS_SIGNATURE', 'API署名');
     define('MODULE_PAYMENT_PAYPAL_EC_DESC_BUSINESS_SIGNATURE', '上記アカウントのAPI署名を設定してください。');
     define('MODULE_PAYMENT_PAYPAL_EC_TEXT_SETTLEMENT_TYPE', '決済方式');
     define('MODULE_PAYMENT_PAYPAL_EC_DESC_SETTLEMENT_TYPE', 'Sale(売上)もしくはAuthorization(与信)を選択してください');
     define('MODULE_PAYMENT_PAYPAL_EC_TEXT_CURRENCY', '通貨');
     define('MODULE_PAYMENT_PAYPAL_EC_DESC_CURRENCY', '通貨を選択してください');
     define('MODULE_PAYMENT_PAYPAL_EC_TEXT_REFERENCE', 'Reference Transactionを利用');
     define('MODULE_PAYMENT_PAYPAL_EC_DESC_REFERENCE', '事前合意によるPayPal口座引き落としを有効にする<br/>※ Reference Transactionを利用するためには事前に審査が必要です。<br/>→ <a href="https://www.paypal.com/jp/cgi-bin/helpscr?cmd=_help&t=escalateTab" target="_blank">審査のご依頼はフォーム</a>');
     define('MODULE_PAYMENT_PAYPAL_EC_TEXT_TEST', 'Test環境');
     define('MODULE_PAYMENT_PAYPAL_EC_DESC_TEST', 'テスト時はTrue、そうでなければFalseとしてください。');
     // for Web Payment Plus
     define('MODULE_PAYMENT_PAYPAL_WPP_TEXT_LINK', 'WebPaymentPlusを利用するにはお申し込みが必要です。');
     define('MODULE_PAYMENT_PAYPAL_WPP_DESC_LINK', '<p>下記のURLから申し込みが可能です。<br><a href="https://www.paypal-japan.com/wpp/">ウェブペイメントプラスのご紹介</a></p>' . '<b>WebPaymentPlusの設定:</b><br>' . '<p>設定方法は<a href="...">WPP設定マニュアル</a>をご覧ください。</p>' . '<b>設定値:</b><br>' . '<p>(A)IPNへのURL:<br>' . str_replace('index.php?main_page=index', 'paypal_ipn.php', zen_catalog_href_link(FILENAME_DEFAULT, '', 'SSL')) . '<br><br>' . '(B)zen-cartへの戻りURL:<br>' . zen_catalog_href_link(FILENAME_CHECKOUT_SUCCESS_PAYPAL_IPN_WAITING, '', 'SSL', false) . '</p>');
     define('MODULE_PAYMENT_PAYPAL_WPP_TEXT_MERCHANT_ID', 'PayPal ビジネスアカウントの「セキュアなマーチャントID」');
     define('MODULE_PAYMENT_PAYPAL_WPP_DESC_MERCHANT_ID', 'PayPalへログインして「個人設定」のページ上部に書いてあります。');
     define('MODULE_PAYMENT_PAYPAL_WPP_TEXT_SETTLEMENT_TYPE', '決済方式');
     define('MODULE_PAYMENT_PAYPAL_WPP_DESC_SETTLEMENT_TYPE', '注文後、即売上となります(sale)');
     define('MODULE_PAYMENT_PAYPAL_WPP_TEXT_CURRENCY', '通貨');
     define('MODULE_PAYMENT_PAYPAL_WPP_DESC_CURRENCY', 'お支払い通貨。');
     define('MODULE_PAYMENT_PAYPAL_WPP_TEXT_TEST', 'テスト環境 (Sandboxの利用有無)');
     define('MODULE_PAYMENT_PAYPAL_WPP_DESC_TEST', 'テスト時はTrue、そうでなければFalseとしてください。');
     define('MODULE_PAYMENT_PAYPAL_WPP_TEXT_CUSTOM_KEY', 'パススルー変数の正当性チェックキー');
     define('MODULE_PAYMENT_PAYPAL_WPP_DESC_CUSTOM_KEY', 'パススルー変数が正しいことをチェックするキーを入力してください。');
     define('MODULE_PAYMENT_PAYPAL_WPP_TEXT_EMAIL', 'エラー発生時の通知先メールアドレス');
     define('MODULE_PAYMENT_PAYPAL_WPP_DESC_EMAIL', 'エラー発生時の通知先メールアドレスを入力してください。');
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function,               date_added) values ('" . MODULE_PAYMENT_PAYPAL_TEXT_STATUS . "',          'MODULE_PAYMENT_PAYPAL_STATUS',          'True',            '" . MODULE_PAYMENT_PAYPAL_DESC_STATUS . "',          '6', '0', 'zen_cfg_select_option(array(\\'True\\', \\'False\\'), ', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function,               date_added) values ('" . MODULE_PAYMENT_PAYPAL_TEXT_SETTLEMENT_TYPE . "', 'MODULE_PAYMENT_PAYPAL_SETTLEMENT_TYPE', 'ExpressCheckout', '" . MODULE_PAYMENT_PAYPAL_DESC_SETTLEMENT_TYPE . "', '6', '1', 'zen_cfg_select_option(array(\\'ExpressCheckout\\', \\'WebPaymentPlus\\'), ', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function,               date_added) values ('" . MODULE_PAYMENT_PAYPAL_TEXT_SELECTOPTION . "',    'MODULE_PAYMENT_PAYPAL_SELECTOPTION',    '',                '" . MODULE_PAYMENT_PAYPAL_DESC_SELECTOPTION . "',    '6', '2', 'zen_cfg_null(', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('" . MODULE_PAYMENT_PAYPAL_TEXT_ZONE . "',            'MODULE_PAYMENT_PAYPAL_ZONE',            '0',               '" . MODULE_PAYMENT_PAYPAL_DESC_ZONE . "',            '6', '3', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('" . MODULE_PAYMENT_PAYPAL_TEXT_ORDER_STATUS_ID . "', 'MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID', '0',               '" . MODULE_PAYMENT_PAYPAL_DESC_ORDER_STATUS_ID . "', '6', '4', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order,                             date_added) values ('" . MODULE_PAYMENT_PAYPAL_TEXT_SORT_ORDER . "',      'MODULE_PAYMENT_PAYPAL_SORT_ORDER',      '0',               '" . MODULE_PAYMENT_PAYPAL_DESC_SORT_ORDER . "',      '6', '5', now())");
     // for Express Checkout
     $curencies = array('USER' => '[User Selected Currency]', 'AUD' => 'Australian Dollar', 'BRL' => 'Brazilian Real', 'CAD' => 'Canadian Dollar', 'CZK' => 'Czech Koruna', 'DKK' => 'Danish Krone', 'EUR' => 'Euro', 'HKD' => 'Hong Kong Dollar', 'HUF' => 'Hungarian Forint', 'ILS' => 'Israeli New Sheqel', 'JPY' => 'Japanese Yen', 'MYR' => 'Malaysian Ringgit', 'MXN' => 'Mexican Peso', 'NOK' => 'Norwegian Krone', 'NZD' => 'New Zealand Dollar', 'PHP' => 'Philippine Peso', 'PLN' => 'Polish Zloty', 'GBP' => 'Pound Sterling', 'SGD' => 'Singapore Dollar', 'SEK' => 'Swedish Krona', 'CHF' => 'Swiss Franc', 'TWD' => 'Taiwan New Dollar', 'THB' => 'Thai Baht', 'TRY' => 'Turkish Lira', 'USD' => 'U.S. Dollar');
     $option = array();
     foreach ($curencies as $k => $v) {
         $option[] = "array(\\'id\\' => \\'{$k}\\', \\'text\\' => \\'{$v}\\')";
     }
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('</b><div id=\"EC_div\"><b>',                           'MODULE_PAYMENT_PAYPAL_EC_START',              '',                              '',                                                     '6', '10', 'zen_cfg_null(', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order,               date_added) values ('" . MODULE_PAYMENT_PAYPAL_EC_TEXT_BUSINESS_ID . "',        'MODULE_PAYMENT_PAYPAL_EC_BUSINESS_ID',        '" . STORE_OWNER_EMAIL_ADDRESS . "', '" . MODULE_PAYMENT_PAYPAL_EC_DESC_BUSINESS_ID . "',        '6', '11', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order,               date_added) values ('" . MODULE_PAYMENT_PAYPAL_EC_TEXT_BUSINESS_PASS . "',      'MODULE_PAYMENT_PAYPAL_EC_BUSINESS_PASS',      '',                              '" . MODULE_PAYMENT_PAYPAL_EC_DESC_BUSINESS_PASS . "',      '6', '12', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order,               date_added) values ('" . MODULE_PAYMENT_PAYPAL_EC_TEXT_BUSINESS_SIGNATURE . "', 'MODULE_PAYMENT_PAYPAL_EC_BUSINESS_SIGNATURE', '',                              '" . MODULE_PAYMENT_PAYPAL_EC_DESC_BUSINESS_SIGNATURE . "', '6', '13', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('" . MODULE_PAYMENT_PAYPAL_EC_TEXT_SETTLEMENT_TYPE . "',    'MODULE_PAYMENT_PAYPAL_EC_SETTLEMENT_TYPE',    'Sale',                          '" . MODULE_PAYMENT_PAYPAL_EC_DESC_SETTLEMENT_TYPE . "',    '6', '14', 'zen_cfg_select_option(array(\\'Sale\\', \\'Authorization\\'), ', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('" . MODULE_PAYMENT_PAYPAL_EC_TEXT_CURRENCY . "',           'MODULE_PAYMENT_PAYPAL_EC_CURRENCY',           'USER',                          '" . MODULE_PAYMENT_PAYPAL_EC_DESC_CURRENCY . "',           '6', '15', 'zen_cfg_select_drop_down_paypal(array(" . implode(",", $option) . "), ', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('" . MODULE_PAYMENT_PAYPAL_EC_TEXT_REFERENCE . "',          'MODULE_PAYMENT_PAYPAL_EC_REFERENCE',          'True',                          '" . MODULE_PAYMENT_PAYPAL_EC_DESC_REFERENCE . "',          '6', '16', 'zen_cfg_select_option(array(\\'True\\', \\'False\\'), ', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('" . MODULE_PAYMENT_PAYPAL_EC_TEXT_TEST . "',               'MODULE_PAYMENT_PAYPAL_EC_TEST',               'True',                          '" . MODULE_PAYMENT_PAYPAL_EC_DESC_TEST . "',               '6', '17', 'zen_cfg_select_option(array(\\'True\\', \\'False\\'), ', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('</b></div><b>',                                        'MODULE_PAYMENT_PAYPAL_EC_END',                '',                              '',                                                     '6', '19', 'zen_cfg_null(', now())");
     // for Web Payment Plus
     $customAvailableChars = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz' . '01234567890123456789';
     $customAvailableCharCount = strlen($customAvailableChars);
     $customCharCount = zen_rand(20, 30);
     $customValue = '';
     for ($i = 0; $i < $customCharCount; $i++) {
         $pos = mt_rand(0, $customAvailableCharCount * 50) % $customAvailableCharCount;
         $customValue = $customValue . substr($customAvailableChars, $pos, 1);
     }
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('</b><div id=\"WPP_div\"><b>',                          'MODULE_PAYMENT_PAYPAL_WPP_START',             '',                              '',                                                     '6', '20', 'zen_cfg_null(', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('" . MODULE_PAYMENT_PAYPAL_WPP_TEXT_LINK . "',              'MODULE_PAYMENT_PAYPAL_WPP_LINK',              '',                              '" . MODULE_PAYMENT_PAYPAL_WPP_DESC_LINK . "',              '6', '27', 'zen_cfg_null(', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order,               date_added) values ('" . MODULE_PAYMENT_PAYPAL_WPP_TEXT_MERCHANT_ID . "',       'MODULE_PAYMENT_PAYPAL_WPP_MERCHANT_ID',       '',                              '" . MODULE_PAYMENT_PAYPAL_WPP_DESC_MERCHANT_ID . "',       '6', '21', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('" . MODULE_PAYMENT_PAYPAL_WPP_TEXT_SETTLEMENT_TYPE . "',   'MODULE_PAYMENT_PAYPAL_WPP_SETTLEMENT_TYPE',   'sale',                          '" . MODULE_PAYMENT_PAYPAL_WPP_DESC_SETTLEMENT_TYPE . "',   '6', '22', 'zen_cfg_select_option(array(\\'sale\\'), ', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('" . MODULE_PAYMENT_PAYPAL_WPP_TEXT_CURRENCY . "',          'MODULE_PAYMENT_PAYPAL_WPP_CURRENCY',          'JPY',                           '" . MODULE_PAYMENT_PAYPAL_WPP_DESC_CURRENCY . "',          '6', '23', 'zen_cfg_select_option(array(\\'User Selected Currency\\', \\'USD\\', \\'JPY\\'), ', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('" . MODULE_PAYMENT_PAYPAL_WPP_TEXT_TEST . "',              'MODULE_PAYMENT_PAYPAL_WPP_TEST',              'True',                          '" . MODULE_PAYMENT_PAYPAL_WPP_DESC_TEST . "',              '6', '24', 'zen_cfg_select_option(array(\\'True\\', \\'False\\'), ', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order,               date_added) values ('" . MODULE_PAYMENT_PAYPAL_WPP_TEXT_CUSTOM_KEY . "',        'MODULE_PAYMENT_PAYPAL_WPP_CUSTOM_KEY','" . $customValue . "',                      '" . MODULE_PAYMENT_PAYPAL_WPP_DESC_CUSTOM_KEY . "',        '6', '25', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order,               date_added) values ('" . MODULE_PAYMENT_PAYPAL_WPP_TEXT_EMAIL . "',             'MODULE_PAYMENT_PAYPAL_WPP_EMAIL',             '',                              '" . MODULE_PAYMENT_PAYPAL_WPP_DESC_EMAIL . "',             '6', '26', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('</b></div><b>',                                        'MODULE_PAYMENT_PAYPAL_WPP_END',               '',                              '',                                                     '6', '29', 'zen_cfg_null(', now())");
     // customers(paypal_express_checkout_billing_agreement_id)
     $find = false;
     $result = $db->Execute("desc " . TABLE_CUSTOMERS);
     while (!$result->EOF) {
         if ($result->fields['Field'] == "paypal_express_checkout_billing_agreement_id") {
             $find = true;
             break;
         }
         $result->MoveNext();
     }
     if ($find == false) {
         $db->Execute("alter table " . TABLE_CUSTOMERS . " add column paypal_express_checkout_billing_agreement_id varchar(255) NULL default NULL");
     }
     // payment_ec_log
     $query = "create table if not exists " . TABLE_PAYPAL_LOG . " (\n                paypal_log_id int(11)      not null auto_increment,\n                customers_id  int(11)      not null default 0,\n                method        varchar(255) not null default '',\n                request       text         not null default '',\n                response      text         not null default '',\n                ack           varchar(255) not null default '',\n                created       datetime         null,\n                updated       datetime         null,\n                primary key(paypal_log_id)\n              )";
     $db->Execute($query);
     // payment_wpp_log
     $query = "create table if not exists " . TABLE_PAYPAL_WPP_LOG . " (\n                paypal_wpp_log_id int(11)      not null auto_increment,\n                post_base64       text,\n                session_id        text,\n                saved_session     blob,\n                expiry            int(17),\n                customers_id      int(11),\n                reject_reason     text,\n                created           datetime     null,\n                updated           datetime     null,\n                primary key(paypal_wpp_log_id)\n              )";
     $db->Execute($query);
     $this->notify('NOTIFY_PAYMENT_PAYPAL_INSTALLED');
 }
Ejemplo n.º 20
0
    <td class="headerBarContent" align="left">
      <?php 
if (!$hide_languages) {
    echo zen_draw_form('languages', basename($PHP_SELF), '', 'get');
    echo DEFINE_LANGUAGE . '&nbsp;&nbsp;' . (sizeof($languages) > 1 ? zen_draw_pull_down_menu('language', $languages_array, $languages_selected, 'onChange="this.form.submit();"') : '');
    echo zen_hide_session_id();
    echo '</form>';
} else {
    echo '&nbsp;';
}
?>
    </td>
    <td class="headerBarContent" align="center"><b><?php 
echo date("r", time()) . 'GMT' . '&nbsp;[' . $_SERVER['REMOTE_ADDR'] . ' ]&nbsp;';
?>
</b></td>
    <td class="headerBarContent" align="right"><?php 
echo '
        <a href="' . zen_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '" class="headerLink">' . HEADER_TITLE_TOP . '</a>&nbsp;|&nbsp;
        <a href="' . zen_catalog_href_link() . '" class="headerLink" target="_blank">' . HEADER_TITLE_ONLINE_CATALOG . '</a>&nbsp;|&nbsp;
        <a href="http://www.zen-cart.com/" class="headerLink" target="_blank">' . HEADER_TITLE_SUPPORT_SITE . '</a>&nbsp;|&nbsp;
        <a href="' . zen_href_link(FILENAME_SERVER_INFO) . '" class="headerLink">' . HEADER_TITLE_VERSION . '</a>&nbsp;|&nbsp;
        <a href="' . zen_href_link(FILENAME_ADMIN_ACCOUNT) . '" class="headerLink">' . HEADER_TITLE_ACCOUNT . '</a>&nbsp;|&nbsp;
        <a href="' . zen_href_link(FILENAME_LOGOFF, '', 'SSL') . '" class="headerLink">' . HEADER_TITLE_LOGOFF . '</a>&nbsp;';
?>
    </td>
  </tr>
</table>
<?php 
require DIR_WS_INCLUDES . 'header_navigation.php';
Ejemplo n.º 21
0
<?php

/**
 * @package languageDefines
 * @copyright Copyright 2003-2014 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart-pro.at/license/2_0.txt GNU Public License V2.0
 * @version $Id: paypal.php 628 2013-03-01 11:05:14Z webchills $
 * @edited and adapted for ZC v1.5.3 2014-12-07 02:43:30Z frank18 - www.isonetwork.net.au $
 */
define('MODULE_PAYMENT_PAYPAL_TEXT_ADMIN_TITLE', 'PayPal Payments Standard');
define('MODULE_PAYMENT_PAYPAL_TEXT_ADMIN_TITLE_NONUSA', 'PayPal Website Payments Standard');
define('MODULE_PAYMENT_PAYPAL_TEXT_CATALOG_TITLE', 'PayPal');
if (IS_ADMIN_FLAG === true) {
    define('MODULE_PAYMENT_PAYPAL_TEXT_DESCRIPTION', '<strong>PayPal Payments Standard</strong> (Alter PayPal Dienst, wesentlich unzuverlässiger als PayPal Express!)<br /><a href="https://www.paypal.com" target="_blank">Managen Sie Ihr PayPal Konto.</a><br /><br /><font color="green">Konfigurations Anleitung:</font><br />1. <a href="http://www.zen-cart.com/partners/paypal-std" target="_blank">Melden Sie sich bei Ihrem PayPal Konto an - Klicken Sie hier.</a><br />2. In Ihrem PayPal Konto, unter "Profile",<ul><li>stellen Sie ein <strong>Instant Payment Notification Preferences</strong> URL to:<br />' . str_replace('index.php?main_page=index', 'ipn_main_handler.php', zen_catalog_href_link(FILENAME_DEFAULT, '', 'SSL')) . '<br />(Sollte bereits eine andere URL eingetragen sein, sollten Sie diese Einstellung unverändert lassen.)<br /><span class="alert">Stellen Sie sicher, dass die Checkbox Enable IPN markiert ist!</span></li><li>in <strong>Website Payments Preferences</strong> set your <strong>Automatic Return URL</strong> to:<br />' . zen_catalog_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', false) . '</li>' . (defined('MODULE_PAYMENT_PAYPAL_STATUS') ? '' : '<li>... and click "install" above to enable PayPal support... and "edit" to tell Zen Cart your PayPal settings.</li>') . '</ul><font color="green"><hr /><strong>Requirements:</strong></font><br /><hr />*<strong>PayPal Account</strong> (<a href="http://www.zen-cart.com/partners/paypal-std" target="_blank">click to signup</a>)<br />*<strong>*<strong>Port 80</strong> is used for bidirectional communication with the gateway, so must be open on your host\'s router/firewall<br />*<strong>PHP allow_url_fopen</strong> must be enabled<br />*<strong>Settings</strong> must be configured as described above.');
} else {
    define('MODULE_PAYMENT_PAYPAL_TEXT_DESCRIPTION', '<strong>PayPal</strong>');
}
// to show the PayPal logo as the payment option name, use this:  https://www.paypal.com/en_US/i/logo/PayPal_mark_37x23.gif
// to show CC icons with PayPal, use this instead:  https://www.paypal.com/en_US/i/bnr/horizontal_solution_PPeCheck.gif
define('MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_IMG', 'https://www.paypal.com/de_DE/i/logo/PayPal_mark_37x23.gif');
define('MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_ALT', 'Einkaufen mit PayPal');
define('MODULE_PAYMENT_PAYPAL_ACCEPTANCE_MARK_TEXT', 'Sparen Sie Zeit. Kaufen Sie sicher ein. <br />Bezahlen Sie ohne ihre Kontoinformationen öffentlich preiszugeben.');
define('MODULE_PAYMENT_PAYPAL_TEXT_CATALOG_LOGO', '<img src="' . MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_IMG . '" alt="' . MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_ALT . '" title="' . MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_ALT . '" /> &nbsp;' . '<span class="smallText">' . MODULE_PAYMENT_PAYPAL_ACCEPTANCE_MARK_TEXT . '</span>');
define('MODULE_PAYMENT_PAYPAL_ENTRY_FIRST_NAME', 'Vorname:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_LAST_NAME', 'Nachname:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_BUSINESS_NAME', 'Firmenname:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_NAME', 'Adresse:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_STREET', 'Strasse:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_CITY', 'Stadt:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_STATE', 'Bundesland:');
Ejemplo n.º 22
0
<?php

/**
 * @package languageDefines
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: paypalwpp.php 5463 2006-12-30 02:06:15Z drbyte $
 */
define('MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_EC', 'PayPal Express Checkout');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_WPP', 'PayPal Website Payments Pro');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_PRO20', 'PayPal Website Payments Pro Payflow Edition (UK)');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_PF_EC', 'PayPal Payflow Pro - Gateway');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_PF_GATEWAY', 'PayPal Payflow Pro + Express Checkout');
if (IS_ADMIN_FLAG === true) {
    define('MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_DESCRIPTION', '<strong>PayPal Express Checkout</strong>%s<br />' . (substr(MODULE_PAYMENT_PAYPALWPP_MODULE_MODE, 0, 7) == 'Payflow' ? '<a href="https://manager.paypal.com/loginPage.do?partner=ZenCart" target="_blank">Manage your PayPal account.</a>' : '<a href="http://www.zen-cart.com/partners/paypal" target="_blank">Manage your PayPal account.</a>') . '<br /><br /><font color="green">Configuration Instructions:</font><br /><span class="alert">1. </span><a href="http://www.zen-cart.com/partners/paypal" target="_blank">Sign up for your PayPal account - click here.</a><br />' . (defined('MODULE_PAYMENT_PAYPALWPP_STATUS') ? '' : '... and click "install" above to enable PayPal Express Checkout support.</br>') . (MODULE_PAYMENT_PAYPALWPP_MODULE_MODE == 'PayPal' && (!defined('MODULE_PAYMENT_PAYPALWPP_APISIGNATURE') || MODULE_PAYMENT_PAYPALWPP_APISIGNATURE == '') ? '<span class="alert">2. </span><strong>API credentials</strong> from the API Credentials option in your PayPal Profile Settings area. This module uses the <strong>API Signature</strong> option -- you will need the username, password and signature to enter in the fields below.' : (substr(MODULE_PAYMENT_PAYPALWPP_MODULE_MODE, 0, 7) == 'Payflow' && (!defined('MODULE_PAYMENT_PAYPALWPP_PFUSER') || MODULE_PAYMENT_PAYPALWPP_PFUSER == '') ? '<span class="alert">2. </span><strong>PAYFLOW credentials</strong> This module needs your <strong>PAYFLOW Partner+Vendor+User+Password settings</strong> entered in the 4 fields below. These will be used to communicate with the Payflow system and authorize transactions to your account.' : '<span class="alert">2. </span>Ensure you have entered the appropriate security data for username/pwd etc, below.')) . (MODULE_PAYMENT_PAYPALWPP_MODULE_MODE == 'PayPal' ? '<br /><span class="alert">3. </span>In your PayPal account, enable <strong>Instant Payment Notification</strong>:<br />under "Profile", select <em>Instant Payment Notification Preferences</em><ul style="margin-top: 0.5;"><li>click the checkbox to enable IPN</li><li>if there is not already a URL specified, set the URL to:<br />' . str_replace('index.php?main_page=index', 'ipn_main_handler.php', zen_catalog_href_link(FILENAME_DEFAULT, '', 'SSL')) . '</li></ul>' : '') . '<font color="green"><hr /><strong>Requirements:</strong></font><br /><hr />*<strong>CURL</strong> is used for bidirectional communication with the gateway, so must be active on your hosting server (if you need to use a CURL proxy, set the CURL proxy settings under Admin->Configuration->My Store.)<br /><hr />');
}
define('MODULE_PAYMENT_PAYPALWPP_TEXT_DESCRIPTION', '<strong>PayPal</strong>');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_TITLE', 'Credit Card');
define('MODULE_PAYMENT_PAYPALWPP_EC_TEXT_TITLE', 'PayPal');
define('MODULE_PAYMENT_PAYPALWPP_EC_TEXT_TYPE', 'PayPal Express Checkout');
define('MODULE_PAYMENT_PAYPALWPP_DP_TEXT_TYPE', 'PayPal Direct Payment');
define('MODULE_PAYMENT_PAYPALWPP_ERROR_HEADING', 'We\'re sorry, but we were unable to process your credit card.');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CARD_ERROR', 'The credit card information you entered contains an error.  Please check it and try again.');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_FIRSTNAME', 'Credit Card First Name:');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_LASTNAME', 'Credit Card Last Name:');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_OWNER', 'Cardholder Name:');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_TYPE', 'Credit Card Type:');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_NUMBER', 'Credit Card Number:');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_EXPIRES', 'Credit Card Expiry Date:');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_ISSUE', 'Credit Card Issue Date:');
Ejemplo n.º 23
0
<?php

/**
 * @package languageDefines
 * @copyright Copyright 2003-2012 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version GIT: $Id: Author: DrByte  Thu Aug 16 01:57:33 2012 -0400 Modified in v1.5.1 $
 */
define('MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_EC', 'Encaissement avec PayPal Express');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_PRO20', 'Encaissement avec PayPal Express (Edition Pro 2.0 Payflow) (UK)');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_PF_EC', 'PayPal Payflow Pro - Portail');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_PF_GATEWAY', 'Encaissement avec PayPal Express via Payflow Pro');
if (IS_ADMIN_FLAG === true) {
    define('MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_DESCRIPTION', '<strong>Encaissement avec PayPal Express</strong>%s<br />' . (substr(MODULE_PAYMENT_PAYPALWPP_MODULE_MODE, 0, 7) == 'Payflow' ? '<a href="https://manager.paypal.com/loginPage.do?partner=ZenCart" target="_blank">Gérer votre compte PayPal.</a>' : '<a href="http://www.zen-cart.com/partners/paypal-ec" target="_blank">Gérer votre compte PayPal.</a>') . '<br /><br /><font color="green">Instructions de configuration :</font><br /><span class="alert">1. </span><a href="http://www.zen-cart.com/partners/paypal-ec" target="_blank">Créez votre compte PayPal - Cliquez ici.</a><br />' . (defined('MODULE_PAYMENT_PAYPALWPP_STATUS') ? '' : '... puis cliquez sur "installer" ci-dessus pour activer le support d\'Encaissement avec PayPal Express.</br>') . (MODULE_PAYMENT_PAYPALWPP_MODULE_MODE == 'PayPal' && (!defined('MODULE_PAYMENT_PAYPALWPP_APISIGNATURE') || MODULE_PAYMENT_PAYPALWPP_APISIGNATURE == '') ? '<br /><span class="alert">2. </span><strong>API pièces justificatives</strong> à partir de l\'option API Credentials dans les paramètres de votre profil PayPal. (Cliquez <a href="http://www.zen-cart.com/getpaypal" target="_blank">ici</a> pour des instructions API.) <br />Ce module utilise l\'option <strong>API Signature</strong> option -- Vous aurez besoin d\'un nom d\'utilisateur, d\'un mot de passe et d\'une signature à entrer dans les champs ci-dessous.' : (substr(MODULE_PAYMENT_PAYPALWPP_MODULE_MODE, 0, 7) == 'Payflow' && (!defined('MODULE_PAYMENT_PAYPALWPP_PFUSER') || MODULE_PAYMENT_PAYPALWPP_PFUSER == '') ? '<span class="alert">2. </span><strong>PAYFLOW credentials</strong> Ce module nécessite que vos paramètres <strong>PAYFLOW Partner+Vendor+User+Password</strong> soient saisis dans les 4 champs ci-dessous. Ils seront utilisés pour communiquer avec le système Payflow et pour autoriser les transactions sur votre compte.' : '<span class="alert">2. </span>Assurez-vous d\'avoir entré correctement ci-dessous les informations de sécurité nom d\'utilisateur / mot de passe, etc...')) . (MODULE_PAYMENT_PAYPALWPP_MODULE_MODE == 'PayPal' ? '<br /><br /><span class="alert">3. </span>Dans votre compte PayPal, activez <strong>Instant Payment Notification</strong>:<br />dans "Profile", choisissez <em>Instant Payment Notification Preferences</em><ul style="margin-top: 0.5;"><li>cliquez sur la case pour activer IPN</li><li>S\'il n\'y a pas déjà une URL indiquée, définissez l\'URL à:<br /><nobr><pre>' . str_replace('index.php?main_page=index', 'ipn_main_handler.php', zen_catalog_href_link(FILENAME_DEFAULT, '', 'SSL')) . '</pre></nobr></li></ul>' : '') . '<font color="green"><hr /><strong>Pré-requis:</strong></font><br /><hr />*<strong>cURL</strong> est utilisé pour la communication bidirectionnelle avec le portail, il faut donc qu\'il soit actif sur le serveur de votre hébergeur (si vous avez besoin d\'utiliser un proxy cURL, définissez les paramètres du proxy cURL dans Admin->Configuration->My Store.)<br /><hr />');
}
define('MODULE_PAYMENT_PAYPALWPP_TEXT_DESCRIPTION', '<strong>PayPal</strong>');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_TITLE', 'Carte de crédit');
define('MODULE_PAYMENT_PAYPALWPP_EC_TEXT_TITLE', 'PayPal');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_EC_HEADER', 'Encaissement rapide et sûr avec PayPal :');
define('MODULE_PAYMENT_PAYPALWPP_EC_TEXT_TYPE', 'Encaissement avec PayPal Expresst');
define('MODULE_PAYMENT_PAYPALWPP_DP_TEXT_TYPE', 'Paiement direct avec PayPal');
define('MODULE_PAYMENT_PAYPALWPP_PF_TEXT_TYPE', 'Carte de crédit');
//(used for payflow transactions)
define('MODULE_PAYMENT_PAYPALWPP_ERROR_HEADING', 'Nous sommes désolé, le traitement de votre carte de crédit n\'a pas pu être effectué.');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CARD_ERROR', 'Les informations de carte de crédit que vous avez saisi contiennent une erreur. Veuillez les vérifier et réessayer.');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_FIRSTNAME', 'Prénom carte de crédit :');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_LASTNAME', 'Nom carte de crédit :');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_OWNER', 'Nom du propriétaire de la carte :');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_TYPE', 'Type de carte de crédit :');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_NUMBER', 'Numéro carte de crédit :');
Ejemplo n.º 24
0
    ?>
      <tr>
        <td colspan="2" class="main" align="center" height= "40" valign="middle"><?php 
    echo '<a href="' . zen_href_link(FILENAME_ATTRIBUTES_CONTROLLER, 'products_filter=' . $products_filter . '&current_category_id=' . $current_category_id . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>';
    ?>
</td>
      </tr>
      <tr>
        <td colspan="2"><table border="1" cellspacing="0" cellpadding="2" align="center" class="main_page">
          <tr>
            <td class="main">
<?php 
    //            where    patrib.products_id='" . $pInfo->products_id . "'
    //            where    patrib.products_id='" . (int)$_GET['products_id'] . "'
    $check_template = $db->Execute("select template_dir from " . TABLE_TEMPLATE_SELECT);
    echo '<link rel="stylesheet" type="text/css" href="' . str_replace('index.php?main_page=NONE', 'includes/templates/' . $check_template->fields['template_dir'] . '/css/stylesheet.css', zen_catalog_href_link('NONE', '', 'SSL')) . '" />';
    ?>

  <tr>
    <td colspan="2" class="main" align="center">
<?php 
    if ($pr_attr->fields['total'] > 0) {
        ?>
      <table border="0" width="90%" cellspacing="0" cellpadding="2">
        <tr>
          <td colspan="2" class="main" align="left"><?php 
        echo TEXT_PRODUCT_OPTIONS;
        ?>
</td>
        </tr>
<?php 
Ejemplo n.º 25
0
function replace_general_email($oID, $text, $comments)
{
    require_once 'includes/classes/currencies.php';
    $currencies = new currencies();
    //オーダー情報の取得
    require_once 'includes/classes/order.php';
    $order = new order($oID);
    //============ 以下、予約語を置換 ============
    $text = str_replace('[CUSTOMER_NAME]', stripslashes($order->customer['name']), $text);
    $text = str_replace('[ORDER_ID]', stripslashes($oID), $text);
    if ($email_template_id != MODULE_EMAIL_TEMPLATE_CHECKOUT_SUCCESS_VISITOR_MAIL_ID) {
        if (function_exists('zen_visitors_purchase_is_visitors_order') && zen_visitors_purchase_is_visitors_order($oID)) {
            $invoice_url = '';
        } elseif (function_exists('zen_catalog_href_link')) {
            $invoice_url = zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL');
            $invoice_url = MODULE_EMAIL_TEMPLATE_INVOICE_TEXT . "\n" . $invoice_url;
        } else {
            $invoice_url = zen_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL', false);
        }
        $text = str_replace('[INVOICE_URL]', $invoice_url, $text);
    }
    if (!empty($comments)) {
        $notify_comments = stripslashes($comments);
    } else {
        $notify_comments = '';
    }
    $text = str_replace('[COMMENTS]', $notify_comments, $text);
    return $text;
}
Ejemplo n.º 26
0
?>
    </tr></table></td>
  </tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
  <tr class="headerBar" height="20" width="100%">

    <td class="headerBarContent" align="left">
      <?php 
if (!$hide_languages) {
    echo zen_draw_form('languages', basename($PHP_SELF), '', 'get');
    echo DEFINE_LANGUAGE . '&nbsp;&nbsp;' . (sizeof($languages) > 1 ? zen_draw_pull_down_menu('language', $languages_array, $languages_selected, 'onChange="this.form.submit();"') : '');
    echo zen_hide_session_id();
    echo '</form>';
} else {
    echo '&nbsp;';
}
?>
    </td>
    <td class="headerBarContent" align="center"><b><?php 
echo date("r", time()) . 'GMT' . '&nbsp;[' . $_SERVER['REMOTE_ADDR'] . ' ]&nbsp;';
?>
</b></td>
    <td class="headerBarContent" align="right"><?php 
echo '<a href="' . zen_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '" class="headerLink">' . HEADER_TITLE_TOP . '</a>&nbsp;|&nbsp;<a href="' . zen_catalog_href_link() . '" class="headerLink" target="_blank">' . HEADER_TITLE_ONLINE_CATALOG . '</a>&nbsp;|&nbsp;<a href="http://www.zen-cart.com/" class="headerLink" target="_blank">' . HEADER_TITLE_SUPPORT_SITE . '</a>&nbsp;|&nbsp;<a href="' . zen_href_link(FILENAME_LOGOFF) . '" class="headerLink">' . HEADER_TITLE_LOGOFF . '</a>&nbsp;';
?>
</td>
  </tr>
</table>
<?php 
require DIR_WS_INCLUDES . 'header_navigation.php';
Ejemplo n.º 27
0
<?php

/**
 * @package languageDefines
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: paypal.php 2644 2005-12-21 16:56:32Z drbyte $
 */
define('MODULE_PAYMENT_PAYPAL_TEXT_ADMIN_TITLE', 'Paypal IPN');
define('MODULE_PAYMENT_PAYPAL_TEXT_CATALOG_TITLE', 'Paypal');
if (function_exists('zen_catalog_href_link')) {
    define('MODULE_PAYMENT_PAYPAL_TEXT_DESCRIPTION', '<strong>PayPal IPN</strong><br /><font color=green>Configuration Instructions:</font><br />On www.paypal.com, under "Profile",<ul><li>set your <strong>Instant Payment Notification Preferences</strong> URL to:<br />' . str_replace('index.php?main_page=index', 'ipn_main_handler.php', zen_catalog_href_link(FILENAME_DEFAULT, '', 'SSL')) . ' </li><li>in <strong>Website Payments Preferences</strong> set your <strong>Automatic Return URL</strong> to:<br />' . zen_catalog_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', false) . '</li>' . (defined('MODULE_PAYMENT_PAYPAL_STATUS') ? '' : '<li>... and click "install" above to enable PayPal support... and "edit" to tell Zen Cart your PayPal settings.</li>') . '</ul><font color=green><hr /></font>');
} else {
    define('MODULE_PAYMENT_PAYPAL_TEXT_DESCRIPTION', '<strong>PayPal IPN</strong>');
}
define('MODULE_PAYMENT_PAYPAL_ENTRY_FIRST_NAME', 'First Name:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_LAST_NAME', 'Last Name:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_BUSINESS_NAME', 'Business Name:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_NAME', 'Address Name:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_STREET', 'Address Street:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_CITY', 'Address City:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_STATE', 'Address State:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_ZIP', 'Address Zip:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_COUNTRY', 'Address Country:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_EMAIL_ADDRESS', 'Payer Email:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_EBAY_ID', 'Ebay ID:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_PAYER_ID', 'Payer ID:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_PAYER_STATUS', 'Payer Status:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_STATUS', 'Address Status:');
define('MODULE_PAYMENT_PAYPAL_ENTRY_PAYMENT_TYPE', 'Payment Type:');
Ejemplo n.º 28
0
function zen_build_html_email_from_template($module = 'default', $block)
{
    // Identify and Read the template file for the type of message being sent
    $template_filename_base = DIR_FS_EMAIL_TEMPLATES . "email_template_";
    if (file_exists($template_filename_base . str_replace(array('_extra', '_admin'), '', $module) . '.html')) {
        $template_filename = $template_filename_base . str_replace(array('_extra', '_admin'), '', $module) . '.html';
    } elseif (file_exists($template_filename_base . 'default' . '.html')) {
        $template_filename = $template_filename_base . 'default' . '.html';
    } else {
        echo 'ERROR: The email template file for ' . $template_filename_base . ' or ' . $template_filename . ' cannot be found.';
        return '';
        // couldn't find template file, so return an empty string for html message.
    }
    if (!($fh = fopen($template_filename, 'rb'))) {
        // note: the 'b' is for compatibility with Windows systems
        echo 'ERROR: The email template file ' . $template_filename_base . ' or ' . $template_filename . ' cannot be opened';
    }
    $file_holder = fread($fh, filesize($template_filename));
    fclose($fh);
    //strip linebreaks and tabs out of the template
    $file_holder = zen_convert_linefeeds(array("\r\n", "\n", "\r", "\t"), '', $file_holder);
    //check for some specifics that need to be included with all messages
    if ($block['EMAIL_STORE_NAME'] == '') {
        $block['EMAIL_STORE_NAME'] = STORE_NAME;
    }
    if ($block['EMAIL_STORE_URL'] == '') {
        $block['EMAIL_STORE_URL'] = '<a href="' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . '">' . STORE_NAME . '</a>';
    }
    if ($block['EMAIL_STORE_OWNER'] == '') {
        $block['EMAIL_STORE_OWNER'] = STORE_OWNER;
    }
    if ($block['EMAIL_FOOTER_COPYRIGHT'] == '') {
        $block['EMAIL_FOOTER_COPYRIGHT'] = EMAIL_FOOTER_COPYRIGHT;
    }
    if ($block['EMAIL_DISCLAIMER'] == '') {
        $block['EMAIL_DISCLAIMER'] = sprintf(EMAIL_DISCLAIMER, '<a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">' . STORE_OWNER_EMAIL_ADDRESS . ' </a>');
    }
    if ($block['EMAIL_SPAM_DISCLAIMER'] == '') {
        $block['EMAIL_SPAM_DISCLAIMER'] = EMAIL_SPAM_DISCLAIMER;
    }
    if ($block['BASE_HREF'] == '') {
        $block['BASE_HREF'] = HTTP_SERVER . DIR_WS_CATALOG;
    }
    if ($block['EMAIL_DATE_SHORT'] == '') {
        $block['EMAIL_DATE_SHORT'] = zen_date_short(date("Y-m-d"));
    }
    if ($block['EMAIL_DATE_LONG'] == '') {
        $block['EMAIL_DATE_LONG'] = zen_date_long(date("Y-m-d"));
    }
    if ($block['EXTRA_INFO'] == 'EXTRA_INFO') {
        $block['EXTRA_INFO'] = '';
    }
    if (substr($module, -6) != '_extra' && $module != 'contact_us') {
        $block['EXTRA_INFO'] = '';
    }
    $block['COUPON_BLOCK'] = '';
    if ($block['COUPON_TEXT_VOUCHER_IS'] && $block['COUPON_TEXT_TO_REDEEM']) {
        $block['COUPON_BLOCK'] = '<div class="coupon-block">' . $block['COUPON_TEXT_VOUCHER_IS'] . $block['COUPON_DESCRIPTION'] . '<br />' . $block['COUPON_TEXT_TO_REDEEM'] . '<span class="coupon-code">' . $block['COUPON_CODE'] . '</span></div>';
    }
    $block['GV_BLOCK'] = '';
    if ($block['GV_WORTH'] && $block['GV_REDEEM'] && $block['GV_CODE_URL']) {
        $block['GV_BLOCK'] = '<div class="gv-block">' . $block['GV_WORTH'] . '<br />' . $block['GV_REDEEM'] . $block['GV_CODE_URL'] . '<br />' . $block['GV_LINK_OTHER'] . '</div>';
    }
    //prepare the "unsubscribe" link:
    if (function_exists(zen_catalog_href_link)) {
        $block['UNSUBSCRIBE_LINK'] = str_replace("\n", '', TEXT_UNSUBSCRIBE) . ' <a href="' . zen_catalog_href_link(FILENAME_UNSUBSCRIBE, "unsubscribe_address=" . $block['EMAIL_TO_ADDRESS']) . '">' . zen_catalog_href_link(FILENAME_UNSUBSCRIBE, "unsubscribe_address=" . $block['EMAIL_TO_ADDRESS']) . '</a>';
    } else {
        $block['UNSUBSCRIBE_LINK'] = str_replace("\n", '', TEXT_UNSUBSCRIBE) . ' <a href="' . zen_href_link(FILENAME_UNSUBSCRIBE, "unsubscribe_address=" . $block['EMAIL_TO_ADDRESS']) . '">' . zen_href_link(FILENAME_UNSUBSCRIBE, "unsubscribe_address=" . $block['EMAIL_TO_ADDRESS']) . '</a>';
    }
    //now replace the $BLOCK_NAME items in the template file with the values passed to this function's array
    foreach ($block as $key => $value) {
        $file_holder = str_replace('$' . $key, $value, $file_holder);
    }
    //DEBUG -- to display preview on-screen
    if (EMAIL_SYSTEM_DEBUG == 'on') {
        echo $file_holder;
    }
    return $file_holder;
}
Ejemplo n.º 29
0
/**
 * @package languageDefines
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @translator: cyaneo/hugo13/wflohr/maleborg	http://www.zen-cart.at	2007-01-03
 * @version $Id: paypalwpp.php 214 2008-04-10 05:31:29Z hugo13 $
 */
define('MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_EC', 'PayPal Express-Kaufabwicklung');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_WPP', 'PayPal Express-Kaufabwicklung Pro');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_PRO20', 'PayPal Express-Kaufabwicklung Pro Payflow Edition (UK)');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_PF_EC', 'PayPal Payflow Pro - Gateway');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_TITLE_PF_GATEWAY', 'PayPal Payflow Pro Express-Kaufabwicklung');
if (IS_ADMIN_FLAG === true) {
    define('MODULE_PAYMENT_PAYPALWPP_TEXT_ADMIN_DESCRIPTION', '<strong>PayPal Express Checkout</strong>%s<br />' . (substr(MODULE_PAYMENT_PAYPALWPP_MODULE_MODE, 0, 7) == 'Payflow' ? '<a href="https://manager.paypal.com/loginPage.do?partner=ZenCart" target="_blank">Verwalten Sie Ihren PayPal Account.</a>' : '<a href="http://www.zen-cart.com/partners/paypal" target="_blank">Verwalten Sie Ihren PayPal Account.</a>') . '<br /><br /><font color="green">Konfiguration Anleitung:</font><br /><span class="alert">1. </span><a href="http://www.zen-cart.com/partners/paypal" target="_blank">Erstellen Sie einen PayPal Account.</a><br />' . (defined('MODULE_PAYMENT_PAYPALWPP_STATUS') ? '' : '... und drücken auf den Button "Installieren" um PayPal Express Checkout zu aktivieren.</br>') . (MODULE_PAYMENT_PAYPALWPP_MODULE_MODE == 'PayPal' && (!defined('MODULE_PAYMENT_PAYPALWPP_APISIGNATURE') || MODULE_PAYMENT_PAYPALWPP_APISIGNATURE == '') ? '<span class="alert">2. </span><strong>API Credentials</strong> Diese Modul benutzt die <strong>API Signatur</strong> Option -- Bitte geben Sie in die utnren Felder Ihren Benutzernamen, Passwort und die Signature ein.' : (substr(MODULE_PAYMENT_PAYPALWPP_MODULE_MODE, 0, 7) == 'Payflow' && (!defined('MODULE_PAYMENT_PAYPALWPP_PFUSER') || MODULE_PAYMENT_PAYPALWPP_PFUSER == '') ? '<span class="alert">2. </span><strong>PAYFLOW Credentials</strong> Dieses Modul benötigt Ihre <strong>PAYFLOW Partner Daten</strong>. Bitte geben Sie diese in die Felder unten ein. Diese Daten werden für den reibungslosen Transaktionsablauf benötigt..' : '<span class="alert">2. </span>Bitte stellen Sie sicher, das Sie notwendigen Daten für diese Modul eingegeben haben.')) . (MODULE_PAYMENT_PAYPALWPP_MODULE_MODE == 'PayPal' ? '<br /><span class="alert">3. </span>Aktivieren Sie in Ihrem Paypal Account <strong>Sofortige Zehlungsbenachrichtung</strong>:<br />unter Mein Profil wählen Sie <em>Sofortige Zahlungsbenachrichtung Einstellungen</em><ul style="margin-top: 0.5;"><li>und machen einen Haken in das dazugehörige Kästchen</li><li>Falls nicht bereicht eine URL angegeben ist, geben Sie bitte folgende URL ein:<br />' . str_replace('index.php?main_page=index', 'ipn_main_handler.php', zen_catalog_href_link(FILENAME_DEFAULT, '', 'SSL')) . '</li></ul>' : '') . '<font color="green"><hr /><strong>Vorrausetzungen:</strong></font><br /><hr />*<strong>CURL</strong> wird für die Kommunikation mit dem Gateway genutzt und muss deshlb zwingend auf Ihrem Webspace vorhanden und aktiviert sein. (Falls Sie einen CURL Proxy verwenden, konfigurieren Sie diesen bitte unter Konfiguration -> Mein Shop)<br /><hr />');
}
define('MODULE_PAYMENT_PAYPALWPP_TEXT_DESCRIPTION', '<strong>PayPal</strong>');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_TITLE', 'Kreditkarte');
define('MODULE_PAYMENT_PAYPALWPP_EC_TEXT_TITLE', 'PayPal');
define('MODULE_PAYMENT_PAYPALWPP_EC_TEXT_TYPE', 'PayPal Express Checkout');
define('MODULE_PAYMENT_PAYPALWPP_DP_TEXT_TYPE', 'PayPal Direct Payment');
define('MODULE_PAYMENT_PAYPALWPP_ERROR_HEADING', 'Es war uns leider nicht möglich Ihre Kreditkarten zu verarbeiten');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CARD_ERROR', 'Die angegebenen Kreditkarten Informationen enthalten einen Fehler, Bitte prüfen Sie ihre Angaben und versuchen Sie es erneut.');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_FIRSTNAME', 'Kreditkarteninhaber Vorname:');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_LASTNAME', 'Kreditkarteninhaber Nachname');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_OWNER', 'Kreditkarteninhaber:');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_TYPE', 'Kreditkarte:');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_NUMBER', 'Kreditkartennummer:');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_EXPIRES', 'Gültig bis:');
define('MODULE_PAYMENT_PAYPALWPP_TEXT_CREDIT_CARD_ISSUE', 'Ausgabedatum der KK:');