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

support for "book", "buy", "checkout", "donate", "order" as type in GooglePayButton component

Open pakkibokati2012 opened this issue 2 years ago • 5 comments

I am working on an app that has allows its user to donate using Google Pay. So the "Pay with G Pay" text on the button just doesn't sound right. It would have been nice if all types were supported.

pakkibokati2012 avatar Mar 22 '22 06:03 pakkibokati2012

Also a black button for Google Pay for white backgrounds. Now there is only a white option with or without shadows.

koukoujohn avatar Mar 22 '22 14:03 koukoujohn

This is a great request, although I'll need to think about it a little bit. I believe we can add the assets to this library, and although it will expand the size of the npm module you download, as long as people enable resource shrinking on Android, it should have no effect on final app size (but I'd want to test that out to be sure).

charliecruzan-stripe avatar Mar 28 '22 13:03 charliecruzan-stripe

Any updates on the ability to style the GooglePayButton to dark or black mode please? Google Pay & Wallet Console is requesting we do this to be able to grant us the integration. Thank you.

raoufr avatar Jul 18 '22 22:07 raoufr

Hi, I haven't been working on this and it's not immediately planned

Rather than adding in these assets to this library itself, the plan is to find if Google provides a friendlier asset type for the google pay button as they have with the "add to google pay" button - https://developers.google.com/pay/issuers/apis/push-provisioning/android/branding-guidelines#flutter (they're providing it for flutter, but it's also much nicer for RN). I'd be surprised if they didn't, and this will make it much easier for folks to customize this button

charliecruzan-stripe avatar Jul 19 '22 16:07 charliecruzan-stripe

Dark buttons will be made available in https://github.com/stripe/stripe-react-native/pull/1051

charliecruzan-stripe avatar Jul 20 '22 22:07 charliecruzan-stripe

Just wanted to ask, have you found friendlier asset types for these buttons? I think besides using "donate" it would also allow us to use borderRadius like with the Apple Pay button (and their defaults are round https://developers.google.com/pay/api/android/guides/brand-guidelines#payment-buttons, in fact I'm worried that they'll have an issue with ours not being round)

yousefamar avatar Jan 18 '23 11:01 yousefamar

The new asset types for PlatformPayButton offer donate and are rounded- they follow Google's newest guidelines

charliecruzan-stripe avatar Jan 18 '23 13:01 charliecruzan-stripe

Thanks for the heads up! Unfortunately I can't upgrade to that version yet, as the latest Expo SDK version is incompatible, but will keep it in mind for when it is. Google have gotten back to me and they indeed require the latest guidelines, so for now I'll just use a static image

yousefamar avatar Jan 18 '23 16:01 yousefamar