Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP verify PayPal Donation

Tags:

php

verify

paypal

How can I verify a paypal donation?

In the user panel I have a donate button. And once someone actually donates I want to do something to him. But I do not know how to check if the user actually donated or just clicked the donate button.

like image 392
DanSpd Avatar asked Jan 02 '10 18:01

DanSpd


1 Answers

Look in to Paypal's IPN (Instant Payment Notification)

When someone makes a payment or donation to your Paypal account, Paypal will send a post message to your web server with all the payment details. You can then send a message back to Paypal to make sure that the payment was real...

There are even some code examples on paypal's website. Including one for PHP.

Note you have to enable IPN and define the call back URL in your paypal account before you can start using IPN.

like image 79
Steven Smethurst Avatar answered Oct 13 '22 00:10

Steven Smethurst