k here’s some docs I wrote for this:
https://github.com/ouya/ouya-sdk-examples/blob/master/Corona/Submission/ouya/docs/ouya/index.markdown
And we are talking about the source here:
https://github.com/ouya/ouya-sdk-examples/blob/master/Corona/Submission/ouya/samples/InAppPurchasesPlugin/Corona/plugin_ouya.lua
– Invoke IAP Request Receipts and provide callbacks
plugin_ouya.asyncLuaOuyaRequestReceipts = function(onSuccess, onFailure, onCancel)
if ouyaSDK == nil then
print “ouyaSDK named java functions are not initialized”;
return;
end
plugin_ouya.initialize();
print (“plugin_ouya.asyncLuaOuyaRequestReceipts”);
ouyaSDK.asyncLuaOuyaRequestReceipts(onSuccess, onFailure, onCancel)
end
Okay so it may call initialize() which will skip if it’s already true.
plugin_ouya.initialize = function ()
if ouyaSDK == nil then
print “ouyaSDK named java functions are not initialized”;
return;
end
if plugin_ouya.initialized == false then
plugin_ouya.ouyaSetDeveloperId(plugin_ouya.developerId);
print “plugin_ouya is initialized”;
end
end
and the first time it will set the developer id.
– Set IAP Developer ID
plugin_ouya.ouyaSetDeveloperId = function(developerId)
if ouyaSDK == nil then
print “ouyaSDK named java functions are not initialized”;
return;
end
if plugin_ouya.initialized == true then
return;
end
print (“plugin_ouya.ouyaSetDeveloperId (” … developerId … “)”);
ouyaSDK.ouyaSetDeveloperId(developerId);
plugin_ouya.initialized = true;
end
but your Java logcat says otherwise…
I wonder how soon you try to get receipts. Do you wait a couple seconds for the iap to initialize? You might be trying too fast…