In app promo codes with dreamlo

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)

I did something just like this in my last game, my own website though.  On top of using the url schemes that Jason uses you can setup your promo system to purchase a free iap on IOS. Then if your user uninstalls/removes the app for some reason and comes back they get everything again thru a restore call. 

I did something just like this in my last game, my own website though.  On top of using the url schemes that Jason uses you can setup your promo system to purchase a free iap on IOS. Then if your user uninstalls/removes the app for some reason and comes back they get everything again thru a restore call.