IAP problem in iOS

Monkey Targets Forums/iOS/IAP problem in iOS

Kslam(Posted 2014) [#1]
Hi,
Normally, if buy an item, we just click shopthisItem method, then click the buy button on the "Buy Screen". Consider 1 transaction.

The problem is,
I have to click shopthisItem method, then click Buy in "Buy Screen". After that, click shopthisItem method again. Then OnBuyProductComplete, result = 0.
Consider 1 transaction.

If just click shopthisItem method, then click Buy in "Buy Screen". No OnBuyProductComplete result.

The shopthisItem method below:
Method shopthisItem:Void()
UpdateAsyncEvents()	
Local iap:Product = _store.GetProduct("com.abc.mygame.100coin")
Print iap.Identifier()
Print iap.Price()
Print iap.Title()
_store.BuyProductAsync( iap, Self )
End Method


Is there anyone got solution ?

Thank you.


Kslam(Posted 2014) [#2]
I tried to use the bananas iaptest example and put in my product.
I found that Store isBusy.
Anyone got solution ?


Xaron(Posted 2014) [#3]
Actually no. I have mixed results with my IAP stuff as well plus some random crashes... Have to investigate but no time atm for this.


Kslam(Posted 2014) [#4]
Hi Xaron,
My topic is no one reply for 1 week. Actually, I posted to two places(topic), no reply at all. Since u reply to me despite without solution but I appreciated.( I thought no one will reply)
I would like to tell u that I found solution, but not in Monkey-x, is in Cocos2d and Cocos2d-x. The IAP in Cocos2d-x is running perfect.
My game is 60% completed in Monkey-X. I'm going to rewrite it in Cocos2d-x. Start from now, I will code my game by using Cocos2d-x, unless I want to try luck in PSM niche market.

Happy coding.


Alex(Posted 2014) [#5]
I assume your method is called once. When the user taps the button.
I think you should move UpdateAsyncEvents() method into your main OnUpdate() method.
It's very important to UpdateAsyncEvents() every time program updates.