Beispiel #1
0
             *
             * The ONLY case where you should not respond to 
             * the request is when you failed to process the data. If you are 
             * unable to process the notification then either do not respond 
             * with anything or set the success parameter to FALSE in the call 
             * to notificationResponse();
             *
             * Trustly will continue to attempt to deliver this notification 
             * until you respond to it.
             * */
            $response = $api->notificationResponse($notification, TRUE);
            print $response->json();
        }
    }
}
/* Simple dispatcher to the correct function */
$path = $_SERVER['PATH_INFO'];
if ($path == '/orders') {
    orders();
} elseif ($path == '/clear_orders') {
    clear_orders();
} elseif ($path == '/notification') {
    notification();
} elseif ($path == '/deposit') {
    deposit();
} elseif ($path == '/extensions') {
    check_extensions();
} else {
    _http_response_code(404);
}
exit(0);
Beispiel #2
0
//echo "555";
$amt1 = $_GET['deposit'];
echo $amt1;
$_SESSION['deposit'] = $_GET['deposit'];
$amt = $_SESSION['deposit'];
echo $amt;
die;
$num = $_SESSION['num'];
$pin = $_SESSION['pin'];
$pin = md5($pin);
echo $num, $pin;
$result = mysqli_query($connection, "SELECT Balance FROM Transaction WHERE CardNo ='{$num}' AND PinNo= '{$pin}' ");
$count = mysqli_num_rows($result);
if (!empty($count)) {
    while ($info1 = mysqli_fetch_array($result)) {
        $value1 = $info1['Balance'];
    }
}
//echo $value1;
$amt = $_SESSION['deposit'];
function deposit($value1, $amt)
{
    $bal = $value1 + $amt;
    return $bal;
}
$bal = deposit($value1, $amt);
$data = "UPDATE Transaction SET Balance='{$bal}' WHERE CardNo ='{$num}' AND PinNo= '{$pin}' ";
if (mysqli_query($connection, $data)) {
    echo "";
    header('Location:insert.php');
}