Pay Pal Listener Problem

ksignorello 18 May, 2015
I'm using the Pay Pal Redirect with IPN Listener pretty successfully. However there are transactions on my PayPal account that are not related to my normal web site operation which generate an IPN that the listner seems to be responding to with a 500 response code and pay pal thinks there is a problem and keeps resending the IPN for up to four days. Eventually paypal complains that I have a problem with my listner.

Here is the action set up:

The problem is that normally there is parameter that the DBSave action uses to mark the record paid in the database and this does work. But in these other transactions the parameter is missing and the DBSave doesn't work (as it should not). But is that why the listener is responding with a 500 code rather then a 200 code? And if so what must I do to get the listener to respond OK even when the parameter to update is missing so that pay pal thinks the IPN was received OK.

Here is my current IPN history. The ones that say retrying are the "external transactions" that don't have the parameter that other transactions do.
GreyHead 19 May, 2015
Hi ksignorello,

Why do you have 'external' transactions going to the IPN Listener URL? That should only be used for transactions that started with that form.

I can't tell from the information here why your server would respond with a 500.

ksignorello 19 May, 2015
Pay pal seems to be sending IPNs for three type of transactions:
1) those that come from my wonderful chronoform
2) payments from paypal created invoices
3) payments from Pay Pal Here CC transactions

There doesn't seem to be a way to control this and we do all three.

The Listener gets hit with all three. The ones where the DBSAVE can't work
get an HTTP Response code of 500 the ones that do have the needed parameter get HTTP Response code of 200.

Just before the dbsave I'm looking for the IPN Parameter item_number.
Code snip from custom code action:


(EnttryID is the primary key on the table I am trying to update)

For some IPNs the item_number parameter has no value:

. . . &item_number=&residence_country=US . . .

Might this create an untrapped error and cause the HTTP response code of 500?
GreyHead 19 May, 2015
Hi ksignorello,

What is the default IPN Listener Notification URL set to in your PayPal account? (See this PayPal doc )

That should **not** be the form IPN Listener URL

ksignorello 19 May, 2015
It is set to

Which is the same form that initiates check out from my web site.
This works.

But the same URL is being hit all the time. I can't see a way to make pay pal not go to that URL in the case of Pay Pal Here or other payment transactions initiated on Pay Pal only.

Pay pal is very persistent too. It will try as many as 16 times to get a good response for an IPN.
GreyHead 19 May, 2015
Hi ksignorello,

That should **not** be the form IPN Listener URL please set it to something else.

Set the notification URL for the form in the form; set the default PayPal Notification URL to something else - another form event if you want to receive the notifications, one that just responds by echoing back.

ksignorello 19 May, 2015
Ah Ha! You are referring to this:

Set this to the IPN event of this form and then set the paypal IPN url to some other form or can I just turn it off at pay pal?

What's confusing is the nomenclature. Paypal call it the Notification URL and CF calls it the Return URL.

Almost there I think.

This looks like two coffee support.
GreyHead 19 May, 2015
Hi ksignorello,

Aha indeed - it looks like the action doesn't have a box for the Notify URL*

In the Extra Fields box on the Fields tab add a line line this
That should set the Notify URL for this transaction.


* Sorry. I'm not too well up on these actions as I rarely use them. I prefer to use an API library to connect to the payment gateways.
ksignorello 28 May, 2015
This almost worked. I think if the URL were in quotes it might have worked but just to be sure I defined it as a form data field and then assigned that field to the "notify_url" parameter it we're all good! THANKS!
This topic is locked and no more replies can be posted.