S2member Coupon code commissions not working with trial (iDevAffiliate)

Hey guys,

I wonder if any of you’s can help out here. I am having issues with coupon codes with s2member pro and idev after a trial has been selected. Here is a summary of the situation:

  • IP tracking works fine when purchasing upfront or with the 7-day trial.
  • coupon codes tracking works fine when purchasing up front.
  • coupon code tracking does not work when a trial has been selected and payment is taken 7-days later.

I have isolated the issue to the API notification not including the coupon code in the URL that is sent to iDev by looking through the http-api log viewer.

The API url is usually:

https://XXXXXX.com/idevaffiliate/sale.php?profile=83&idev_saleamt=XX&idev_ordernum=XXXXXXXXXXX&coupon_code=CODE&ip_address=111.111.111.11

But after a trial it is:

https://XXXXXX.com/idevaffiliate/sale.php?profile=83&idev_saleamt=XX&idev_ordernum=XXXXXXXXXXX&coupon_code=&ip_address=111.111.111.11

(note that “CODE” is missing)

I then noticed that the coupon code is also not included when I get an email payment notification.

So my question: is the ability to include coupon codes in all payment notifications possible with the current version of s2member?

If not, would it be difficult to implement? I have a little bit of coding experience and a lot of perseverance :slight_smile:

Cheers

I just noticed under the API section, it says:

“Coupon Replacement Codes (applicable only w/ s2Member Pro-Forms):
These are ONLY included with payments that occur during checkout. They will NOT be provided with any future recurring payments.”

Pretty annoying to have to manually create commissions. Does anyone know a way around this?

Cheers

There is a solution: set the notification URL to a script of yours, that will count the need sum and will pass it to affiliate software.

Hey Krumch,

Thanks for the reply. So the problem isn’t that it’s not sending the amount to the affiliate software, it’s that it doesn’t know the coupon code because it’s not given in the payment info.

Do you think there is a way to write a piece of code that will check if that user used a coupon code (at any point in time), and then pass that info along to the affiliate software along with the payment details?

cheers

Hi Richard,

May be possible, not sure, must review your site. Please see my PM.