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

cancel commission after refund

by

Tips and Tricks HQ Support Portal › Forums › WP Affiliate Platform › cancel commission after refund

Tagged: affiliate, members

  • This topic has 13 replies, 6 voices, and was last updated 8 years, 3 months ago by admin.
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • December 21, 2010 at 10:22 pm #2416
    kenduret
    Member

    Hello- thanks for the excellent plugin. I’ve had no problems installing and integrating this with s2member following your documentation. Works great!

    What I am interested in doing next is automatically reversing a commission if a refund is issued. s2member has a ‘Refund/Reversal Notification URLs’ field where I’ve added the commission url for wp-affiliate [http://mysite.com/wp-content/plugins/wp-affiliate-platform/api/post.php?secret=xxx&ap_id=%%cv1%%&sale_amt=%%amount%%]

    This is passing a negative sale amount to wp-affiliate and it is being tracked in wp-affiliate but giving a $0 commission instead of subtracting the commission amount.

    Any ideas how I can get wp-affiliate to recognize the negative sale amount as a refund and subtract the commission instead of showing a $0 commission?

    Thanks!

    December 22, 2010 at 1:52 am #27578
    amin007
    Participant

    If the sale amount is negative then it should award a negative commission… are you using a fixed commission per sale model or the percentage based commission model?

    December 22, 2010 at 2:10 am #27579
    kenduret
    Member

    This is percentage based.

    December 22, 2010 at 5:12 am #27580
    amin007
    Participant

    To reverse a commission it just need to know the parent transaction ID. I can add in another API for the refund but the S2Member plugin will need to pass in the value of the ‘parent_txn_id’ field that PayPal sends in the refund IPN. Will S2Member pass the parent transaction ID if we use something like the following?

    [http://mysite.com/wp-content/plugins/wp-affiliate-platform/api/refund.php?secret=xxx&parent_txn_id=%%parent_txn_id%%]

    December 22, 2010 at 7:07 am #27581
    kenduret
    Member

    Yes s2member is using %%parent_txn_id%% as a shortcode replacement for that value.

    December 23, 2010 at 12:29 am #27582
    amin007
    Participant

    I will add in another API for the refund.

    December 23, 2010 at 1:54 am #27583
    amin007
    Participant

    Added the refund handling API. You should be able to use like the following:

    [http://example.com/wp-content/plugins/wp-affiliate-platform/api/refund_handler.php?secret=XXXX&parent_txn_id=%%parent_txn_id%%]

    Replace “XXXX” with the actual secret word.

    There is one catch though… this relies on the fact that the original transaction IDs are also recorded properly. So you will need to make one modification to the normal commission awarding integration. You need to pass in the transaction ID too so the plugin can record them when the commissions are awarded.

    I am guessing you can you pass the transaction ID of the PayPal transaction like the following in your payment notification URL:

    [http://www.example.com/wp-content/plugins/wp-affiliate-platform/api/post.php?secret=XX&ap_id=%%cv1%%&sale_amt=%%amount%%&txn_id=%%txn_id%%]

    December 29, 2010 at 9:41 pm #27584
    kenduret
    Member

    Great- I have this working.

    In s2member under ‘payment notifications’ I used

    [http://yoursite.com/wp-content/plugins/wp-affiliate-platform/api/post.php?secret=xxx&ap_id=%%cv1%%&sale_amt=%%amount%%&txn_id=%%txn_id%%]

    Then under ‘Refund/Reversal Notification’ I used

    [http://yoursite/wp-content/plugins/wp-affiliate-platform/api/refund_handler.php?secret=xxx&ap_id=%%cv1%%&parent_txn_id=%%parent_txn_id%%]

    Then in wp-affiliate platform under settings I checked ‘Use Automatic Commission Reversal’.

    Thanks so much for your help!

    August 10, 2011 at 3:01 am #27585
    itshouldjustwork
    Member

    You guys say the affiliate system will automatically reverse a commission based on a refund from eStore.

    Please forgive me being dense, but I can’t find any information on how does one process a refund from within the eStore so that this automated process works?

    August 10, 2011 at 3:30 am #27586
    amin007
    Participant

    You issue a refund from your PayPal account. Pull up the transaction in question from your PayPal’s transaction history page and hit the “Issue Refund” link. When you do this PayPal will notify eStore automatically and the rest will be taken care of.

    PayPal has lots of helpful documentation on how to issue a refund to your customer.

    December 29, 2014 at 10:27 pm #27587
    hogge1978
    Member

    Hi

    I bought the bundle for eMember / eStore and Affiliate plugin

    Created one product with e-store and tested in sandbox mode.

    two sales with one affiliate link

    two tier level. both commission is booked correctly also for tier level 2

    But when I issue a refund from within paypal the negative commission is not booked and the refund needs some time before estore books it.

    How is the affiliate plugin handling the negative commission? I checkmarked it under settings so I only found this forum post about it. and that refund is done via paypal account directly. is it not working properly with sandbox mode? OR how can I set this up correctly?

    December 29, 2014 at 11:26 pm #27588
    wpCommerce
    Moderator

    @hogge1978, Affiliate plugin will process a refund as soon as it receives notification from PayPal (usually it’s instant). You just need to have the “Automatic Commission Reversal” option enabled for this feature to work (WP Affiliate->Settings->General Settings->Commission Settings).

    You can enable debug to see how refunds are being processed on your website.

    https://support.tipsandtricks-hq.com/forums/topic/how-and-when-to-enable-debug-and-what-does-it-do

    December 29, 2014 at 11:46 pm #27589
    hogge1978
    Member

    This is enabled

    (You just need to have the “Automatic Commission Reversal” option enabled for this feature to work (WP Affiliate->Settings->General Settings->Commission Settings.

    Do I have to enable anything in Paypal? how does the Affiliate Plugin communicate with Paypal after the refund? I mean how does Paypal send the information to the plugin?

    I will try to enable the debug and let you know later. At the moment I can manually delete the commission after I refund something. But if it comes to more than 50 refunds per day, I need this automated thing work properly. thanks for the fast reply, but sorry I already know how to enable this feature and I thought it was clear that I have enabled it.

    What do you need from me to see the mistake in my setting/installation? I am not a programmer, so need to know what you need from the debugging.

    December 30, 2014 at 2:45 am #27590
    admin
    Keymaster

    eStore and the affiliate plugin will take care of it when you enable that setting option.

    You just need to make sure that the PayPal IPN feature is turned on in your PayPal account (it is turned on by default when you create a PayPal account). So unless you have changed it, you shouldn’t need to do anything in your PayPal account.

    Do a test run with the debug option enabled, then share the URL of your product page so we can inspect.

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