Jump to content


Photo

Passing paypal amount to Joomla Poll Module


  • This topic is locked This topic is locked
3 replies to this topic

#1 joshuab86

joshuab86

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 06 September 2009 - 02:00 PM

Hi guys, I'm looking to let users vote in a fundrasing website by donating money through paypal. I'd like the amount that they donated in paypal to then be passed back to the joomla poll module boosting the specified poll item by the same amount of points as what they donated in dollars.

Anybody have an idea of how I could do this? I'm thinking if I just used the standard poll module, there is the ability of PayPal to add special code to send back upon completion... or it can forward you a specified page that would read the paid amount and update the poll?

Let me know if you have any ideas.

-Josh

#2 joshuab86

joshuab86

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 06 September 2009 - 02:02 PM

Ok, so in poll.php in the poll module, I see this code:

$query = 'UPDATE #__poll_data'
			. ' SET hits = hits + 1'
			. ' WHERE pollid = ' . (int) $poll_id
			. ' AND id = ' . (int) $option_id
			;

where
SET hits = hits + 1

I'd like to make it so that upon completion of a donation from paypal, it will advance the number of hits by whole numbers according to how much they donated.

and in
AND id = ' . (int) $option_id
			;
I'd like to hardcode which option it sets the votes to as each vote option will have it's own PayPal donate/vote button for each option.

Now, anyone familiar with paypal enough to see how this could be done?

-Josh

#3 nds_webdesign

nds_webdesign

    Junior Member

  • Members
  • 159 posts

Posted 05 March 2010 - 12:11 AM

You would want to set up IPN to do this. You would have to code a script to post data to the POLL module and have the POLL Module coded to accept that data validate it then increment the number of hits based on that POST from the IPN.

There is an IPN Script Generator at https://www.paypaltech.com/SG2/

That would be a good place to start.

Thanks,
Nate

www.ndswebdesign.com

#4 tifenni

tifenni

    Newbie

  • Members
  • Pip
  • 0 posts

Posted 16 August 2012 - 09:46 PM

To see a http://www.mmolive.com/ and http://www.mmohome.com/ world in a granda of stand.And a heaven in a wild flower.Hold infinity in the palm your hand and eternity in an hour.
To see a http://www.mmolive.com/ and http://www.mmohome.com/ world in a granda of stand.And a heaven in a wild flower.Hold infinity in the palm your hand and eternity in an hour.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users