YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

Passing paypal amount to Joomla Poll Module Options
joshuab86
#1 Posted : Sunday, September 06, 2009 7:00:30 PM
Rank: Starting Member

Groups: Registered

Joined: 9/6/2009
Posts: 2
Location: ,
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
Sponsor  
 
joshuab86
#2 Posted : Sunday, September 06, 2009 7:02:29 PM
Rank: Starting Member

Groups: Registered

Joined: 9/6/2009
Posts: 2
Location: ,
Ok, so in poll.php in the poll module, I see this code:

Code:

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


where
Code:
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
Code:
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
nds_webdesign
#3 Posted : Friday, March 05, 2010 5:11:07 AM
Rank: Junior Member

Groups: Registered

Joined: 10/15/2009
Posts: 159
Location: Omaha, NE USA
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,
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFVision Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF | YAF © 2003-2009, Yet Another Forum.NET
This page was generated in 0.226 seconds.