<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[PHP Forums - [Tutorial] How to Get email after user buys something from your paypal]]></title>
		<link>http://phpforums.org/topic9-tutorial-how-to-get-email-after-user-buys-something-from-your-paypal.html</link>
		<description><![CDATA[The most recent posts in [Tutorial] How to Get email after user buys something from your paypal.]]></description>
		<lastBuildDate>Sun, 04 Oct 2009 03:22:34 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[[Tutorial] How to Get email after user buys something from your paypal]]></title>
			<link>http://phpforums.org/post14.html#p14</link>
			<description><![CDATA[<p>Hello,</p><p>Here is a tutorial on how to find out instantly when someone makes a purchase from your paypal</p><p>in this tutorial there will be 2 files</p><p>-payment.php -Gets Info<br />-orderconfirmation.php -Processes Info<br />================================</p><p>payment.php:</p><div class="codebox"><pre><code>&lt;?php 
/*
Free Payment Proccessing Script
Script Designed by JayDesigns
JayDesigns@live.com
*/

?&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt; Order Page &lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
div {
background-color:#b0c4de;
margin-top:100px;
margin-bottom:100px;
margin-right:400px;
margin-left:400px;
border-style:solid;
border-color:#98bf21;

} 



&lt;/style&gt;

&lt;/head&gt;
&lt;body bgcolor=&quot;e5e4e4&quot;&gt;
&lt;center&gt;
&lt;div&gt;
&lt;h1&gt; Order Page &lt;/h1&gt;


&lt;?php
if(isset($_GET[&#039;submit&#039;])){

$email = $_GET[&#039;email&#039;];
$name = $_GET[&#039;name&#039;];

?&gt;
&lt;div&gt;
&lt;td width=&quot;33%&quot; style=&quot;border-style: none; border-width: medium;&quot;&gt;
                  
&lt;form action=&quot;https://www.paypal.com/cgi-bin/webscr&quot; method=&quot;post&quot;&gt;
&lt;input type=&quot;hidden&quot; value=&quot;_xclick&quot; name=&quot;cmd&quot;&gt;
&lt;input type=&quot;hidden&quot; value=&quot;JneroCorp12345@gmail.com&quot; name=&quot;business&quot;&gt;
&lt;input type=&quot;hidden&quot; value=&quot;Item Name&quot; name=&quot;item_name&quot;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
  &lt;p style=&quot;margin-top: 0pt; margin-bottom: 0pt;&quot;&gt;&lt;font size=&quot;3&quot;&gt;Select&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
  &lt;p style=&quot;margin-top: 0pt; margin-bottom: 0pt;&quot;&gt; &lt;/p&gt;
  &lt;p style=&quot;margin-top: 0pt; margin-bottom: 0pt;&quot;&gt;&lt;select name=&quot;amount&quot;&gt;
    &lt;option value=&quot;10.00&quot;&gt; $10.00
    &lt;/option&gt;&lt;option value=&quot;20.00&quot;&gt; $20.00
    &lt;/option&gt;&lt;option value=&quot;30.00&quot;&gt; $30.00
&lt;/option&gt;&lt;/select&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;input type=&quot;hidden&quot; value=&#039;./orderconfirmation.php?email=&lt;?php echo &quot;$email&quot;; ?&gt;&amp;name=&lt;?php echo &quot;$name&quot;; ?&gt;&#039; name=&quot;return&quot;&gt;
&lt;input type=&quot;hidden&quot; value=&quot;1&quot; name=&quot;no_note&quot;&gt;
&lt;input type=&quot;hidden&quot; value=&quot;USD&quot; name=&quot;currency_code&quot;/&gt;

&lt;input type=&quot;image&quot; height=&quot;47&quot; border=&quot;0&quot; width=&quot;122&quot; alt=&quot;&quot; name=&quot;submit&quot; src=&quot;http://www.call52.com/btn_buynowCC_LG.gif&quot;/&gt;
&lt;img height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; src=&quot;pixel.gif&quot; alt=&quot;&quot;/&gt;
&lt;/form&gt;

&lt;/td&gt;

&lt;/div&gt;



&lt;form action=&quot;&lt;?php echo $_SERVER[&#039;PHP_SELF&#039;]; ?&gt;&quot; method=&quot;get&quot;&gt;
Name: &lt;input type=&quot;text&quot; name=&quot;name&quot;&gt;&lt;br&gt;
Email: &lt;input type=&quot;text&quot; name=&quot;email&quot;&gt;&lt;br&gt;
&lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;submit&quot;&gt;
&lt;/form&gt;&lt;br&gt;&lt;br&gt;
&lt;font size=&quot;1&quot;&gt;Payment Script Developed by JayDesigns@live.com&lt;/font&gt;
&lt;/div&gt;
&lt;?php

}
?&gt;

&lt;/center&gt;
&lt;/body&gt;
&lt;/html&gt;
?&gt;

&lt;/center&gt;</code></pre></div><p>and this would be the code for the orderconfirmation.php</p><div class="codebox"><pre><code>&lt;?php
/*
Free Payment Proccessing Script
Script Designed by JayDesigns
JayDesigns@live.com
*/

$myemail = &quot;youremail@domain.com&quot;; //Your Email Address

if(isset($_GET[&#039;email&#039;])){

$name = $_GET[&#039;name&#039;];
$email = $_GET[&#039;email&#039;];

$to      = &quot;$myemail&quot;;
$subject = &#039;Paypal Purchase Made&#039;;
$message = &quot;A Paypal Purchase has been made bu $name , \r\n \r\n Here is the Information: \r\n Email: $email&quot;;
$headers = &quot;From: $myemail&quot; . &#039;\r\n&#039; . &quot;Reply-To: $myemail&quot; . &#039;\r\n&#039; . &quot;X-Mailer: PHP/&quot; . phpversion();

mail($to, $subject, $message, $headers);

} else {
?&gt;
&lt;font color=&quot;red&quot;&gt; Invalid Parameters &lt;/font&gt;

&lt;?php
}
?&gt;</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (jaydesigns)]]></author>
			<pubDate>Sun, 04 Oct 2009 03:22:34 +0000</pubDate>
			<guid>http://phpforums.org/post14.html#p14</guid>
		</item>
	</channel>
</rss>
