1

We have app which provides consumable In-app product to buy eBooks. We are following 2 issues as below:

Issue 1: We have installed our latest app from appstore & trying to buy eBook, we don't have previously added Credt/Debit card in iPhone. While purchasing we have enterd those details. It redirects to Appstore/Settings, but not returned back to our app. And Money has been deducted but In-App not notified in App.

Issue 2: Next time onwards, using same iphone & same apple id, We are getting " Product is already purchased." even thought it's consumable In-App.

While in Settings we can see our purchase in "Pending" status.

We tried to debug issue but all things are working perfect in Sandbox Environment. Let us know is there any issue at apple end or we have done something wrong. We do have our app live on appstore since long, but we are facing this issue from 4-5 days only. Please help.

Thanks in Advance.

Dimple Shah
  • 304
  • 3
  • 18
  • Your app should always check for pending transactions when it starts. It seems that you have a bug that you are not doing this and completing any pending transactions. – Paulw11 Nov 21 '17 at 05:40
  • For issue 2 : https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Restoring.html and https://stackoverflow.com/questions/15493761/restore-for-inapp-for-non-consumable-product-in-iphone – iPatel Nov 21 '17 at 05:40
  • @iPatel I think for consumable product I should not get "already bought.." error. – Dimple Shah Nov 21 '17 at 08:45
  • @Paulw11 what are the steps for that? can you please tell me? – Dimple Shah Nov 21 '17 at 08:45
  • You will get an “already purchased” message if you have not successfully completed the pending transaction for that product code. One of the first things your app should do on launch is register an SKPaymentTransaction observer so that you can process any pending transactions. It is not sufficient to on,y create the payment observer when the user initiates a purchase. – Paulw11 Nov 21 '17 at 08:55
  • @DimpleShah https://forums.developer.apple.com/thread/64939 and https://stackoverflow.com/questions/26937195/in-app-purchase-when-trying-to-buy-consumable-product-again-this-in-app-purc – iPatel Nov 21 '17 at 09:04
  • @Paulw11 then should I need to show UI for buying process if I get pending transaction on launch?? or it'll directly complete transaction? but how can my app get transaction ID ? – Dimple Shah Nov 21 '17 at 11:27
  • No, you don’t need to show a UI. Any unfinished transactions will be presented to your observer; you then process the transaction based on its state. – Paulw11 Nov 21 '17 at 11:40
  • @Paulw11 Is there a compulsion that with same credit/debit card there should not be any pending purchase in any device? – Dimple Shah Nov 22 '17 at 10:20
  • I don’t understand what you are asking. You don’t have to worry about payment methods. All you need to do is ensure that any pending transactions are properly finished. – Paulw11 Nov 22 '17 at 10:21
  • now transaction is not in pending state still I'm getting the same alert, "Already purchased.." I have pending state transaction in another device with different apple ID but same credit card. – Dimple Shah Nov 22 '17 at 11:19
  • @iPatel I have added observer in AppDelegate and with surprise I'm getting 10 incomplete transactions from "updatedTransactions:" method. Now, what should be done? I'm getting same even after uninstalling app and running again. – Dimple Shah Nov 22 '17 at 13:21

0 Answers0