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!
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.
Bump. Having a hard time testing without understanding this feature fully.
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 - 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-channels/.
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.
“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.
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?