Johurt
Умник
PHP:
<?php
require_once('mokejimai_webtopay.php');
include "config.php";
try
{
$response = WebToPay::checkResponse($_GET, array(
'projectid' => *****,
'sign_password' => ''.$passwordas.'',
));
$kns = ($_GET['wp_amount']);
$ex1 = ($_GET['wp_sms']);
$ex = explode(' ', $ex1);
if(empty($ex[1]))
{
echo $ok."Jus neivedete ID!";
exit();
}
echo "OK Nusipirkote 6 kreditus Dogberry.lt projekte.";
mysql_query('UPDATE players SET Balansas=Balansas+6 WHERE ID=\''.$ex[1].'\' LIMIT 1');
$file = 'logai.txt';
$current = file_get_contents($file);
$current = "Nupirko 6 kreditus id: ".$ex[1]."";
file_put_contents($file, $current);
}
catch (Exception $e) {
echo get_class($e).': '.$e->getMessage();
}
?>
