#dlaugh14_unexpected
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1457974269584867419
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Is there a public URL that I can visit and check your google pay integration?
https://docs.stripe.com/testing/wallets?ui=payment-element#device-requirements can you go through this list to ensure your device and browser fulfill the requirements?
Yes -
this is a link on how to get to it.
https://www.dropbox.com/scl/fi/s1gy1zpzw91fwnjv1efd0/stripe-test.mp4?rlkey=5l9ceqaapyf3jxhv7g7hdja40&dl=0
https://4a3615601315.ngrok-free.app/
It is in development so need to use ngrok.
Steps
- in drug search type esc and select drug that appears
- in right sidebar scroll to bottom - click add
- sign up with name and any test email and pass
- select terms and continue
- select individual plan $10
it should appear there now (stripe) - google pay doesn't appear. link, card, klarna do.
I've whitelisted that domain - I tested the same setup in another vue2 app with success. same way too with ngrok
Can you share with me your merchant ID? you can find it from the Stripe Dashboard -> Settings -> Business -> Account Details
acct_1QSVf4BDwiW4XPPk
Ok, I found out the problem.
Your wesbite also integrated Apple Pay SDK, and Stripe will not surface Google pay in chrome if Apple Pay SDK is available.
So you can't enable apple pay and google pay together as payment methods?
No, what I said is that your website has also directly integrated the Apple Pay SDK, you can open chrome console and enter window.ApplePaySDK to check.
how do I disable that?
Use window.ApplePaySDK=undefined
okay, I added that and still no google pay
Apple Pay SDK is still available in your website
hmm...even on refresh? I added " window.ApplePaySDK = undefined;" to the initializeCheckout method I have. and after stripe loads I check ApplePaySDK and it shows undefined.
It's showing up now after setting window.ApplePaySession, window.ApplePaySdk and window.ApplePayWebOptions to undefined
okay! can I not decide if it appears in paymentelement over expresscheckout? when I test my app with apple pay it shows up in express checkout
I think I might prefer apple pay appear like google pay here
Did you enable google pay in your express checkout element setup?
expressCheckoutOptions: {
type: Object,
default: () => ({
buttonHeight: 48,
buttonTheme: { theme: "dark" }, // or 'light'
layout: "horizontal",
paymentMethodOrder: ["link", "klarna", "applePay", "googlePay"],
}),
paymentMethods: {
applePay: "always",
googlePay: "always",
},
},
shouldn't google appear here as express checkout
expressCheckoutOptions: {
type: Object,
default: () => ({
buttonHeight: 48,
buttonTheme: { theme: "dark" }, // or 'light'
layout: "horizontal",
paymentMethodOrder: ["link", "klarna", "applePay", "googlePay"],
}),
paymentMethods: {
applePay: "always",
googlePay: "always",
},
},
I think I tried both before and had issues.
so
right now setting this
// window.ApplePaySDK = undefined;
// window.ApplePaySession = undefined;
// window.ApplePayWebOptions = undefined;
disables apple pay. when above is there my apple pay doesn't load in express checkout.
even when I comment out my express checkout apple pay (or set express apple pay to never) it still appears there and not payment method.
If I set these to undefined
// window.ApplePaySDK = undefined;
// window.ApplePaySession = undefined;
// window.ApplePayWebOptions = undefined;
google pay appears. and apple pay does not
is there a better way so that naturally both will appear when the device is whichever. My iphone won't show apple pay with those set to undefined. but it helps google to show
Have you figured out which components in your project integrates Apple Pay?
Stripe.js will automatically include Apple Pay SDK when it detects compatible browser
Did you also integrate any other payment SDK?
So right now I have apple pay set in payment element
const paymentElementOptions = {
defaultValues: {
billingDetails: {
email: this.email || "",
name: this.name || "",
phone: this.phone || "",
},
wallets: {
applePay: "auto",
googlePay: "auto",
},
},
};
and I've commented out the googlePay from expresscheckout. But it still appears in express checkout.
this is just for web. I'm targeting klarna, link, apple and google pay. and trying to test each. I'm setting klarna, link, card in my payment method types in my intent creation
If you don't want to show Google Pay in the payment element, you can set paymentElementOptions.wallets.googlePay to 'never'
Yeah I was wanting to have link and klarna in express checkout element and google pay, apple pay, and card in the paymentelement.
does that work?
Sure in that case you'll need to set applePay and googlePay in expressCheckoutElementOptions.paymentMethods to never
yeah it's just weird. I did that.
still express checkout for apple pay.
on the "Stripe.js will automatically include Apple Pay SDK when it detects compatible browser" - If I'm having to set the below in code for Google Pay appear in my app
// window.ApplePaySDK = undefined;
// window.ApplePaySession = undefined;
// window.ApplePayWebOptions = undefined;
I think that's an issue. becuase when that is set "Apple Pay" then does not appear.
I feel like there's got to be a better way. So on my pc I figured I would see Google Pay in chrome, and my iphone I'd see Apple Pay in safari, naturally without having to set anything like above.
There are two solutions here
- Find out what component/depdnencies adds Apple Pay SDK to your website, and see if there's an option to prevent it from including the Apple Pay SDK
- Check the browser's user agent, and manually disable Apple Pay SDK (i.e., by setting it to undefined) if the browser doesn't support apple pay.
okay, I'll need to figure that out. got to head out. Thanks for your help!