#Iskaldr-cli

1 messages ยท Page 1 of 1 (latest)

chrome leaf
#

hmm, let me look

#

I think there's a race condition unfortunately

#

the way the trigger works is it creates a customer, then an invoice item, then an invoice, which is supposed to pull in the pending invoice item, and then it tries to charge the invoice with a card that fails, to simulate the event. But here it somehow created the invoice without pulling in the invoice item(you see it's still pending on https://dashboard.stripe.com/test/customers/cus_MEOmqeLQ7AFGkP) , so the invoice was for $0 and there was no payment and thus no failure

#

that's really weird

opal trail
#

Ah ok, but at least I now know, it is not because of me misusing the command. ๐Ÿ™‚

#

Are there any alternative ways, how I could trigger an invoice.payment_failed to test my local code?

chrome leaf
#

if you try it again does it work? or was it a once off blip?

#

oh wait

#

so that's a bug in the CLI, we need to update the trigger fixture to work on the latest API version

#

you could also do --api-version=2020-08-27 on the stripe trigger call to force the old version as a quick fix to get the event you want.

opal trail
#

Awesome thank you very much, will try the quick fix for now and keep my eyes open for the next CLI update. ๐Ÿ™‚

#

It is working with the quick fix, thank you very much!

opal trail
#

One more question (please let me know if I should create a new Thread for that): is it possible to use stripe trigger invoice.payment_failed with an additional parameter so that the invoice will be for a subscription?

chrome leaf
#

it's not

#

what I'd suggest if you need to test a recurring failure is to use Test Clocks