December 21, 2010 at 10:22 pm #2416
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
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
This is percentage based.December 22, 2010 at 5:12 am #27580
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
Yes s2member is using %%parent_txn_id%% as a shortcode replacement for that value.December 23, 2010 at 12:29 am #27582
I will add in another API for the refund.December 23, 2010 at 1:54 am #27583
Added the refund handling API. You should be able to use like the following:
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
Great- I have this working.
In s2member under ‘payment notifications’ I used
Then under ‘Refund/Reversal Notification’ I used
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 #27585itshouldjustworkMember
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
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 #27587hogge1978Member
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 #27588wpCommerceModerator
@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.December 29, 2014 at 11:46 pm #27589hogge1978Member
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 #27590adminKeymaster
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.
- You must be logged in to reply to this topic.