I am using code from the
Roku Billing Sample to implement in-app purchasing. When I run the billing task in my app, I get a warning about:
BRIGHTSCRIPT: WARNING: clDoOrder: GetCatalog must be called on the same roChannelStoreObject before calling DoOrder
In the documentation for roChannelStore it mentions having only one instance of ChannelStore instantiated during the purchase flow. Looking at the RokuBillingTask from the sample code, a new channel store is created each time the task is run. So it creates a new ChannelStore instance when you call GetProducts and then it creates another ChannelStore instance when you call PurchaseProduct. This means multiple instances of the ChannelStore are created and we get the above error.
So how does Roku suggest using the ChannelStore and tasks in a way that works with the restriction of having only one instance of a ChannelStore?