stripe-react-native icon indicating copy to clipboard operation
stripe-react-native copied to clipboard

[Payment sheet] Google Pay not showing when setupIntentClientSecret provided

Open trex-quo opened this issue 4 years ago • 3 comments

Describe the bug When initializing the payment sheet on Android with a setupIntentClientSecret instead of a paymentIntentClientSecret, Google Pay does not appear on the Payment Sheet. When a paymentIntentClientSecret is provided, Google Pay does appear on the Payment Sheet. I have confirmed that I am correctly providing a Setup Intent and Payment Intent to their respective fields.

To Reproduce

  const onSubscribePressAndroid = async () => {
    const res = await functions().httpsCallable('getStripeSecret')({});
    if (res.data.errorCode) {
      console.log(res.data.errorCode);
      return;
    }

    const secret = res.data.setupIntentSecret;

    let {error} = await initPaymentSheet({
      setupIntentClientSecret: secret, //providing a Payment Intent to paymentIntentSecret makes Google Pay appear on the payment sheet
      googlePay: true,
      merchantCountryCode: 'US',
      merchantDisplayName: 'Quo Finance',
      testEnv: true,
    });

    if (error) {
      console.log({error});
      return;
    }

    await sleep(1000);

    try {
      ({error} = await presentPaymentSheet({
        clientSecret: secret,
      }));
    } catch (e) {
      console.log({e});
      updateLoading(false);
      return;
    }


    if (error) {
      console.log({error});
      return;
    }
  };

Expected behavior I would expect Google Pay to appear on the Payment Sheet regardless of whether or not a Setup Intent or Payment Intent is provided.

Screenshots With Payment Intent provided: Screenshot_20210607-151906_Quo

With Setup Intent provided: Screenshot_20210607-151938_Quo

Desktop (please complete the following information):

  • OS: macOS Big Sur
  • Version 11.2.3

Smartphone (please complete the following information):

  • Device: Galaxy S10
  • OS: Android

trex-quo avatar Jun 07 '21 22:06 trex-quo

I'm able to reproduce this. Will check with the team.

thorsten-stripe avatar Jun 08 '21 09:06 thorsten-stripe

This is currently not supported in stripe-android. We will need for a new release of the stripe-android SDK to ship this functionality.

thorsten-stripe avatar Jun 10 '21 03:06 thorsten-stripe

@thorsten-stripe Is it supported now? @trex-quo Currently I've made two separated buttons. @Mfrizzy FYI

ScreamZ avatar May 10 '22 11:05 ScreamZ

This was fixed in stripe-android a while ago, and we've since integrated that version into stripe-react-native, so I'm going to close this issue

charliecruzan-stripe avatar Aug 12 '22 22:08 charliecruzan-stripe