Copyright
© 2003, Groundbreak.com. All rights reserved.
Any comments, suggestions, or mistakes: smiles@groundbreak.com
|
Integrating
Ultimate Affiliate with Paysystems.com
Paysystems.com
has a very flexible system and integrating it with Ultimate Affiliate
is fairly simple. In the end, it will be much like integrating it
with paypal.com (see
tutorial).
PART ONE:
Setting up your paysystems.com order buttons
Here's where
the trick lies. You will NOT be creating products through the paysystems
admin page. That way is less flexible since you put in all the info
at their admin page and then the purchase link looks something like
this:
http://auth.paysystems.com/sale.asp?pd_info=7978A7886EDA2281FB8D64C9D4DE471C8A62317A5
This will not
work with the affiliate program because you're only sending a product
ID to paysystems and you can't send along the referring affiliate's
username.
So, in order
to integrate with Ultimate Affiliate you need to use their TTP-Pro
ordering buttons. This way of creating order buttons is MUCH more
flexible and works out-of-the-box with Ultimate Affiliate. Here
is a link to their TTP-Pro instruction file: CLICK
HERE.
Here's
is the code for an example button:
<form
action=https://auth.paysystems.com/cgi-v310/payment/onlinesale-tpppro.asp
method=post>
<input type=hidden name=companyid value=94830>
<input type=submit value="Click here to
purchase access">
<input type=hidden name=product1 value="groundbreak.com
membership">
<input type=hidden name=total value="200.00">
<input type=hidden name=redirect value="http://www.groundbreak.com/thanks.html">
<input type=hidden name=option1 value="AFFILIATEUSERNAME">
</form>
Or
here's a direct link:
<a
href=https://auth.paysystems.com/cgi-v310/payment/onlinesale-tpppro.asp?companyid=94830&product1=groundbreak.com+membership&total=200.00&
redirect=http://www.groundbreak.com/thanks.html&option1=AFFILIATEUSERNAME>
Click here to purchase access</a>
Click
here to purchase access
|
Notice that
in each order link/button you can include an extra field called
option1 (you can add option2, option3, etc...) where you will include
the referring affiliate's username.
On the page
with your orderr buttons you will put this javascript code in the
top of the page between the <head></head> tags:
<script>
function getCookie (name) {
var dc = document.cookie;
var cname = name + "=";
var clen = dc.length;
var cbegin = 0;
while (cbegin < clen) {
var vbegin = cbegin + cname.length;
if (dc.substring(cbegin, vbegin) == cname) {
var vend = dc.indexOf (";", vbegin);
if (vend == -1) vend = clen;
return unescape(dc.substring(vbegin, vend));
}
cbegin = dc.indexOf(" ", cbegin) + 1;
if (cbegin== 0) break;
}
return null;
}
affiliatecookie = getCookie('COOKIENAME');
</script>
Make sure to
replace COOKIENAME with the name of the affiliate cookie you set
at the main admin.cgi configuration page.
Then, in each
order link/button you will place the bold javascript tag below:
<form action=https://auth.paysystems.com/cgi-v310/payment/onlinesale-tpppro.asp
method=post>
<script>
document.write("<input type=hidden name=option1
value="+affiliatecookie+">");
</script>
<input type=hidden name=companyid value=94830>
<input type=submit value="Click here to purchase
access">
<input type=hidden name=product1 value="groundbreak.com
membership">
<input type=hidden name=total value="200.00">
<input type=hidden name=redirect value="http://www.groundbreak.com/thanks.html">
</form>
or
<a href="#" onClick="window.open('https://auth.paysystems.com/cgi-v310/payment/onlinesale-tpppro.asp?companyid=94830&
product1=groundbreak.com+membership&total=200.00&redirect=
http://www.groundbreak.com/thanks.html&option1='+affiliatecookie+'',
'cartwin','scrollbars,location,resizable,status');">
<font face="Arial, Helvetica, sans-serif">Click
here to purchase access</font></a>
Click here to purchase access
PART TWO:
Modifying your paysystems account
In order to
trigger commissions, at the paysystems admin page you need to turn
on and configure their 3rd party affiliate program
tools.
Log into your
paysystems admin page and go to: Settings & Options
-> 3rd Party Affiliate System
1. Add a new
affiliate setting
2. Activate it, and choose a name
3. Set the url to http://www.yoursite.com/cgi-bin/affiliates/sale.cgi
(the sale.cgi script)
4. Set the "method" to "post".
5. Most importantly, in the "post" fields you will need
to change a couple of these:
Check
the "order id" and change the name to "goods"
Check
the "product price" and change the name to "cashflow"
Check
the "option value 1" and chang ethe name to "affiliate"
PART THREE:
Changing settings in the affiliate script
There's not
much to do outside of the initial setup of the affiliate script
to get this to work with paysystems. Make sure that you have the
IP tracking after a sale turned off as well as the referral checking.
Sale.cgi should be set to execute as a script and the secret word
should NOT be set.
As extra fraud
protection, you should rename sale.cgi to something else - and make
sure that change is reflected in the url to sale.cgi that you put
in at the paysystems affiliate program settings page.
|