ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Mobile specific functions / In-App Purchase functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
WLanguage procedure called by inAppListPurchase
Procedure ("Callback") called by inAppListPurchase when the list of purchases made is received. This procedure can be a local, global or internal procedure.
Example
// Récupération de la liste des achats de l'utilisateur 
inAppListPurchase(ListeAchat, inAppPurchaseID)
PROCEDURE ListeAchat(bSuccès is boolean, sListeAchat is string)
	IF NOT bSuccès THEN
		ToastDisplay(ErrorInfo())
	ELSE
		// Parcours les achats effectués
		FOR EACH STRING sInfoAchat OF sListeAchat SEPARATED BY CR
			// Récupère l'identifiant du produit
			sIDProduit is string = ExtractString(sInfoAchat, 1, TAB)
			// Récupère l'identifiant de l'achat
			sIDAchat is string = ExtractString(sInfoAchat, 2, TAB)
			// Consomme le produit si nécessaire
			IF sIDProduit = "ID_PRODUIT" THEN
				inAppConsumeProduct(sIDProduit, ConsommationProduit)
			END
		END
	END
END
PROCEDURE ConsommationProduit(nSuccès is boolean)
	IF NOT bSuccès THEN
		ToastDisplay(ErrorInfo())
	ELSE
		// Consommation du produit dans l'application
		...
	END
END
Syntax
inAppListPurchase_Callback(<Success> , <PurchaseList>)
<Success>: Boolean
  • True if the list of purchases performed by the user was retrieved,
  • False otherwise. To get more details on the error, use ErrorInfo before any other call to a WLanguage function (this would reinitialize the error).
<PurchaseList>: Character string
Details of each purchase made by the user. The information returned for each purchase has the following format (according to the requested information):
<Product identifier> + TAB + <Order number> + TAB + <Purchase date> +
TAB + <Purchase identifier> + TAB + <Automatic renewal> + TAB +
<End date of subscription>
If several purchases are listed, they are separated by CR characters (Carriage Return).
Minimum version required
  • Version 25
Comments
Click [Add] to post a comment

Last update: 06/11/2025

Send a report | Local help