"my_test_sku" vs "my_real_sku"

In the code below, why do you have two sku? I understand how to make a duplicate sku but I don’t understand why I would. I didn’t do this for Apple or GP and I’m just trying to figure out what the deal is.

[lua]

store.loadProducts( { “my_test_sku”, “my_real_sku” }, loadProductsListener )

if ( store.isSandboxMode() == true ) then

     store.purchase( “my_test_sku” )

else

     store.purchase( “my_real_sku” )

end

[/lua]

Also, why are you loading your products in the example, is it necessary to make the purchase or are you simply demonstrating the syntax? I have been looking at all available doc on Amazon and on Corona website and I don’t see any explanation.

Hi Mark,

You’re not missing anything.

I’m not exactly sure why the example is this way.  Perhaps to demonstrate how isSandboxMode() might be used. I would suggest you create SKUs in test that are the same as your production SKUs so that you don’t have what is effectively testing code in your app. 

Just like the other stores, you do not need to call loadProducts before making a purchase. 

Hi Mark,

You’re not missing anything.

I’m not exactly sure why the example is this way.  Perhaps to demonstrate how isSandboxMode() might be used. I would suggest you create SKUs in test that are the same as your production SKUs so that you don’t have what is effectively testing code in your app. 

Just like the other stores, you do not need to call loadProducts before making a purchase.