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:
- "id" - The product ID string.
- "title" - The title of the product.
- "description" - The description of the product.
- "price" - The price of the product, where available (not all stores support this).
- "type" - The type of product, which will be either "Consumable" or "Durable", where available (not all stores support this).
- "verified" - Will be either true or false (ie: real numbers 0 or 1) depending on whether or not your game has received details of this product from the store and thus believes this product to be available for purchase.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.
|purchase_id||The product ID string for the purchase.|
|ds_map||The ds_map that will store the product information.|
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")));
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.