Nonstop Brightscript SDK
Purchase Validation
In order to ensure user's only have their points deducted when they actually start watching content, the Nonstop SDK operates a principal of purchase validation. The steps involved are as follows:
presentChoiceCardis called by the integrating app and if the user has sufficient points to purchase the content, the choice card is rendered to the user. See Choice Cards for more details.- The user selects to watch the content Nonstop, triggering the
onWatchNonstopcallback. At this point, the server records that the user has purchased this item - however, no points are deducted from the user at this point. - The integrating app now presents the video player in Nonstop mode. See Playing Content Nonstop for more information.
- As part of performing this, the integrating app will now check the user's MVPD login status and whether their MVPD allows them to watch this particular piece of content (and any other checks it feels are important). If any of these checks fail, then an error message is displayed to the user.
- If these checks pass and the user begins watching the stream, the integrating app calls the
userPeformedTaskmethod on the SDK with details of astart-contenttask. See Tasks for more details. This indicates to the server that the user has successfully started watching this piece of content and so the purchase has been validated. At this point, the server then deducts the user's points. It is therefore vital that this task is recorded at the correct moment - that is, once all checks have passed and the user has begun watching the stream.