Page 1 of 1
Can S2 Read Another Subscription Button's IPN?
Posted:
October 26th, 2010, 5:05 pm
by KirkWard
That being said, PayPal's service "Website Payments Standard" will not allow the IPN communication to be transferred from your old system to your new system. At least not for existing Subscriptions that existed before you made the switch to s2Member. Going forward you'll be fine, but old "Subscriptions" will NOT be communicated to s2Member via IPN, because they were created by a different piece of software
I use an IPN Relay script to receive the PayPal "Website Payments Standard" IPN and then forward it to three different scripts, WishList Member, iDevAffiliate, and a custom script I use to subscribe new members to my autoresponder. Each uses the IPN properly, extracting the information it needs. The only data in the CUSTOM field is the buyers IP address, which iDevAffiliate uses in some way.
If I use this IPN relay script to also point the IPN to the correct S2 URL, will S2 read the IPN and manage subscribers I have manually added?
Re: Can S2 Read Another Subscription Button's IPN?
Posted:
October 27th, 2010, 5:53 am
by Jason Caldwell
Great question Kirk.
No, because when/if you are forwarding IPN responses to s2Member from a former integration with another piece of software, you would be required to modify the "custom" variable, and also the "item_number" variable to match what s2Member expects in the IPN response.
Changing those variables would break the PayPal verification system that is implemented internally by s2Member. In other words, when s2Member sends a POST back to PayPal for verification, PayPal would report "UN-Verified", because the variables would not match what was originally transacted.
That being said, s2Member does provide a way around this issue. You can use the "IPN w/ Proxy Key" supplied by s2Member. In your Dashboard, see: s2Member -> PayPal Options -> IPN Integration. Using this special version of your IPN processor, you will be able to circumvent the issue I just described. However, you will still need to make sure that you dynamically modify the following two variables appropriately in the script that you write to forward the IPN response to s2Member ( e.g. your proxy script ).
custom = this MUST be the domain name where s2Member is installed.
( ex: custom=www.example.com )
item_number = this MUST be 1-4 ( indicating Membership Level )
( ex: item_number=1 )
-------------------------------------------------------------
item_number could also include
Custom Capabilities, and/or a fixed term length.
item_number = 1,2,3, or 4
-- OR --
item_number = level:custom capabilities:fixed term
Level #1 access, + music,videos as Custom Capabilities - account expires in 1 month.
( ex: 1:music,videos:1 M )
Re: Can S2 Read Another Subscription Button's IPN?
Posted:
October 27th, 2010, 7:14 am
by KirkWard
That is cool, and VERY powerful. I am really impressed!
One question about the CUSTOM field ... regarding iDevAffiliate integration.
iDev wants the customer IP address. Will s2 accept the ipn if it has that additional data delimited in the CUSTOM field? (If so, what is the delimiter, a comma?)
Cheers and happy thoughts,
Re: Can S2 Read Another Subscription Button's IPN?
Posted:
October 27th, 2010, 7:36 am
by Jason Caldwell
Thanks Kirk, very much.
Yes, you will need to make sure it "starts" with your domain name. Then you can pipe (|) delimit additional custom variables in along with it. These additional custom variables can be referenced later through s2Member's API Notifications and inside emails using %%cv1%%, %%cv2%%, etc. You'll find the details on this in your Dashboard. For example, this is discussed in the Replacement Codes for each API Notification that s2Member processes.
Examples:
custom=www.example.com|123.433.643.444
custom=www.example.com|123.433.643.444|google
The domain is used for verification.
%%cv1%% = 123.433.643.444
%%cv2%% = google
Re: Can S2 Read Another Subscription Button's IPN?
Posted:
October 27th, 2010, 7:39 am
by KirkWard
Ah, yes.
I saw that and didn't quite understand. This clarifies. Thanks.
Re: Can S2 Read Another Subscription Button's IPN?
Posted:
October 27th, 2010, 7:39 am
by Jason Caldwell
I'm attaching a sample script that comes packaged as an /extra/ with each copy of s2Member Pro. This is not exactly what you're trying to accomplish, but it might be helpful in some way. The sample script is designed for use with s2Member Pro, when/if a site owner needs to implement s2Member on multiple domains with only PayPal account. We refer to this as a central IPN processor.
Re: Can S2 Read Another Subscription Button's IPN?
Posted:
October 27th, 2010, 9:21 am
by KirkWard
Thanks, this looks like a good guide.
Will play with it.