Page 1 of 1

Central IPN Questions

PostPosted: July 10th, 2011, 5:32 pm
by blewis
I have just setup s2member pro and so far so good. I will be using PayPal Pro, but I have another Joomla website which currently uses our PayPal account and is currently assigned to the IPN URL in our PP profile. So I need to utilize a central IPN script to route the PP messages to the correct spot.

Question 1:

I have come across two variants of the Central IPN script. One is shown in this post:

viewtopic.php?f=4&t=3142&p=9588#p11804

The other is what comes with the s2m-pro-extras.zip file. They are somewhat similar, but there is enough difference I figured I would ask about it. Is one better than the other for any reason?


Question 2:

My other site (the Joomla install) does not use the custom field nor return a "rp_invoice_id" that the script(s) above will like (it doesn't contain the domain name). Since I have only two sites, does it seem safe to alter the script to look for those things -- if it finds the domain, go to the s2member site, if not go to my other site? Otherwise, my Joomla site does return a "product_name" variable that does identify these IPN messages (it's always the same product because that site has a single recurring membership product). I guess I could change the greps to look in that field, no?

Thanks,
Bryan

Re: Central IPN Questions

PostPosted: July 11th, 2011, 10:45 pm
by Jason Caldwell
Thanks for the excellent questions.
The other is what comes with the s2m-pro-extras.zip file. They are somewhat similar, but there is enough difference I figured I would ask about it. Is one better than the other for any reason?

They'll both work just fine. I'd recommend the newer version that comes inside the /s2m-pro-extras.zip file, because it's designed with versatility in mind, and it's easier to configure. That being said, if you're more comfortable with the older version, feel free to use it. They both work fine.

My other site (the Joomla install) does not use the custom field nor return a "rp_invoice_id" that the script(s) above will like (it doesn't contain the domain name). Since I have only two sites, does it seem safe to alter the script to look for those things -- if it finds the domain, go to the s2member site, if not go to my other site? Otherwise, my Joomla site does return a "product_name" variable that does identify these IPN messages (it's always the same product because that site has a single recurring membership product). I guess I could change the greps to look in that field, no?

Yes, that should be just fine. If your other site does NOT use either of those fields, then you could simply test to see if one of those variables has a value; and if so, redirect the IPN to your s2Member installation, otherwise, default to your other installation.