In-app purchase - restore transaction

Ok so I have been able to use the native extensions to make use of the in app purchase and got that working well, however, my app got rejected because I didn't have a way for a user to restore their purchase if they delete the app from their device and re-add it at a later date.
Here's my question though. How do I detect whether a user has actually already purchased the in-app purchase when they reinstall the app to show the restore purchase button.
Right now the way it works is that when they buy my in app purchase the app stores a variable in a SharedObject so that whenever the app loads it sees the vairable as true and reveals the feature. Once they delete the app from the device the shared object has been deleted also so there is no way for the app to know it was already purchased.
Do I just put a button on the purchase screen that says "restore purchase" that will fire the StoreKit.storeKit.restoreTransactions()event if that user had already purchased something, but return an error if they hadn't?

sbhave wrote:
Also I would recommend you call restoreTransactions on launch if you find that LSO is unavailable. That way user will automatically get all his purchases as he starts using your app.
isn't that a bit wierd - it means that as soon as the app is launched for the first time it will ask the user for their password with the dialog box - that's not normal behaviour for an app. I would imagine the user being dubious about entering it when they didn't expect anything to start downloading
and with regard to the restore button always behing there - isn't that weird for someone who has never purchased anything to see a button that says "restore purchases". I've never seen either of these two implementations on an app before. Isn't there a way to detect if the user has any purchases to restore before you offer them an automatic restore or a manual one?

Similar Messages

  • IOS In App Purchases restore transactions not working properly with Milkman Games ANE for Adobe AIR

    I am experiencing the following problems with Milkman Games in-app-purchases ANE dor Adobe AIR:
    PROBLEM 1
    0) StoreKit is created and correctly returns all the product IDs via StoreKit.storeKit.loadProductDetails()
    1) I purchase item A, the item is correctly purchased
    2) I purchase item B, the item is correctly purchased
    3) I uninstall and re-install the app
    4) I restore transactions via StoreKit.storeKit.restoreTransactions()
    5) Only item B is restored ( onPurchaseSuccess() is only triggered once for item B)
    EXPECTED BEHAVIOUR: I would expect that restoreTransactions() would trigger onPurchaseSuccess() for each of the items previously restored.
    PROBLEM 2
    6) I close the app
    7) When I restart the app, onPurchaseSuccess() for product B is fired without any of the app code calling it.
    Is StoreKit attempting to restore transactions by default everytime StoreKit is created? (i.e. StoreKit.create(); )
    Testing device: iPad2, iPhone4
    Operating System: iOS 7 and iOS 6
    Compiling for: AIR 3.8
    Type of item purchased: all items tested are non-consumable
    Did anyone ever experienced such a behaviour with iOS in-app-purchases in an AIR mobile app? Any ideas or pointer in the right direction are appreciated, thanks!

    Shared Objects aren't working for me after the last update Adobe Flash Pro 13.1.0.217 and Air 3.9.0.1380. After exporting to the iPad the apps I get an erro when using Flush command:
    Error: Error #2130: Unable to flush SharedObject.
              at Error$/throwError()
              at flash.net::SharedObject/flush()
              at CleverClimbers_fla::MainTimeline/frame1()[MyFile_fla.MainTimeline::fr ame1:133]
              at CleverClimbers_fla::MainTimeline/frame1()
    Cannot display source code at this location.
    Debug session terminated.
    Any ideas for this?

  • HT4009 When I try to buy in app purchases the transaction  cannot be made. Why? And how do you fix it?

    When i want to make an in App purchase, the transaction always fails. Why? And how can you fix it?

    What happens when you try to do the IAP, does the 'buy' button not work, do you get any error messages ... ?
    If you are getting a message to contact iTunes Support then you can do so via this link and ask them why the message is appearing (we are fellow users here on these forums) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption
    If it's a different problem ... ?

  • In App Purchase Error, ( Transaction Failed Cannot connect to iTunes Store)

    O.k. on my iPhone when I'm in an app I tried to purchase something and it won't let me by saying, Transaction Failed, Cannot Connect to iTunes Store.. But I'm able to use the same app on my iPod touch and I can purchase what I needed.... So can somebody help me figure out what the reason is behind it? Both the iPhone and the Ipod has the same account information and both uses the same computer to connect to iTunes.... So why does one work and the other doesn't? Also its an iPhone 3Gs...

    Although you may be using the same iTunes Account, things can get a little strange if you have different AppleID's for each device. On your device, check settings ==> Store. The AppleID for that device is listed there. It can be confusing because syncing to the same iTunes account is not the same as managing App and purchases through the iTunes Store Account.
    On your iTunes window the uppe right corner shows which AppleStore ID is logged in. If it turns out they are different, simply log out of the store on iTunes, and log in with the other account. Download the updates. Log out and then back in to the other account.
    As an alternative, download the updates on the device they were purchased. Sync to iTunes, and the updated download be transferred back to iTunes and available to the other devices syncing with iTunes.
    Or....... if your iPhone is Airplane Mode, turn that Airplane mode off and ignore everything from above.

  • HT4009 Restoring of non-renewing in-app Purchases

    The Getting started with In-App Purchase on iOS and OS X (published February 3, 2014) document in "Restoring Previous Completed Purchases" specifies that non-renewing purchases must be transferred to other devices.
    In-App Purchase Type: Non-Renewing Subscriptions
    Restore Required?: Yes
    Transaction Restoration Mechanism: Use iCloud or your own server to track purchases and allow user to restore purchased subscriptions to all iOS devices owned by a single user
    Technical Note 4009, iTunes Store: About In-App Purchases (published July 29, 2014) in "Transfer an In-App Purchase" specifies that this is not allowed.
    You can't sync or transfer non-renewing subscriptions and consumable In-App Purchase to another iOS device or Mac.
    Which one is correct?

    I understand it is from the App Store. That is part of iTunes. You still need to contact them for assistance, or you can try Express Lane, https://expresslane.apple.com/GetproductgroupList.action

  • HT1491 I'm using a prepaid credit card to make in app purchases. Every 2 days or so, I will attempt to make an in-app purchase and it will say "Unable to complete transaction at this time. Please contact iTunes Store Support."

         Like I said, I often play iOS games on my iPhone 4S in my spare time. Sometimes, if the game is good enough, I will attempt to make an IAP (In-App Purchase). Sometimes, I have no trouble with this. Other times it will say: "Unable to complete transaction at this time. Please contact ITunes Store Support. I primarily use a prepaid credit card by AMEX called Bluebird. I always make sure that I have plenty of funds available in it. For instance, tonight, it has roughly $200 stored. So I try to make an IAP for $10 and it works fine. Later I make another for $15, no trouble there either. Then I try to make a purchase on the same game for $2.99 and it gives me that error message.
         This has been happening on and off for the past 3-4 weeks only. Every few days it happens, I contact the iTunes Store Support, and sometime in the next 24-72 hours they get back to me. They then apologize for the inconvenience and fix the problem. But the main problem is that their fix seems to be only temporary. It happens irregardless of how much money I have available on my card. I've even had it happen when I had just redeemed a. $50 iTunes gift card and was trying to make a $5 purchase.  It doesn't seem to matter if I've spent a little bit or a lot of money that day. It doesn't care for which game I am purchasing the IAP. TThis never happened to me before a month ago. Now it won't stop. And it is incredibly frustrating that it seems to happen for no rhyme or reason out of the blue. Then I'm stuck waiting on the support staff to get back to me for the next few hours to few days, depending on the day.
         Is this happening to anyone else?  Does anyone have any ideas why this is happening?  Or how can I prevent it from happening in the future. The support folks at Apple are nice, but I'm tired of emailing them every other day with the same problem. I'm sure they are quite tired of getting emails from me at the same frequency. Any assistance would be appreciated. Thanks in advance.
    Nick
    P.S. my Internet connection is working perfectly. No technical difficulties whatsoever other than the inability to make an IAP. Also, after it gives that unable to complete transaction message, I can no longer buy anything with my apple account until tech support fixes it. Any suggestions or ideas appreciated.

    Thank you Brian, but I just tried that, and it didn't work, I'm still getting the same messages.

  • How do I restore an in-app purchase from a backup?

    I purchased and downloaded a number of issues of Popular Science magazine. These would have been backed up over the cloud.
    I subsequently deleted some of these from my iPad to free up space.
    Since then, the Popular Science app has been removed from the Australian App Store.
    Am I able to restore individual in-app purchases from a backup? And, if so, how do I do this?
    If not, what's the impact of restoring a full backup from, say, 12 months ago? Does this mean I've lost all app data in the period since? I'm thinking that this option would not be practical and am hoping that I can pick and choose from a backup a la Time Machine on OS X.
    Thanks in advance for any suggestions.

    It works the same way as a credit card so on the back you have your security code. You type in the card number and then you give it your security code. You should be able to purchase what ever you need.

  • I restored my iPod touch, but was unable to restore my data from a backup, so I synced it and now all of the data from my apps has gone, and so have in app purchases. Is there anything I can do to get them back?

    Does anyone know if there's anything I can do to get my app data back? All levels completed on games have been erased, and I am unable to use in app purchases which I did purchase, such as the Mighty Eagle in Angry Birds. Thanks for your help

    Go to the Device tab in iTunes' Preferences and se what the date iis of the backup(s).  Apple only retaines the latest backup unless you restor from a backup and that one is also kept.

  • Expanded content in-app purchase of $4.99 installs but is never available (does not work), endless loop of "restore content".

    Once I upgraded o Mavericks (10.9.4) and GarageBand (10.0.2) I saw the offer for additional content – 200 sounds, 2,000 loops, 15 drummers... – and made the purchase per this article: Expanding GarageBand for Mac (v10.0) content with an in-app purchase
    After downloading the content, system asked for my log in, went through the install, but alas, the content is nowhere to be found.
    GarageBand menu, "Restore Purchases" available.
    Choose Restore Purchases
    GB downloads 10G
    OS requests log in for installation
    OS performs installation (no crashes, no problems)
    But then content is not there and "Restore Purchases" is still available in the GarageBand menu. I've read the threads about the download crashing (which happened to me once), but this is different. I've tried resetting permissions, and now I've just installed a brand new SSD drive, fresh install of Mavericks and GB, and got the same problem.
    Unless I am missing something, content is nowhere to be found. Any help would be appreciated.
    "Restore Content" always available:
    Where are the 40 lessons?
    Where are the 17 additional drummers:

    Your last screenshot is showing that the purchase installed:
    You have more than the one drummer "Kyle". You can switch between different drummers by clicking the portraits "Rose" Curtis", Berry" and the genre menu, to bring up different drummers.
    "Restore Content" always available:
    This will always be available, so you can reinstall, if need be.
    Where are the 40 lessons?
    The in-app purchase does not download the lessons, but enables you to buy them for free. Sign into the Lesson Store, to download the lessons you want. It should now be possible.
    Select "File > New" and then select the Lesson Store.
    200 sounds, 2,000 loops, 15 drummers...
    The 200 sounds will be visible, depending on the selected kind of track.
    You will see 2000 loops, if you disable the default "Keyword Browsing > Filter for more relevant content" in the GarageBand Preferences > Loops panel and set the the menu at the top of the Loop Browser to "Loops" and "Scale > Any"
    What do you see, when you set the Loop options this way?

  • Error "Please contact itunes support to complete this transaction" when in-app purchases

    Dear Sirs,
    As frequent customer buying iTunes Gift Card, I would appreciate your kind clarification on below points, for my best reference:
    - I'm using Apple ID Canada and playing a game (i.e. Clash of Clans from http://www.supercell.net) which identifies each game account by their GameCenter account. Hence in case of using only this Apple ID, for how many account game I can buy in-app purchases?
    http://itunes.apple.com/ca/app/clash-of-clans/id529479190?mt=8
    - I use my Apple ID buy gem ( intem of this game ) for 2 anccout game ( 2 iDevices) , but now I can't buy more Error "Please contact itunes support to complete this transaction" .How I can fix it ?
    For ex: My Apple ID is [email protected] and share to a friend. Both of us log to this Apple ID "[email protected]" to download a game on 02 different iDevices namely "acc1" and "acc2". Is it possible to use only this Apple ID to buy in-app purchases for both account games "acc1" and "acc2".
    Looking forward to hearing from you soon.
    Thanks and Regards,

    noobdoon wrote:
    ... "Please contact itunes support to complete this transaction" .How I can fix it ?
    Contact iTunes Customer Service
    Apple  Support  iTunes Store  Contact Us
    noobdoon wrote:
    ... Is it possible to use only this Apple ID to buy in-app purchases for both account games "acc1" and "acc2".
    See Here   http://support.apple.com/kb/HE37
    I have multiple Apple IDs. Is there a way for me to merge them into a single Apple ID?
    Apple IDs cannot be merged. You should use your preferred Apple ID from now on, but you can still access your purchased items such as music, movies, or software using your other Apple IDs.

  • Trouble with connecting to an App and restoring In App Purchases

    I am having trouble with restoring my in app purchases. I had purchased the full season for crazy night out a while back but when I got the app again after restoring the app the full season wasn't on and it is trying to charge me for it. I had also bought the fantasy date app and the multipacks and unlike crazy night out it recognizes I made the purchase but when I click restore purchases or buy pack it won't download and it says can not connect to server and for me to check my settings and try again also for the ones I do have that were free when I click play or download all videos it says it can't connect to servers and the videos don't play. Is there anything I can do to retrieve these purchases back and get the videos to play.
    It's not the Internet everything else works.

    ftp doesn't work well in modern network environments, and the design of the protocol itself is basically incompatible with the inclusion of firewalls in modern networks. And it transmits the authentication credentials in cleartext.
    Put another way, see if ssh and particularly sftp works here (either directly via the sftp command, or via a sftp GUI tool) works for your requirements.
    Failing that, [here is ftp set-up information|http://labs.hoffmanlabs.com/node/942].
    If it's the DNS set-up, then here is some [DNS server set-up information|http://labs.hoffmanlabs.com/node/1436]. And your Mac OS X client will need to have access to the same DNS information your server is using.

  • When I try to make an in-app purchase, it says it cannot complete the transaction.

    So, I downloaded the app Roblox mobile and tried to make an in-app purchase with it, and it worked the first three times, but when I tried a forth time, it said "Please contact Itunes Support to complete this transaction"   I then tried purchasing an app, and I was able, same with songs.   But not with the in-app purchase.  I do not use credit card, but I just got a few Itunes gift cards and I'm using those.  I have redownloaded the app and tried over and over, and even waited a day, but it still doesn't work...   its an Ipod 4th Gen and I just got it a few days ago, and there's only about ten apps on it.  I also got the apple account at the same time.  I sent Itunes support a message, but I'm posting this while waiting for their response.

    rockyboy223 wrote:
    I thought the question was implied.  How do I get this fixed so I can make the in-app purchase?
    By doing exactly what it said to do and what you have alrready done:
    "Please contact Itunes Support to complete this transaction"
    This is an issue with itunes support.  You have done all you can do

  • HT4009 In-App Purchases denied "Please contact iTunes Support to complete transaction" when trying to buy Gems in a game.

    In-App Purchases denied "Please contact iTunes Support to complete transaction" when trying to buy Gems in a game.
    I want to gem In-app very much. I need to do.

    Now. I contract itune support. But I have not received the email from Itune support.
    about 2 days.

  • In App purchasing transaction failed.

    I can't purchase in App purchasing because it always say transaction failed please contact iTunes support. iTunes support didn't help at all though. I am trying to purchase in App purchases in Deer Hunter Reloaded for IPad 1

    Please refer to one of your other posts with the same question. There is NO need to post the same question multiple times.

  • HT201272 What course of action do i take to restore in app purchases that were lost ?

    I recently bought the game Dead Trigger, I made a few in app purchases. played until my phone battery died. charged my phone, restarted the game and found all game progress was lost as well as all my IAP's. I dont mind the loss of game progress so much, but losing the IAP's is what makes me mad. Its like i just threw my money away. I reported the problem to the game manufacturer, still havent heard anything from them. If i check my purchase history for my Itunes account it shows the IAP's. what would be my next coures of action to restore my IAP's? thanks in advance guys

    See if these help:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    iTunes Store- About In-App Purchases

Maybe you are looking for