#alessandrosiragusa_91615

1 messages · Page 1 of 1 (latest)

wet flameBOT
uncut gale
#

Hello there

limber pawn
#

ok thank you, how can I make sure that the signature of the webhook is valid?

uncut gale
limber pawn
#

yes I am doing this, but how can I generate a valid signature so the test passes?

uncut gale
#

Ah for your integration test you mean. Sorry. You would not automate the test of the actual handler receiving a signature. You would mock the response that would come from your handler.

#

So you test your handler to ensure it works

wet flameBOT
uncut gale
#

Then you automate the response it provides

limber pawn
#

wouldn't it be easier if there was an api for changing the status of a payment intent manually?

uncut gale
#

No. It is important that our API in test mode mirrors what happens in production as much as possible.

limber pawn
#

I get it, but in real life there is a user interaction and it's impossible to do a proper test without simulating those interactions

uncut gale
#

It is impossible to automate one of these tests

limber pawn
#

it's not a real e2e test and if something breaks the tests won't reveal that

uncut gale
#

It is absolutely not impossible to perform these tests