Please help me out of this ~ IAP fail for 2 weeks....

Hi dear all,

I already stuck on this for 2 weeks, really drives me CRAZY

I hv tested many times, can send request for product list and get information from app store.
( So I assume my product is activated )
But I failed to send out the purchase request(or maybe I send it out but get nothing back )

Guess this function never has been processed
" function transactionCallback( event ) "

This code is 90% from official sample, just copy and paste.

Please teach me how to fix this ~~~ thanks a lot for you guys help!!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---------------------------------------------------------------
-- In APP Purchases
---------------------------------------------------------------
        
        local productsTable = {}
        
        function loadProductsCallback( event )
                
                productsTable =  event.products
                native.showAlert("loadProductsCallback", "products: "..#event.products.." invalidProducts: "..#event.invalidProducts, { "OK" } )
        
        end
        
        arrayOfProductIdentifiers = 
        {
                "com.fingerfever.DonutChaser.ScoreBooster"
        }
        
        function transactionCallback( event )
                native.showAlert("Transaction Start!", "began!", { "OK" } )
        local transaction = event.transaction
 
        -- Once we are done with a transaction, call this to tell the store
        -- we are done with the transaction.
        -- If you are providing downloadable content, wait to call this until
        -- after the download completes.
                store.finishTransaction( transaction )
                
        end
        
        store.init( transactionCallback )
        
        store.loadProducts( arrayOfProductIdentifiers, loadProductsCallback )
        
        store.purchase( productsTable[#productsTable].productIdentifier )
 
<code>

Were you ever able to get an answer to this?
I've just submitted an IAP app to the app store and got it approved. If you still need assistance, just send a reply and I'll help.

views:1355 update:2011/12/31 9:35:10
corona forums © 2003-2011