There are two ways you can integrate a plain PayPal button with the WP Affiliate Platform plugin. Choose one of the following options:
Some users tend to get confused because they try to follow everything that is on this page. Please only follow option 1 or option 2 (do not follow both of them at the same time)
Option 1) Integrating PayPal Button Using PayPal’s PDT Feature (Easier Option)
This integration is best suited for one time payments (“add to cart” and “buy now” type transactions)
This option takes advantage of the PayPal’s PDT (Payment Data Transfer) feature to receive the payment confirmation on the “Thank You” page and award the commission after a payment.
Step 1: Create a “Thank You” page in your WordPress (This is the page where you will send your customers thanking them for the purchase after they make a payment). Keep note of the URL of this page.
Step 2: Create your PayPal button as you normally do but make sure to use the URL of the “Thank You” page created in step 1 as the “Return URL” for this button. This page does not have to be the “Thank You” page… it can actually be the URL of any WordPress post or page on your site.
Step 3: Go to the settings menu of the Affiliate Platform plugin and find the “3rd Party Integration” section (see screenshot below). Check the “Enable 3rd Party Cart Integration” and fill out the “PayPal PDT Identity Token” field.
Read this post to learn how to get your PayPal PDT token.
All done! Now, when your customers make a payment using the button your created in step 2 the affiliate platform plugin will award commission to the correct affiliate when this customer lands on the “Thank You” page after making a confirmed payment.
============== Integration Steps for Option 1 Ends Here ===============
Option 2) Integrating PayPal Button Using PayPal’s IPN Feature (More suited for developers)
- This option is best suited for advanced users as it involves customizing and using some HTML code.
- This integration works for all types of transactions (one time payments and subscription/recurring payments)
The Affiliate Platform plugin comes with a basic IPN handling script. So in your PayPal button you just need to tell it to send the IPN notification to this plugin. This way the plugin will be notified by PayPal when someone pays you using that PayPal button. The affiliate plugin comes with a shortcode that makes this process very easy.
Edit the post or page (where you have your PayPal button), then insert the following shortcode inside the PayPal button code.
When the button is rendered on the front-end of your site, the above shortcode will add the necessary variables to it.
Example PayPal Button Code
Your PayPal button code should look similar to one of the following examples (when you use the above mentioned shortcode):
If you are placing the PayPal button inside a WordPress post/page via the WP Editor then make sure to enter the button code in the Text View (HTML code won’t work if you enter it in the visual view of the editor).