Maybe success = false because it is a test account? Or because i'm on simulator?
This is my code, i not already buy the product, and i'm using sandbox account. Any help?
B4X:
Main.MyStore.Initialize("MyStore")
If Main.MyStore.CanMakePayments = True Then Main.MyStore.RequestPayment("0001")
Sub MyStore_PurchaseCompleted (Success As Boolean, Product As Purchase)
Log("Purchase completed")
If Product.IsInitialized Then
Log("Product: " & Product.ProductIdentifier & ", date=" & DateTime.Time(Product.TransactionDate) & _
", Transaction identifier=" & Product.TransactionIdentifier)
End If
Log("Success = " & Success)
End Sub
I tried on a real device with iOS 11 and it works. So i think we cannot reproduce in app purchase using simulator.
When i return on pc i am going to post Log
You can't test IAPs on a simulator. I think you can test certain parts (like requesting products & showing localizes prices) but you can't complete a purchase from a simulator.