Your Digital Media Has Never Looked So Good

 
EnTerr
** Valued Community Member **
Topic Author
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

How can developer test with different regions?

Mon Jul 11, 2016 2:07 pm

Here is the case: some things Roku are localized per-country. Roku billing, for example - different currencies are used. E.g. cost/amount/total fields for USA contain values like "$1.99" but is entirely unclear what will be there for Canada or UK (undocumented, naturally). Would it be (wrongly) "$1.49" - or "1.49 GBP" - or "£1.49" (and if the latter, will that be the U+00A3 or U+20A4, with or w/o space, is it proper UTF8, url-encode...). Ditto for Euros and Canadian dollar^.

I do want to test all that, full trip to my server after purchase and such. Question is, how do i switch a player to another region? I don't see regional settings on per-account basis. I thought choosing region was on per-device base on initial install but am unclear if that "infects" the account linked to or stays local.

Still, no way to change that once player linked, is there? Factory reset is very slow because the player "locks up" to install a good six dozen channels each time.

(^) as well as Mexican... dollars? I guess MX got "Trumped", for dev.portal says they pay in USD.
 
EnTerr
** Valued Community Member **
Topic Author
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

Re: How can developer test with different regions?

Mon Jul 11, 2016 7:38 pm

Wait, i am confused (again). I just realized i never knew in the first place how Channel Store decides on what region/currency to use for billing purposes - and also i presume to filter down listings by regional availability.

My hunch was wrong and there is no regional choice available when creating new user account, nor when installing new player.
So how is it done?
 
renojim
** Valued Community Member **
Posts: 3490
Joined: Mon Feb 15, 2010 1:35 pm

Re: How can developer test with different regions?

Mon Jul 11, 2016 11:19 pm

EnTerr wrote:
I do want to test all that...

I'm struggling with this exact problem right now. I'm displaying the cost returned by GetCatalog to the user, but I really have no idea what's going to happen in different regions. It would be nice to get some clarification on what symbols may or may not be returned, especially since I'm using a font that may or may not agree with conventions for the different currency symbols.

I'm guessing it's not possible to select a region for one's box, but there needs to be a way to test this sort of thing.

-JT
 
User avatar
RokuJoel
Posts: 1758
Joined: Mon Nov 14, 2011 5:22 pm

Re: How can developer test with different regions?

Tue Jul 12, 2016 5:47 pm

You would need to create a separate Roku User using an ip address from the region you are going to test - so you would, at least for the initial setup, need a VPN connection for each region you are targeting. Once an account is setup, devices linked to that account should be associated with that region.

We unfortunately do not have a way to test multiple regions otherwise (short of us manually going in and changing the region associated with an account - not very scaleable).

- Joel
 
EnTerr
** Valued Community Member **
Topic Author
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

Re: How can developer test with different regions?

Tue Jul 12, 2016 6:48 pm

Thanks RokuJoel! That clarifies for me the status-quo.

So one would need separate "regional" user accounts - and in my case particularly will need to reset to factory and re-link player every time (cannot dedicate a player per each account because of custom provisioning). Or i can wish "touch luck" to those <10% Roku users that are outside US, whatever is clever. Hmm, choices, choices... i'll figure it out. Good to know the limits
 
Tajson
Posts: 337
Joined: Wed Jul 20, 2011 10:50 am

Re: How can developer test with different regions?

Wed Jul 13, 2016 8:56 am

Like Joel said, the Roku account and box gets set (and locked) to the Region store based on your ip address at creation so you would have to have a Roku account for each market that you want to test. You can change the box's region with a factory reset to initialize the box set up again. Also, you would need a credit card with an address within that market to make test payments.

The easier process would be to start a test group and pay some users from each markets to carry out your testing requirements.
 
EnTerr
** Valued Community Member **
Topic Author
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

Re: How can developer test with different regions?

Wed Jul 13, 2016 10:07 am

Tajson wrote:
The easier process would be to start a test group and pay some users from each markets to carry out your testing requirements.

Great point! It's not that it did not occur to me but it's a hullabaloo i hoped to avoid.
Nor do i have budget to pay, this is a "church mouse" operation.
Still, seems like the best course of action - thank you for saying it aloud to re-consider!

So. Any brave souls with Roku 3/Roku 4 player and account from Mexico, Canada, UK or Australia?
If willing to take the adventure of a simple in-app purchase, shoot me a PM with your email address (on Roku account) and country. The purchase will be free. But if somehow charged, i'll fix it by refunding - or paypal-ing 2x the amount.
 
renojim
** Valued Community Member **
Posts: 3490
Joined: Mon Feb 15, 2010 1:35 pm

Re: How can developer test with different regions?

Wed Jul 13, 2016 11:34 am

I'm going to go ahead and set up accounts in all the regions. I've already created a UK account. It will probably take most of the day, but it may be easier than finding volunteers in every region. I'm mostly interested in how the prices are returned for IAPs. I'll post my findings later.

-JT
 
renojim
** Valued Community Member **
Posts: 3490
Joined: Mon Feb 15, 2010 1:35 pm

Re: How can developer test with different regions?

Wed Jul 13, 2016 1:15 pm

Well, I think I'm going to abandon the multiple account approach. It appears that the 'cost' returned by GetCatalog is in GBP for every region I've tried outside of the U.S. I thought this might have something to do with me creating the UK account first, but I just went through the whole process in French and I still see prices in GBP. There must be a bug someplace because when I actually go through the purchase process it shows the price in Euros (e.g., the price returned from GetCatalog is £0.69 and the price displayed to be charged is 0,79 €.

If anyone in Ireland or France wants to give it a try, let me know.

One other note: the cost string returned for the test purchases when side-loaded doesn't match the string returned for a packaged (private or public) channel. The test purchase string displays something like $0.99 USD and the real cost just shows $0.99. There's no GBP appended to the real cost either when it is returned from GetCatalog in a packaged channel for any of the regions I tried. I was going to suggest that there be a method of requesting the test purchases' information for different regions, but if the information for the U.S. region doesn't match the real thing, what's the point?

I think I'll let the <10% or so foreign customers be on their own. :( I think the worst thing that can happen is that the price I display to the user is garbled and/or in the wrong currency.

-JT
 
EnTerr
** Valued Community Member **
Topic Author
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

Re: How can developer test with different regions?

Wed Jul 13, 2016 2:36 pm

@RenoJim -
Side-loaded app is hopelessly stubbed re billing, no good.
See viewtopic.php?f=34&t=95553 where i advocate to make it usable.

Re setting Region, my current understanding is it gets set once-and-for-all during initial user account creation based on geo-IP at the time of creation. In other words, it does not matter what language you do player setup in - when associated with account, it will inherit account's region.

For comparative purposes, here are my results "documenting" roChannelStore existing behavior for US account: viewtopic.php?f=34&t=95592
 
renojim
** Valued Community Member **
Posts: 3490
Joined: Mon Feb 15, 2010 1:35 pm

Re: How can developer test with different regions?

Wed Jul 13, 2016 3:58 pm

EnTerr wrote:
Re setting Region, my current understanding is it gets set once-and-for-all during initial user account creation based on geo-IP at the time of creation. In other words, it does not matter what language you do player setup in - when associated with account, it will inherit account's region.

Yeah, I know. I used a VPN to "locate" myself in France. It was pretty clear the Roku website thought I was in France when my account was setup. It wasn't as clear for the account I setup from Ireland. One of the "what's my IP" sites thought I was in Canada, so I can't be sure where Roku thought I was. I should have checked what country Roku automatically filled in for my address, but I didn't think of it. Either way, GetCatalog returned a cost in GBP when I linked that account to my SE.

Doing a factory reset on my SE and linking it to my "French" account still returned the "cost" in GBP from GetCatalog. I'm guessing that it's a bug in roChannelStore that isn't seen unless the string returned from GetCatalog is actually displayed to the user. Until recently I just hard-coded the prices in USD. The actual screens from the purchase process handled by roChannelStore would, I assume, display the correct price in the correct currency that the user would be charged. I thought it would be cleaner and more professional to display the true price in the user's currency on my screens, but other than hard-coding the strings and doing an update if/when exchange rates are updated (does Roku ever update them?) I don't see a way to do it.

-JT
 
EnTerr
** Valued Community Member **
Topic Author
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

Re: How can developer test with different regions?

Wed Jul 13, 2016 5:33 pm

renojim wrote:
It wasn't as clear for the account I setup from Ireland. One of the "what's my IP" sites thought I was in Canada, so I can't be sure where Roku thought I was. I should have checked what country Roku automatically filled in for my address, but I didn't think of it. Either way, GetCatalog returned a cost in GBP when I linked that account to my SE.
Well, "Northern Ireland" is part of UK/GBP, so where IP was placed vs rest of the island "Republic of Ireland" (".ie" TLD)... go figure

Doing a factory reset on my SE and linking it to my "French" account still returned the "cost" in GBP from GetCatalog. I'm guessing that it's a bug in roChannelStore that isn't seen unless the string returned from GetCatalog is actually displayed to the user.
Ouch. That would be nasty thing for a Frenchman to see, "i can guarantee you that"!
Roku*, can we get a bug filed on this?

I wonder if it's related to this one viewtopic.php?f=34&t=90866&p=510916#p529491 -
where Mexico and Canada were lacking a certain... je ne sais quoi :mrgreen:
 
Tajson
Posts: 337
Joined: Wed Jul 20, 2011 10:50 am

Re: How can developer test with different regions?

Thu Jul 14, 2016 10:33 am

renojim wrote:
Doing a factory reset on my SE and linking it to my "French" account...


Did you have a French IP address while you did the factory reset and linked it to your account?
 
renojim
** Valued Community Member **
Posts: 3490
Joined: Mon Feb 15, 2010 1:35 pm

Re: How can developer test with different regions?

Thu Jul 14, 2016 8:45 pm

The Roku itself never had a French IP address. Its IP address was always a U.S. IP address. The Roku account was created via a Paris IP address and the Roku was linked to that French account. The billing should be connected to the account and not depend on where the box is located. In other words, if I take my Roku that's connected to a U.S. account to France and make an in-app purchase, I'd expect to be charged in USD. Likewise, if my French friend took his Roku that's connected to a French account across the pond, I'm sure he'd expect to still be charged in Euros. I could be wrong about all this, but that's how I'm interpreting what RokuJoel stated a few posts back.

It still appears to me that GetCatalog() returns the cost in GBP unless the account is a U.S. account, but until someone with a box located outside the U.S. and an account created outside the U.S. (and outside the UK) chimes in, we'll never know. For GetCatalog() to return one price and the purchase process to display another just has to be a bug somewhere, even if this is an abnormal case.

-JT
 
renojim
** Valued Community Member **
Posts: 3490
Joined: Mon Feb 15, 2010 1:35 pm

Re: How can developer test with different regions?

Mon Jul 18, 2016 6:00 pm

I'm happy to report that it looks like GetCatalog() may now be returning the cost in the proper currency for the account! I'm assuming it was taken care of on the back end. I've only looked at my French account, but it's now returning a cost in Euros. Yay! I can finally verify that my font can handle the Euro symbol. :D

For anyone wondering how exactly the Euro symbol appears in the cost string:
cost string is "0,79 Gé¼"  <- Windows console can't handle the symbol
Length of 'cost' string is 6
asc() values:  48  44  55  57  32  8364  <- I thought asc() gave a value <= 255?
Hex dump:  302C373920E282AC <- used roByteArray.FromAsciiString(cost) and .toHexString()

An earlier capture of a cost in GBP produced:
cost string is "-ú0.69"
Length of 'cost' string is 5
asc() values:  163  48  46  54  57
Hex dump:  C2A3302E3639

I don't know if I'll bother going through all the different regions, but if anyone wants me to check one or more, let me know.

There's still an oddity with a side-loaded app and the test products. There appears to be a combination of localized number format and prices in USD. I'm seeing "cost: 1,99 $ (USD)" on my SE (note the comma) connected to a French account, but "cost: $1.99" on my Stick (thanks, EnTerr!) connected to a U.S. account.

Thanks to whomever is responsible for fixing this! I just wish some kind of acknowledgement and/or update had been made.

-JT

Who is online

Users browsing this forum: No registered users and 2 guests