Sub Manager_PurchaseStateChange (PurchaseState As Int, ProductId As String, OrderId As String, PurchaseTime As Long, ExtraData As String)
Log("PurchaseStateChange: " & PurchaseState & ", " & ProductId& ", " & OrderId & ", " & DateTime.Time(PurchaseTime) & ", " & ExtraData)
If PurchaseState = Manager.PURCHASE_STATE_PURCHASED Then
CallSub2(Main, "addGold", ProductId)
CallSub2(Main, "ThankYouForPurchasing", ProductId)
Main.isTrial = False
End If
End Sub