예제 #1
0
if ($filteredG['token'] and $filteredG['PayerID'] and !$filtered['paypal-verify-txn']) {
	$txn->getByToken($filteredG['token']);
	$txn->payerId = $filteredG['PayerID'];
	$txn->save();
	$t->ppVerify = $txn;
	$for = new User();
	$t->forName = '';
	if ($txn->id) {
		$for->get($txn->forId);
		$t->forName = $for->getNameLink();
	}
}
else if ($filtered['token'] and $filtered['paypal-verify-txn']) {
	$txn->getByToken($filtered['token']);
	$pp = new Paypal();
	if ($pp->step4($txn)) {
		// good, can update the user.
		$u = new User();
		$u->get($txn->forId);
		$u->supporter += floor($txn->amount);
		$u->save();
		header('Location: support.php?e=4');
		exit;
	}
	else {
		$t->err = "There was an error processing the transaction, please contact an admin in the forum with the following transaction ID: $txn->id";
	}

}
else {
	$txn->time       = time();