|
|
|
|
WLanguage procedure called by inAppListProductInfo Procedure ("Callback") called by inAppListProductInfo when the product details are received. This procedure can be a local, global or internal procedure. arrIdentifier is array of strings IF InAndroidMode() THEN arrIdentifier = ["product1", "product2", "product3", "product4", "unknown product"] ELSE arrIdentifier = ["ProductID1", "ProductID2", "ProductID3", ... "ProductID4", "ProductID5", "unknown product"] END IF inAppListProductInfo(arrIdentifier, ListProductInfo) THEN  ToastDisplay("Asks for the list of products sent.") ELSE Error("ERROR: " + ErrorInfo) END // -------------------- // ListProductInfo procedure PROCÉDURE ListProductInfo(bSuccess is boolean, arrProducts is array of inAppProduct) IF NOT bSuccess THEN Error("Error: " + ErrorInfo()) RETURN END LooperDeleteAll(LOOP_ProductInfo) FOR I = 1 _TO_ arrProducts.Count LooperAddLine(LOOP_ProductInfo, arrProducts[I].Caption, ... arrProducts[I].Description, arrProducts[I].Identifier, arrProducts[I].Price) END // Copy into the array global to the window garrProduct <= arrProducts Syntax
inAppListProductInfo_Callback(<Success> , <Product details>)
<Success>: Boolean - True if information about the products 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).
<Product details>: Character string Array of inAppProduct variables containing the details of each product with a known ID. If the identifier does not correspond to an existing product, it is ignored. If <Success> = False, the array will be empty.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|