Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

WP Affiliate – Commissions not showing up with Paid Downloads plugin integration

by

Tips and Tricks HQ Support Portal › Forums › WP Affiliate Platform › WP Affiliate Troubleshooting › WP Affiliate – Commissions not showing up with Paid Downloads plugin integration

  • This topic has 7 replies, 2 voices, and was last updated 11 years, 5 months ago by bigsea.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • November 30, 2013 at 2:50 pm #10139
    bigsea
    Member

    Recently we’ve noticed that commissions aren’t showing up for our affiliates. (This came to our attention when we verified that an affiliate’s friend had purchased our eBook but a commission didn’t show up in her account.)

    Commissions have shown up before, but we have not changed any settings (except choosing the debug option) in the past few months to get it working again.

    Is there a way to see past commissions that happened since this problem has arisen, and how do we fix it for the future?

    November 30, 2013 at 11:13 pm #59343
    admin
    Keymaster

    Please provide a little more details (the following post will work as a guide):

    https://support.tipsandtricks-hq.com/forums/topic/clicks-are-tracked-but-not-the-sales

    December 9, 2013 at 6:23 pm #59344
    bigsea
    Member

    Hi Admin,

    Sorry for the delay. We are using v4.8.3 of the WP Affiliate Platform plugin.

    The issue is in part because of our third party plugin (“Paid Downloads”) was upgraded by the client and our integration disappeared, as it was hardcoded into this plugin (no hooks to tap into, sadly). I have worked on putting the code back in place, with which I used this integration method: http://www.tipsandtricks-hq.com/wordpress-affiliate/api-awarding-commission-via-wordpress-hook-501

    We added the script to the “Paid Downloads” plugin (which handles our purchase), placed after the “Successful payment” points in their script. I put the integration code upon payment SUCCESS (from the API call), and before the successful purchase emails go out. During test purchases, the payment went through, success emails were sent, but the affiliate transaction wasn’t successful.

    An example referral is as such:

    [www.aromahead.com/blog/essential-living-aromatherapy-ebook/?ap_id=soben]

    Please advise. It appears that the action isn’t running.

    December 9, 2013 at 6:39 pm #59345
    bigsea
    Member

    I should note that we have debug mode enabled, including during those 3 test transactions i’ve done so far today… and there is nothing in the error log or anything.

    December 9, 2013 at 11:23 pm #59346
    admin
    Keymaster

    That action hook was added recently to the affiliate plugin. Please load a new copy of the affiliate plugin and you will see that action hook working. That should solve the issue.

    https://support.tipsandtricks-hq.com/forums/topic/re-install-or-load-a-fresh-build-of-the-plugins

    December 12, 2013 at 2:13 pm #59347
    bigsea
    Member

    Hey Admin.

    So, here’s where we currently stand: the plugin was updated to the latest version provided to us (v5.7.4), using WP 3.6, and the Paid Downloads plugin (v3.15).

    I installed this site locally so I could test with the sandbox paypal account, and I started getting messages in the debug log, but they stopped coming in.

    During a “Successful” round (after enabling Remote POST), the following messages showed up in the log:

    [12/11/2013 6:27 PM] - SUCCESS :Start processing remote commission tracking request...
    [12/11/2013 6:27 PM] - FAILURE :Request does not have any GET or POST data... cannot process request
    [12/11/2013 6:27 PM] - SUCCESS :Start processing remote click tracking request...
    [12/11/2013 6:27 PM] - FAILURE :Request does not have secret key present.. cannot process request

    The Paypal IPN itself shows me as every submission has a successful (200 OK) connection to the server.

    After that, not a single payment I tried to purchase showed up in the log (tried 5 more times), though they showed up in the paypal sandbox as successful payments.

    So, to our code… we have a filter and an action that we added to Paid Downloads. Both appear to be set up properly:

    function aromahead_affiliate_notify_url($url) {
    $ap_id = (!isset($_COOKIE['ap_id'])) ? $_GET['ap_id'] : $_COOKIE['ap_id'];
    if ( strstr($url, '?', FALSE) === FALSE ) {
    $url = $url . '?ap_id='.$ap_id;
    }
    else {
    $url = $url . '&ap_id='.$ap_id;
    }

    return $url;
    }

    function aromahead_process_affiliate($data) {
    do_action('wp_affiliate_process_cart_commission',$data);
    }

    The notify url change is successful (the if/else statement is there because my local copy doesn’t use pretty permalinks, and the live site does), and the code in the Paid Download for the actual cart commission (upon Paypal Successful Payment) is as such:

    // BIGSEA - ckanclerowicz - WP-AFFILIATE INTEGRATION 2013-12-09
    $data = array(
    "referrer" => (isset($_COOKIE['ap_id']) ? $_COOKIE['ap_id'] : $_GET['ap_id']),
    "sale_amt" =>$gross_total,
    "txn_id"=>$txn_id,
    "buyer_email"=>$payer_email,
    "secret"=>'4e6a5eee9988b'
    );
    do_action('paiddownloads_process_affiliate', $data);

    Currently, I’m at a complete standstill, because individually, everything appears to be running just fine. However as a whole, something seems to be broken.

    Any ideas are much appreciated.

    December 12, 2013 at 10:56 pm #59348
    admin
    Keymaster

    You actually don’t need to use the Remote post feature for this. Both of these plugins are installed on the same WordPress install right?

    Simply add the following bit of code in the post payment processing script of that paid downloads plugin then make sure it gets executed after a sale.

    $data = array(
    "referrer" => (isset($_COOKIE['ap_id']) ? $_COOKIE['ap_id'] : $_GET['ap_id']),
    "sale_amt" =>$gross_total,
    "txn_id"=>$txn_id,
    "buyer_email"=>$payer_email,
    "secret"=>'4e6a5eee9988b'
    );
    do_action('wp_affiliate_process_cart_commission', $data);

    The above code will notify the affiliate plugin and pass the necessary transaction data.

    December 17, 2013 at 12:50 pm #59349
    bigsea
    Member

    Hey Admin,

    Yea, that exact code you provided is in place, however, it just appears that the Paypal IPN itself is calling the Remote Post feature. I did not set anything initially to configure it as such. It was just during testing to make sure the Paid Downloads addon was connecting to the Affiliate Platform properly, and the errors above showed up, hence why I enabled the mode.

    The code you provided in your last reply is indeed the same code that I have in one spot in the paid affiliate system. I don’t know where or how it’s calling the Report Post feature, honestly, I certainly didn’t configure it myself.

    I will try to start this over and make sure I didn’t accidentally trigger something else. But the code you provided me is in the Paid Downloads plugin upon successful Paypal IPN request. I can copy/paste more code for an example of where it’s enclosed, if that will help.

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ