#mattwoberts

1 messages ยท Page 1 of 1 (latest)

timid jackalBOT
forest quest
#

๐Ÿ‘‹

#

So it would appear that I can't update a customer while the clock is advancing

echo warren
#

you should just wait for the clock to have a status of ready before trying to advance it once more

#

or do any other action

forest quest
#

No - the error happens when I try to update the customer (I'm just updating the customers details)

echo warren
#

related to test clock objects

forest quest
#

So my plan was that I can use test clocks to drive the advancement of time in my integration tests... kind of like this...

  1. Add a new test clock, create a new customer
  2. Check some things in the web app are good.
  3. Add a card to that account
  4. Advance the clock 30 days to trigger an invoice and payment
  5. Check that everything worked OK
#

But if I'm reading this right - my webhooks - which will fire as the clock is advancing - will trigger various things in my stripe integration, which won't be allowed, since the clock is advancing?!

#

I must be confused, 'cos that would default the whole purpose?

#

What I'm asking is - how am I supposed to use the test clocks if they put constraints on your existing stripe integration that stop it from working - it makes no sense to me

echo warren
#

I understand your frustration

#

there's a couple of things you can do to test your integration

#

either accept the fact that if the clock is still in an advancing state your webhook endpoint will fail, this will trigger a reattempt of the same event in a later stage

#

which is fine I guess

#

or try to add some logic to wait for the clock to finish advancing before doing any updates on the customer object

forest quest
#

Yeah I suppose that is fair enough. It shouldn't stop the core stuff I need to test from working - even with the error happening... Do you have a list there of things I'm not allowed to do while the clock is advancing - is it just updating the customer, or will other things be restricted too?

echo warren
#

anything attached to a clock

#

basically customer, subscription, invoices,etc.

forest quest
#

That's pretty much everything ๐Ÿ˜† Ok no worries, I'll try to work around this, at least now I understand it's a restriction - I can kinda see why it's needed from a developers perspective too

echo warren
#

let me know if you need any more help

forest quest
#

Ok thanks for your help!