Hi, what happens when you press the Clear button, any errors? Are you on a Mac or Windows PC? Did you specify a price for your “Dice Tower” product - else it will be granted automatically when you run the game.
Thanks for the quick reply Baroni. No errors. Upon clicking “clear” I just get the attached pop-up, and when I click clear on that nothing happens, errors or otherwise. I click refresh but nothing happens.
And yes, I’ve placed a price on the product as shown in the other attachment.
I’m developing for both windows and mac, but am currently just trying things on my windows machine.
Very weird. What the code does is just calling PlayerPrefs.DeleteAll. You could call this yourself in an Awake method as a workaround, for example. Alternatively, you could open the Registry, find the entry and delete it (see here for the location).
If you try to delete it within the Registry, please let me know what content is shown there. I am curious why the code does nothing though. Could you also let me know what Unity version you are running? Will try to reproduce this on my end.
I think that’s a good compromise. Will just call it myself then.
Not quite sure what’s going on myself as well. I tried looking at the registry as you said, but having never modified anything in registry before, I couldn’t quite figure it out. Will let you know if I do.
Thanks again for the quick reply!
Hey Baroni, thanks for the support. I have a quick question, is there a way to fetch the price in the user currency on Steam? (BRL in Brazil, EUR in Euro-zone, etc)
Or do I need to manually implement that somehow?
After Installing unity purchasing and service core, the project linked successfully but when I tried to follow the next step ( To tick Enable Integration) then I wasn’t able to check mark it. Please help
Hi @mbast , Simple IAP System does not fetch item prices on Steam by default, since that requires doing two additional requests. This might not be something every user needs, so I kept it separate. The local currency price is displayed when initiating the purchase only, in the Steam popup.
If you would like to know the local currency price beforehand, you would have to do a call to RequestPrices, and then GetItemPrice on the SteamInventory API as described here:
https://partner.steamgames.com/doc/api/ISteamInventory#RequestPrices
@Shivaji_Games Thanks for reporting this, I am aware of this issue but have not been able to reproduce yet. Could you please let me know what Unity version you are running? As a workaround, you would want to try clicking on the “Enable Integration” text or next to the checkbox so it gets highlighted in blue (selected) and then pressing Enter on your keyboard.
@all Looking for games which integrate Simple IAP System for showcase screenshots and/or a quick video for my trailer! Video will be splitted into 7 seconds of gameplay, 3 seconds shop. Game name and platform will be mentioned.
There is no work for you, just send me a link to your published game, please
@Baroni1 I am using Unity 2021.2.19f1. Thank you It’s working now after following what you said (pressing enter after clicking on text).
Thank you for pointing out the correct API method to look for, I spent many hours looking into the wrong place. It was way easier than I expected. SteamInventory.RequestPrices and SteamInventory.GeItemPrice was all I needed.
I’d recommend having this as an option in future updates, it can be confusing for the end user if they see a different currency when they initiate the checkout.
I even got a message from the Steam review team pointing that out:
Caution: The currency shown in-game doesn’t display prices in the user’s own currency. For example, an item is shown in-game to cost $1.99, but when clicking to buy this item, it actually costs 2.69 Canadian dollars. It looks like you do make a currency conversion, so this isn’t a major problem. However, we recommend setting up the game to display prices in the user’s own currency. You can use the ISteamMicroTxn/GetUserInfo API to display the user’s currency, and display your prices accordingly
The difficulty for this is having to consider all the different currency codes, where some of them should be displayed before the price ($1.99) and some of them after (1.99€). Will have to investigate how to handle it within SIS correctly for all cases - thanks for the feedback!
I honestly haven’t thought about the position, I just put the symbol before the number. But after reading your message I did a little research and this is what I found, which may help you:
System.Globalization.NumberFormatInfo.CurrencyPositive
Is a number from 0 to 3, being:
0 = $n (1.99)
1 = n (1.99$)
2 = n ( 1.99)
3 = n (1.99 )
public static CultureInfo GetCultureInfoFromCurrencyCode(string currencyCode) {
CultureInfo[] cultures = CultureInfo.GetCultures(CultureTypes.SpecificCultures);
foreach (CultureInfo cultureInfo in cultures) {
RegionInfo regionInfo = new RegionInfo(cultureInfo.LCID);
if (regionInfo.ISOCurrencySymbol == currencyCode)
return cultureInfo;
}
return CultureInfo.InvariantCulture;
}
public static string GetCurrencySymbolFromCultureInfo(CultureInfo cultureInfo) {
if (cultureInfo == CultureInfo.InvariantCulture) return string.Empty;
RegionInfo regionInfo = new RegionInfo(cultureInfo.LCID);
return regionInfo.CurrencySymbol;
}
public static string GetPriceString(string currencyCode, ulong value) {
CultureInfo cultureInfo = GetCultureInfoFromCurrencyCode(currencyCode);
string symbol = GetCurrencySymbolFromCultureInfo(cultureInfo);
string valueString = value.ToString().PadLeft(3, '0');
string parsedString = valueString.Insert(valueString.Length - 2, cultureInfo.NumberFormat.NumberDecimalSeparator);
int currencyPattern = cultureInfo.NumberFormat.CurrencyPositivePattern;
string priceString = parsedString;
switch (currencyPattern) {
case 0:
priceString = $"{symbol}{parsedString}";
break;
case 1:
priceString = $"{parsedString}{symbol}";
break;
case 2:
priceString = $"{symbol} {parsedString}";
break;
case 3:
priceString = $"{parsedString} {symbol}";
break;
}
return priceString;
}
@mbast awesome, thank you for taking the extra time! Definitely noted as a feature request with that namespace in mind.
Hi,
As of this morning IGooglePlayStoreExtensions.IsPurchasedProductDeferred(Product p) call inside the HasPendingPurchases() method fires a warning stating “Cannot parse Google receipt for transaction”. I debugged and found out that GetPurchaseState method of IGooglePlayStoreExtensions interface can’t get the payload out of receipt string.
Does anyone have any idea what may have gone wrong?
Hi @doganakdag , what SIS and Unity IAP version are you using? Could you post an anonymized receipt string that throws the error?
Hello, I am using Receipt Validator, want to know what should be filled in User ID (Receipt Validator Script) And from where I can get it ?
Hello @Shivaji_Games , thank you for trying out the Receipt Validator. The User ID is an identity of the user that you would assign after the user logged into your app. If you are on the FREE plan or do not have any login in your app, just leave it empty. The Receipt Validator will then generate an internal User ID for transaction tracking purposes.
If you do have a login (like Google Play Games or Sign In With Apple), you would set the User ID value to the user token you received from your login. For more information, please see the documentation.
Also, for support requests about the Receipt Validator feel free to use the internal support ticket system, after you logged into the dashboard, in the lower left corner. Thanks!
Important note: If you are using Simple IAP System in your project, it comes with a component that works with the Receipt Validator service already. To be clear: you do not have to import the Receipt Validator SDK separately! Please see this page for details and the short setup guide.
@Baroni1 Hi there! Just saying [Unity IAP 4.7.0 was released]( Unity IAP package 4.12.2 is now available page-2)
@justtime Got the forum notification, no changes necessary (but an update will be released later today anyway with other fixes), thanks for the heads up