Paypal PHP IPN Integration System -


The site is here www.web-preventivi.it, and I want to integrate PayPal for payment when the user Need to subscribe to my website At this address, I have an IPN listener, and when the exact URL is received from PayPal, the script returns only the WALID, otherwise it returns INVALID.

I am using the IPN simulator to see if my code is working, and my code seems to not get the whole URL from the paypal, in fact I think that Attempted to get a code like this in my log file generated from my script: www.paypal.com/cgi-bin/webscr/cmd=_notify? -validate var1 = value1 & amp; Var2 2 = value & amp; Etc., but I only get in this log: www.paypal.com/cgi-bin/webscr/cmd=_notify-validate, why

I have a foreach loop that controls the post field, and Specifies each variable on the urlchecker, but I do not?

Is this my fault? Do I have to do something with PayPal, or just integrate some code?

PS: My problem only is that my script does not receive payment variables from PayPal, tested differently, but nothing

here is my code:

  & lt; Php class PayPal_IPN {public function __construct ($ mode = 'g') {// Cambia le Opzioni // if ($ mode == 'live') {$ this- & gt; _url = 'https://www.paypal.com/cgi-bin/webscr'; } And {$ this- & gt; _url = 'https://www.sandbox.paypal.com/cgi-bin/webscr'; }} Public function run () {$ postFields = "cmd = _notify-validate"; Foreign currency ($ _ POST $ as key = & gt; $ value) {$ postFields. = "& Amp; $ key =". Urlencode ($ value); } // Ritchima PayPal $ ch = curl_init (); Curl_setopt_array ($ ch, array (CURLOPT_URL => = this- & gt; _url, CURLOPT_RETURNTRANSFER = & gt; true, CURLOPT_SSL_VERIFYPEER = & gt; false, CURLOPT_POST = & gt; true, CURLOPT_POSTFIELDS = & gt; $ postFields )); $ Result = curl_xac ($ CH); Curl_close ($ ch); $ FH = FOPAN ('result.txt', 'w'); Filitt ($ FH, $ result. '-'. $ Postfiled); Fclose ($ fh); $ Return result; }}? & Gt;  

If you need to try the log file with the last try, then go to www.web-preventivi.it/ppprova/result.txt. Thanks, I appreciate any kind of help


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -