Here what ShareaSale want me to do:
Tracking Code Information
In order for ShareASale to track affiliate-referred transactions, you must install the invisible tracking code on your site.
For sales-based programs, the tracking code should be placed on your site’s checkout receipt (”thank you” confirmation page). This is the page displayed immediately after your customer’s credit card has been charged.
ShareASale partners with a variety of popular shopping cart platforms to provide easy solutions for the task. If you use a custom cart or your platform is not listed in the drop-down select box, select “My Shopping Cart Platform is Not Listed” to continue. Send the instructions to your programmer to implement the ShareASale tracking if your are unclear on how to proceed.
For leads-based programs, the tracking code should be placed on your site’s lead confirmation page. This is the page displayed immediately after completing a free lead form, subscription, trial, quote, etc. on your site. This requires a programmer to implement.
PayPal Website Payments Standard
Unfortunately, integrating with PayPal Website Payments Standard is more difficult than most shopping carts. You will need to setup their Payment Data Transfer system before integrating with ShareASale. See PayPal's documentation and sample code here:
[url removed, login to view]
Unfortunately, ShareASale is unable to help in setting up the Payment Data Transfer system. If you require assistance you should contact PayPal directly.
Once you have the Payment Data Transfer system running, you can use the following tracking codes in your Auto-Return script:
[url removed, login to view]("<img src=""[url removed, login to view]" & mcGross & "&tracking=" & txToken & "&transtype=SALE&merchantID=XXXX"" width=""1"" height=""1"">")
echo ("<img src=\"[url removed, login to view]$amount&tracking=$tx_token&transtype=SALE&merchantID=XXXX\" width=\"1\" height=\"1\">");
Where you replace XXXX with your ShareASale merchant ID number.
Please note there is currently a bug in the PayPal sample code for PHP. If you are running PHP, you will need to change the line that reads:
$amount = $keyarray['payment_gross'];
$amount = $keyarray['mc_gross'];