EOSERV Forum > Lounge > Donations
Topic is locked.
Page: << 1 >>
Donations
Author Message
Post #186094 Donations

Hello everyone, I was wondering how would I go about adding donation rewards? like lets say someone donated 1$ to my paypal towards the server, how would I make it that they receive 1 item in game. such as..

1$ = 1 Donation Token

5$ = 5 Donation Token

etc.

---
Click 4 cookies: http://tinyurl.com/sneezing4lyfe
12 years, 7 weeks ago
Post #186095 Re: Donations

Well, you could just give it to them in-game when you get an email from paypal saying how much they donated. You could also do some web coding and get so it's automatically place it in their accounts after they donate, but it's hardly necessary considering people probably won't donate often enough for an automatic system to be useful: Also, a glitch in that system giving someone a massive amount of tokens could singlehandedly destroy the in-game economy. Things to consider.

---
Want to learn to pixel?
Pixelsource.org
12 years, 7 weeks ago
Post #186096 Re: Donations


Probably the best way to do this is to allow a login to WebCP. A PayPal shop will probably work best here as it gives you the ability to direct to a "success" page if the donation completes. Hardly the thing to explain here, but since PayPal covers it on there site I don't see what the need to repeat their words here. So like this:

Login WebCP, go to "donate" or w.e. you name it, complete the donate transaction handled by PayPal, PayPal redirects to a success page where the donation reward can be received.

That is the gist. I am too damn lazy to do it for you.

12 years, 7 weeks ago
Post #186097 Re: Donations

^What Apollo said, and the success page then adds the amount + Donation tokens in database column.
Used to do this on RSPS all the time, I earned shit loads of money.

12 years, 7 weeks ago
Post #186098 Re: Donations

$5 for membership monthly plus tokens on sign up. 

12 years, 7 weeks ago
Post #186100 Re: Donations

Create a dropdown option using html first.

<select id="quantity" name="quantity">

<option value="1">1$ = 1 Donation Token</option>

<option value="5">5$ = 5 Donation Token</option>

</select>


Then connect your mysql using php.

This is config.php

<?php

$con=mysqli_connect("db_ip,"db_user","db_pass","db_name");

// Check connection

if (mysqli_connect_errno())

 {

 echo "Failed to connect to MySQL: " . mysqli_connect_error();

 }

?>


Then add another code where after you input a value the data will store.

<?php

include("include.php");

$sql="INSERT INTO character (inventory)

VALUES

('$_POST[quantity]')";

if (!mysqli_query($con,$sql))

 {

 die('Error: ' . mysqli_error());

 }


mysqli_close($con);

?>


Not sure if this would work since you have to declare the id of the item that will transfer into the inventory right after you donated, it's just the quantity, well you could always try.

---
56616C68616C6C612053746F7279
12 years, 7 weeks ago
Page: << 1 >>
Topic is locked.
EOSERV Forum > Lounge > Donations