store.canMakePurchases doesn't working

Hi,

I am testing the IAP on my iPhone (on dev env.). All working well except the store.canMakePurchases.

I have turn on the restriction on my iPhone so I will not be able to do the purchase but the store.canMakePurchases retun True instead of False - Why ?

........ elseif ( system.getInfo( "platformName" ) == "iPhone OS" ) then store = require( "store" ) store.init( "apple", storeTransaction ) if store.isActive then print (store.canMakePurchases) -- Print True !!! if (store.canMakePurchases) then store.purchase( { i\_productID } ) else native.showAlert( "Notice","Note that purchasing is forbidden. In order to enable purchases turn-off the Restriction option on your iPhone",{ "OK" } ) end end .....

Can anyone help on this one ?

Does it print true or false?

Print true 

Do you get the alert in the else block?
Are you user i_ProductID is valid?

Hi Bob,

I don’t get the alert in the else statment.

Instead it run the code line : store.purchase( { i_productID } ).

and that I am geting the following error message (on my iPhone 5): 

Title of error message : “Purchase” 

Body of message: “In-app ourchases are not allowed.” 

After click the “OK” button it got as fail with the following data :

transaction.errorType = “paymentNotAllowed”

transaction.errorString =“Cannot connect to iTunes Store”

BTW : if the the restriction is turn off I have no issue to purchaes the i_productID - so this product is valid one.
 

Thanks 

  Yuval

Can I get you to file a bug report?  Please create a simple sample app that demonstrates the problem. It needs to be a complete project with main.lua, config.lua and build.settings and any assets needed to run/build the app. Put it in a .zip file and use the Report a Bug link above.

Rob

Hi Bob,

I have created a bug report as you suggested 2 weeks ago. 

I heard nothing since then - How can I know the status of the bug ?

Yuval F

Please post the CaseID number that was in the subject of the email you got after filing the bug report here and I’ll go look. But between Christmas and New Years, making each week a short 3 day weeks and a lot of vacations in between, I doubt any one has had time to look at it.

Rob

Can anyone help on this one ?

Does it print true or false?

Print true 

Do you get the alert in the else block?
Are you user i_ProductID is valid?

Hi Bob,

I don’t get the alert in the else statment.

Instead it run the code line : store.purchase( { i_productID } ).

and that I am geting the following error message (on my iPhone 5): 

Title of error message : “Purchase” 

Body of message: “In-app ourchases are not allowed.” 

After click the “OK” button it got as fail with the following data :

transaction.errorType = “paymentNotAllowed”

transaction.errorString =“Cannot connect to iTunes Store”

BTW : if the the restriction is turn off I have no issue to purchaes the i_productID - so this product is valid one.
 

Thanks 

  Yuval

Can I get you to file a bug report?  Please create a simple sample app that demonstrates the problem. It needs to be a complete project with main.lua, config.lua and build.settings and any assets needed to run/build the app. Put it in a .zip file and use the Report a Bug link above.

Rob

Hi Bob,

I have created a bug report as you suggested 2 weeks ago. 

I heard nothing since then - How can I know the status of the bug ?

Yuval F

Please post the CaseID number that was in the subject of the email you got after filing the bug report here and I’ll go look. But between Christmas and New Years, making each week a short 3 day weeks and a lot of vacations in between, I doubt any one has had time to look at it.

Rob