1

I have kontagent analytics plugin in my Unity project (v. 1.5.7) and have one problem. When I have purchases, I can set how much a player spends in my game, but if a user doesn't spend in USD I get the wrong amount of money. Can I set the currency Code when track IAP to Kontagent server?

Or can you to advice me any plugins for convert local currency to USD?

UPD: I use link to convert money. But. Example:
Swedish purchase of 7 Krona ($0.99) is convert to 101 cent (need 99). This is because different convert system in my app an server apple.
So, can I set currency Code when track IAP to Kontagent server?

frankiek3
  • 88
  • 5
LuckSound
  • 986
  • 2
  • 12
  • 35
  • @IgnacyDebicki how i can use this link? Can you help me? – LuckSound Aug 18 '14 at 13:00
  • sorry wrong link: http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.xchange%20where%20pair%20in%20%28%22EURUSD%22%29&format=json&env=store://datatables.org/alltableswithkeys&callback= -shows EUR to USD – Ignacy Debicki Aug 18 '14 at 13:01
  • you can use this to download an xml file from yahoo, which has the most recent conversion rate. If you want to convert any value to USD in your code, you substitute the part EURUSD to [currency code you are converting from]USD, to get its value in US dollars. You can than use this xml file to convert the value to USD – Ignacy Debicki Aug 18 '14 at 13:04
  • @IgnacyDebicki I have `{"error":{"lang":"en-US","description":"Query syntax error(s) [line 1:31 no viable alternative at character '‌',line 1:32 no viable alternative at character '​']"}}` when go to link – LuckSound Aug 18 '14 at 13:06
  • 1
    Its wierd, it works, but as soon as i paste it into comments and post it it stops working [Try pressing this and copy the url](http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.xchange%20where%20pair%20in%20%28%22EURUSD%22%29&format=json&env=store://datatables.org/alltableswithkeys&callback=) -- should work now – Ignacy Debicki Aug 18 '14 at 13:09
  • @IgnacyDebicki thx. Now I try to find some articles for get answer in runtime unity project... – LuckSound Aug 18 '14 at 13:15
  • I'm not sure why you have not been using the _Apple Pricing Matrix_ for finding the equivalent price tier... – holex Aug 28 '14 at 13:19

1 Answers1

0

Show the price like this:

_priceFormatter = [[NSNumberFormatter alloc] init];
[_priceFormatter setNumberStyle:NSNumberFormatterCurrencyStyle];
[_priceFormatter setLocale:product.priceLocale];
aLabel.text = [_priceFormatter stringFromNumber:product.price];

and send to kontagent like this:

Upsight.trackInAppPurchase("com.lucksound.product.item", 1,
    UpsightIosPurchaseResolution.Buy, iapReceiptData);

You should update to the latest version (Now Upsight) for you needs. Github Link

You shouldn't need to change the amount separately from apple.

frankiek3
  • 88
  • 5