示例#1
0
        private async void BuySubscription_Click(object sender, RoutedEventArgs e)
        {
            // InAppPurchaseDialog inherits ContentDialog so it needs to be hidden first.
            _inAppDialog?.Hide();

            //show In-App purchase dialog for time-limited subscription
            //rinkeby address: "0xa9589de3fab16dac92ed7f30000bcf087561335e"
            //ropsten address: "0xcf4709a4b4e3ae9333dab13ed44b8d06ece6da9e"
            _inAppDialog = new InAppPurchaseDialog("0xa9589de3fab16dac92ed7f30000bcf087561335e", _inAppService);
            await _inAppDialog.ShowAsync();
        }
示例#2
0
        private async void BuyConsumable_Click(object sender, RoutedEventArgs e)
        {
            // InAppPurchaseDialog inherits ContentDialog so it needs to be hidden first.
            _inAppDialog?.Hide();

            //show In-App purchase dialog for consumable in-app product
            //rinkeby address: "0x7ea5c56768718fbc22718f45b1995ddf5e2d545a"
            //ropsten address: "0x6e1ac83fab32a0fafa51e400c594569c7de07fa1"
            _inAppDialog = new InAppPurchaseDialog("0x7ea5c56768718fbc22718f45b1995ddf5e2d545a", _inAppService);
            await _inAppDialog.ShowAsync();
        }
示例#3
0
        //we have some in-app contracts already deployed in test networks for test purposes

        private async void BuyPermanent_Click(object sender, RoutedEventArgs e)
        {
            // InAppPurchaseDialog inherits ContentDialog so it needs to be hidden first.
            _inAppDialog?.Hide();

            //show In-App purchase dialog for permanent subscription
            //rinkeby address: "0xa136a40c7e713542960d910ae9c81240b37b4145"
            //ropsten address: "0x70fe8d22d4bb4cefcbeaec88076169ecf6e93d46"
            _inAppDialog = new InAppPurchaseDialog("0xa136a40c7e713542960d910ae9c81240b37b4145", _inAppService);
            await _inAppDialog.ShowAsync();
        }