dnenb Posted February 24, 2013 Share Posted February 24, 2013 Hey guys, Does anyone have a simple solution for taking paypal-donations from multiple MCCODE games? Paypal only lets me set one IPN url. Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted February 24, 2013 Share Posted February 24, 2013 Yes you can have only one automatic IPN url, however if you disable it, you can pass the IPN via an hidden field: <input type='hidden' name='notify_url' value='http://yoursite.com/paypal_ipn.php'> 1 Quote Link to comment Share on other sites More sharing options...
dnenb Posted February 24, 2013 Author Share Posted February 24, 2013 (edited) Yes you can have only one automatic IPN url, however if you disable it, you can pass the IPN via an hidden field: <input type='hidden' name='notify_url' value='http://yoursite.com/paypal_ipn.php'> Wow, I had no clue. Is there any reason why I wouldn't want to do that? I mean why isn't this what we're told to do in the install instructions? Edit, just FYI: "You must spread some Reputation around before giving it to a_bertrand again." Edited February 24, 2013 by dnenb bertrand<3 Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted February 24, 2013 Share Posted February 24, 2013 There is no real reason to not use it, if your IPN checks back to paypal if the transaction is valid. Therefore if you implement your check correctly, you don't risk anything. On the other side, if you simply take any calls to your IPN as valid, then anybody could make a transaction without paying anything. But I'm sure you are not doing it, right? Quote Link to comment Share on other sites More sharing options...
dnenb Posted February 24, 2013 Author Share Posted February 24, 2013 There is no real reason to not use it, if your IPN checks back to paypal if the transaction is valid. Therefore if you implement your check correctly, you don't risk anything. On the other side, if you simply take any calls to your IPN as valid, then anybody could make a transaction without paying anything. But I'm sure you are not doing it, right? I'm using mccode v2 and I haven't changed anything in the ipn files. You tell me? Looks like is checks (from ipn_donator.php): // post back to PayPal system to validate $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: " . strlen($req) . "\r\n\r\n"; $fp = fsockopen('www.paypal.com', 80, $errno, $errstr, 30); Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted February 25, 2013 Share Posted February 25, 2013 Well clearly it doesn't work anymore as, if I remember right paypal works only in HTTPS yet, and... you can't do that with fsockopen. Sorry to say, but McCodes is not a good bases. To make it work I would use the curl lib. Quote Link to comment Share on other sites More sharing options...
dnenb Posted February 25, 2013 Author Share Posted February 25, 2013 Well clearly it doesn't work anymore as, if I remember right paypal works only in HTTPS yet, and... you can't do that with fsockopen. Sorry to say, but McCodes is not a good bases. To make it work I would use the curl lib. Alright, thanks man. I'm gonna rewrite the donations system and figure it out. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.