Merge pull request #13033 from MednauN/master
Add currency code to iOS product details response
This commit is contained in:
commit
d629a753ec
1 changed files with 3 additions and 0 deletions
|
@ -92,6 +92,7 @@ void InAppStore::_bind_methods() {
|
||||||
PoolRealArray prices;
|
PoolRealArray prices;
|
||||||
PoolStringArray ids;
|
PoolStringArray ids;
|
||||||
PoolStringArray localized_prices;
|
PoolStringArray localized_prices;
|
||||||
|
PoolStringArray currency_codes;
|
||||||
|
|
||||||
for (int i = 0; i < [products count]; i++) {
|
for (int i = 0; i < [products count]; i++) {
|
||||||
|
|
||||||
|
@ -105,12 +106,14 @@ void InAppStore::_bind_methods() {
|
||||||
prices.push_back([product.price doubleValue]);
|
prices.push_back([product.price doubleValue]);
|
||||||
ids.push_back(String::utf8([product.productIdentifier UTF8String]));
|
ids.push_back(String::utf8([product.productIdentifier UTF8String]));
|
||||||
localized_prices.push_back(String::utf8([product.localizedPrice UTF8String]));
|
localized_prices.push_back(String::utf8([product.localizedPrice UTF8String]));
|
||||||
|
currency_codes.push_back(String::utf8([[[product priceLocale] objectForKey:NSLocaleCurrencyCode] UTF8String]));
|
||||||
};
|
};
|
||||||
ret["titles"] = titles;
|
ret["titles"] = titles;
|
||||||
ret["descriptions"] = descriptions;
|
ret["descriptions"] = descriptions;
|
||||||
ret["prices"] = prices;
|
ret["prices"] = prices;
|
||||||
ret["ids"] = ids;
|
ret["ids"] = ids;
|
||||||
ret["localized_prices"] = localized_prices;
|
ret["localized_prices"] = localized_prices;
|
||||||
|
ret["currency_codes"] = currency_codes;
|
||||||
|
|
||||||
PoolStringArray invalid_ids;
|
PoolStringArray invalid_ids;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue