#feloe_paymentintent-capture

1 messages ยท Page 1 of 1 (latest)

soft pondBOT
fierce ridgeBOT
#

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.

soft pondBOT
#

๐Ÿ‘‹ 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/1245488713442787338

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

true storm
#

You can test different outcomes that result from different 3DS auth scenarios using these test cards: https://docs.stripe.com/testing#regulatory-cards

But you can't really see what 3DS redirects will look like, since it's different for every customer's card issuer.

small crescent
#

Oh ok because I'm following https://docs.stripe.com/payments/place-a-hold-on-a-payment-method this method and I was receiving this error

A `return_url` must be specified because this Payment Intent is configured to automatically accept the payment methods enabled in the Dashboard, some of which may require a full page redirect to succeed. If you do not want to accept redirect-based payment methods, set `automatic_payment_methods[enabled]` to `true` and `automatic_payment_methods[allow_redirects]` to `never` when creating Setup Intents and Payment Intents.

So I just added the return_url param to my payment intent but I have no idea how that is handled in the client and I can't just roll out my code without testing it first ๐Ÿ˜ฌ

true storm
#

Gotcha. Basically that is the URL that the customer is redirected to after 3DS authentication, so you would need to have a staging environment setup to test this flow yourself. I'm not sure of another way

small crescent
#

Here is my checkout flow if it helps

// submit the StripeElements form
const { error } = await (paymentForm.value as StripeElements).submit()

// create a payment method using the elements form
$stripe.createPaymentMethod({
  elements: paymentForm.value,
  params: {
    billing_details: {
      name: `${firstName} ${lastName}`,
      email: email,
      phone: `${phoneNumber}`
   },
  }
}).then(async (result: any) => {
  if (result.error) {
    // todo handle error
    loading.value = false
  } else {
// use created payment method id to create order
    await placeOrder(result.paymentMethod.id)
  }
}).catch((err: any) => {
  handleError(err)
  console.error(err)
}).finally(() => {
  loading.value = false
})
true storm
#

Not really. Like, you need to run a local server of your code and access it in the browser to test this yourself. Without that, you're not going to be able to test actions performed on redirect

small crescent
true storm
#

It depends. If you followed that guide to create your payment flow, then yes.

small crescent
#

so our flow doesn't capture the funds until a restaurant accepts the order

true storm
#

Wait... So if the confirmation step is handled, why not just capture the payment like the guide says?

small crescent
#

which guide?

small crescent
#

you mean in the Capture Funds Section?

true storm
#

yup

soft pondBOT
fierce ridgeBOT
bronze fog
#

feloe_paymentintent-capture

small crescent
#

So the flow was working correctly until I updated the node-stripe dependency from version 12 to 15 and added support for Apple Pay then I started getting that return_url is required error. I want to make sure I am handling those redirects correctly

bronze fog
#

you jumped 3 major versions and each major version has breaking changes that is important to carefully read about

#

What is blocking you exactly after what my colleague explained?

small crescent
#

Yeah that was my mistake.

So currently nothing is blocking me from capturing funds after I added the redirect_url to my paymentIntent.

My main concern is how should I handle those redirects when following the place a hold on a payment method guide.