Table of contents

Integration Workflow

This section shows the general guide line of how to integrate with third-party payment providers and implement the in-app purchase and activation.

Four Components

There are four interactive components in this workflow:

  1. Application: It is the app protected by SoftwareShield and to be activated.

When the app is wrapped by SoftwareShield IDE, it has a HTML/Javascript based license UI which can browse to local or external web pages driven by end users.

  1. CheckPoint License Server: It is SoftwareShield cloud-based license activation server.

After successful payment, you can make a call to CheckPoint License Server to generate a new serial number for the order.

  1. Payment Provider: The third-party payment processors that manage the actual payment.

There are many payment providers in the market with different rates and services. Most of them allow you to setup call-back URL once the payment is done, which is needed in our app integration workflow. A payment provider also renders its own payment UI for each app order, collecting customer's secure information (Credit Card, PayPal account, etc.) and processing the payment.

  1. App Store: It sits between app and payment provider to initiate purchase order and process post-payment logics.

The major features are:

  • Pre-Payment UI: for each app there is a pre-payment UI to collect user informations;

Sometimes the Pre-Payment UI can be part of the Payment UI hosted by Payment Provider (such as FastSpring, in this case the payment provider might also provides way of customizing the UI content and style.

  • Post-Payment UI: for each app there is a post-payment UI that renders payment feedback informations to end user.
  • Submit purchase request via Payment provider's API;
  • Implements Call-Back URL to parse payment result from Payment provider;

As you can see, the app store acts as a proxy between App and Payment Provider, for different payment provider the app store should be able to consume different payment API and call-back parameters.

Workflow

  1. The SoftwareShield protected app launches, if the app is not activated, the license UI will pop up (usually the local embedded "UI_HTML/onStart.htm" web page);

The user press the "Buy Now" button on the license UI, as a result app's UI goes to App Store URL of the pre-payment UI (hosted on App Store web server);

  1. The user inputs all necessary information ( Name, Email, Telephone, etc. ) and press the "Submit" button on the order form of Pre-Payment UI;

    The App Store creates a purchase order (with call-back URL as part of the api parameters) and post it to Payment Provider via Payment Provider's web API;

  2. Payment Provider renders its own payment UI to accept whatever supported payment cards or currencies (you might optionally need to embed the Payment Provider's UI in an IFrame of your app store page, or redirect the app store page to Payment UI);

After payment completed, the Payment Provider invokes the Call-back URL implemented by App Store;

  1. The Post-Payment Controller in App Store parses the payment result, if the payment is successful:
  • It retrieves a serial number for the purchase order.

    There are two options to get the serial number:

    (1) The serial number is generated from CheckPoint License Server (ref: Serial Number Generation);
    (2) The serial number is retrieved from a pre-generated serial number pool. You can generate serial numbers on CheckPoint License Management Portal manually and import them to the app store for each app;

  • It sends the purchase order number and serial number via e-mail; It can also log the order to internal database and CRM system;

  1. The Post-Payment Controller renders the Post-Payment UI to the paid customer with the following information:
  • Serial Number;
  • In-App Activation javascript code;
  1. When the Post-Payment UI page is loaded, the in-app activating javascript code on the web page will contact license server to activate the app automatically. Please refer to "Post-Payment App Activation Script" for a script template.

    After the app is activated, the "Play Now" button on app's license UI will become visible (it is previous hidden / disabled for non-trial license model )

Summary

As a software vendor, depending on the payment provider you choose, you may follow the integration guide lines to develop and host the App-Store on your own web server. SoftwareShield provides License server API and in-app activating script template so that you can integrate them with your Post-Payment Controller easily. For example, if you are using MVC/C# framework, the Post-Payment UI can be rendered as a view of your post-payment controller.

Generally speaking, the above guide lines can be applied to all payment providers for in-app purchase & activating integration; however, some payment providers provide more powerful services that could save you time of developing App-Store.

In the next tutorial we will introduce how to integrate SoftwareShield with FastSpring --- a very interesting e-commerce provider which acts as both a payment provider and the App-Store host. For FastSpring, instead of developing your own app store, you simply spend your time customizing the Payment UI styles, the "Post-Payment" logic is implemented by FastSpring as "Fullfillment Actions".

In the future we will develop and host app-store to support most well known payment providers so that our SoftwareShield customers will get an one-stop solution ( e-commerce + DRM ) for the digital app protection and delivery.