PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Restores the purchases of non-consumable products previously performed by the user in an iOS application.
Note: This function is useful if the application was reinstalled by the user. We advise you to place the call to this function in a button accessible to the user.
Example
ArrayDeleteAll(garrReceived_iOS)
HourglassNetwork(True)
inAppRestorePurchases(RestoreProc)
// -----------------------------------------
PROCÉDURE RestoreProc(bSuccess is boolean, ...
ProductPurchased is inAppProduct, nQuantity is int)
IF bSuccess THEN
stReceived is ST_Received_iOS
stReceived.nQuantity = nQuantity
stReceived.prodProduct = ProductPurchased
ArrayAdd(garrReceived_iOS, stReceived)
// Refresh the Looper control
LOOPDisplayReceived_iOS()
HourglassNetwork(False)
ELSE
Error("Error while restoring the purchases: " + ErrorInfo())
END
Syntax
inAppRestorePurchases(<Procedure Name>)
<Procedure Name>: Character string (with or without quotes)
Name of WLanguage procedure ("callback" procedure) run when a purchase is restored by the store. This procedure has the following format:
PROCEDURE <Procedure Name>(<Success> is boolean,
<Product> is inAppProduct, <Quantity> is int)
where:
  • <Success> is boolean:
    • True if the product was restored,
    • False otherwise. To retrieve the details of the error, use ErrorInfo before any other call to a WLanguage function (that would reinitialize the error).
  • <Product> is an inAppProduct variable corresponding to the product to restore.
  • <Quantity> is the quantity of product to restore.
Minimum required version
  • Version 19
Comments
Click [Add] to post a comment