0

I am building a web site for an organisation. The organisation can create as many programs as they want. Each program should have a paypal donate button. when creating a program, a paypal donate button can be inserted automatically (something like {donate_button: label } ).

i want to keep track of each program donation fees.

So i need somehow to know what program a donor donate to so then i can make a report about fee for each program.

Am not so sure how to get this done properly. is it possible to add some parameters in the donate paypal button dynamically ? if posible , is there any problem regarding to security ?

Can paypal donate button be created dynamically ?

I am very appreciated for all of you .

Thanks

Am sorry for my bad English.

channa ly
  • 9,479
  • 14
  • 53
  • 86

1 Answers1

0

I'd suggest looking at Instant Payment Notification (IPN) and 'custom' to pass the name of the organisation on to PayPal.
Simply include the following in your existing button code

<input type="hidden" name="notify_url" value="link to IPN script">
<input type="hidden" name="custom" value="name of organisation / other unique identifier">

and read the IPN POST for the 'custom' parameter when it comes through.

There's additional documentation and some sample code at https://www.paypal.com/ipn

Robert
  • 19,326
  • 3
  • 58
  • 59