iap_restore_all

Restores all purchases for the game.

Syntax:

iap_restore_all();


Returns: N/A


Description

Restores all purchases to their default status for the game and user. This would be applicable if (for example) the user has changed device or removed the title from their current device and has re-installed the title. This will trigger two IAP Events, with the first being of the type iap_ev_restore, and the second of the type iap_ev_purchase. For the restore event, the ds_map iap_data will have the following extra key which can then be checked to make sure that the products and purchases have been successfully restored:

For the Purchase event, the iap_data map will contain the same information as that which is returned when you call iap_acquire.


Example:

iap_restore_all();

This would request that the target store restores all purchases for the game on the device running it, and it will trigger an IAP Event with the result of the call stored in the special iap_data ds_map.


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