#javespi

1 messages ยท Page 1 of 1 (latest)

keen tokenBOT
bright oyster
#

Hi! Let me help you with this.

#

Do you want to test what happens if capture fails?

naive gyro
#

Exactly, and which different errors we can face

#

Specially the ones related with the payment method

#

Create intent โœ…
Confirm โœ…
Capture โŒ

This flow to be exactly

bright oyster
#

I don't think we have a test card for this unfortunately.

naive gyro
#

๐Ÿ˜„
Is there any documentation about which payment errors we could have when capture? Specially card/payment methods exceptions caused by bank or customer's card

bright oyster
#

Where are you expecting to see the errors?

naive gyro
#

Returns an error if the PaymentIntent was not capturable or an invalid amount to capture was provided.

bright oyster
#

I see. You can try to remove the Payment Method from the PaymentIntent, but it might not allow you to capture the funds afterwards.

keen tokenBOT
bright oyster
#

In short, there's no straightforward way to test that, unfortunately.

static sparrow
#

๐Ÿ‘‹ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!

naive gyro
#

How can I remove a payment method from an intent?

['payment_method' => null] using update method?

I'm using PHP SDK

#

You passed an empty string for 'payment_method'. We assume empty values are an attempt to unset a parameter; however 'payment_method' cannot be unset. You should remove 'payment_method' from your request or supply a non-empty value. (Stripe\Exception\InvalidRequestException)

naive gyro
#

I'm trying to test payment errors in my capture later use case

For now, I have covered different errors could happen when:

  • Intent is created with capture method manual
  • Intent is confirmed

But not when:

  • Capture amount of the intent

Maybe im missing something, but after the payment intent confirm was OK, is there any card error or payment method error like: cvc, declined, insufficient funds, etc that could happen when capture?

I was trying to create intents with test payment methods to trigger these errors; but errors are triggered when I confirm, not when I capture

static sparrow
#

normally the error would happen on confirmation

naive gyro
#

Okey! And which errors could happen?

static sparrow
#

any type