• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Your website! (Modern AAC only)

Status
Not open for further replies.
I found a power supply. :3
 
Last edited:
this script already exist i have that:
config.php
PHP:
<?

//mysql conf
$mysql_host = 'localhost'; //Leave at localhost
$mysql_user = 'root'; //DB User
$mysql_pass = 'password_here'; //DB Pass
$mysql_db = 'table_here'; //DB Name

//payment configuration
$points_add = '15'; //points add for payment
$my_email = '[email protected]'; // your paypal email
$my_amount = '5.0'; // amount of payment
$my_currency = 'EUR'; // payment currency (can be EUR, USD etc...)


//pointsperbuck function (1 buck = 1 euro or 1 dollar etc...)
$pointsperbuck = 0; //enable/disable pointsperbuck function, this function disables $points_add and $my_amount
$pointsperbuck_add = 2 // how much points will player receive each buck
?>

paypal.php
PHP:
<?

include('config.php');


//save post variables to local variables
$custom = stripslashes(ucwords(strtolower(trim($_REQUEST['custom']))));
$receiver_email = $_REQUEST['receiver_email'];
$payment_status = $_REQUEST['payment_status'];
$item_name = $_REQUEST['item_name'];
$item_number = $_REQUEST['item_number'];
$payment_amount = $_REQUEST['mc_gross'];
$payment_currency = $_REQUEST['mc_currency'];
$txn_id = $_REQUEST['txn_id'];
$payer_email = $_REQUEST['payer_email'];


// connect db

$db = mysql_connect($mysql_host, $mysql_user, $mysql_pass);
mysql_select_db($mysql_db, $db);


//read the actual number of points
$query = "SELECT premium_points FROM accounts WHERE accounts.name = '$custom'";


//add points to variable
$result = mysql_query($query);
$prem = mysql_fetch_array($result);

if ($pointsperbuck == 1) 
    $points = $prem['premium_points'] + (floor($payment_amount) * $pointsperbuck_add); 
else 
$points = $prem['premium_points'] + $points_add; 


// read the post from PayPal system and add 'cmd'
$req = 'cmd=_notify-validate';

foreach ($_POST as $key => $value) {
$value = urlencode(stripslashes($value));
$req .= "&$key=$value";
}

// post back to PayPal system to validate
$header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";
$fp = fsockopen ('ssl://www.paypal.com', 443, $errno, $errstr, 30);

if (!$fp) {
// HTTP ERROR
} else {
fputs ($fp, $header . $req);
while (!feof($fp)) {
$res = fgets ($fp, 1024);
if (strcmp ($res, "VERIFIED") == 0) {
  if ($pointsperbuck == 0) {
	if ($payment_status == "Completed" & $receiver_email == $my_email & $my_currency == $payment_currency & $my_amount == $payment_amount)
		{
		$qry2 = "UPDATE accounts SET premium_points = '$points' WHERE accounts.name = '$custom'";
	        $result2 = mysql_query($qry2);
		$save_payment = "INSERT INTO payments(account_name, payment_status, payment_amount, payment_currency, txn_id, receiver_email, payer_email) VALUES('$custom', '$payment_status', '$payment_amount', '$payment_currency', '$txn_id', '$receiver_email', '$payer_email')";
		$save_qry = mysql_query($save_payment);
		}
	else	{
	       $save_uncompleted = "INSERT INTO wrong_payments(account_name, payment_status, payment_amount, payment_currency, txn_id, receiver_email, payer_email) VALUES('$custom', '$payment_status', '$payment_amount', '$payment_currency', '$txn_id', '$receiver_email', '$payer_email')";
	       $save_unquery = mysql_query($save_uncompleted);
		}
		}
  else if ($pointsperbuck == 1) {
	if ($payment_status == "Completed" & $receiver_email == $my_email & $my_currency == $payment_currency)
		{
		$qry2 = "UPDATE accounts SET premium_points = '$points' WHERE accounts.name = '$custom'";
		$result2 = mysql_query($qry2);
		$save_payment = "INSERT INTO payments(account_name, payment_status, payment_amount, payment_currency, txn_id, receiver_email, payer_email) VALUES('$custom', '$payment_status', '$payment_amount', '$payment_currency', '$txn_id', '$receiver_email', '$payer_email')";
		$save_qry = mysql_query($save_payment);
		}
	else	{
		$save_uncompleted = "INSERT INTO wrong_payments(account_name, payment_status, payment_amount, payment_currency, txn_id, receiver_email, payer_email, invalid) VALUES('$custom', '$payment_status', '$payment_amount', '$payment_currency', '$txn_id', '$receiver_email', '$payer_email', 0)";
 	        $save_unquery = mysql_query($save_uncompleted);
		}
	}
		
}
else if (strcmp ($res, "INVALID") == 0) {
$inv_save = "INSERT INTO wrong_payments(account_name, payment_status, payment_amount, payment_currency, txn_id, receiver_email, payer_email, invalid) VALUES('$custom', '$payment_status', '$payment_amount', '$payment_currency', '$txn_id', '$receiver_email', '$payer_email', 1)";
$inv_query = mysql_query($inv_save);
echo("Invalid.");
}
}
fclose ($fp);
}
?>

buypoints.htm
PHP:
<b>Welcome in Paypal payment system.<br><br>
The donation costs 5 Euros (incl. VAT) <br>
After donation, 15 premium points will be added to your account by a automatic script. <br><br>

Here are the steps you need to make: <br>
1. You need Paypal account with a required balance (5 Euros)  or with a credit card. <br>
2. If you have, you need to write your account name bellow. <br>
3. After it, simply click on the donate button. <br>
4. Make a transaction on paypal. <br>
5. After transaction 15 premium points will be automatically added to your account. <br>
6. Enjoy items from our shop. :) <br> <br> <br> </b>



<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_donations">

<! Your Paypal Email>
<input type="hidden" name="business" value="[email protected]">

<input type="hidden" name="lc" value="GB">

<!Your server name>
<input type="hidden" name="item_name" value="Your server name">
<b>Account number/name:</b> <input type="text"  name="custom" value="" >
<input type="hidden" name="item_number" value="1">

<! Total cost of donation, add <! on the start of the line if you're using PointsPerBuck function>
<input type="hidden" name="amount" value="5.0">

<! Payment currency>
<input type="hidden" name="currency_code" value="EUR">

<input type="hidden" name="no_note" value="0">
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="currency_code" value="EUR">

<! Your URL with ipn script>
<input type="hidden" name="notify_url" value="http://tibia.darksun.sk/paypal/paypal.php">
<! Return URL>
<input type="hidden" name="return" value="http://tibia.darksun.sk">



<input type="hidden" name="rm" value="1">
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG_global.gif:NonHosted">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>


credits to gun'z i think

configure all and the variables :)

where i have to put this scripts ? into system/pages ? and i have to creat config.php there ?
 
'Buy Points'/'Shop Offer'.

'Powergamer'/'Worstgamer'

'Guild Wars'

'Houses with little screenshot, like global'

'Auction System by vdk'

If interesting, you can do too the PagSeguro payment. Its brazilian way.
 
'Buy Points'/'Shop Offer'.

'Powergamer'/'Worstgamer'

'Guild Wars'

'Houses with little screenshot, like global'

'Auction System by vdk'

If interesting, you can do too the PagSeguro payment. Its brazilian way.

Signed =)
 
  • 'Buy Points'/'Shop Offer'.
    Have, just use search.php

  • 'Powergamer'/'Worstgamer'
    Have, use search.php

  • 'Guild Wars'
    Have, just buy

  • 'Houses with little screenshot, like global'
    Dont have.

  • 'Auction System by vdk'
    Have, just use search.php


    If interesting, you can do too the PagSeguro payment. Its brazilian way.
 
Status
Not open for further replies.
Back
Top