Collapse Menu
Docs Home
Extensibility Options
Contact Support

Integrating Nalpeiron

Overview

This article describes how to set up integration between Nalpeiron and your FastSpring Store.

The Nalpeiron Licensing & Analytics Service offers both online and offline activation, usage analytics, analytics on trial conversions, sales cycles, and more. You can sign up for a free trial for Nalpeiron and integrate the service with FastSpring in just a few short minutes.

 

Dashboard Setup

In the Dashboard for your FastSpring Store, set up a license fulfillment action, which will issue a license on a non-subscription product.

  1. From the Dashboard, select the Products menu.


     
  2. Click the ProductsBundles, or Subscriptions tab, depending on the product for which you want to set up Nalpeiron integration.

     Note about bundles

    Bundles can have a fulfillment action, such as a license generator, attached to the bundle itself. However, if the products that make up the bundle (i.e., the bundle children) have their own fulfillments, you might want to avoid setting up a fulfillment action on the bundle. Doing so prevents duplicate fulfillment generation (e.g., having the license key appear twice on the completion page).
     
  3. Click the product, bundle, or subscription for which you want to set up Nalpeiron integration, to open the product's details.
  4. In the product details, click ADD FULFILLMENT.


     
  5. In the Add Fulfillment Action dialog, select Generate a License.


     
  6. In the resulting drop-down list, select Script (PHP or JavaScript).


     
  7. Click NEXT at the lower right-hand corner of the page.
  8. Select the desired options for the Output Format and License Name, and ensure that the Script Type is set to JavaScript. Then, click CREATE.


     
  9. In the Script Source Code (JS) field, replace the existing placeholder content with the following script:
    Example of Nalpeiron integration script
     
var auth = "<auth><username>YOUR NALPEIRON WEB SERVICES USER NAME</username><password>YOUR NALPEIRON WEB SERVICES PASSWORD </password><customerid>YOUR NALPEIRON CUSTOMER ID</customerid></auth>";

var data = "<data><productid>NALPEIRON PRODUCT ID</productid><amount>"+quantity+"</amount><profilename>NALPEIRON LICENSE PROFILE</profilename></data>"

var response = httpPost("https://my.nalpeiron.com/shaferws.asmx/GetNextLicenseCode", {
    "Auth": auth,
    "Data": data
});
var xml = response.body;
var licenses = xml.match(">(.*)<")[0];
licenses = licenses.substring(1, licenses.length - 1);
licenses = licenses.split(",");
var output = "";
for (var i = 0; i < licenses.length; i++) {
    license = output + licenses[i] + "\n";
}
license;
  1. Edit the script to replace the following placeholders with the information from your Nalpeiron account:
    • YOUR NALPEIRON WEB SERVICES USERNAME
    • YOUR NALPEIRON WEB SERVICES PASSWORD
    • YOUR NALPEIRON CUSTOMER ID
    • NALPEIRON PRODUCT ID
    • NALPEIRON LICENSE PROFILE
  2. ​​​​​​​​​​​​Click  near the top right-hand corner of the page.

For Further Assistance

If you need assistance integrating Nalpeiron with FastSpring, please contact Nalpeiron support.

Try FastSpring

Get a free account and see why FastSpring is the ecommerce partner of choice for software providers around the world. Try our full-service ecommerce solution today to unlock revenue growth for your online company.