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.
[wp_aff_paypal_fields]
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).
@Marianne, For that you need to use the 2nd option. Then you it will only award the commission if the button has the shortcode in it.
Another alternative is to use our WP eStore plugin to process your transaction. It just makes things easy when you are not dealing with a raw paypal button. You can set commission on a per product basis when using WP eStore:
https://www.tipsandtricks-hq.com/wordpress-estore-plugin-complete-solution-to-sell-digital-products-from-your-wordpress-blog-securely-1059
Thanks. Another question: If I have several products selling from one website (via PayPal) but only want to set up an affiliate programme to give commission for one of those products – how can I make that happen?
@Marianne, Having separate thank you pages is not an issue. As long as the PayPal PDT feature is enabled and working correctly (given you are going for option 1) then the tracking will work fine.
Hi, a question about option 1: I have several products selling via direct PayPal integration (no shopping cart). These have different thank you pages.
Does option 1 (setting up the return URL in PayPal) mean that all my products will then have the same thank you page? (ie: does this over ride existing individual thank you page set ups for different PayPal buttons?)
Thanks!
Marianne
Ok i figured out why the Manual Commission Award did not work. I was entering in the variable and the value/ID – ap_id=XXXX. So just entering the actual value/ID XXXX works fine. And I see that in my Sandbox testing i also added the variable with the value so you can delete my question. All is well, just had a special moment there. it’s always the simple stuff that messes with you. ha ha ha.
I’m sure this question has been asked before and i looked around and could not find the answer so if i apologize if i missed the answer somewhere.
I have successfully completed PayPal IPN Sandbox testing with some additional custom coding I have added to connect to another DB on another WP Site and insert data. Everything is working perfectly both with your existing coding and my added custom coding. Both playing together nicely. 😉
The question i have is very simple one. The only thing that i cannot verify is that when i log in to the Affiliate Center under a test affiliate account and click on the Sales tab, enter a date range and check for Earnings, no data is displayed. I am assuming that in Sandbox testing mode the data is not actually populated to the DB. The Sale Amount displayed on the Sales/Comm Data Admin page is $49 and the Commission Amount is $0. So that makes sense that no positive sales commission is available.
Ok so i did a Manual Commission Award and the data still is not showing up in the test affiliate account? I have taken the site out of Sandbox Mode? Anyway everything up to this point has gone smooth as butter so I am at a roadblock now with something this simple. Thanks.
@Pam, if the customer is getting redirected to the “Thank You” page on your WordPress site directly form PayPal then yes (the affiliate plugin needs some transaction data from PayPal and it can only get those data if the customer lands on your WordPress site directly from PayPal after a payment).
I’m using Paypal’s PDT with 1shoppingcart. Will option 1 work if I’m not actually using Paypal buttons?
@Patrick, it only gets triggered after a successful payment. So cancelling and returning won’t award an affiliate commission.
My concern was whether this would function properly with s2member-protected pages. That concern was allayed by your answer to S.Smith’s question above.
But that answer brings up a new question: if all that is required to trigger a response from the plugin is a return to any site URL, would a “sale” be logged if the user simply clicks on the “Cancel and return to…” link at PayPal?
Added clarification. You can add a shopping cart later and continue to use the PayPal buttons (no harm in that). That warning is mainly there so customers using eStore do not get confused if they should check that or not.
Hi,
1) I am using Wishlist Member and two PayPal generated buttons for Subscription SignUp. Subscribers have to go to PayPal for Payment and then return to the site “Registration page” to allow collection of subscribers name & email address for the purposes of Wishlist Member. So the Admin response above Dec 1 2010, clarifies that returning to ANY page is sufficient. Can I suggest that the wording of Option 1, Step 2 be amended to reflect this.
2) Complying with Step 3, however, and adding the PayPal PDT Identity Token, should complete the action but in the header 3rd party Shopping Cart Integration it states “(Do Not use these these settings when using WP eStore plugin)”. I need to use eStore or possibly WP eCommerce Plugin for selling other products and not just digital products, could you please clarify the warning or will I have to incorporate the Subscription payments via eStore somehow or use e.g. WP eCommerce
Look for the following comment in that file:
// Code to handle the signup IPN for subscription
Thats where the code will go when a subscription signup type IPN is received. You can place your custom code there to do special things with the subscription signup message.
Yes, I can see that there is no code implemented. Instead, there is a reference to a subscription handler. Is there an actual “subscription IPN handler” or what? If so, where is the hook and where is the code. I need to do some custom coding for the system I am implementing, and I want to make sure I add my code in the right place.
I didn’t implement that bit as for the affiliate plugin subscription signup and cancellation requests are not needed for anything. The affiliate commission is given when the actual payment (subscription payment) hits which comes via a different type of transaction.
Hi,
I was looking through the code in the IPN handler that comes with the affiliate plugin. On lines 211 and 225, there is mention of a “subscription IPN handler.” Where is that handler located?
–Robert
Yes method 1 will work as long as you return to any page on our site that is part of the WordPress install.
Can I return to any page to get the proper affiliate-payment response, as long as I return to the site? How does that work?
Really: will returning to “realtaiji.com/?s2member_paypal_return=1” qualify, and therefore integrated with s2member. See, I’m trying to integrated paypal buttons that I save in paypal account with s2member and affiliates plugins. That’ll work in theory, right?
Hi Julien, The following post will explain more about how to integrate the Affiliate Platform with a 3rd party plugin:
http://www.tipsandtricks-hq.com/wordpress-affiliate/integrating-the-wp-affiliate-software-with-a-3rd-party-plugin-61
Hello its possible with http://www.alertpay.com?