iap_product_details

Add details of a single product to a ds_map.

Syntax:

iap_product_details(product_id, ds_map);


Argument Description
purchase_id The product ID string for the purchase.
ds_map The ds_map that will store the product information.


Returns: N/A


Description

With this function you can populate a previously created ds_map with a number of key/value pairs that describe the given purchase. The following data is returned within the map:

NOTE: The ds_map used is not created by the function, meaning that you must create it previously and remove it again from memory when not in use using the appropriate function.


Example:

var p_map = ds_map_create();
iap_product_details(ds_map_find_value(iap_data, "index"), p_map);
p_title = " + string(ds_map_find_value(p_map, "title")));
p_description = " + string(ds_map_find_value(p_map, "description")));
ds_map_destroy(p_map);

The above code will create a ds_map and then populate it with the product details for the product taken from the special iap_data ds_map which is created exclusively in the IAP Event. The "title" and "description" are then added to variables so that they can later be drawn on the screen.


Back: In App Purchases
Next: iap_purchase_details
© Copyright YoYo Games Ltd. 2018 All Rights Reserved