#How Stripe webhook router works?

1 messages · Page 1 of 1 (latest)

spice herald
#

Hey! I'm trying to add new payment gateway. I'm simply copied Stripe directory and rewrite internal logic. But, I don't understand how the router works.

GET request on /payment/YokassaPay/{shopProduct} works great, i can create new payment
But POST request on /payment/YookassaNotification - get page 404, and nothing happens. I tested it with postman and curl

Pls, can someone explain me how it works?nezukouch

fleet agate
#

Hey! What branch are you referring to exactly?

spice herald
#

I take it you mean the panel version? The latest one, installed it yesterday

fleet agate
#

Ah okay!
Hmm that is interesting. Did you use "extensions" as uri prefix? Like /extensions/payment/YokassaNotification

spice herald
#

ohhh, my bad, didn't pay attention to the prefix...

fleet agate
#

Ah happens, its a bit hidden 😄 Does it work with the url being prefixed?

spice herald
#

yes, but now i have 419 page expired. Is this due to CSRF protection?

fleet agate
#

Most likely yes. You can workaround that tho

#

In the extensions config.php there is a property "RoutesIgnoreCsrf" which holds an array of possible routes that will not get csrf checked

spice herald
#

yes, it works, thanks a lot PepeLove