|
|
|
|
WLanguage Procedure llamada por inAppListProductInfo Procedure ("Callback") llamada por inAppListProductInfo cuando se reciben los detalles del producto. Este procedimiento puede ser local, global o interno. 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 PROCEDURE 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 Sintaxis
inAppListProductInfo_Callback(<Success> , <Product details>)
<Success>: booleano - True si se recuperó información sobre los productos,
- False en caso contrario. Para get más detalles sobre el error, utilice ErrorInfo antes de cualquier otra llamada a una función de WLanguage (esto reiniciaría el error).
<Product details>: Cadena de caracteres Array de variables inAppProduct que contienen los detalles de cada producto con un ID conocido. Si el identificador no corresponde a un producto existente, se ignora. Si <Éxito> = False, el array estará vacío.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|