saravans / in-app-purchase-air-ios

Automatically exported from code.google.com/p/in-app-purchase-air-ios
0 stars 0 forks source link

Impossible to resume incomplete transactions later? #20

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Buy a consumable item but do not call AppPurchase.manager.finishTransaction
2. Buy the same item again
3. An iTunes message will popup telling me "You already bought this item but it 
has not been loaded yet. Tab OK to load it now" (similar to this, I have German 
version)
4. Tapping OK will throw an Error event with the message "Unable to connect to 
iTunes"
5. From here on it seems impossible to ever buy that item again,

This is sandbox mode, have not tested production yet.

What is the expected output? What do you see instead?

I would expect a restore transaction event or another mechanism that allows me 
to resume this transaction (e.g. in case of network disconnect in the moment of 
purchase, I am verifying purchases on my server). Right now the error message 
prevents me from ever buying this item again

What version of the product are you using? On what operating system?

Windows 7, testing on iPad.

Please provide any additional information below.

Extension works great besides, very good job!

Original issue reported on code.google.com by rewb...@googlemail.com on 4 Nov 2012 at 2:30

GoogleCodeExporter commented 9 years ago
Hi rewBorn:

restoreTransaction functionality is for different purpose. It is used when you 
want to use item purchased on one device on another device. [for eg. I have 
iPhone and iPad and a same app on both. if I purchase an item on iPhone I want 
it to show up on iPad automatically.] Hence it works only on completed 
transactions.

Quote from iOS reference 
"Once a transaction has been processed and removed from the queue, your 
application normally never sees it again. However, if your application supports 
product types that must be restorable, you must include an interface that 
allows users to restore these purchases. This interface allows a user to add 
the product to other devices or, if the original device was wiped, to restore 
the transaction on the original device."

I think you need to call finishTransaction be it normalPurchase, Restore or 
Error, mandatorily.
see 
https://developer.apple.com/library/ios/#documentation/NetworkingInternet/Concep
tual/StoreKitGuide/AddingaStoretoYourApplication/AddingaStoretoYourApplication.h
tml

Original comment by saumitra...@gmail.com on 1 Mar 2013 at 3:52