http://www.oscommerce.com DevosC, Developing open source Code http://www.devosc.com Copyright (c) 2003 osCommerce Copyright (c) 2004 DevosC.com Copyright (c) 2006 Dipl.-Ing.(TH) Winfried Kaiser (w.kaiser@fortune.de) -- Port to OL-Commerce Released under the GNU General Public License */ include DIR_WS_CLASSES . 'order.php'; $order = new order($HTTP_GET_VARS['oID']); require_once PAYPAL_IPN_DIR . 'Admin/languages/' . $language . '/paypal.lng.php'; require_once PAYPAL_IPN_DIR . 'Classes/TransactionDetails/TransactionDetails.class.php'; $paypal = new PayPal_TransactionDetails(TABLE_PAYPAL, $order->info['payment_id']); if ($HTTP_GET_VARS['digest'] != $paypal->digest()) { $messageStack->add_session(ERROR_UNAUTHORIZED_REQUEST); } elseif ($paypal->info['payment_status'] === 'Completed' && $order->info['orders_status'] === MODULE_PAYMENT_PAYPAL_ORDER_ONHOLD_STATUS_ID) { include PAYPAL_IPN_DIR . 'Functions/addressbook.func.php'; include PAYPAL_IPN_DIR . 'Classes/osC/Order.class.php'; $PayPal_osC_Order = new PayPal_osC_Order(); $PayPal_osC_Order->setOrderID($HTTP_GET_VARS['oID']); $PayPal_osC_Order->loadOrdersSessionInfo(); //$currency = $PayPal_osC_Order->currency; $PayPal_osC_Order->setAccountHistoryInfoURL(olc_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $PayPal_osC_Order->orderID, 'SSL', false)); $PayPal_osC_Order->setCheckoutProcessLanguageFile(DIR_FS_CATALOG_LANGUAGES . $PayPal_osC_Order->language . '/' . 'checkout_process.php'); $PayPal_osC_Order->updateProducts($order, $currencies); $PayPal_osC_Order->notifyCustomer($order); $affiliate_ref = $PayPal_osC_Order->affiliate_id; $affiliate_clickthroughs_id = $PayPal_osC_Order->affiliate_clickthroughs_id;
osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com DevosC, Developing open source Code http://www.devosc.com Copyright (c) 2003 osCommerce Copyright (c) 2004 DevosC.com Copyright (c) 2006 Dipl.-Ing.(TH) Winfried Kaiser (w.kaiser@fortune.de) -- Port to OL-Commerce Released under the GNU General Public License */ include_once DIR_WS_CLASSES . 'currencies.php'; $currencies = new currencies(); require_once PAYPAL_IPN_DIR . 'Classes/TransactionDetails/TransactionDetails.class.php'; $paypal = new PayPal_TransactionDetails(TABLE_PAYPAL); $paypal->query($HTTP_GET_VARS['info']); $pixel = PAYPAL_IPN_DIR . 'images/pixel.gif'; ?> <table width="100%" cellpadding="0" cellspacing="0" align="center"> <tr> <td width="150"><?php echo olc_image($pixel, '', '150', '1'); ?> </td> <td width="6"><?php echo olc_image($pixel, '', '6', '1'); ?> </td> <td width="100%"><?php echo olc_image($pixel, '', '432', '1');
DevosC, Developing open source Code http://www.devosc.com Copyright (c) 2003 osCommerce Copyright (c) 2004 DevosC.com Copyright (c) 2006 Dipl.-Ing.(TH) Winfried Kaiser (w.kaiser@fortune.de) -- Port to OL-Commerce Released under the GNU General Public License */ require_once PAYPAL_IPN_DIR . 'Classes/TransactionDetails/TransactionDetails.class.php'; require_once PAYPAL_IPN_DIR . 'Classes/Page/Page.class.php'; require_once PAYPAL_IPN_DIR . 'Functions/general.func.php'; paypal_include_lng(PAYPAL_IPN_DIR . 'Admin/languages/', $language, 'paypal.lng.php'); require_once PAYPAL_IPN_DIR . 'database_tables.inc.php'; $paypal = new PayPal_TransactionDetails(TABLE_PAYPAL, $order->info['payment_id']); ?> <tr valign="top"> <td colspan="2" style="padding-bottom:0px;"> <?php echo olc_image(PAYPAL_IPN_DIR . 'images/paypal_logo.gif', 'PayPal'); ?> </td> </tr> <tr valign="top"> <td class="main"> <style type="text/css"> .Txns{font-family: Verdana;font-size: 10px;color: #000000;background-color: #aaaaaa;} .Txns td {padding: 2px 4px;}.TxnsTitle td {color: #000000;font-weight: bold;font-size: 13px;} .TxnsSTitle td{background-color: #ccddee;color: #000000;font-weight: bold;} </style>
switch ($action) { case 'new': break; case 'edit': break; case 'delete': break; default: if (is_object($ipnInfo)) { $heading[] = array('text' => HTML_B_START . TEXT_INFO_PAYPAL_IPN_HEADING . ' #' . $ipnInfo->paypal_id . HTML_B_END); if (!empty($ipnInfo->orders_id)) { $contents[] = array('align' => 'center', 'text' => HTML_A_START . olc_href_link(FILENAME_ORDERS, olc_get_all_get_params(array('ipnID', 'oID', 'action')) . 'oID=' . $ipnInfo->orders_id . '&action=edit&referer=ipn') . '">' . olc_image_button('button_orders.gif', IMAGE_ORDERS) . HTML_A_END); } elseif (!empty($ipnInfo->txn_id)) { $contents[] = array('align' => 'center', 'text' => '<a href="javascript:openWindow(\'' . olc_href_link(FILENAME_PAYPAL, olc_get_all_get_params(array('ipnID', 'oID', 'action')) . 'action=details&info=' . $ipnInfo->txn_id) . '\');">' . olc_image_button('button_preview.gif', IMAGE_PREVIEW) . HTML_A_END); } $contents[] = array('text' => HTML_BR . TABLE_HEADING_DATE . ': ' . PayPal_TransactionDetails::date($ipnInfo->payment_date)); } break; } if (!empty($heading) && !empty($contents)) { echo ' <td width="25%" valign="top">' . NEW_LINE; $box = new box(); echo $box->infoBox($heading, $contents); echo ' </td>' . NEW_LINE; } ?> </tr> </table></td> </tr> </table>