}
    JB_complete_subscription_invoice($_REQUEST['invoice_id'], '');
    JB_debit_transaction($_REQUEST['invoice_id'], $invoice_row['amount'], $invoice_row['currency_code'], $txn_prefix . "S" . $invoice_row['invoice_id'], '', 'Admin', 'S');
    $JBMarkup->ok_msg('Order completed, user subscription activated!');
}
if ($_REQUEST['action'] == 'confirm') {
    echo "confirmed: " . $_REQUEST['invoice_id'];
    JB_confirm_subscription_invoice($_REQUEST['invoice_id']);
    $JBMarkup->ok_msg('Order Confirmed');
}
if ($_REQUEST['action'] == 'cancel') {
    JB_cancel_subscription_invoice($_REQUEST['invoice_id']);
    $JBMarkup->ok_msg('Order Cancelled');
}
if ($_REQUEST['action'] == 'void') {
    JB_void_subscription_invoice($_REQUEST['invoice_id']);
    $JBMarkup->ok_msg('Order set to void');
}
if ($_REQUEST['clean_up'] != '') {
    $sql = "DELETE FROM subscription_invoices WHERE status='Void' ";
    JB_mysql_query($sql) or die(mysql_error());
    $JBMarkup->ok_msg('Deleted all void orders');
}
$local_time = strtotime(gmdate("Y-m-d H:i:s"));
preg_match("#(\\d+)-(\\d+)-(\\d+)#", gmdate("Y-m-d H:i:s"), $local_m);
$prev_time = $local_time - 60 * 60 * 24 * 30;
// minus 30 days
if ($_REQUEST['from_day'] == '') {
    $_REQUEST['from_day'] = date('d', $prev_time);
}
if ($_REQUEST['from_month'] == '') {
Beispiel #2
0
 function void_subscription_invoice($invoice_id, $employer_id)
 {
     $invoice_id = (int) $invoice_id;
     $employer_id = (int) $employer_id;
     return JB_void_subscription_invoice($invoice_id, $employer_id);
 }