<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Paypal IPN: receiving instant payments in your web application.</title>
	<atom:link href="http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/feed/" rel="self" type="application/rss+xml" />
	<link>http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/</link>
	<description>Photoshop Tutorials</description>
	<lastBuildDate>Tue, 03 Aug 2010 05:18:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Heshan Peiris</title>
		<link>http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/comment-page-2/#comment-23042</link>
		<dc:creator>Heshan Peiris</dc:creator>
		<pubDate>Wed, 14 Jul 2010 06:26:11 +0000</pubDate>
		<guid isPermaLink="false">http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/#comment-23042</guid>
		<description>Thanks for sharing valuable information.</description>
		<content:encoded><![CDATA[<p>Thanks for sharing valuable information.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/comment-page-2/#comment-19771</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Mon, 26 Apr 2010 22:04:20 +0000</pubDate>
		<guid isPermaLink="false">http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/#comment-19771</guid>
		<description>Thanks Stan. Seems like a big problem. Post again if you have any more news. I believe urlencoding helps as well?

Mike</description>
		<content:encoded><![CDATA[<p>Thanks Stan. Seems like a big problem. Post again if you have any more news. I believe urlencoding helps as well?</p>
<p>Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stan</title>
		<link>http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/comment-page-2/#comment-19761</link>
		<dc:creator>Stan</dc:creator>
		<pubDate>Mon, 26 Apr 2010 13:03:10 +0000</pubDate>
		<guid isPermaLink="false">http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/#comment-19761</guid>
		<description>Hi, if anyone is facing response 500 internal server error from paypal on live service it may not be your problem, Paypal confirmed an issue with IPN on their side. check this out http://www.lampwebdevelopers.com/152/web-developement/bugs-issues/paypal-express-checkout-ipn-notification-bug/</description>
		<content:encoded><![CDATA[<p>Hi, if anyone is facing response 500 internal server error from paypal on live service it may not be your problem, Paypal confirmed an issue with IPN on their side. check this out <a href="http://www.lampwebdevelopers.com/152/web-developement/bugs-issues/paypal-express-checkout-ipn-notification-bug/" rel="nofollow">http://www.lampwebdevelopers.com/152/web-developement/bugs-issues/paypal-express-checkout-ipn-notification-bug/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Latest Gadget</title>
		<link>http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/comment-page-2/#comment-19760</link>
		<dc:creator>Latest Gadget</dc:creator>
		<pubDate>Mon, 26 Apr 2010 12:06:55 +0000</pubDate>
		<guid isPermaLink="false">http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/#comment-19760</guid>
		<description>I checked this IPN Code and that works fine
Just a question I received IPN and log them and got two values 

One for current paid and other is for subscription or what any idea ?</description>
		<content:encoded><![CDATA[<p>I checked this IPN Code and that works fine<br />
Just a question I received IPN and log them and got two values </p>
<p>One for current paid and other is for subscription or what any idea ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: almondj</title>
		<link>http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/comment-page-2/#comment-19661</link>
		<dc:creator>almondj</dc:creator>
		<pubDate>Thu, 22 Apr 2010 17:07:35 +0000</pubDate>
		<guid isPermaLink="false">http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/#comment-19661</guid>
		<description>This code has worked for me, it&#039;s simple. Not as complex as the above, but it works. Modify it where necessary! Hope this helps. It&#039;s a basic skeleton, from here you can add more variables and commands.

 $value) {
$value = urlencode(stripslashes($value));
$req .= &quot;&amp;$key=$value&quot;;
}

// post back to PayPal system to validate
$header .= &quot;POST /cgi-bin/webscr HTTP/1.0\r\n&quot;;
$header .= &quot;Content-Type: application/x-www-form-urlencoded\r\n&quot;;
$header .= &quot;Content-Length: &quot; . strlen($req) . &quot;\r\n\r\n&quot;;

// comment out one of the following lines

//$fp = fsockopen (&#039;www.sandbox.paypal.com&#039;, 80, $errno, $errstr, 30);
$fp = fsockopen (&#039;www.paypal.com&#039;, 80, $errno, $errstr, 30);

// or use port 443 for an SSL connection
//$fp = fsockopen (&#039;ssl://www.paypal.com&#039;, 443, $errno, $errstr, 30);


// assign posted variables to local variables
$item_name = $_POST[&#039;item_name&#039;];
$item_number = $_POST[&#039;item_number&#039;];
$payment_status = $_POST[&#039;payment_status&#039;];
$payment_amount = $_POST[&#039;mc_gross&#039;];
$payment_currency = $_POST[&#039;mc_currency&#039;];
$txn_id = $_POST[&#039;txn_id&#039;];
$receiver_email = $_POST[&#039;receiver_email&#039;];
$payer_email = $_POST[&#039;payer_email&#039;];

if (!$fp) {
// HTTP ERROR
} else {
fputs ($fp, $header . $req);
while (!feof($fp)) {
$res = fgets ($fp, 1024);
if (strcmp ($res, &quot;VERIFIED&quot;) == 0) {
// check the payment_status is Completed
// check that txn_id has not been previously processed
// check that receiver_email is your Primary PayPal email
// check that payment_amount/payment_currency are correct
// process payment
//DATABASE STUFF and cool stuff because the payment was a success!
mail(&#039;MYEMAIL&#039;,&#039;somesort&#039;,&#039;ofsuccess&#039;);
}
else if (strcmp ($res, &quot;INVALID&quot;) == 0) {
// log for manual investigation
// PayPal and this page have had a mis-communication
mail(&#039;MYEMAIL&#039;,&#039;complete&#039;,&#039;failure&#039;);
}
}
fclose ($fp);
}
?&gt;</description>
		<content:encoded><![CDATA[<p>This code has worked for me, it&#8217;s simple. Not as complex as the above, but it works. Modify it where necessary! Hope this helps. It&#8217;s a basic skeleton, from here you can add more variables and commands.</p>
<p> $value) {<br />
$value = urlencode(stripslashes($value));<br />
$req .= &#8220;&amp;$key=$value&#8221;;<br />
}</p>
<p>// post back to PayPal system to validate<br />
$header .= &#8220;POST /cgi-bin/webscr HTTP/1.0\r\n&#8221;;<br />
$header .= &#8220;Content-Type: application/x-www-form-urlencoded\r\n&#8221;;<br />
$header .= &#8220;Content-Length: &#8221; . strlen($req) . &#8220;\r\n\r\n&#8221;;</p>
<p>// comment out one of the following lines</p>
<p>//$fp = fsockopen (&#8216;www.sandbox.paypal.com&#8217;, 80, $errno, $errstr, 30);<br />
$fp = fsockopen (&#8216;www.paypal.com&#8217;, 80, $errno, $errstr, 30);</p>
<p>// or use port 443 for an SSL connection<br />
//$fp = fsockopen (&#8217;ssl://www.paypal.com&#8217;, 443, $errno, $errstr, 30);</p>
<p>// assign posted variables to local variables<br />
$item_name = $_POST['item_name'];<br />
$item_number = $_POST['item_number'];<br />
$payment_status = $_POST['payment_status'];<br />
$payment_amount = $_POST['mc_gross'];<br />
$payment_currency = $_POST['mc_currency'];<br />
$txn_id = $_POST['txn_id'];<br />
$receiver_email = $_POST['receiver_email'];<br />
$payer_email = $_POST['payer_email'];</p>
<p>if (!$fp) {<br />
// HTTP ERROR<br />
} else {<br />
fputs ($fp, $header . $req);<br />
while (!feof($fp)) {<br />
$res = fgets ($fp, 1024);<br />
if (strcmp ($res, &#8220;VERIFIED&#8221;) == 0) {<br />
// check the payment_status is Completed<br />
// check that txn_id has not been previously processed<br />
// check that receiver_email is your Primary PayPal email<br />
// check that payment_amount/payment_currency are correct<br />
// process payment<br />
//DATABASE STUFF and cool stuff because the payment was a success!<br />
mail(&#8216;MYEMAIL&#8217;,&#8217;somesort&#8217;,'ofsuccess&#8217;);<br />
}<br />
else if (strcmp ($res, &#8220;INVALID&#8221;) == 0) {<br />
// log for manual investigation<br />
// PayPal and this page have had a mis-communication<br />
mail(&#8216;MYEMAIL&#8217;,'complete&#8217;,'failure&#8217;);<br />
}<br />
}<br />
fclose ($fp);<br />
}<br />
?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: svarga</title>
		<link>http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/comment-page-2/#comment-18252</link>
		<dc:creator>svarga</dc:creator>
		<pubDate>Wed, 03 Mar 2010 11:31:51 +0000</pubDate>
		<guid isPermaLink="false">http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/#comment-18252</guid>
		<description>Ok, I correct this code, mea culpa. Every thing is ok, &quot;completed status received from paypal&quot; thank you, my friend. But nothing to change in the database. And no error messages, like &quot;unable connect to the database&quot;. Maybe I miss some {} or something like this? Or replaced mysql querry in the wrong place?</description>
		<content:encoded><![CDATA[<p>Ok, I correct this code, mea culpa. Every thing is ok, &#8220;completed status received from paypal&#8221; thank you, my friend. But nothing to change in the database. And no error messages, like &#8220;unable connect to the database&#8221;. Maybe I miss some {} or something like this? Or replaced mysql querry in the wrong place?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: svarga</title>
		<link>http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/comment-page-2/#comment-18250</link>
		<dc:creator>svarga</dc:creator>
		<pubDate>Wed, 03 Mar 2010 08:56:26 +0000</pubDate>
		<guid isPermaLink="false">http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/#comment-18250</guid>
		<description>&quot;We have had an INVALID response&quot;. 

Is it possible I wrote uncorrect Mysql querry?</description>
		<content:encoded><![CDATA[<p>&#8220;We have had an INVALID response&#8221;. </p>
<p>Is it possible I wrote uncorrect Mysql querry?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/comment-page-2/#comment-17897</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Wed, 17 Feb 2010 23:59:46 +0000</pubDate>
		<guid isPermaLink="false">http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/#comment-17897</guid>
		<description>Have you enabled IPN in your Paypal account?</description>
		<content:encoded><![CDATA[<p>Have you enabled IPN in your Paypal account?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rijo</title>
		<link>http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/comment-page-2/#comment-17836</link>
		<dc:creator>Rijo</dc:creator>
		<pubDate>Mon, 15 Feb 2010 10:29:17 +0000</pubDate>
		<guid isPermaLink="false">http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/#comment-17836</guid>
		<description>sir,
 i used your code but it is not working.. after making the payment paypal is not sending back the data.. please help me...</description>
		<content:encoded><![CDATA[<p>sir,<br />
 i used your code but it is not working.. after making the payment paypal is not sending back the data.. please help me&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/comment-page-2/#comment-17722</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 11 Feb 2010 22:34:44 +0000</pubDate>
		<guid isPermaLink="false">http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/#comment-17722</guid>
		<description>Sorry Ross I can&#039;t think of anything.</description>
		<content:encoded><![CDATA[<p>Sorry Ross I can&#8217;t think of anything.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
