-
Notifications
You must be signed in to change notification settings - Fork 1
/
paypal.php
24 lines (20 loc) · 833 Bytes
/
paypal.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
if(isset($_GET["cancel"])) {
?>
<h1>Upgrade canceled</h1>
<p>You canceled the payment.</p>
<?php
}
else {
log_event("User paid for the services");
$q = "UPDATE users SET user_flags = user_flags | ". USER_FLAG_PREMIUM ." WHERE id='". $m->escape_string($_SESSION["u"]->id) ."'";
if(@$m->query($q) === FALSE)
log_event("Failed to reflect payment in users-table: $m->error\nSQL: $q");
$_SESSION["u"]->user_flags |= USER_FLAG_PREMIUM;
?>
<h1>Your account has been upgraded</h1>
<p>Thank you for your payment. Your transaction has been completed, and a receipt for your purchase has been emailed to you. You may log into your account at <a href="https://www.paypal.com/row" target="_blank">www.paypal.com/row</a> to view details of this transaction.</p>
<?php
}
?>
<p><a href="/">Continue to the frontpage</a></p>