Sub Process_Globals
Public billing As BillingClient
Public Const My_PublicKey As String = "xxxxxxxx"
Public Const product20 As String = "product20"
Public Const product50 As String = "product50"
End Sub
Sub Service_Create
billing.Initialize("billing")
End Sub
Sub billing_PurchasesUpdated (Result As BillingResult, Purchases As List)
If Result.IsSuccess Then
For Each p As Purchase In Purchases
If billing.VerifyPurchase(p, My_PublicKey) = True Then
If p.PurchaseState = p.STATE_PURCHASED Then
CallSubDelayed2(Main,"ConsumeProduct",p)
End If
End If
Next
End If
End Sub