PDA

View Full Version : ipn moslock


atapi
30th November 2004, 09:08 PM
Hi everyone

I have been looking for a multi teir affiliate program.
And this one looks pretty good.
I need the system to work with two different systems.
On the web site I have a shopping cart system, oscommerce and I have moslock for mambo.
http://www.phil-taylor.com/Product_Info/Mambo_Products/mosLock/
Both systems use differnt ipn locations.
I read through the oscommerce install
but on the same web site we are going to use moslock to do subscription logins. moslock uses paypal and ipn to add a new user to the system.
is there a way to integrate the ipn page for paypal subscriptions with the moslock script?

could I merely do an include inside the moslock script with your affiliate script?

-let me know what I need to do. My client needs a one stop shop for affiliate management.

mark
2nd December 2004, 08:56 AM
Hi,

I'm sure it can be integrated.
There are two ways:
1. include the sale tracking code of affiliate system to your IPN script - hard to say how difficult it wil be. Check /scripts/paypal.php (in affiliate system, I guess you have to buy it first :-)), there are only few lines of code that take care of registering the sale.

2. call affiliate sale registration script using fsockopen or cURL - you'd have to pass cookie value to the sale.php as it cannot get its value in a normal way.

both ways would require some customizations of sale registration script, in case of way 2. the customization will be quite small.

I can help you make it if you want.

regards,

mark

atapi
5th December 2004, 05:13 AM
After I posted that I bought the product and starting looking how it worked
I just finished getting paypal sub set up
Read through the SaleRegistrator class file
I have been tracking through the app to see how it works very interesting
my only concern is my client is asking to pay out $30 on a special package gift and 30% on the other products in oscommerce.
then she also wants to do seperate subscription commissions

mark
5th December 2004, 10:54 PM
check this topic:
http://forum.qualityunit.com/viewtopic.php?p=507#507

how you integrated it with paypal? using fsockopen/curl or the other way?

is there a problem passing the product id during sale registration to force the system to apply correct commission? As far as I see into your integration it should be possible.

regards,

mark

atapi
9th December 2004, 11:00 PM
hi mark
did you get my email with my script?
I think I can pass vars through the paypal system now
can you just give me the code I could use to register a sale?
im using item_name to pass the subscription type

mark
10th December 2004, 02:18 PM
To register sale commission with affiliate system, you have to call
only few functions:

$saleReg = new SaleRegistrator();

if($saleReg->decodeData($custom))
$saleReg->registerSale($payment_amount, $txn_id, $item_number);


where $custom is value passed from paypal button, it should be
in format AffiliateID_ProductCategoryID, for example '1_2'.
If data is recognized, then the function registerSale() registers
the sale with given payment amount,
transaction id (will be saved as Order ID), and item number (will
be saved as Product ID). You can use item_name instead of item_number if you want.

To be able to call these functions, you should include the appropriate
files. The best is to include file /scripts/global.php which contains
all the other necessary includes. I expect there will be some problems
with paths to directories, you should customize it to your system.

regards,

mark

atapi
10th December 2004, 06:49 PM
I pluged it in last night but I havent figure out how to
in put your hidden field in the form var for paypal inside the
cms system I am useing to test it.

and your right I had to change a ton of paths inside global.php
in order for it to work.

here is a link
http://www.mambers.com/showthread.php?p=79915#post79915

mark
14th December 2004, 09:22 AM
Hello,

check this one:
http://forum.qualityunit.com/viewtopic.php?t=159

regards,

mark