Home Integration Methods aMember

aMember

This integration method is for aMember versions lower than v4.

Integration with aMember uses a variation of General solution, it tracks sales by invoking hidden script from "thank you" page.
1
Integration
Put the following code to the aMember thanks.html page
2
Integration of recurring sales with PayPal
If you want to integrate aMember with PayPal recurring payments then follow these instructions. You will have to find the paypal_r.inc.php on your server /amember/plugins/payment/paypal_r

Insert next code right after this line:
function paypal_validate_ipn($vars){
Now find this line (2x times):      'custom'      => '', 
and change them to:                   'custom'      => $_COOKIE['PAPCookie_Sale'],

In case of version 4.4.x the variable is $_COOKIE['PAPVisitorId']

Notice, that your cookies must be available at the domain where amember in order to track sales.
3
Signup form integration
It's possible to integrate Amember in way, that every new user signup will create also affiliate account in your PAP in the same time. This integration is using our API, therefore it's necessary to upload PapApi.class.php into your Amember main folder. Then locate file signup.php (also in the main folder), open it in some text editor and add following code right after this line:

proceed_to_payment($payment_id, $member_id_exists);
This is all that is required. Now whenever there's sale, aMember will call our sale tracking script, and system will generate commission for the affiliate.

Possible bug in integration code

3 years ago Alan Tutt
In the aMember integration code above, I see a bit that looks wrong -- {/literal} -- on the line with "setTotalCost".

You might want to verify that.

Weird code

3 years ago Martin Pullmann, Q.U.
Yes, this looks like weird code, but it is working... in most cases. If not, then also this code is working (probably it depends on version of aMember):

sale.setTotalCost('{/literal}{$payment.amount}{literal}');

In each line have to be this code - for total cost, order ID and also for product ID.

Not adding the Affiliate info

3 years ago Monica Lund
I am using amember and PAP. This code do not ad the new member from aMember as an affiliate in PAP.

Maybe update this code so it is correct and also include the personal info of the new member that is signing up through aMember ? I think thats the reason why most people use aMember along with PAP, to sell memberships.

The code adds a commission

3 years ago Martin Pullmann, Q.U.
This code just creates a commission! It should not add a new affiliate into PAP.

Good Idea

3 years ago Alan Tutt
While I do understand the integration code above is meant to generate commissions only, I do think the idea of automatically creating an affiliate account for all new members would be a great idea. Obviously, this is a different level of integration and would require a separate piece of code, however, it would be extremely valuable to be able to do this.

aMember | PAP4 Integration

3 years ago Alex Ochart
Amember has a plugin that can create a new pap affiliate acount for every new member automatically.

We are trying to implement this right now with the help of aMember and quality unity staff .

I will get back to you soon with the details.

Recurring Commissions?

3 years ago C Peterson
@ Alex: While this work is underway, is it also possible to establish recurring commissions from amember to PAP? It seems that most users of Amember are selling recurring memberships, so an affiliate integration should be capable of recurring commissions.

Recurring Commissions

3 years ago Alex Ochart
@ C Peterson. Yes... I agree this is my main reason for the integration of aMember/PAP4. We are still having problems but confident that will make it work. I will keep you post it.

Recurring payments

3 years ago Martin Pullmann, Q.U.
To make work recurring payments of aMember with PAP4 you should not use this integration method. You need to edit Plugin for PayPal in aMember. Then, recurring payments will be automatically done by PayPal - also with "trial period" feature of PayPal.

Explain what you mean

2 years ago Craig
Martin, you say we need to edit the information in the amember "paypal" settings to allow for recurring commissions, can you please explain in detail what you mean?

templates

2 years ago Martin Pullmann, Q.U.
Craig, not in settings, but in templates - files in aMember folder. Please contact our support enter so we can help you with it.

Okay

2 years ago Craig
Martin, that is what I did they directed me to this website:

http://www.amember.com/forum/showthread.php?p=35808

But that doesn't really help me or answer my question? Am I suppose to use the amember integration code provided by PAP4 then as according to your instruction edit a template file w/ an additional code so it can accurately track recurring commissions?

Recurring payments

2 years ago Martin Pullmann, Q.U.
OK, once again. To make work recurring payments with PayPal in aMember, you only have to find templates for PayPal button in aMember file templates, and to use integration method for PayPal. Please, if you have any troubles, contact our Support Center so we can give you an advice or to help you.

This solution doesn't work for amember

2 months ago Teresa
I tried this. I added the code above to my amember thanks.html template and then to my paypal recurring php file. I got a smarty code error for the literal function for the thanks.html page. So I tweaked it based on Martin's comment and still get the error when I test:

ERROR [256] Smarty error: [in thanks.html line 27]: syntax error: unrecognized tag '/literal' (Smarty_Compiler.class.php, line 551) in line 1102 of file /home/mysite/amember/smarty/Smarty.class.php

Is there a better solution or did I just pay for Affiliate tracking software that only works for one product with one set price? NOT happy.

Errors, problems

2 months ago Martin Pullmann
Please, if you are referring to any problem or an error, it is hardly possible to solve it here. Because of that, please contact our support agents to check where and what is the problem.
In case of Teresa's Smarty issue, I really have no idea what could have caused this, we will have to check your code to see what is the problem.
Thanks for understanding.