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

Add Paypal Listener Url to trigger webhook

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Add Paypal Listener Url to trigger webhook

Tagged: IPN, PayPal, web hooks, WP Affiliate

  • This topic has 8 replies, 3 voices, and was last updated 4 years, 9 months ago by admin.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • June 15, 2018 at 3:36 pm #14919
    quickregister
    Member

    I am creating a subscription with Paypal. I need to add a Paypal Listener url to trigger a php script on my server which triggers affiliate commissions.

    This is the code I have on one of my other scripts and it works.

    $paypal_ipn_listener_url = “http://www.mysite.com/paypalhook.php”;

    I need to trigger this script on a sale and on recurring billing.

    How do I add this hook (listener url) with your plugin?

    Thank you.

    June 15, 2018 at 3:49 pm #77998
    wzp
    Moderator

    If you have both eStore and Affiliate Platform, the PayPal IPN back to eStore will trigger Affiliate Platform:

    https://www.tipsandtricks-hq.com/wordpress-affiliate/wp-estore-and-wp-affiliate-plugin-integration-717

    Or is there something else you are trying to do?

    June 15, 2018 at 3:56 pm #77999
    quickregister
    Member

    I do not have YOUR affiliate script/plugin. I have my own affiliate script with active affiliates. So I need to trigger this url as a listener url for Paypal mydomain.com/paypalhook.php Again I am not using your affiliate plugin. I am just using your store. I need the store to trigger my script. Thank you.

    June 15, 2018 at 4:08 pm #78000
    wzp
    Moderator

    I think, if you follow this thread, you might find the information you are looking for:

    https://support.tipsandtricks-hq.com/forums/topic/integration-with-jrox-jam-affiliate-manager

    June 15, 2018 at 4:23 pm #78001
    quickregister
    Member

    So it takes place in paypal.php

    I see the example:

    $sale_amt = $this->ipn_data;

    $trans_id = $this->ipn_data;

    $jrox_cookie = $customvariables;

    $JAMIntegrate = file_get_contents(“http://www.mydomainname.com/affiliates/sale.php?amount=”.$sale_amt.”&trans_id=”.$trans_id.”&custom_mid=”.$jrox_cookie);

    $this->debug_log(‘Awarding JROX affiliate commission.’,true);

    I get the cookie part. I had already seen the post

    and added my cookie variables.

    However is just want to have paypal call

    mydomain.com/paypalhook.php

    My script already does all the get contents stuff. I just need to trigger the url on sale and rebill.

    Thanks,

    Matt

    June 15, 2018 at 11:35 pm #78002
    admin
    Keymaster

    We have the following action hooks that you can use to get notified after a transaction and execute whatever code you want to from your custom code.

    do_action(‘eStore_product_database_updated_after_payment’, $this->ipn_data, $cart_items);

    do_action(‘eStore_paypal_recurring_payment_received’, $this->ipn_data, $cart_items);

    Are you familiar with WordPress action hooks?

    June 16, 2018 at 2:35 am #78003
    quickregister
    Member

    I am not familiar with this. I just need to call this page when there is a sale

    mydomainname.com/payaplhook.php

    Can you please direct me on where and how to do this. I have no idea about these wordpress action hooks. Please clarify. Thank you. Can you give me an example? Where do I put the hooks? Do I put the code in where it says ipn_data?

    June 16, 2018 at 2:55 am #78004
    quickregister
    Member

    Ok I read a bit about action hooks. Where do I define the code for the action hook and where do I put it?

    If I wanted the action hook to call mydomain.com/paypalhook.php on initial subscription payment and subsequent subscription payments what it the code and where do I put it?

    Thank you,

    Matt

    June 16, 2018 at 11:03 pm #78005
    admin
    Keymaster

    I am not sure that just calling that URL will do the job. An affiliate software generally needs to be integrated according to their integration guide. You also have to pass the payment parameters to them. If you think just calling the URL is enough then here is how you can do that:

    Add the following code to your functions.php file of the theme. The following is just an example code so make sure you understand it and before adding to your site:

    add_action('eStore_product_database_updated_after_payment', 'custom_aff_integration', 10, 2);

    function custom_aff_integration ($ipn_data, $cart_items) {
    $execute_url = file_get_contents("http://www.mydomainname.com/payaplhook.php");
    }

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

Forum Related

  • Forum Home
  • Forum Search
  • 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
  • WP PDF Stamper Documentation
  • WP Photo Seller 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
  • WP Photo Seller Video Tutorial

Our Other Plugins

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

Copyright © 2023 | Tips and Tricks HQ