示例#1
0
        private void OnBuyPotionButton_pressed()
        {
            var result = _googlePlayBilling.Purchase("android.test.purchased");

            if (result != null && result.Status == (int)Error.Ok)
            {
                GD.Print("Purchase Requested");
            }
            else
            {
                GD.Print($"Purchase Failed {result.ResponseCode} {result.DebugMessage}");
            }
        }
示例#2
0
        private void OnBuyPotionButton_pressed()
        {
            var result = _googlePlayBilling.Purchase("android.test.purchased");

            if (result != null && result.Status == (int)Error.Ok)
            {
                GD.Print("Bought");
            }
            else
            {
                GD.Print("Failed");
            }
        }
示例#3
0
        private void OnPurchaseButton_pressed()
        {
            var response = _payment.Purchase(TestItemSku);

            if (response != null && response.Status != (int)Error.Ok)
            {
                ShowAlert($"Purchase error {response.ResponseCode} {response.DebugMessage}");
            }
        }