Basit Nizami
Basit Nizami

Reputation: 345

In-Channel Monthly / Annual Subscription issue in Roku / Bright Script

I have gone through all of the documentation stuff and have read about the roChannelStore component that can be used for in-channel purchases or subscriptions. I have also found out about the "Fake Server" approach for local development (side-loading) and how it uses the xml files as the server calls instead of actually talking to roku server when we do store.FakeServer(true) where store is an instance of roChannelStore.

My Scenario

I have an application that shows a video thumbnail and when I click on it, it shows an option to "Play".

My Requirement

I want to check if the current user is subscribed to the video shown and only then show the "Play" button. I can do this by fetching the subscribed products using GetPurchases() function and then checking if the product is inside that collection. Otherwise show two buttons. One for monthly subscription price and the other for annual subscription price that I can use to trigger the Order Placement.

The Problem

The way I see it, a product can be set as either Consumable, NonConsumable or MonthlySub in that xml file. Is that possible for a single product that I can choose if I want either monthly subscription or annual? How to handle this scenario? I cannot figure out how to allow both monthly and annual subscription types link to one product and then trigger that specific subscription from my code.

The xml file I'm talking about is the "GetCatalog.xml" xml file, provided in the "csfake" folder in the sample project that I downloaded from https://blog.roku.com/developer/2013/06/06/supporting-in-app-purchases-in-your-roku-brightscript-channels/ (download link in the end)

Any help or pointer would be really appreciated.

Upvotes: 2

Views: 330

Answers (2)

Nas Banov
Nas Banov

Reputation: 29018

Re types of subscriptions, see the dev. portal. The fake server xml file is outdated.

More discussion here https://forums.roku.com/viewtopic.php?f=34&t=97065

Upvotes: 0

squirreltown
squirreltown

Reputation: 66

Why not list two versions of the same product, one with a monthly and one with an annual sub? Then show the proper version in context.

Upvotes: 2

Related Questions