latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

iDevAffilaite and s2Member API notifications

Home Forums Community Forum iDevAffilaite and s2Member API notifications

This topic contains 1 reply, has 2 voices. Last updated by  Bruce 3 years, 5 months ago.

Topic Author Topic
Posted: Tuesday Jul 9th, 2013 at 7:35 pm #53198

Hi,

I have integrated s2 and iDevAffiliate with no problems so far. I would like to have two “types” of affiliates.

1. An affiliate who is not a subscriber for my website (not registered with s2Member)
2. An affiliate who is a subscriber for my website (has registered with s2Member)

All non-subscriber affiliates get their commissions when s2Member sends payment notification via the following URL:

http://www.my-site.com/affiliate/sale.php?idev_saleamt=%%amount%%&idev_ordernum=%%txn_id%%&ip_address=%%user_ip%%

So non-subscriber affiliates are getting paid as described above.

However, I would like to have a referral program for my website subscribers as well. I have created a custom profile field using s2Member pro forms that asks the customer for the referral ID (named referral_id) that belongs to one of my current subscribers.

I would like to have this second type of affiliate that does not need to create website and insert ad links to my website – they just tell other people about my product and mention their referral ID to get their commission sometime in the future.

My question is how do I notify iDevAffiliate when a new comission should be paid to an affiliate of type #2? Since these affiliate types will not be sending customers via a website but will just be using “word of mouth”, the potential customer will not have a cookie that associates them with any affiliate. I have a feeling that I can just substitute the %%user_ip%% field in the API URL for the customer profile field %%referral_id%%. But after reading the iDevAffiliate documentation:

Important Note: If you are setting this function to trigger for a recurring payment, you need to pass the original IP address that the customer had at the time of his/her first purchase. This is the IP that we have stored in iDevAffiliate so we need it to lookup the original referring affiliate.

it seems that an IP must be used with URL notifications.

This is where I’m stuck because I can’t figure how to tie everything together for an affiliate for type #2.

TIA

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Tuesday Jul 23rd, 2013 at 4:03 am #53845
Bruce
Username: Bruce
Staff Member

Thank you for your inquiry.

And thank you for your patience with us. I’m very sorry this thread got buried.

My question is how do I notify iDevAffiliate when a new comission should be paid to an affiliate of type #2?

It sounds to me like you’re on the right track, you’d need to use a cURL tracking pixel to tell iDevAffiliate for this type of referral. I’d say the best way to get an IP for this would be to grab the IP Address the User used to signed up with. You should be able to get it like this:

get_user_field ('s2member_registration_ip', $user_id);

See: http://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_get_user_field()

Viewing 1 replies (of 1 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.