Please enable JavaScript to view this site.

Altova MobileTogether Designer

The Query Purchases action (screenshot below) queries the respective app store for all purchases made with the current user account, including those made on other devices. The action updates the Purchases element of the $MT_IN_APP_PURCHASE page source.

 

In the case of iOS clients, a server connection is necessary because the Apple Store only provides a server-side "receipt validation". The receipt validation provides a JSON string that contains the purchase data of the current user of the device. The Purchases element of $MT_IN_APP_PURCHASE is updated with key data of the purchases returned in the JSON string. If you want to use any other data that is available in the JSON string but not added to the Purchases element (for example, the end date of a subscription), you can directly access the JSON string, which is stored in the attribute $MT_IN_APP_PURCHASE/Root/Purchases/@OriginalJSON (see In-App-Purchase Page Source).

MTDInAPActionQueryPurchases
Note:For iOS devices that connect to the Apple Store via a server (instead of directly), additional time will be required for the additional steps and processing. So, in these cases, you should consider carefully where in the workflow you are using the Query Purchases action and how this could affect performance.

 

Note:On iOS devices, you can use the Restore Purchases action to obtain information about the end user's purchases..

 

Note:If this action is the first In-App Purchase action to be added to the design, then the $MT_IN_APP_PURCHASE page source tree will be added automatically to the design's page sources. For a description of this page source, see the topic In-App-Purchase Page Source.

 

MobileTogether extension functions

MobileTogether provides a range of XPath extension functions that have been specifically created for use in MobileTogether designs. Some functions can be particularly useful with specific actions. For example, mt-available-languages() returns the languages in which the solution is available and could, for example, be used with the Message Box action. If a function is especially relevant to this action, it is listed below. For a full list of extension functions and their descriptions, see the topic MobileTogether Extension Functions.

 

mt-client-ip-address()

mt-in-app-purchase-platform-to-product()

mt-in-app-purchase-product-to-platform()

mt-in-app-purchase-service-started()

 

© 2015-2021 Altova GmbH