3 ms·
What are the values in the body that is sent in a webhook? Are those dummy values. Mostly, in response of a Stripe webhook, one would want to do something base
by sidchilling 13y ago
What are the values in the body that is sent in a webhook? Are those dummy values.
Mostly, in response of a Stripe webhook, one would want to do something based on the id. For instance, for a charge failed event, one would like to retrieve the customer for which the charge has failed and would retrieve the customer details from Stripe. Dummy values will not help here.
Just thinking aloud, how would one use this? I have been in need for something to test Stripe webhooks.
- luaybs 13y agoYou can specify values to overwrite the dummy data. For example: StripeTester.create_event(:charge_failed, {"id" => "your_customer_id"}) This will overwrite the first occurrence of the key. I'm working towards solving this issue. Maybe have the user specify which parent object the key is in. Anyway, pull requests are welcome.
- sidchilling 13y agoAh.. okay.