This document illustrates the now.gg Payments Quick Integration flow to enable in-app purchases within your game on Unity.
Here is a comparison between the Standard and Quick integrations:
| Particulars | Quick Integration | Standard Integration |
|---|---|---|
| Integration Flows | You should use the Quick Integration flow only if your IAP implementation is based on Unity’s StandardPurchasingModule. | You should use the Standard Integration flow for all other payment integration requirements. |
| Consumable and Subscription Products | Quick Integration flow only supports one-time consumable products. | Standard Integration flow supports both consumable and subscription products. |
The now.gg Payments Unity module is included as a Unity package file NowGGUnitySdk.unitypackage.
Add the module to your Unity project:
NowGGUnitySdk.unitypackage from your system.
Assets/Plugins/Android directory of your project using the Unity External Dependency Manager.Once the now.gg Payments module has been imported, and the dependencies have been added; you can follow this section to implement now.gg Payments with your app/game.
The following steps are required to configure now.gg Purchasing module with your app.
StandardPurchasingModule.Instance() used in Unity IAP with now.gg Purchasing Module NowGG.Sdk.NowGGPurchasingModule.Instance().PaymentId to now.gg Payments module while initializing payments.The following sample illustrates these configurations:
public void Start()
{
/* Current code
var builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance());
*/
// Replace with
var builder = ConfigurationBuilder.Instance(NowGG.Sdk.NowGGPurchasingModule.Instance());
NowGG.Sdk.NowGGPaymentsSdkManager.Instance.PaymentId = "<your_Payment_ID_here>";
}
StandardPurchasingModule instance will be returned by default in case now.gg Payment isn’t supported.PaymentId is a unique identifier for your app.
PaymentId can be found under the App Details section of nowStudio. More information.Payments
Payments
Document Rev. 1.0