Answer the question
In order to leave comments, you need to log in
How to accept an external (from another server) HTTP request on a WP site?
On the WP site, you need to accept and process an external HTTP request from the service (Yandex.Money) (POST method, MIME type - application/x-www-form-urlencoded).
I just can’t figure out where to place the handler and how to form a link to it in order to tell its service where it should send this very request.
A stupid solution, like creating a file with the wp-filename.php handler in the root and specifying https://mysite.ru/wp-filename.php as a link , does not work. Well, if only because all this is by WP and there is no access to the database, no hooks, no objects. Of course, you can connect to the database directly from this file via PDO, but this is all terribly crooked.
And how beautifully to implement - it is not thought out. Tell me, in which direction to think about the solution?
Answer the question
In order to leave comments, you need to log in
I just can't figure out where to place the handler and how to form a link to it
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question