Re: IPN error
| From: | Stephen Lake | Date: | Sat, 29 Apr 2006 19:13:28 +0000 |
| Subject: | Re: IPN error | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-235107@lists.php.net to get a copy of this message | ||
One more thing, make sure you validate ALL data that is being sent from
paypal to ensure what you need and expect are there....also validate the
transaction ID to ensure it was never used before.
""Stephen Lake"" <slake2@ns.sympatico.ca> wrote in message
news:A5.DC.18514.92AB3544@pb1.pair.com...
> Use cURL I found it much easier then using fsockopen
>
> http://ca.php.net/cURL
>
>
> ""Richard Lynch"" <ceo@l-i-e.com> wrote in message
> news:53198.67.184.121.112.1146304064.squirrel@www.l-i-e.com...
>> On Sat, April 29, 2006 3:53 am, suresh kumar wrote:
>>> <input type="hidden" name="item_name"
>>> value="Subscribe to Additional User Account Yearly">
>>
>>> my page code to process paypal
>>> ------------------------------
>>> <?
>>>
>>> // read the post from PayPal system and add 'cmd'
>>> $req = 'cmd=_notify-validate';
>>>
>>> foreach ($_POST as $key => $value) {
>>> $value = urlencode(stripslashes($value));
>>> $req .= "&$key=$value";
>>
>> echo "$key => $value<br />\n";
>>
>>> }
>>>
>>> $item_name = $_POST['item_name'];
>>
>> $item_name = isset($_POST['item_name']) ? $_POST['item_name'] :
>> '';
>>
>>
>>> Undefined index:item_name
>>
>> The $_POST data is not filled in, either because this is your FIRST
>> visit to the page, or because something is not doing a POST request
>> the way you think it should be.
>>
>> --
>> Like Music?
>> http://l-i-e.com/artists.htm