@@ -28,31 +28,31 @@ func TestVerifyWebhookPayload(t *testing.T) {
28
28
}{
29
29
{
30
30
name : "Test unauthorized access due to invalid signature for Checkout" ,
31
- path : "webhooks/checkout" ,
31
+ path : "/ webhooks/checkout" ,
32
32
signatureKey : "invalid_signature" ,
33
33
signatureName : "Cko-Signature" ,
34
34
secretKey : checkoutSecretKey ,
35
35
expectCode : http .StatusUnauthorized ,
36
36
},
37
37
{
38
38
name : "Test successful access for Checkout" ,
39
- path : "webhooks/checkout" ,
39
+ path : "/ webhooks/checkout" ,
40
40
signatureKey : computeHmacSha256 ("hello" , checkoutSecretKey ),
41
41
signatureName : "Cko-Signature" ,
42
42
secretKey : checkoutSecretKey ,
43
43
expectCode : http .StatusOK ,
44
44
},
45
45
{
46
46
name : "Test unauthorized access due to invalid signature for Persona" ,
47
- path : "webhooks/persona" ,
47
+ path : "/ webhooks/persona" ,
48
48
signatureKey : "t=1629478952,v1=invalid_signature" ,
49
49
signatureName : "Persona-Signature" ,
50
50
secretKey : personaSecretKey ,
51
51
expectCode : http .StatusUnauthorized ,
52
52
},
53
53
{
54
54
name : "Test successful access for Persona" ,
55
- path : "webhooks/persona" ,
55
+ path : "/ webhooks/persona" ,
56
56
signatureKey : fmt .Sprintf ("t=1629478952,v1=%s" , computeHmacSha256 ("1629478952.hello" , personaSecretKey )),
57
57
signatureName : "Persona-Signature" ,
58
58
secretKey : personaSecretKey ,
0 commit comments