Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
johnmarsden
Level 7

roChannelStore FakeServer / DoOrder receipt

As I understand it, the DoOrder command only returns Boolean and the confirmation / receipt will be received through the roChannelStoreEvent.

Would this event still fire if you're running FakeServer(true)? I'm trying to see what the receipt looks like and complete the flow, but it's not firing for me after DoOrder.

I assume the format is like "CheckOrder.xml" in the examples I've seen across the web?

Thanks!
0 Kudos
6 Replies
adamkaz
Level 7

Re: roChannelStore FakeServer / DoOrder receipt

Is there any documentation or examples on fakeserver() ? All I see in the documentation is:
If enable is true, enables a test mode for the roChannelStore component.
This test mode short circuits communication to the Ropku Channel store. It makes other methods get their responses to async queries and operations rom configuration files rather than actual server communication
This should never be called in a production channel.


This seems like it would be super helpful to test with, given all the undocumented behavior I've seen.
0 Kudos
johnmarsden
Level 7

Re: roChannelStore FakeServer / DoOrder receipt

Bump. Having a hard time testing without understanding this feature fully.
0 Kudos
Roku Employee
Roku Employee

Re: roChannelStore FakeServer / DoOrder receipt

I think one of the blog examples:

http://sourceforge.net/projects/rokusdk ... p/download

has the XML that FakeServer reads in the csfake folder.

- Joel
0 Kudos
adamkaz
Level 7

Re: roChannelStore FakeServer / DoOrder receipt

Joel - thanks for pointing that out. If anyone else is looking for it, here is the blog writeup https://blog.roku.com/developer/2013/06/06/supporting-in-app-purchases-in-your-roku-brightscript-cha....

I will note that there is at least one difference between test users and actual paid users. This caused some problems for me - so I'll leave this here:

If a test user purchases a subscription and then cancels it, they can "repurchase" the same product again. This actually does not create a new transaction, it just makes the transaction go from "cancelled" to not cancelled.

If a paying user tries to purchase a cancelled subscription (before the original expiration date), they will be told they already purchased the subscription and won't be able to.

In case Roku is interested, the behavior of the test user is preferable to me. We have multiple tiers of monthly plans and need users to be able to switch back and forth between them as they desire.
0 Kudos
TheEndless
Level 7

Re: roChannelStore FakeServer / DoOrder receipt

"adamkaz" wrote:
Joel - thanks for pointing that out. If anyone else is looking for it, here is the blog writeup https://blog.roku.com/developer/2013/06 ... -channels/.

I would caution you to be careful relying on that example. If I'm not mistaken, the fake server will return whatever data is in the xml file, even if it doesn't contain all of the fields that the real channel store returns.

One good thing, Roku now automatically approves in-channel products, so you could publish the channel as a private channel and assign products to it for testing. While you won't be able to directly debug that, you could add code that either prints the output of the channel store calls to a dialog on screen or sends it to a web server for capture to ensure you're getting the correct data.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
abhishek
Level 7

Re: roChannelStore FakeServer / DoOrder receipt

Couldn't find any source code in the provided link. Have you moved your repositories somewhere else? 

Also, does fake server returns the response only available in the xml file in complete purchase flow? or setOrder/makePurchase returns the response from Roku Server?
0 Kudos