Cannot rebill license using FastSpring script

Hi there,

few days ago I sent you an email to your support but I didn't reiceved any answer yet, so I copy here the message:

"I'm using FastSpring with your license system from a year, actually I got a problem with one of my customer (which is the first that bought the software). The problem is associated to the license system, in particular the renew. I never tested this mechanism, but I used the codes that you provided me last year, I attached both in this email. The email that I reiceved from FastSpring is the following:

Order incomplete due to error:

License generator did not have results. (dispenser=LicenseDispenser[nDunX3yZQs6helAHAtk5FA,License Updater,])"

Could you help me to fix this? More details are available in the email

Kind regards

This is actually covered in the help article about FastSpring: https://wyday.com/limelm/help/automate-license-generation-with-fastspring/

Scroll down to the bottom section (after the testing section) "Not seeing the product key?" It covers how to debug your code.

Hi again,

unfortunately, when I test the fulfillment script all works well, the problem only happen in production, any idea?

No, you'd have to run the script in production and log the errors.

Hi again,

I contacted FastSpring and they told me that are not able to solve the problem. The situation is this: I'm paying for two services that aren't able to fix an issue of their own products.I just need a php script that renew the license automatically from FastSpring to your api key. Last year you sended me this two scripts:

https://pastebin.com/Yv07i6Mb (license generation)https://pastebin.com/L32pLRNE (license renew)

the first script works well, the last is causing the following error:

License generator did not have results. (dispenser=LicenseDispenser[nDunX3yZQs6helAHAtk5FA,License Updater,])

Can you solve the problem with FastSpring without me having to bounce from one service and the other and waste my time?

I posted my scripts in this post (note that I do not work for Wyday, just a user who uploaded my scripts to help other users): https://wyday.com/forum/t/4270/fastspring-and-saas/

It looks like your scripts are incorrectly modified versions of my scripts.

You should be using $subscription not $reference as the subscription id. On the initial order, you have two unique identifiers: the order reference id ($reference) and the subscription id ($subscription). On a rebill, a new order reference id is created, but the subscription id remains consistent so you should be using $subscription not $reference.

to fix your issue, update your scripts to use $subscription instead of $reference and then manually update the custom license fields for your existing orders in LimeLM by replacing the initial order reference id with the subscription id (I'm not sure if FastSpring shows the subscription id in their admin panel, but they should be able to tell you the subscription id for a given order reference id). Once you have manually updated the custom license fields for your existing orders in LimeLM, your existing orders should renew correctly (with the update to your scripts).

Hi anon,

thank you very much for your help, I contacted FastSpring again to get all the subscription ids of my customers.I did some tests and seems that your scripts are working well, thanks again, wish you a good day 😉