Thanks for your comments Ken.
I have left my answers below each part of yours:
Quote:
Step 1: payments.php simply adds the IP address of the person who has purchased the subscription.
|
iDevAffiliate tracks recurring commissions by IP. Since we can't guarantee the same IP on each recurring payment, the only way to solve this is to save the IP on initial payment in the vbulletin database and pull it out on recurring payment to pass to iDevAffiliate.
(In iDevAffiliate they use the IP on recurring payment to give the commission to the right person since on recurring payment there is no other way to figure out what belongs to whom). I guess they could have solved it by just using a payment id or hash or whatnot but that is up to idevaffiliate not vbulletin.
It is also important that the IP is stored on the initial payment and not on the recurring payments... hence the insert at the point in payments.php where the insert to paymentinfo table happens.
Quote:
Step 2: payment_gateway.php saves the sale in the affiliate script
|
Excellent observation here. As I mentioned in my original post I am new to vBulletin and I could not find the hooks to do that part.
I will modify the plugin to include the calls to the two hooks - this will eliminate 1 file edit and leave us with just the one file edit in payments.php
Thanks!