示例#1
0
    $sisow->purchaseId = $_POST["purchaseid"];
    $sisow->description = $_POST["description"];
    $sisow->amount = $_POST["amount"];
    $sisow->payment = $_POST["payment"];
    $sisow->issuerId = $_POST["issuerid"];
    $sisow->returnUrl = "http://" . $_SERVER["HTTP_HOST"] . $_SERVER["PHP_SELF"];
    $sisow->notifyUrl = $sisow->returnUrl;
    if (($ex = $sisow->TransactionRequest()) < 0) {
        header("Location: payment.php?ex=" . $ex . "&ec=" . $sisow->errorCode . "&em=" . $sisow->errorMessage);
        exit;
    }
    header("Location: " . $sisow->issuerUrl);
} else {
    if (isset($_GET["trxid"])) {
        if (isset($_GET['notify']) || isset($_GET['callback'])) {
            $sisow->StatusRequest($_GET["trxid"]);
            if ($sisow->status == "Success") {
                //verwerk order in database
            }
        } else {
            //stuur klant naar de juiste pagina
            if ($_GET['status'] == "Success") {
                $url = "succesurl";
            } else {
                $url = "cancelurl";
            }
            header("Location: " . $url);
        }
        exit;
    } else {
        // there are 2 methods for filling the available issuers in the select/dropdown