Online Trial Extension broken?

I'm using version 3.4.6 of the C API.So far, I have only recreated this behavior on Mac OS. I have not attempted on another machine.

Rather than telling the user to copy and paste the extension text into a box (or type it in) I've decided to have the program read the trial extension code from a text file on the disk.

If I open a file containing an offline trial extension, all is well. ExtendTrial returns TA_OK and the expected number of days are added to the trial period.

However, if I try using a file with a 34-character online extension code, ExtendTrial always returns TA_FAIL. It makes no difference whether there is a newline after the code or not.

There is no difference in my program logic from one case to the other. The only difference is whether the text file being opened contains an online or offline key. And the online key still shows 0/1 uses.

At first, I thought maybe it was because using an online extension was more sensitive to the fact that I wasn't calling UseTrial first. (UseTrial was only being called after we had confirmed that there were still days remaining on the trial with TrialDaysRemaining) I modified my code to always call UseTrial with TA_USER immediately before calling ExtendTrial, and it made no difference in behavior.

If the customer is not activated, and you've decided to use our trial system, then you should always call UseTrial(). Preferably using TA_SYSTEM, and you should always look at the error code from UseTrial(). Don't just assume it will succeed.

However, if I try using a file with a 34-character online extension code, ExtendTrial always returns TA_FAIL. It makes no difference whether there is a newline after the code or not.

We can't reproduce this here. Are you using the latest version of TurboActivate? Currently 3.4.6. If not, before you do anything else, get that and try again.

Next, try hardcoding the trial extension string inside in your app with a direct call to ExtendTrial(). Does it work?

Mystery solved.

As stated in my original post, yes, I'm using 3.4.6.

The routine I was using to read in the text file ensures that the last non-null character of the resulting string is a newline.The handler for the offline trial extension appears to be tolerant of this.The handler for the 34-character online extension codes is not.

Trimming the extraneous newline before passing the string to ExtendTrial ensures proper handling in all cases.

Thank you.