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

Transfer php parameters to external affiliate program with thank you page

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Transfer php parameters to external affiliate program with thank you page

Tagged: PayPal IPN, Thank you page

  • This topic has 3 replies, 3 voices, and was last updated 9 years, 8 months ago by erfolg2.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • September 22, 2015 at 2:23 pm #13098
    erfolg2
    Member

    Hello, I have already read different articles on this topic.

    For instance:

    eStore – Purchase detail on success page ( thank you page

    Now I have an issue:

    I want to use the eStore Plugin with another affiliate program. For that I need the information about transaction delivered to the affiliate program. Why not use our own affiliate program? I just need (for this case) a program which can give affiliates access to multiple products at multiple different domains without making a new affiliate account on each selling page.

    My code as a tracking pixel on the thank-you-page:

    <?php xample.domain/verkauft.php?preis=" . $gross_total . "&order_id=" . $transaction_id . "&remark_admin=" . rawurlencode($firstname) . " " . rawurlencode($lastname) . " " . rawurlencode($seller_paypal_email) . "' height='1' width='1' border='0'>"; ?>

    When a successful payment is made through paypal, the new customer is redirected to the thank-you-page. The pixel fires, and a new sale is counted within the affiliate program. That is good. What I need help with:

    The parameters here are not correct. There is no result posted to the affiliate program. No details are transmitted.

    I tried to use parameters from:

    /paypal.php

    or

    /eStore_includes3.php

    Which information is included into the thank-you-page using this shortcode:

    [wp_eStore_display_transaction_result]

    How to get data to the the thank-you-page? Do I need to include any file like paypal.php once to make the pixel post the parameters?

    Or can I just use those parameters included from the transaction result – and if I can, which ones are used here?

    Thanks for help.

    September 23, 2015 at 12:12 am #71428
    wpCommerce
    Moderator

    Hi, PayPal IPN (Instant Payment notification) is processed in the backend. If you want some of these parameters to be available on the “Thank You” page you will need to use PayPal’s PDT (Payment Data Transfer) feature:

    https://www.tipsandtricks-hq.com/ecommerce/wp-estore-instant-digital-product-delivery-499

    September 23, 2015 at 2:49 am #71429
    admin
    Keymaster

    There is an action hook that you can use to hook your custom code into eStore. This way, this custom code will get executed after a sale is processed by eStore.

    Here is an example snippet of code:

    add_action('eStore_product_database_updated_after_payment', 'custom_log_commission', 10, 2);
    function custom_log_commission($ipn_data, $cart_items)
    {
    $sale_amt = $ipn_data['mc_gross'];
    $trans_id = $ipn_data['txn_id'];
    $customvariables = get_custom_var($ipn_data['custom']);

    //Do something here
    }

    You will need to be a developer to code it up though. You can use the following option to hire one of our developers (to do the code if you want):

    https://support.tipsandtricks-hq.com/need-custom-work-done

    September 24, 2015 at 11:52 am #71430
    erfolg2
    Member

    We have another affiliate programm which have to be integrated into eStore. We want to track the sales outside of WordPress with this program.

    Instructions

    We need an add-on for wp-eStore.

    Functions:

    Display an echo-command on the thank-you-page.

    On the thank-you-page is the shortcode [wp_eStore_display_transaction_result].

    We need the add-on either to expand the shortcode if set or we create a new shortcode for this add-on, which makes displaying our echo-command.

    The echo-command should be like this:

    <?php

    echo “<img src=’http://[partnerurl]/verkauft.php?preis=&#8221; . [price variable] . “&order_id=” . [trans_id] . “&remark_admin=” . [first name] . ” ” . [last name] . ” ” . [email] . ” ” . [customer id] . “‘ height=’1′ width=’1′ border=’0’>”;

    ?>

    [partnerurl] – domain/url to the partnerprogram location anythin like [http://domain.tld]

    [price variable] – variable of price either total_minus_total_tax or any aquivalent (price with/-out taxes)

    [trans_id] – $transaction_id, means eStores transaction id from for instance paypal or whatever

    At the remark admin area – the partnerprogram is coded into iso, so I think we would need a rawurlencode?

    [first name] – rawurlencode($firstname)

    [last name] – rawurlencode($lastname)

    [/email][email] – rawurlencode($buyer/customer_email)

    [customer id] – the unique customer id of eStore for this customer

    What do we need within the add-on?

    – The possibility to set the url to the program

    – the choice between price parameters (total with tax, total minus tax)

    – the possibility to do remark admin by choice (check boxes) for above variables

    A shortcode or an automated integration in the specified thank-you-page.

    What we have tried:

    We used this function and created:

    – a new custom template for the wordpress tahnk-you-page

    – integrated this function into the page

    – used only the echo-command and integrated into the page

    <?php

    add_action(‘eStore_product_database_updated_after_payment’, ‘custom_log_commission’, 10, 2);

    function custom_log_commission($ipn_data, $cart_items)

    {

    $sale_amt = $ipn_data;

    $trans_id = $ipn_data;

    $customvariables = get_custom_var($ipn_data);

    //Do something here

    echo “<img src=’http://[partnerurl]/verkauft.php?preis=&#8221; . [price variable] . “&order_id=” . [trans_id] . “&remark_admin=” . [first name] . ” ” . [last name] . ” ” . [/email][email] . ” ” . [customer id] . “‘ height=’1′ width=’1′ border=’0’>”;

    }

    ?>

    Only the echo-command integrated into the thank-you-page triggered the partner program and counted a sale, but we had no prices or other variables transmitted (price has been shown as 0)

    Please help and tell us, if you can do this – and please tell us what costs we should expect.

    Thanks in advance

    Alexander

    [/email]

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