Check out this sample for putting in app promo codes using http://www.dreamlo.com
--Main.lua local isHttps= false local publicCode = "" local returnString = "" local function getCode( code, lis ) if (code) then local httpSting = "http://" if (isHttps == true) then httpSting = "https://" end local function networkLis( e ) if (e.isError) then lis("Cannot Connect") else if (e.response=="ERROR|Unknown Code") then lis("Unknown Code") elseif (e.response:sub(1,3 ) == "OK|") then lis("Code Redeemed", e.response:sub(4)) elseif (e.response=="ERROR|Code Already Used") then lis("Code Already Used") end end end network.request(httpSting.."dreamlo.com/pc/"..publicCode.."/redeem/"..code , "GET", networkLis ) else return "No Code" end end -- local function codeLis( results, value ) print( results ) if (value) then print( value ) end end getCode("", codeLis)
Thanks,
Scott
This works well with Jason’s blog post
PS: Corona I have two plugins stuck in limbo(you have not contacted me in a week)