#miketimturner-metered
1 messages · Page 1 of 1 (latest)
hi! I haven't directly tested this myself yet but I think I'd expect it to 'just work'. Do you have a request ID req_xxx of failed attempt to report usage?
req_6q6Q3KmkE1XQ71
I'm testing this too, but before looking too deeply, that timestamp looks like it was .now() in your code, but if using a test clock it should be in the time range(frozen_time) of the clock(which in September/November this year)
Hmm looking inside Cashier it looks like it falls back to php time()
If it was null would Stripe work it out itself?
no
having said this when I try it I get this error instead
StripeInvalidRequestError: Cannot create the usage record with timestamp 1652004781 because timestamps must not be in the future. Expected a timestamp less than or equal to 1651745566.
but I might have my clock times not set up properly, will have to experiment some more
OK its tricky getting the actual time I have advanced by as Im using the browser to advance
You pointed me in the right direction. I queried the test clock and set the time stamp to the frozen time and it works. Thanks