NOTE: I'm in contact with Apple and this MAY be an issue with how I submitted my IAPs. I'm really starting to hate working with Apple. The entire process with them has been hugely convoluted and unnecessarily complex. I'll keep everyone posted.
Hi all, I'm getting an error when trying to process app purchases...
Here's the code I use to initialise my IAP:
if (left(getDeviceBaseName(),3) = "ios")
iap_onoff = true
inAppPurchaseSetTitle(getAppName())
inAppPurchaseAddProductID("WO_COIN_DOUBLER",0)
inAppPurchaseAddProductID("WO_COINS_10K",1)
inAppPurchaseAddProductID("WO_COINS_25K",1)
inAppPurchaseAddProductID("WO_COINS_50K",1)
inAppPurchaseAddProductID("WO_COINS_100K",1)
inAppPurchaseSetup()
endif
if (left(getDeviceBaseName(),7) = "android")
iap_onoff = true
inAppPurchaseSetTitle(getAppName())
inAppPurchaseAddProductID("android.item.coindoubler",0)
inAppPurchaseAddProductID("android.item.10kcoins",1)
inAppPurchaseAddProductID("android.item.25kcoins",1)
inAppPurchaseAddProductID("android.item.50kcoins",1)
inAppPurchaseAddProductID("android.item.100kcoins",1)
inAppPurchaseSetup()
endif
And here's the function I use to call the purchase:
function PurchaseItem(ItemIndex)
RetVal = 0
if (iap_onoff = true)
sortie = false
inAppPurchaseActivate(ItemIndex)
while (getInAppPurchaseState() = 0)
Sync()
endwhile
if (getInAppPurchaseAvailable(ItemIndex) = 1)
RetVal = 1
else
RetVal = 0
endif
else
RetVal = 0
endif
endfunction RetVal
Can anyone see a problem here? I followed the AppGameKit tutorials on this one to sort it out, and can't really see a difference in my process to the official way... And yet I just got my app rejected from the Apple store submission because of this glitch...
(I'm currently riding my test team to see why they didn't pick up on this before submission, but I figured I'd post here, too, since you guys are cool)
EDIT: This issue seems to only be happening on iOS
I work full-time making games in AGK2 and DBpro. Living the dream!