#henrique-gpay-paymentsheet

1 messages · Page 1 of 1 (latest)

dire eagleBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

sleek lance
#

Hi 👋

Can you describe more completely what is going wrong here?

#

What docs are you following? What code are you using (text, not screenshots), and what is the behavior you expect?

strange otter
#

Opting to force light mode on Android affects all applications, but you would like to leave only the payment screen, so that the Google button can continue dark and then Google approves that screen.

sleek lance
#

Okay what options are you passing to the initPaymentSheet function?

strange otter
#

const initializePaymentSheet = async () => {
const {
paymentIntent,
ephemeralKey,
customer,
publishableKey,
} = await fetchPaymentSheetParams();

const { error } = await initPaymentSheet({
  merchantDisplayName: "Blist",
  googlePay: {
    merchantCountryCode: 'US',
    currencyCode: 'usd',  
    // testEnv: true,
  },
  applePay: {
    merchantCountryCode: 'US',
  },
  style: 'automatic',
  customerId: customer,
  customerEphemeralKeySecret: ephemeralKey,
  paymentIntentClientSecret: paymentIntent,
  allowsDelayedPaymentMethods: true,
  defaultBillingDetails: {
    name: userData.name,
  }
});
if (!error) {
  setLoading(true);
  openPaymentSheet(paymentIntent);
}

};

#

You must turn the Google Pay button on when the device is in dark mode, and dark when in light mode, so that it passes through Google's review. So you can fix the Stripe element always in light mode but without affecting other screens of my app

sleek lance
#

Sorry, I'm finding this wording rather confusing. We allow you to specify either dark or light mode for only the PaymentSheet by passing in arguments to the initPaymentSheet function but I don't see you doing that.

#

So what do you expect to happen?

#

style: 'automatic' will mean the Payment Sheet (on iOS) will adjust to match whatever the device is set to

#

Okay but your issue is that the GooglePay button is NOT changing color even when the rest of the PaymentSheet is in Dark mode?

#

What version of the React Native SDK are you using?

sleek lance
#

Can you share which version of the Stripe RN SDK you are using?

dire eagleBOT
strange otter
sleek lance
strange otter
#

okay, I'll try... but as it's a relatively old application, the last time I tried to use the latest version, it broke a lot of elements. Thanks for the help anyway

sleek lance
#

Yeah, I know I've hit similar issues with even simple RN apps. It's easy to run into dependency issues

sleek lance
#

I can confirm that my React Native integration with "@stripe/stripe-react-native": "^0.35.0", does render the Google Pay button in Light mode when the Payment Sheet is in Dark

#

Looking in the Changelog you can see the Google Pay element was updated to match Google brand guidelines in version 0.27.0

dire eagleBOT
sleek lance
#

I'm going to close this thread but if you are still having difficulties once you've tested out an integration with our updated SDK feel free to come back to the main channel and ask your question there.