#inxilpro
1 messages · Page 1 of 1 (latest)
Hello! You can check the frozen_time on the Test Clock before advancing it instead of checking the Charge creation time.
I guess my question is more about what's the "correct" timestamp to associate with a charge? It seems like charge.created is not guaranteed to be the timestamp that the charge was attempted.
I could code around this issue by checking to see if there's a test clock in place first, but I really hate writing test-specific logic in my production code.
Ideally I wouldn't use "now" in my application context, because it's possible that a webhook will be delivered a few days late if the application goes down.
A Charge's created timestamp can be used as you're describing, just not with Test Clocks. You would need to write special Test Clock logic I'm afraid.