Tips and Tricks HQ Forum

Support Forum for Tips and Tricks HQ Products

Register or log in - lost password? (Having an issue with the forum login?)

Search the Forum

Tips and Tricks HQ Forum » WP Affiliate Platform

Difficulty Setting up WP Affiliate Platform for Paypal Subscription Buttons

(4 posts) (2 voices)
  • Started 1 year ago by dadamson
  • Latest reply from amin007
  • Possible Solutions (Related Topics):
    1. Affiliate widget not pointing to Aff Platform settings pages
    2. Simplest way to do subscriptions on Affiliate Platform?
    3. Integrating WP Affiliate with Recurring Paypal Subscription/Membership
    4. eStore + WP Affiliate Platform + Wish List Member + Buy Now buttons
    5. Integrating WP Affiliate Platform with Merchant One Gate way, paying with paypal

Tags:

No tags yet.

  1. dadamson
    Member

    Hi Guys,

    I have searched the forum and I am at a complete loss on how to set the WP Affiliate Platform up for PayPal subscription buttons for ongoing commissions..

    Each time I enter the custom code from the "Example Button Code for PHP (PayPal hosted button) " into the hosted button at PayPal.com it doesn't copy across to the next page when I save the button and get the button code.

    I have entered the snippet of code like this into the "Custom Variables" box:

    <input name="notify_url" type="hidden" value="http://www.your-domain.com/wp-content/plugins/wp-affiliate-platform/api/ipn_handler.php" />
    <input name="custom" type="hidden" value="<?php echo $_COOKIE['ap_id']; ?>" />

    and I have even changed it to this:

    notify_url=http://www.your-domain.com/wp-content/plugins/wp-affiliate-platform/api/ipn_handler.php
    custom=<?php echo $_COOKIE['ap_id']; ?>

    I have also copied the entire code and tried pasting it into the PayPal custom variables section.

    Whatever I seem to write there it doesn't show up in the code on the next page page saving the button and retrieving the code to embed to the site.

    Regardless of this, I have hardcoded the entire button code in the site as a test button and used it through my own affiliate account I have created.

    I get the clicks registering but I don't get the sales registering.

    I have even copied the <script> snippet of code above and manually added to the correct section of my PayPal code on my site but still I get the same result.

    I have been at this for about 3 hrs now with no progress, could anyone shed any light?

    Thanks,
    Dave

    Posted 1 year ago #
  2. amin007
    Key Master

    Not sure which instruction you followed. You need to follow this one (option 2):
    http://www.tipsandtricks-hq.com/wordpress-affiliate/plain-paypal-button-and-affiliate-plugin-integration-168

    Here is what you did wrong... you don't need to add the following to your custom variable box of the hosted button on PayPal (PHP code won't get executed in the custom variable box like that):

    notify_url=http://www.your-domain.com/wp-content/plugins/wp-affiliate-platform/api/ipn_handler.php
    custom=<?php echo $_COOKIE['ap_id']; ?>

    You will specify those values in the button when you place it on a page. For example if you look closely to this example button code you will see where they are being add to in the button:

    <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_s-xclick">
    <input type="hidden" name="hosted_button_id" value="7JK4AJCBQGJV6">
    <input type="image" src="https://www.paypal.com/en_US/GB/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
    <img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
    <input name="notify_url" type="hidden" value="http://www.your-domain.com/wp-content/plugins/wp-affiliate-platform/api/ipn_handler.php" />
    <input name="custom" type="hidden" value="<?php echo $_COOKIE['ap_id']; ?>" />
    </form>

    So basically copy and paste your hosted button code and then add the following two lines just before the </form> tag:

    <input name="notify_url" type="hidden" value="http://www.your-domain.com/wp-content/plugins/wp-affiliate-platform/api/ipn_handler.php" />
    <input name="custom" type="hidden" value="<?php echo $_COOKIE['ap_id']; ?>" />

    Obviously you will change the "you-domain.com" to your actual domain URL. Does that make sense?

    The key is to make sure that the PHP code that retrieves the cookie value is actually getting executed. So Remember, if you are planning to place the button code on a WordPress post or page then you need to have a plugin (e.g. PHP Exec plugin) that lets you execute PHP code in WordPress page or post (by default WordPress post or page won't execute PHP code). If you are placing this code on your themes template file then you are good to go (no need to install a PHP executable plugin)

    Posted 1 year ago #
  3. dadamson
    Member

    Great, Got it working now!

    My mistake - I didn't install that PHP handler.

    I have created a test transaction and the commission was processed to the affiliate account successfully.

    As it is a recurring transaction, I just need to know if the affiliate will get paid for each recurring payment... my test button is set on a daily basis so I guess I'll know for sure tomorrow.

    Thanks for the help! Definitely looks like a solid software.

    Cheers,

    Posted 1 year ago #
  4. amin007
    Key Master

    Glad to hear that. Yes the recurring payments will also award commission to the affiliate (this is the advantage of using option 2 as the integration method)

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Tips and Tricks HQ  | WP Shopping Cart  | WP Affiliate Software  | WordPress Membership Plugin