/ This will be called when a purchase completes. M_AppleExtensions.RegisterPurchaseDeferredListener (OnDeferred) On non-Apple platforms this will have no effect OnDeferred will never be called. On Apple platforms we need to handle deferred purchases caused by Apple's Ask to Buy feature. M_AppleExtensions = extensions.GetExtension () Public void OnInitialized (IStoreController controller, IExtensionProvider extensions) / This will be called when Unity IAP has finished initialising. UnityPurchasing.Initialize (this, builder) Public void OnInitialized(IStoreController controller, IExtensionProvider extensions)Įxtensions.GetExtension ().RestoreTransactions (result => / Your IStoreListener implementation of OnInitialized. During this process the ProcessPurchase method of your IStoreListener will be invoked for any items the user already owns. On Apple platforms users must enter their password to retrieve previous transactions so your application must provide users with a button letting them do so. In App Purchases may be restricted in a device’s settings, which can be checked for as follows: var builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance()) īool canMakePayments = builder.Configure().canMakePayments String receipt = builder.Configure().appReceipt Extended functionality Reading the App ReceiptĪn App Receipt is stored on the device’s local storage and can be read as follows: var builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance())
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |