}
}
if ($ok) {
    //
    // check status
    //
    $order = $my_order;
    $delivered_status = 3;
    if ($order['orders_status'] == MODULE_PAYMENT_INPAY_COMP_ORDER_STATUS_ID || $order['orders_status'] == $delivered_status) {
        $ok = false;
        $result = 'Status already in level' . $order['orders_status'];
    }
}
if ($ok) {
    require_once 'inpay_functions.php';
    $invoice_status = get_invoice_status($HTTP_POST_VARS);
    $ok = false;
    if (($invoice_status == "pending" || $invoice_status == "created") && ($HTTP_POST_VARS["invoice_status"] == "pending" || $HTTP_POST_VARS["invoice_status"] == "created")) {
        $ok = true;
    } else {
        if ($invoice_status == "approved" && $HTTP_POST_VARS["invoice_status"] == "approved") {
            $ok = true;
        } else {
            if ($invoice_status == "sum_too_low" && $HTTP_POST_VARS["invoice_status"] == "sum_too_low") {
                $ok = true;
            }
        }
    }
    if (!$ok) {
        $result = "Bad invoice status:" . $invoice_status;
    }
示例#2
0
    }
}
if ($ok) {
    //
    // check status
    //
    $order = $my_order;
    $delivered_status = 3;
    if ($order['orders_status'] == MODULE_PAYMENT_INPAY_COMP_ORDER_STATUS_ID || $order['orders_status'] == $delivered_status) {
        $ok = false;
        $result = 'Status already in level' . $order['orders_status'];
    }
}
if ($ok) {
    require_once 'inpay_functions.php';
    $invoice_status = get_invoice_status($_POST);
    $ok = false;
    if (($invoice_status == "pending" || $invoice_status == "created") && ($_POST["invoice_status"] == "pending" || $_POST["invoice_status"] == "created")) {
        $ok = true;
    } else {
        if ($invoice_status == "approved" && $_POST["invoice_status"] == "approved") {
            $ok = true;
        } else {
            if ($invoice_status == "sum_too_low" && $_POST["invoice_status"] == "sum_too_low") {
                $ok = true;
            }
        }
    }
    if (!$ok) {
        $result = "Bad invoice status:" . $invoice_status;
    }