Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Google pay - This payment option is no longer available in this app

$
0
0

I'm trying to add Google Pay to my application as described in this tutorial: https://blog.xamarin.com/bring-android-pay-to-your-apps-with-stripe/ and in stripe.com docs - https://stripe.com/docs/mobile/android/google-pay
But when I click to "pay" button, the following message appears: "This payment option is no longer available in this app."
What option is no longer available - wallet?

var options = WalletFragmentOptions.NewBuilder()
                .SetEnvironment(WalletConstants.EnvironmentSandbox)
                .SetMode(WalletFragmentMode.BuyButton)
                .SetTheme(WalletConstants.ThemeLight)
                .SetFragmentStyle(new WalletFragmentStyle()
                    .SetBuyButtonText(BuyButtonText.BuyWithGoogle)
                    .SetBuyButtonAppearance(BuyButtonAppearance.Classic)
                    .SetBuyButtonWidth(Dimension.MatchParent))
                .Build();

            var fragment = SupportWalletFragment.NewInstance(options);

            var request = MaskedWalletRequest.NewBuilder()
                .SetPaymentMethodTokenizationParameters(
                    PaymentMethodTokenizationParameters.NewBuilder()
                        .SetPaymentMethodTokenizationType(PaymentMethodTokenizationType.PaymentGateway)
                        .AddParameter("gateway", "stripe")
                        .AddParameter("stripe:publishableKey", "<my_code_here>")
                        .AddParameter("stripe:version", "2018-11-08")
                        .Build())
                    .SetShippingAddressRequired(false)
                    .SetMerchantName("Xamarin")
                    .SetPhoneNumberRequired(false)
                    .SetShippingAddressRequired(false)
                    .SetEstimatedTotalPrice("10.00")
                    .SetCurrencyCode("USD")
                    .Build();

            fragment.Initialize(WalletFragmentInitParams.NewBuilder()
                .SetMaskedWalletRequest(request)
                .SetMaskedWalletRequestCode(111)
                .Build());

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>