Making IAP work using multiple LUA files?

Hi Guys,

I'm trying to integrate in-app purchases on my app and I'm stuck. I followed the instructions on how to integrate the store module from init to completing a transaction and the following works:

1. My in-app store can grab the products from iTunes properly.
2. It can check if in-app purchasing is allowed under device restrictions.
3. When I click on my BUY button, it asks me for my iTunes username/password.

However, after entering my iTunes details, nothing happens and my transactionCallback function doesn't seem to work.

I have 2 LUA files--Main.lua and MyStore.lua. Main.lua is where all the "store" functions are placed (initialization, load products, transactionCallback, etc.). MyStore.lua is where the products are displayed and bought. One thing to note is that I'm also using the Director class.

Questions:

1. Since I'm working with 2 files, should I place transactionCallback inside Main.lua or MyStore.lua? Should the function be global?

2. How were you able to integrate IAP using multiple LUA files? I'm pretty sure someone has done this already, I just couldn't find any sample code.

Any help would be greatly appreciated. Thanks in advance! :)

views:1822 update:2012/2/9 11:37:26
corona forums © 2003-2011