How to create a PayPal donation system that gives points

I am trying to create a way to configure the following options:

  • The user sends a donation to paypal with information from the donation site (name, email address).
  • Paypal receives a donation and uses 2 variables it received (name, email address), which sends them to the donation site.
  • The donation site receives the variables and donation amount and changes some variables on the website to show that the user donated a certain amount.

The site shows a list of users who donated and how much they donated, which shows how points. How can I do this with paypal and php and mysql.

+5
source share
4 answers

I would suggest exploring the use of PayPal Instant Notifications (IPN). PayPal IPN allows you to (asynchronously) process order information, independent of the customer, in order to return to your website in order to complete the order (which would be the case with PDT).

You can use IPN by setting up a script that receives data (POST) from PayPal. In addition, you must include the following code in your button and / or API call (s):

Website Payment Standard (where "xxxxxxxx" is the full URL of your IPN script):
<input type="hidden" name="notify_url" value="xxxxxxxx">

For express payment:
Include the NOTIFYURL=xxxxxxxxSetExpressCheckout and DoExpressCheckoutPayment API in your call

For Pay Pro web payments Include NOTIFYURL=xxxxxxxxDoDirectPayment API in your call

POST PayPal .
https://www.paypal.com/cgi-bin/webscr?cmd=_notify-validate (Live) https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_notify-validate () . PayPal VERIFIED ( ), , IPN, PayPal.

, IPN PayPal https://www.paypal.com/ipn

. IPN https://www.x.com/developers/community/blogs/ppmtsrobertg/securing-your-instant-payment-notification-ipn-script

+6

- paypal payments pro. , pro-. PayPal - .

, , .

, , - API PayPal , PHP API ...

https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/howto_api_overview

PHP/MySQL. , API PayPal.

, , , . . -, , "", , . -, .

- , , , , , .

-1

PayPal,

PayPal PDT

Then, on the page that receives payment data from PayPal, calculate the number of points for which a person receives money, from how much money they donated (using any multiplier or point scheme that you accept), then register the data in the points field in user line of your user table in mysql.

-1
source

All Articles