Home
Integration Methods
PayPal (IPN used by other script)
PayPal (IPN used by other script)
PayPal integrates using IPN callback even if the callback is used by other system (e.g. shopping cart).
Note! This is description of integration with PayPal if you use PayPal
buttons on your web pages. If you use PayPal as a processing system in
your shopping cart, use the method for integrating with shopping cart,
not these steps.
1
Paypal button
Now add the following code into EVERY PayPal button form
This will ensure that referrer will be stored to the custom field.
2
Example
Example of updated PayPal form:
<!-- Begin PayPal Button -->
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="paypalemail@yoursite.com">
<input type="hidden" name="undefined_quantity" value="1">
<input type="hidden" name="item_number" value="Product Name">
<input type="hidden" name="amount" value="19.95">
<input type="hidden" name="image_url" value="https://yoursite.com/images/paypaltitle.gif">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="http://www.yoursite.com/paypalthanks.html">
<input type="hidden" name="cancel_return" value="http://www.yoursite.com">
<input type="hidden" name="custom" value="" id="pap_dx8vc2s5">
<script id="pap_x2s6df8d" src="http://www.yoursite.com/affiliate/scripts/notifysale.php" type="text/javascript">
</script>
<input type="image" src="http://images.paypal.com/images/x-click-but5.gif" border="0" name="submit">
</form>
<!-- End PayPal Button -->
3
Integration
Now the IPN callback is pointed to your script. This callback has to be
forwarded also to PAP4 paypal.php script, which url is http://www.yoursite.com/affiliate/plugins/PayPal/paypal.php.
In case, your paypal processing script is in PHP, you can use following
code to accomplish that. You can place it at the beginning of your
processing file.
This will ensure that whole IPN callback will be forwarded without affecting your original script
This is all that is required. Now whenever there's sale, PayPal will
use its IPN function to call our sale tracking script, and system will
generate commission for the affiliate.
NOTE: If you have more buttons at one page, you should insert only HTML
tags into button. The script tag should be only inserted once at the
whole page. It even doesn't need to be in the button form, it can be
somewhere in the body of the page.
Input "custom" doesn't get a VALUE
3 years ago
Eden Amirav
Hey, I am doing everything like explaind, but for somereason the input of
"custom" is not getting any value!
can anybody check it out please? http://www.home-hivtestkit.com/buytry.html?a_aid=495d117dc9c25
It seems like everything is right!
Custom field
3 years ago
Martin Pullmann, Q.U.
Custom field is not getting any value because click tracking code can't be at the same page as the button. But they both have to be at the same domain. This is because cookies have to be created so then script can put cookies value to the button.
it's the same problem when I am linking to a different page
3 years ago
Eden Amirav
I link to a page that haev Affiliate Pro tracking code, and then from there there is a link to the buy page, where the paypal button is...
But there is still no value in the custom input, what else can I do?
Contact our support
3 years ago
Miso Bebjak
Hi, take a look at the article which explains how to debug paypal tracking: http://support.qualityunit.com/knowledgebase/post-affiliate-pro/troubleshooting/how-to-debug-tracking/paypal-button.html
If you still won't be able to solve your problem, please contact our support at: http://support.qualityunit.com/server/submit_form.php
Custom field in IPN is already used for something else.
2 years ago
Ben
I use the custom field in the PayPal IPN for something else. How do I integrate without using the custom field?