#Srujan
1 messages ยท Page 1 of 1 (latest)
Hello! I'm not familiar with that drawer component, but I'm wondering if it uses an <iframe> under the hood that might be causing the issue? Do you have a URL where I can see the problem and debug?
There isn't a iframe, I did look into that attribute that stripe mentions. I do have a url, here it is
The demo on that page you linked to doesn't seem to use an <iframe>, so maybe that's not ti...
Looking...
Google Pay shows up for me just fine on that page:
Ah, I see. It looks like the Payment Element might get destroyed when the panel goes away. Let me see...
Oh I totally think thats what it is, but the drawer stays mounted in the dom by default
restarting the server, one sec. will send you another link
I was just about to ask what happened. ๐
sorry hehe
okay yup you were right though
I just commented out closing the drawer and its working
SO! Thank you ๐ issue resolved
Okay, cool!
wait one sec though
I am not able to get any of my console logs to display, even though the payment is going through successfully. I do have manual capture setup, does calling confirmPayment with redirect: 'if_required' give me back a paymentIntent from google pay?
I basically have other APIS as part of the food menu I need to call to verify and process the user's cart, and if that comes back as a failure I want to cancel the payment, or capture if succeeded
I don't believe so. You should avoid using redirect: 'if_required' if possible.
But if I don't have it, then I'm automatically redirected to the return url without the rest of my code executed, so in a manual capture scenario like I described above, what would you do instead?
I guess I can manually retrieve the paymentIntent and check the status that way? Like for requires_capture and etc?
The Payment Element is designed to do a full redirect by default, and you need to be able to handle that flow. To clarify, are you trying to avoid client side confirmation?
I'm trying to call confirmPayment and at that point, I want to check if there's an error, but if there's not one, I need to check the status of other external API calls before I capturePayment. If the external API calls come back unsuccessful, I want to cancel payment and avoid a redirect.
This flow works for credit card and apple pay, so I'm not sure what the difference is for google pay?
It sounds like you want to use this beta: https://stripe.com/docs/payments/run-custom-actions-before-confirmation
Oh damn I see. So the confirmation would be setup to be on the server side instead of calling confirmPayment on the frontend?
It sounds like that's what you want, right? Or am I misunderstanding?
That is definitely a solution, but kind of an overhaul for what I've been working with just to make google pay work. Is there no way to stop the redirect on google pay once confirmPayment has been called? If not then I guess this is my only options, but I'm wondering why google pay ignores the manual capture that we set on the server when we create the paymentIntent?
No you're correct
I'm not sure, honestly. It shouldn't be ignoring it. Do you have a Payment Intent ID I can look at?
Sure, pm_1MHtm9Qo4ogIFLACGU9C860R
That's a Payment Method. Can you give me a Payment Intent ID (starts with pi_)?
pi_3MHtkxQo4ogIFLAC1ybRclcc
it looks like capture method is automatic for this one for some reason
OH
Yeah, when that one was created you didn't set it to manual.
when I created it I used curl...how do I set manual capture on the curl manual command?
Sorry about that confusion
I'm creating them manually til we refactor the backend to use a test mode connect account to create payment intents, right now we're using live mode accounts to test and that doesn't work with google pay, so this was the workaround
I'm using this command curl https://api.stripe.com/v1/payment_intents \ -u sk_test_51L6JVvJlV60ASTL6kimW71XnHuW3GgHpwBocJyzAqLWmuW5KHNlAn7PbPuF0PEIRGhq7M2Jpc1zrcJI5yDBzCtmS00xcag2S40: \ -d amount=100 \ -d currency=usd \ -d "payment_method_types[]"=card \ -H Stripe-Account:acct_1LT8QGQo4ogIFLAC
How would I add manual capture to that? -d flag with manual capture?
Thank you!
Am I missing something? so it would be ``` curl https://api.stripe.com/v1/payment_intents
-u sk_test_51L6JVvJlV60ASTL6kimW71XnHuW3GgHpwBocJyzAqLWmuW5KHNlAn7PbPuF0PEIRGhq7M2Jpc1zrcJI5yDBzCtmS00xcag2S40:
-d amount=100
-d currency=usd
-d capture_method="manual"
-d "payment_method_types[]"=card
-H Stripe-Account:acct_1LT8QGQo4ogIFLAC
with or without quotes?
looks like that worked ๐
You don't need quotes for that one because it's just lowercase letters, but they don't hurt if you include them.
Awesome!
Can you check why these payments might be uncaptured?pi_3MHuEyQo4ogIFLAC02WqeiGK
That one was created with capture_method set to manual, then it was confirmed, but it was never captured.