zen_redirect(zen_href_link(FILENAME_SUPER_PAYMENTS, 'oID=' . $so->oID . '&payment_mode=' . $payment_mode . '&index=' . $new_index . '&action=confirm', 'NONSSL')); break; case 'purchase_order': $new_index = $so->add_purchase_order($_GET['po_number']); if ($update_status) { update_status($oID, AUTO_STATUS_PO, $notify_customer, sprintf(AUTO_COMMENTS_PO, $_GET['po_number'])); } // notify the customer if ($notify_customer) { $_POST['notify_comments'] = 'on'; email_latest_status($oID); } zen_redirect(zen_href_link(FILENAME_SUPER_PAYMENTS, 'oID=' . $so->oID . '&payment_mode=' . $payment_mode . '&index=' . $new_index . '&action=confirm', 'NONSSL')); break; case 'refund': $new_index = $so->add_refund($_GET['payment_id'], $_GET['refund_number'], $_GET['refund_name'], $_GET['refund_amount'], $_GET['refund_type']); if ($update_status) { update_status($oID, AUTO_STATUS_REFUND, $notify_customer, sprintf(AUTO_COMMENTS_REFUND, $_GET['refund_number'])); } // notify the customer if ($notify_customer) { $_POST['notify_comments'] = 'on'; email_latest_status($oID); } zen_redirect(zen_href_link(FILENAME_SUPER_PAYMENTS, 'oID=' . $so->oID . '&payment_mode=' . $payment_mode . '&index=' . $new_index . '&action=confirm', 'NONSSL')); break; } // END switch ($payment_mode) break; // END case 'add' // update an existing payment entry