Hello guys, I’m using the store.loadProduct() API to build my game store.
However, it is working fine on iOS and Android <5.0, but, from 5.0 and above, the prices on the store are not referring to the right item.
To be more precise, if item #1 is 1.00$ , item #2 is 2.00$ and item #3 is 3.00$, on Android 5.0 and above
item #1 is 3.00$, item #2 is 1.00$ and item #3 is 2.00$.
The code I’m using is the follow:
local function productCallback( event ) print( "Showing valid products:", #event.products ) for i = 1,#event.products do print( event.products[i].title ) print( event.products[i].description ) print( event.products[i].price ) print( event.products[i].localizedPrice ) print( event.products[i].priceLocale ) print( event.products[i].productIdentifier ) end if ( system.getInfo( "platformName" ) == "Android" ) then storeBTN[1073].text = event.products[4].localizedPrice storeBTN[1074].text = event.products[2].localizedPrice storeBTN[1075].text = event.products[5].localizedPrice storeBTN[1076].text = event.products[3].localizedPrice storeBTN[1077].text = event.products[6].localizedPrice storeBTN[1078].text = event.products[1].localizedPrice end if ( system.getInfo( "platformName" ) == "iPhone OS" ) then storeBTN[1073].text = event.products[6].localizedPrice storeBTN[1074].text = event.products[3].localizedPrice storeBTN[1075].text = event.products[4].localizedPrice storeBTN[1076].text = event.products[1].localizedPrice storeBTN[1077].text = event.products[2].localizedPrice storeBTN[1078].text = event.products[5].localizedPrice end if(storeBTN[1087])then for i=1087,1098 do storeBTN[i].isVisible = false end end priceLoaded = true Runtime:removeEventListener("enterFrame", moveLoadingIAP) eventListenerLoadingIAPAdded = false print( "Showing invalid products:", #event.invalidProducts ) for i = 1,#event.invalidProducts do print( event.invalidProducts[i] ) end end
I’ve even tried to put an if statement to check the Android version in use, right after
if ( system.getInfo( "platformName" ) == "Android" ) then
but, at that point, nothing happens and prices are not loading.
Is there something I’m missing?
Thanks and have a nice day.