#damdeez - Stripe React - Android
1 messages ยท Page 1 of 1 (latest)
Great, thanks!
just to help me clarify, are we talking about React Native?
Not React Native but just React on Web
๐
Would you be able to share the code you are using to instantiate the PaymentRequestButtonElement?
I could send snippets
The entire thing is spread over multiple files
But basically we first create a paymentRequest
const pr = stripe.paymentRequest({
country: 'US',
currency: currency,
total: {
label: selectedOption.title,
amount: centsValue,
},
requestPayerName: true,
requestPayerEmail: true,
});
void pr.canMakePayment().then((result) => {
if (result) {
const typeOfWallet: string = result.applePay
? 'applePay'
: result.googlePay
? 'googlePay'
: 'microsoftPay';
setWalletType(typeOfWallet);
setPaymentRequest(pr);
}
});```
And then we just send it to the child component which has the PaymentRequestButtonElement <PaymentRequestButtonElement options={{ paymentRequest }} onClick={handleMobileWalletButtonClick} />
handleMobileWalletButtonClick is just a function we do analytics with
Other than this Android Pay issue, the button functions fine for us on our web views as well as non webviews
Hey sorry for the long wait. There's been some history going back on this.
NP, appreciate your help
@bright perch I'm hopping in! Give me a minute to catch up
From my understanding, yes, this is a limitation of Android webviews that they don't support Google Pay. The expectation is that if you have a user that needs to go through a google pay flow on a mobile device you should direct them to an app w/ a native google pay integration, or the chrome browser
Thank you, appreciate your help.