Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect currency based on user's location?

I am creating an international web application which users can subscribe to. I want subscription rates to vary based on the user's currency. If my user is in the US, they pay $19/month; if in China, they pay some other rate. So, I am thinking I could detect the user's location, and from their location, I can detect their currency (via a location to currency map table in my database). If I can't detect their currency, then I'll force them to enter it before displaying subscription rates.

Does this seem like an acceptable solution? Will this be pretty reliable? If not, can anyone think of a better solution?

like image 736
Chad Johnson Avatar asked Feb 02 '10 21:02

Chad Johnson


2 Answers

Seems good. Geolocation is pretty reliable, and the mapping from countries to currencies should be easy. I don't know whether such a mapping is already available somewhere, though.

Just make sure that you allow users to change the currency, in case your detection fails. Or they're trying to subscribe while they happen to be abroad, or something.

like image 167
Thomas Avatar answered Sep 30 '22 14:09

Thomas


how to get the location of a user might be helpful

like image 35
infinitloop Avatar answered Sep 30 '22 14:09

infinitloop