Gossamer Forum
Quote Reply
PayPal IPN
Has anyone actually figured this out yet?

The documentation at paypal.com is big baggy pants.

I don't know if the IPN URL should be the same URL as the successful payment URL or if it should be a different script.

If it is a different script how am I supposed to tell customers if their payment was successful in realtime...I thought that was the whole point of IPN?

Im trying some code but nothing seems to happen after paying...I can get to the success url but then what happens?....has paypal already posted to my IPN URL by then or what?....ugh.

If I go directly to the IPN URL I set up it tells me it can't reach paypals server.

Last edited by:

Paul: Apr 12, 2002, 9:46 AM
Quote Reply
Re: [Paul] PayPal IPN In reply to
Lol...I finally worked out something before you Tongue Its quite easy...either define the IPN redirect URL on the website, or set &return in the URL when making the payment URL. Then you can verify it with the code they provide in their development section.

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy.] PayPal IPN In reply to
So if I enter an IPN URL will that be used as a success URL?

What if I enter a success URL, won't I be taken there instead?
Quote Reply
Re: [Paul] PayPal IPN In reply to
From what I can tell, the &return= on the URL seems to override the URL listed with PayPal as your IPN URL. I believe the only reason you would need to edit the IPN URL on their server is when you are nopr defining the 'return' variable.

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy.] PayPal IPN In reply to
Ok, thanks for the explanation...I'll have to play with this...hmm....
Quote Reply
Re: [Andy.] PayPal IPN In reply to
Have you got a working copy anywhere I can test?
Quote Reply
Re: [Paul] PayPal IPN In reply to
Maybe you could give me a hand with my Plugin problems :( Still can't get it to work.

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Paul] PayPal IPN In reply to
Only sample I have working is the PHP...

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy.] PayPal IPN In reply to
Hmm you weren't right about the IPN and payment URL being the same. I emailed paypal and got a bit of a crappy answer. They wrote about a paragraph and then just copied the stuff from their site, but they did say:

Quote:
The IPN URL is actually the URL where your scripting page can be found.
Your customers will still be able to access the "successful" payment URL.

This is so confusing. When is the damn IPN URL called?
Quote Reply
Re: [Paul] PayPal IPN In reply to
Give the Tech guy a call. I'm still convinced that it is how I explained it. I'll verify it later :D

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy.] PayPal IPN In reply to
I aint calling the US and getting put on hold.
Quote Reply
Re: [Paul] PayPal IPN In reply to
They are quite good. Call was only £1, and I was on the phone for about 1/2 an hour ;)

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Paul] PayPal IPN In reply to
Well, just tried it with:

https://www.paypal.com/xclick/business=webmaster@ace-installer.com&item_name=Ace%20Mailing%20List&item_number=acemailingd&amount=9.95&return=http://www.ace-installer.com/buy/mailing/buy.php

And it works fine for verification purposes. You sure your doing it right?

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy.] PayPal IPN In reply to
I think so.

I have IPN switched on and return= in the URL that links to the verification script/success URL.
Quote Reply
Re: [Paul] PayPal IPN In reply to
Mmmm...odd. I've had it working fine in both PHP and Perl now...so it must be something you are doing. Could you PM/Email me a copy of the related file to look at? The only other thing I can think of, is that PayPal's verification stuff doesn't really like being included in an existing script. I've had to create seperate script for everytihng that uses it,for verification purposes.

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] PayPal IPN In reply to
Do you know of any way to have use 1 buinsess account but support multiple sites by sending the IPN script as a variable?



I want to override the IPN script in the paypal ipn page and have this passed with my serverside script so that an order can come back to any site script I want to choose.


Quote Reply
Re: [g0nz030] PayPal IPN In reply to
Yes you just pass return= in the URL with the value being your IPN script.
Quote Reply
Re: [Paul] PayPal IPN In reply to
Ok weird happening ...

I am receiving transaction information from non IPN transactions through the ipn script into my database ...



Also I tried replacing the return variable but that is not correct ... that only changes the location the script sends you back to after the whole process is complete. Do you need to remove the ipn script from paypal in the ipn section to make this work?
Quote Reply
Re: [g0nz030] PayPal IPN In reply to
You can't. There are two ways, the harder is to somehow daisy chain the entire IPN script processing on your side. Easiest way may be with multiple accounts - paypal doesn't seem to provide much support for multiple payment systems through a single account.

Any transaction (at least single item) will be referred to the IPN on your server so you'll be getting lots of wierd post-backs on _one_ single payment system on your server has more than one payment system.
Quote Reply
Re: [Aki] PayPal IPN In reply to
LOl..this brings back bad memories when writing my PayPal shopping system Tongue

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] PayPal IPN In reply to
No doubt. At least their tech support seems nice enough :) (I called to find out if my ipn postback script had to send them the "....cmd=_notify-validate" string had to be in the exact same order)

It was wierd that paypal never reports when my script fatals. Crazy Oh well, can't have everything right? (guess they don't want to make it seem like their scripts fail eh?)
Quote Reply
Re: [Aki] PayPal IPN In reply to
>>>No doubt. At least their tech support seems nice enough :) <<<

Yeah..if I hadn't had to wait 3 hours on international call rates to get throuh to them, and then another 45 minutes trying to work out what the problem was Frown

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] PayPal IPN In reply to
Yowtch. Calling Europe from Canada costs buckazoids quickly. Rates from Europe to US worse?

I found the paypal system a bit odd at first but easy enough to code for afterwards, it's very strict and limited. Haven't tried messing around with batch processing yet.
Quote Reply
PayPay's new owners In reply to
FYI: EBay Buying PayPal for $1.3B in Stock

Linky: http://www.washingtonpost.com/...A38765-2002Jul8.html
Quote Reply
Re: [Paul] PayPal IPN In reply to
I figured out the IPN, at least for php3/4. The success URL and IPN URL are different. The IPN is a silent post to your IPN return script, which must also silent post back to paypal for verification, by sending back the exact query_string paypal sent to it plus the cmd=_notify-validate must be added to the query_string before posting it back. The purpose of it is for
tracking in realtime from your own scripts, for databases and the like. When the silent post comes in you can check that it is marked as "VERIFIED" and the payment type and status, such as "Pending", "Completed". Completed means it was successful. The success URL shows up in the PayPal webpage for the user to actually click on to return to your site (also the failure URL). I have written an Automated Member Management system which uses the IPN for automated subscriptions, and flat-rate systems.

Note, the sample PHP code PayPal provides only uses the $HTTP_POST_VARS[]. If you do not have those turned on with track_vars for php, you have to use the $GLOBALS, but I have not tried that, yet.
Jeffrey L Meyer, Sr. Programmer
MeySoft http://meysoft.com