Search code examples
listpaypaldonations

How I can show PayPal donators list?


I added a PayPal Donate button on my site, with that code

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">

<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="item_name" value="Donation">
<input type="hidden" name="item_number" value="Donation"> 
<select name="amount"><option value="2.00">$2.00</option><option value="5.00">$5.00</option><option value="10.00">$10.00</option></select>
<input type="hidden" name="currency_code" value="EUR">
<input type="image" name="submit" border="0" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" alt="PayPal - The safer, easier way to pay online">
</form>

I want add and show Donators names or emails with the $$ amount on list on my website after then when someone pays. How can i do this?


Solution

  • I would set something like up using PayPal Instant Payment Notification (IPN).

    It will automatically POST data about transactions to a listener script you have on your server. That script can receive the data and load it into a database table called "donors" or whatever you want to call it.

    Then on your site you can simply pull the data from the donors table and display it accordingly.

    Since you're using WordPress I'd recommend taking a look at this PayPal IPN for WordPress plugin. It's free and it will get you up and running with IPN very quickly. It logs all of the IPN data in WordPress and allows you to easily extend the plugin using a number of hooks to trigger events based on different IPN types or payment status.