|
|
'', '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']) . '';
?>
';
?>
|
|
|
|
|
|
|
|
|
bindVars($ipn_search, ':selectedStatus:', $selected_status, 'string');
switch ($selected_status) {
case 'Pending':
case 'Completed':
default:
$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;
break;
}
} else {
$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 left join " .TABLE_ORDERS . " as o on o.orders_id = p.order_id" . $order_by;
}
$ipn_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS_PAYPAL_IPN, $ipn_query_raw, $ipn_query_numrows);
$ipn_trans = $db->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";
}
?>
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) . ''; } ?> |
MoveNext();
}
?>
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 : '')); ?> |
|
|
'' . 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";
$box = new box;
echo $box->infoBox($heading, $contents);
echo ' | ' . "\n";
}
?>
|
|