Tips and Tricks HQ Support Portal › Forums › WP eMember › eMember integration with Affiliate Platform
Tagged: emember affiliate
- This topic has 15 replies, 4 voices, and was last updated 11 years ago by xenmoso.
-
AuthorPosts
-
November 10, 2013 at 10:42 pm #9998xenmosoMember
I searched forums and all the related docs I can find and I do not see anything obvious about integrating eMember with Affiliate Platform.
Affiliate Platform docs here
http://www.tipsandtricks-hq.com/wordpress-affiliate/
Do not have any mention of how eMember is integrated. If there is something automagic that is not apparent, it should at least be mentioned.
The Aff integration docs and API talk of using the Affiliate IPN
But we can’t use to IPN urls…. one for eMember and one for Affiliate.
In the sample affiliate PayPal button code here:
you include
name=”custom” value=”[wp_aff_custom_args]”
But in eMember docs only discuss puting in the subscription id in the custom field for the paypal button.
Also,
It does not make sense to use a 3rd party integration as mentioned on the affiliate docs as these 2 plugins are not of 3rd parties
eMember docs here.
http://www.tipsandtricks-hq.com/wordpress-membership/
Do not mention your Affiliate Platform Integration either.
I see some mention in eMembers WP plugin settings. There is a section for Affiliate Platform Account Creation Settings but that does not apply either.
When using eMember PayPal IPN, does it automatically look for affiliate cookies?
Do I need to include [wp_aff_custom_args] in the PayPal Button?
If it is automatic, can you describe how it works and maybe
where I can find the code that checks that a sale is tagged to an affiliate.
Is there a trigger in the eMember code? If so this should at least be mentioned.
…and if it is automatic, ideally there should be some mention of it in the docs for both Affiliate Platform and eMember.
Thanks for clarification
November 11, 2013 at 12:45 am #58841xenmosoMemberWhen doing a paypal subscription button test, the eMember “wp_eMember_members_tbl” table is updated correctly
The table has the correct membership level and even has the correct referrer in the “referrer” field so I know the affiliate is being tracked somehow. Probably from a cookie.
But nothing appears in the affiliate’s sales, only the referred clicks are being registered.
The affiliate log does not have any actions in it either that look like a sale is being generated.
Intergrating these 2 plugins should be the most brain dead thing. Right? I Don’t see how can’t find an obvious brain dead answer
Thanks for some pointers
November 11, 2013 at 1:12 am #58842mbrsolutionSpectatorHello have you check this URL
Let me know if this is what you are after.
Kind regards
November 11, 2013 at 3:50 am #58843xenmosoMemberThanks for the suggestion but no. At that link, it talks about crediting the Affiliate with a “Lead” different that paying a commission on a membership sale.
What I want to do is pay a 25% commission to the Affiliate who referred a sale of a membership.
If it makes a difference, members sign up FREE. I have special code that requires them to upgrade to a paid membership after 7 Days. When they upgrade, there membership after 7 days, this would be the first time they pay with a PayPal subscription button.
What I need that is not happening now… is to credit the Affiliate with 25% of the membership price and for each and every month after.
still trying…..
November 11, 2013 at 5:19 am #58844PeterMemberDo the following for PayPal Button + eMember + Affiliate Integration
Do what the advanced integration section says here (scroll to the bottom):
Another Way to Handle This
Basically you want a way to track a sale of a certain item and then you want to award your affiliate the required percentage of the sale.
Therefore in summary you need to integrate the affiliate platform with the selling mechanism.
Now in your case it sounds like you are using a plain paypal button to sell your memberships, therefore all you need to do is follow the instructions for integrating the affiliate plugin with a PayPal button:
Direct/Plain/Hosted PayPal Button and Affiliate Plugin Integration
If you follow those instructions all should be ok.
November 11, 2013 at 1:48 pm #58845xenmosoMemberI will try today and let you known how it works. Thanks for the feedback
November 13, 2013 at 7:14 pm #58846xenmosoMemberThe first link posted above has not mention of Affiliate Platform integration.
The second link is what I have already metioned which leads to the problem of eMember and Affiliate Platform both wanting to use a special PayPal notify parameter in the button.
I can direct you back to my first post for more clarification.
November 13, 2013 at 8:18 pm #58847xenmosoMemberas I wait for a definitive answer here from admin…
So this leads to 2 more questions..
1) Which IPN script is used for what reason and how do I know which is called in my situation.
2) If I am going in the right direction with this, where in the eMember IPN script do I include the GET request with my affiliate sale info.
This all leads to another question as well. Since I want to pay affiliates on reoccuring monthly membership payments, is this automatically done? Or do I have to add additional code that checks if a membership has an associated affiliate and take that into consideration before posting my GET request from the eMember IPN.
How could it be so tedious and difficult to integrate 2 plugins from the same developer that I thought would be integrated “out of the box”?
I can’t be the only one that has wanted to pay Affiliate commissions on memberships, but I can find any referrences or examples on how this is done anywhere on your site or forums.
Please help me out here mr admin or developer.
Thanks
November 13, 2013 at 11:26 pm #58848adminKeymasterYou only need to follow one of the suggestions that Peter made (not both).
So lets follow this one (it requires the least amount of setup):
All you have to do is make ONE PayPal button for your membership payment using the parameters explained in the “advanced integration” section of the above documentation and the integration is done.
There is nothing you need to do on the affiliate plugin side for this. That one button with the advanced integration is capable of giving commission when a member pays for membership.
Question for you:
Have you created your PayPal button for membership/emember using the instructions from the advanced integration section?
If you have please post a link to the page where you have placed that button so I can check it.
November 14, 2013 at 2:02 am #58849xenmosoMemberThanks for the response.
Yes, I initially did follow those instructions in the link mentioned to get the PayPal subsciption button working but it only mentions creating or generating the notify URL which contains the subscription reference variable: subscr_ref.
notify_url=http://www.your-domain.com/wp-content/plugins/wp-eMember/ipn/eMember_handle_paypal_ipn.php
custom=subsc_ref=4
All that works. What does not work or happen is giving the affiliate credit. Does the ap_id variable need to be included in the custom variable as well? If so, that should be mentioned on that page and would have saved me from creating this thread.
I found this in ipn_handle_debug_eMember.log which helped to explain some.
Quote:[11/11/2013 12:23 AM] – SUCCESS :Membership payment paid for membership level ID: 3
[11/11/2013 12:23 AM] – SUCCESS :WP Affiliate Platform is installed, checking if custom field has affiliate data…
[11/11/2013 12:23 AM] – SUCCESS :Custom field value: subsc_ref=3
[11/11/2013 12:23 AM] – SUCCESS :Could not find affiliate ID (ap_id) data in the custom field
[11/11/2013 12:23 AM] – SUCCESS :Referrer value is empty! No commission will be awarded for this sale
In the referrer field in the eMember table the correct affiliate/referrer is there so it still somehow knew who the affiliate was/is.
In my button code I only had subsc_ref=3
<input type=”hidden” name=”custom” value=”subsc_ref=3″>
Should I also include ap_id like this?
<input type=”hidden” name=”custom” value=”subsc_ref=3&ap_id=AFFILIATEID”>
The plan is do dynamically create the value= contents anyway using PHP so if I know
it is necesary to include ap_id I can do that a number of ways it seems…
$_COOKIE probably being the most appropriate I think.
So is it true that I always should include the “ap_id” variable in the custom field of the button?
Then the next question is how are reoccuring affiliate commissions are handled.
I would imagine that each month that PayPal bills the customer, PP will continue to post back both custom variables so the sale can be credited to the affilaite.
So will both subsc_ref and ap_id always be included in the monthly IPN post from PayPal?
If this is the case, it makes sense… and I will find a way to make sure ap_id is included in the custom field.
Let me know if this is correct.
Thanks again for following up. Much appriciated.
November 14, 2013 at 2:48 am #58850adminKeymasterWe can’t predict what custom coding/setup you are doing. Our emember and affiliate integration just needs the following in the advanced variables section of your PayPal button. That shortcode for that custom field will take care of everything (it generates all the required data).
notify_url=http://www.your-domain.com/wp-content/plugins/wp-eMember/ipn/eMember_handle_paypal_ipn.php
custom=[wp_eMember_custom_value level_id=4]
Now that you mentioned that you are creating the PayPal button with some custom coding I understand your requirement better. Yes, the value of the custom field needs to be like the following:
<input type="hidden" name="custom" value="subsc_ref=3&ap_id=AFFILIATEID">
So from PHP you can do the following:
echo '<input type="hidden" name="custom" value="subsc_ref=3&ap_id='.$_COOKIE['ap_id'].'">';
The recurring payment will generate recurring commission and the commission will be awarded to the appropriate affiliate who originally sent that member to your site.
November 14, 2013 at 3:14 am #58851xenmosoMembergreat, ok, makes sense.
I think one last question…
If the member upgrades a few months later after the cookie has gone away, is the Affilate Platform smart enough to credit it to the right affiliate?
I ask because the upgrade requires a new PP subscription button and the affiliate cookie may not be around still but I’d still want to continue paying the affiliate.
November 14, 2013 at 10:09 pm #58852adminKeymasterOnce the member subscribes and the appropriate affiliate gets a commission, he will continue to get a commission for the remainder of that subscription (even if the cookie is expired).
November 16, 2013 at 6:41 pm #58853xenmosoMemberHi Admin,
Regarding your response. It did not directly answer my question. That part was already clear; the fact that once a member subscribes the affiliate will continue to get a commission on that “subscription”. Assuming “subsciption” meaning a particular paypal subscription. As that is not distinctly clear. And assuming a person with an eMember “membership” can be referred to as a “membership” not a subscription.
But and so, My real question was regarding membership upgrades which is still not clear, which I understand PayPal handles as a NEW subscription, since in most cases a new PayPal button is used with new a NEW subscription price and details.
So if a member/client decides to upgrade his eMember “membership” with a NEW PayPal “subscription”, say from $10/month to $20/month way after the cookie expires, is this NEW PayPal subscription still credited towards the original affiliate with proper commission? Is this situation accounted for in eMember?
I hope the question is more clear now.
Thanks again for your answer and support here
November 16, 2013 at 10:39 pm #58854adminKeymasterYes, the question is more clear now
This upgrade scenario you explained above will be treated as a completely new transaction. So the commission will be given, if there is an affiliate cookie present at the time of this new transaction. If you want to give commission to the original affiliate then simply increase the cookie lifetime to a long value (you can do that from the affiliate plugin settings).
-
AuthorPosts
- You must be logged in to reply to this topic.