This section shows the general guide line of how to integrate with third-party payment providers and implement the in-app purchase and activation.
There are four interactive components in this workflow:
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.
After successful payment, you can make a call to CheckPoint License Server to generate a new serial number for the order.
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.
The major features are:
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.
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.
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);
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;
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;
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;
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 )
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.