Hello, i trying to create a DONATE button with this code but when i click seccond time on same button - "Unable to buy item, Error response: 7:Item Already Owned"
Where is my mistake?
B4X:
Sub Donate_Click
'manager For Donation
manager.RequestPayment("donate_soccer","inapp", False) 'request purchase with ID "donate_soccer"
End Sub
Sub manager_PurchaseCompleted (Success As Boolean, Product As Purchase)
Log(Product)
Log(Success)
If Success Then
If Product.ProductId = "donate_soccer" Then
ToastMessageShow(langThanksForSupport,True)
End If
End If
End Sub
Purchasing a product is done by calling: manager.RequestPayment. The user will be asked to approve the payment. The PurchaseCompleted event will be raised when the operation completes.
Note that managed products can only be purchased once. Only after you call ConsumeProduct will the user be able to purchase the same item again.
Consuming purchased products is done by calling manager.ConsumeProduct.