#amadeus-confirm-paymentintent

1 messages ยท Page 1 of 1 (latest)

amber crypt
#

Which library are you using?

cursive otter
#

php

#

v7.97.0

amber crypt
#

Thanks for your patience here. There are other things you can get in that case

#

For example if the PI requires a next action

#

So definitely check the status of the PI when you get it back

cursive otter
#

ok, thank you for your answer.

#

if I have a related question, should I start a new thread, or ask here?

amber crypt
#

Ask here please

cursive otter
#

card payment methods have some dummy ids available for testing, e.g.: pm_card_chargeDeclinedInsufficientFunds

#

are there such ids for testing sepa direct debit failures (e.g. insufficient funds)?

#

or do I need to create myself a payment method and a mandate to test that?

fluid lodge
#

Hello! I'm taking over for @amber crypt, let me get caught up...

cursive otter
#

I see these numbers, but I'm struggling to use them to be honest.

#

I created a payment method with one of these numbers, and passed it to payment intent

#

I'm getting the following error:
Stripe\Exception\InvalidRequestException with message 'This PaymentIntent requires a mandate, but no existing mandate was found. Collect mandate acceptance from the customer and try again, providing acceptance data in the mandate_data parameter.'

#

and then I don't see any endpoint for creating mandates, so how do I go about testing a failing off_session sepa debit charge?

fluid lodge
#

Are you using Checkout or your own custom payment form?

cursive otter
#

checkout

#

I am trying to test the following scenario

#

we're a marketplace for cleaning services

#

we take 1st hour deposit

#

I want the deposit payment to succeed (we store payment method for subsequent payments)

#

and then, we charge the customer for the remaining amount (however long the cleaning took) - I want THAT payment to tail

#

we're currently with Mollie, but I want to migrate to stripe to do payouts to providers as well

#

the remaining amount is done off_session

fluid lodge
#

Ah, I see. I don't think there's a way to test that specific scenario in test mode with a Checkout integration.

cursive otter
#

do you have any suggestion where can I see possible responses at least?

#

I am guessing CardException won't be thrown for sepa_debit failures, right?

fluid lodge
#

Let me check one other thing though...

#

You should be able to plug in any of the test account numbers and save them to a Customer that way, then you can charge off-session after that and get the different responses.

#

That way you won't have to build a custom payment form just to test this.

cursive otter
#

one sec, I'll just try it

#

ok, so tested it for this number:
DE62370400440532013001 The PaymentIntent status transitions from processing to requires_payment_method.

and then initiated an off_session payment intent on it. In response, I got a payment intent with "pending" charge, not an exception.

#

is there actually a testing number for "insufficient funds"?

fluid lodge
#

No, SEPA takes time to process, so the response you get after confirming the Payment Intent will always be pending. Later you'll get information regarding the outcome of the payment once it processes.

cursive otter
#

ok, it's a good news in a way, since at least I know I get payment intent linked to a charge ๐Ÿ™‚

#

thanks a lot for an idea how to test this, it would take me days probably to figure it out ๐Ÿ˜›