Page 1 of 1

In app purchases.

Posted: Tue Nov 01, 2011 5:46 pm
by Kaubs
Has anyone made an in app purchase with LC 5 yet?

Re: In app purchases.

Posted: Thu Nov 10, 2011 11:28 pm
by Kaubs
Is this close to what things should look like?

Code: Select all

   //enable purchase updates to be pushed to the phone
   mobileEnablePurchaseUpdates
   //checks to see if purchases can be made
   mobileCanMakePurchase
   return it
   //create a purchase 
   mobilePurchaseCreate newprod
   //send a purchase request
   mobilePurchaseSendRequest newprod
   //check the status of the purchase
   mobilePurchaseState(newprod)
   //check for an update to the purchase request
   purchaseStateUpdate newprod
   return it
   //return content delivery confirmation to appstore
   mobilePurchaseConfirmDelivery newprod
   return it
   mobileDisablePurchaseUpdates

Re: In app purchases.

Posted: Thu Nov 10, 2011 11:31 pm
by bn
Hi Kaubs,

you might have a look at:

http://lessons.runrev.com/m/4069/l/48771

Kind regards

Bernd

Re: In app purchases.

Posted: Thu Nov 10, 2011 11:34 pm
by Kaubs
You rock, I feel like an idiot. Lol thanks!

Re: In app purchases.

Posted: Thu Jan 19, 2012 8:32 pm
by bleddy
bn wrote:Hi Kaubs,

you might have a look at:

[link to in app purchase lesson]

Kind regards

Bernd
This lesson seems to cover it well, but I have a question that I hope someone can help me with.

If a user deletes the app that was used to make a purchase, then reloads it. I assume the text file described in the lesson is no longer there. What is a good strategy for retrieving the purchases for a customer in that case?

I'm thinking some thing like:

Code: Select all

If extra features not purchased then
   connect to remote host and query purchase
   update purchase history
end if
Should work, I think but I would much prefer a self contained solution.

Thanks for any advise or comments.

Bill

Edit: Looks like I need to do more research... Looks like maybe the mobilePurchases() function will return a list of the features that have already been purchased.