#mattwoberts
1 messages ยท Page 1 of 1 (latest)
๐
So it would appear that I can't update a customer while the clock is advancing
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
No - the error happens when I try to update the customer (I'm just updating the customers details)
related to test clock objects
So my plan was that I can use test clocks to drive the advancement of time in my integration tests... kind of like this...
- Add a new test clock, create a new customer
- Check some things in the web app are good.
- Add a card to that account
- Advance the clock 30 days to trigger an invoice and payment
- 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
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
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?
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
let me know if you need any more help
Ok thanks for your help!