Forums

PayPal listener configuration

GreyHead 16 Dec, 2011
Hi orionkc,

It's a while since I looked at this. I think that what happens is that you send a url to PayPal telling it where to send the IPN information. This can't be a 'normal' form URL because there are some security checks to make sure that the form is submitted by the same user who loaded it. So it has to be a 'non-form' url. ChronoForms gives you access to these through the events.

In the example there I created a new 'ipn' event using teh Add Event button and dragged the PayPal listener action into that event. Then you need to add &event=ipn to the IPN URL sent to PayPal to link the two up.

Bob
orionkc 23 Dec, 2011
Should the notify url I enter into Paypal be as follows?
http://mysite.com/administrator/components/com_chronoforms/form_actions/paypal_listener/paypal_listener.php?event=ppipn
GreyHead 29 Dec, 2011
Hi orionkc,

No, you don't need the administrator in there and I'd also get rid of the SEF url too.
http://mysite.com/index.php?option=com_chronoforms&chronoform=XXXXX&event=ppipn
where you need to replace XXXXX with the form name.

Bob
orionkc 29 Dec, 2011
Thanks for the response. I assume from your response that the notify_url is simply a variable that I pass to paypal by entering that variable in a hidden field and then mapping it in the paypal redirect under extra fields?

I was confused at first because if you log into paypal (at paypal.com, not my site), there is setting to turn IPNs on and off and it requires you to enter a "Notification URL" It is there that I thought you entered the notify_URL because there is no other field for notify URL that I could see within Chronoforms. If that had been correct, then it would seem that the link you provided would only work for whichever form name you entered.

But since the notify_URL is being passed as a variable (I assume), do I just leave the IPN settings in my paypal account off?

Please advise. Thanks
GreyHead 30 Dec, 2011
Hi orionkc,

I don't know much about Max's PayPal actions. :-( Looking round I also don't see a Notify URL box but you can set a value and add it to the Extra fields box. (I'd set it in a Custom Code action rather than a hidden input though.)

Whether you have IPN on or off depends on the info you need to get back from PayPal. If it's simple payment than you may not need it; if you need to be sure that payment has succeeded then it can be invaluable.

Bob
Max_admin 30 Dec, 2011
Hi orionkc,

The steps are just as Bob explained, I believe the IPN url can be set in your PayPal account settings, other users have confirmed this, there is a place to enable the IPN and set the notify url.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
orionkc 31 Dec, 2011

I believe the IPN url can be set in your PayPal account settings, other users have confirmed this,



Yes, but the question is "What is the IPN URL to set it to in the PayPal account settings?" There is only one URL you can enter in your paypal account settings. So if I set it as Bob suggested, it could only work on a single form because the URL includes the form name.

I did set a notify url as a variable within the form that gets passed to paypal. That does pass back the event, triggering the next actions in the ppipn event, but PayPal apparently doesn't recognize that IPN has been received and keeps retrying to resend the IPN causing a continuous triggering of subsequent events in the form.
GreyHead 02 Jan, 2012
Hi orionkc,

I agree that I prefer to set the Notify URL by form rather than rely on the PayPal default setting.

I'm not sure why the IPN Listener isn’t replying correctly to PayPal though - the code looks OK to me. It may be worth adding a data logger into the result events so that the results are tracked. You could use the Joomla! logger, or just dump the output to a file.

Bob

PS You might find this post useful as it works through an simple example of using PayPal Express Checkout which is similar to IPN.
orionkc 03 Jan, 2012
Thanks for your help, but I think I'm giving up on this for now. It's already put us three weeks behind. We'll just have to confirm payments manually for now.

I'm not a php guru and I do not recognize the functions that communicate back to paypal that the notification has been received (or to ignore it once the event is triggered). I see the While function which I assume is what is repeating the actions, but I'm not comfortable messing with it.

I will have to revisit this shortly (or find another solution), because the next project relates to selling documents that will need to be downloaded on demand. Luckily the current project does not require that.

Maybe you or Max could create a quick video demonstrating how to set up the listener? I just want to be able to eliminate the possibility that I skipped a step, or that there is a bug in the code that you didn't realize before. I did pay for this after all and there is no documentation on it. Videos seem to work much better anyway.

By the way, I did try it with the IPN settings in my PayPal account disabled. It still triggers the event that I passed in the form, but again, it keeps repeating the subsequent actions (a simple email to myself for now) When I tested it, I had ten identical emails within 2 minutes and they kept coming until I could get back to the form and disable the email action.

Thanks again for your help.
Max_admin 03 Jan, 2012
Hello,

I have only tested this before with the IPN setting enabled under the PayPal account and the IPN notify URL in the PayPal account set to the event with the "Listener", I didn't try the notify url passed to the gateway, so I suggest that you test it that way, if its working fine then we know that all is good and we should investigate your new approach.

You may also check 2 points:

1- do you have either the fsockopen or the CURL functions on your server ? you can find this by clicking the "Validate" button under the "Validate installation" page in Chronoforms admin area, it will let you know if both functions don't exist.

2- are you testing on live mode or using sandbox ? do you have the correct setting selected in the "listener" action configuration ?

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 08 Jan, 2012
Hi orionkc,

the next project relates to selling documents that will need to be downloaded on demand.

You might look at Document Seller as a short cut, I use it on my site and it has IPN built in.

Bob
This topic is locked and no more replies can be posted.