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 & PayPal

by

Tips and Tricks HQ Support Portal › Forums › WP Affiliate Platform › WP Affiliate & PayPal

Tagged: WP Affiliate

  • This topic has 6 replies, 2 voices, and was last updated 14 years ago by mikee17.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • May 19, 2011 at 3:10 pm #3437
    mikee17
    Member

    Hi,

    Does this http://www.tipsandtricks-hq.com/wordpress-affiliate/wp-content/uploads/2011/03/php-example-award-commission-http-post.txt script work on notify_url of PayPal ?

    What if the sale amount = 0 ?

    I tried and no sale is recorded…

    I turned the debug log ON and here is what I get from the log.

    —

    [05/19/2011 3:05 PM] – SUCCESS :Start Processing…

    [05/19/2011 3:05 PM] – SUCCESS :Request does not have any GET or POST data.. cannot process request

    —

    PS: I use the code for HTTP Post using cURL from the above link.

    Thanks & Regards

    May 19, 2011 at 4:52 pm #32689
    mikee17
    Member

    Hi,

    1. I learned that the sale amount cannot be 0.

    2. cURL and file_get_contents do not work on the notify_url page and requires browser execution.

    Am I correct?

    Thanks & Regards

    May 20, 2011 at 12:51 am #32690
    amin007
    Participant

    1. I learned that the sale amount cannot be 0 – There is no point in doing a commission calculation on a 0 (zero amount) so I added that restriction but if for some reason you really need to have 0 amount then this condition can be taken out.

    2. CURL can work on any script execution. You just can’t directly make that script your notify_url without doing modifications to it. For example you will need to massage the data you get from PayPal’s IPN then populate the variables correctly then execute the CURL POST. If you are simply trying to integrate with a PayPal button why not use this integration?

    http://www.tipsandtricks-hq.com/wordpress-affiliate/plain-paypal-button-and-affiliate-plugin-integration-168

    May 20, 2011 at 5:57 am #32691
    mikee17
    Member

    Say for example, we have a MONTHLY subscription of 5 USD with ONE WEEK trail(0 USD) and would like to record a commission even though its not relevant. How do we take out the condition you say?

    Saying when I used the script from the link I pasted above, it does not mean I used the script as it is… I have all the values in place, i.e…

    cURL: $secretKey, $affiliate_id, $sale_amt

    file_get_contents: $secret, $referrer, $sale_amt

    Stil it did not work for both POST and GET methods, shall try again and get back on this.

    May 20, 2011 at 6:30 am #32692
    mikee17
    Member

    If, I’m using direct SQL statements to insert values to ‘wp_affiliates_sales_tbl’ table, what do I do for ‘txn_id’ ?

    i.e $txn_id = uniqid(); ? or can we use for ex. the payer_id => TT4B9D8ZKHBQA from paypal?

    I have values from paypal on the notify_url page for >> refid, date, time, payment, sale_amount, item_id, buyer_email

    Do I have to insert/update to any other table?

    May 20, 2011 at 11:12 pm #32693
    amin007
    Participant

    You can use a unique ID as the transaction ID. I prefer to use the transaction ID sent from PayPal (PayPal will also send you the transaction ID in the IPN… the name of the variable will be “txn_id”). Either method is fine though.

    “Do I have to insert/update to any other table?” – No.

    May 23, 2011 at 7:49 am #32694
    mikee17
    Member

    Thank you!

    * I actually wanted to say ‘Transaction ID’ i.e ‘txn_id’, by mistake said ‘payer_id’ instead.

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 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