PayPal (IPN used by other script)
Integrate PayPal with other systems using IPN callback for seamless payment processing and sale tracking. Add specific code to PayPal button forms and point the IPN callback to the script to generate affiliate commissions.
PayPal (IPN used by other script) integration
The faster, safer way to send money, make an online payment, receive money or set up a merchant account.
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.
Paypal button
Now add the following code into EVERY PayPal button form:
<input type="hidden" name="custom" value="" id="pap_dx8vc2s5">
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/notifysale.php" type="text/javascript">
</script>
This will ensure that referrer will be stored to the custom field.
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="https://URL_TO_PostAffiliatePro/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 -->
Integration
Now the IPN callback is pointed to your script. This callback has to be forwarded also to PAP paypal.php script, which url is https://URL_TO_PostAffiliatePro/plugins/PayPal/paypal.php.
In case your paypal processing script is in PHP, you can use the following code to accomplish that. You can place it at the beginning of your processing file.
/* Post Affiliate Pro integration snippet */
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://URL_TO_PostAffiliatePro/plugins/PayPal/paypal.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST);
curl_exec($ch);
/* /Post Affiliate Pro integration snippet */
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.
Frequently asked questions
- What is PayPal (IPN used by other script) integration?
This integration allows you to connect PayPal with Post Affiliate Pro using the IPN callback, enabling seamless payment processing and automatic affiliate sale tracking.
- How do I integrate PayPal buttons with Post Affiliate Pro?
Add a hidden input and a script tag to every PayPal button form on your website as described in the guide. This ensures that affiliate referrals are tracked for each sale.
- What if my PayPal processing script is in PHP?
You can use a PHP snippet to forward the IPN callback to the Post Affiliate Pro paypal.php script, ensuring complete tracking functionality.
- Can I use this integration if the IPN is already used by another system?
Yes, this integration method works even if your PayPal IPN callback is used by a different system, such as a shopping cart, by forwarding the callback to Post Affiliate Pro.
- Is it necessary to add the script tag to every PayPal button?
No, if you have multiple PayPal buttons on one page, you only need to add the HTML input to each button, but the script tag should be inserted only once per page.
Lucia is a talented content editor who ensures the seamless publication of content across multiple platforms.

Enhance Your Affiliate Program with PayPal Integration
Integrate PayPal with Post Affiliate Pro to track sales and generate affiliate commissions automatically. Start optimizing your affiliate network today.