'0', 'text' => TEXT_SORT_PAYPAL_ID_DESC), array('id' => '1', 'text' => TEXT_SORT_PAYPAL_ID), array('id' => '2', 'text' => TEXT_SORT_ZEN_ORDER_ID_DESC), array('id' => '3', 'text'=> TEXT_SORT_ZEN_ORDER_ID), array('id' => '4', 'text'=> TEXT_PAYMENT_AMOUNT_DESC), array('id' => '5', 'text'=> TEXT_PAYMENT_AMOUNT) ); if (isset($_GET['paypal_ipn_sort_order'])) { $paypal_ipn_sort_order = $_GET['paypal_ipn_sort_order']; } else { $paypal_ipn_sort_order = 0; } // $ipn_query_raw = "select p.order_id, p.paypal_ipn_id, p.txn_type, p.payment_type, p.payment_status, p.pending_reason, p.mc_currency, p.payer_status, p.mc_currency, p.date_added, p.mc_gross, p.first_name, p.last_name, p.payer_business_name, p.parent_txn_id, p.txn_id from " . TABLE_PAYPAL . " as p, " .TABLE_ORDERS . " as o where o.orders_id = p.order_id " . $ipn_search . " order by o.orders_id DESC"; switch ($paypal_ipn_sort_order) { case (0): $order_by = " order by p.paypal_ipn_id DESC"; break; case (1): $order_by = " order by p.paypal_ipn_id"; break; case (2): $order_by = " order by p.order_id DESC, p.paypal_ipn_id"; break; case (3): $order_by = " order by p.order_id, p.paypal_ipn_id"; break; case (4): $order_by = " order by p.mc_gross DESC"; break; case (5): $order_by = " order by p.mc_gross"; break; default: $order_by = " order by p.paypal_ipn_id DESC"; break; } $action = (isset($_GET['action']) ? $_GET['action'] : ''); $selected_status = (isset($_GET['payment_status']) ? $_GET['payment_status'] : ''); require(DIR_FS_CATALOG_MODULES . 'payment/paypal.php'); $payment_statuses = array(); $payment_status_trans = $db->Execute("select payment_status_name as payment_status from " . TABLE_PAYPAL_PAYMENT_STATUS ); while (!$payment_status_trans->EOF) { $payment_statuses[] = array('id' => $payment_status_trans->fields['payment_status'], 'text' => $payment_status_trans->fields['payment_status']); $payment_status_trans->MoveNext(); } ?> > <?php echo TITLE; ?>
'', 'text' => TEXT_ALL_IPNS)), $payment_statuses), $selected_status, 'onChange="this.form.submit();"') . zen_hide_session_id() . zen_draw_hidden_field('paypal_ipn_sort_order', $_GET['paypal_ipn_sort_order']) . ''; ?> '; ?>
'' . TEXT_INFO_PAYPAL_IPN_HEADING.' #' . $ipnInfo->paypal_ipn_id . ''); $ipn = $db->Execute("select * from " . TABLE_PAYPAL_PAYMENT_STATUS_HISTORY . " where paypal_ipn_id = '" . $ipnInfo->paypal_ipn_id . "'"); $ipn_count = $ipn->RecordCount(); $contents[] = array('align' => 'center', 'text' => '' . zen_image_button('button_orders.gif', IMAGE_ORDERS) . ''); $contents[] = array('text' => '
' . TABLE_HEADING_NUM_HISTORY_ENTRIES . ': '. $ipn_count); $count = 1; while (!$ipn->EOF) { $contents[] = array('text' => '
' . TABLE_HEADING_ENTRY_NUM . ': '. $count); $contents[] = array('text' => TABLE_HEADING_DATE_ADDED . ': '. zen_datetime_short($ipn->fields['date_added'])); $contents[] = array('text' => TABLE_HEADING_TRANS_ID . ': '.$ipn->fields['txn_id']); $contents[] = array('text' => TABLE_HEADING_PAYMENT_STATUS . ': '.$ipn->fields['payment_status']); $contents[] = array('text' => TABLE_HEADING_PENDING_REASON . ': '.$ipn->fields['pending_reason']); $count++; $ipn->MoveNext(); } } break; } if ( (zen_not_null($heading)) && (zen_not_null($contents)) ) { echo ' ' . "\n"; } ?>
Execute($ipn_query_raw); while (!$ipn_trans->EOF) { if ((!isset($_GET['ipnID']) || (isset($_GET['ipnID']) && ($_GET['ipnID'] == $ipn_trans->fields['paypal_ipn_id']))) && !isset($ipnInfo) ) { $ipnInfo = new objectInfo($ipn_trans->fields); } if (isset($ipnInfo) && is_object($ipnInfo) && ($ipn_trans->fields['paypal_ipn_id'] == $ipnInfo->paypal_ipn_id) ) { echo ' ' . "\n"; } else { echo ' ' . "\n"; } ?> MoveNext(); } ?>
 
fields['order_id']; ?> fields['paypal_ipn_id']; ?> fields['txn_type'] . '
' . $ipn_trans->fields['first_name'] . ' ' . $ipn_trans->fields['last_name'] . ($ipn_trans->fields['payer_business_name'] != '' ? '
' . $ipn_trans->fields['payer_business_name'] : ''); ?>
fields['payment_status_name'] . ' '. $ipn_trans->fields['payment_status'] . '
Parent Trans ID:' . $ipn_trans->fields['parent_txn_id'] . '
Trans ID:' . $ipn_trans->fields['txn_id']; ?>
fields['mc_currency'] . ' '.number_format($ipn_trans->fields['mc_gross'], 2); ?> fields['paypal_ipn_id'] == $ipnInfo->paypal_ipn_id) ) { echo zen_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . ''; } ?> 
display_count($ipn_query_numrows, MAX_DISPLAY_SEARCH_RESULTS_PAYPAL_IPN, $_GET['page'], "Displaying %d to %d (of %d IPN's)"); ?> display_links($ipn_query_numrows, MAX_DISPLAY_SEARCH_RESULTS_PAYPAL_IPN, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], (zen_not_null($selected_status) ? '&payment_status=' . $selected_status : '') . (zen_not_null($paypal_ipn_sort_order) ? '&paypal_ipn_sort_order=' . $paypal_ipn_sort_order : '')); ?>
' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo '