#arggh-pi-status-transition

1 messages · Page 1 of 1 (latest)

mystic falcon
#

Hey there. There's not I'm afraid, ~1 hour is the timeframe in which auto collection is attempted after the invoice is finalised

#

What part of this flow are you explicitly attempting to test/trigger?

tame crescent
#

Just trying to get the payment intent's status into requires_payment_method, since our app uses that. Now I have to wait an hour every time I try to simulate this flow.

mystic falcon
#

Specifically with an Invoice/Subscription?

tame crescent
#

Yes.

mystic falcon
#

To be clear you'll only ever get that status when:

  • There's no payment_method on the PI
  • Auth fails
#

So are you trying to simulate an actual auto collection failure on the invoice, or just that status of a PI?

tame crescent
#

Well I'm working on resolving the real world case of a failed payment where the user needs to get on-site and add a new payment method or otherwise take action. It's just unnecessarily slow if I have to wait an hour each time I need to run the flow.

mystic falcon
#

How do you bring them on-site? Have you considered using the CLI with an invoice.payment_failed event?

tame crescent
#

I'm just pretending to be the user, logged in to our service. It's manual testing and depends on actual test data, I believe triggering fake events with CLI doesn't cut it, since they don't match any data in our DB?

mystic falcon
#

Using the CLI would help speed up this for you if you can figure out the correct event you need and stub the data

tame crescent
#

Oh I didn't know that, thanks!

#

Though our app still uses the actual invoice data from Stripe by calling the API, so ..

#

I could replicate the data in our DB and use that of course, and then use the CLI with fixture data.