ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Mobile specific functions / In-App Purchase functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Restores the purchases of non-consumable products previously performed by the user in an iOS application.
Remark: 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(<WLanguage procedure>)
<WLanguage procedure>: Procedure name
Name of WLanguage procedure ("callback" procedure) run when a purchase is restored by the store. For more details on this procedure, see Parameters of the procedure used by inAppRestorePurchases.
Minimum version required
  • Version 19
Comments
Click [Add] to post a comment

Last update: 06/26/2023

Send a report | Local help