Answer the question
In order to leave comments, you need to log in
How to redirect notifications from payment systems?
Given: online store.
On production , at {prod}/callback.php, notifications about payments from payment systems are sent.
When ordering on the dev server , notifications should go to {dev}/callback.php, which would be processed there.
Question: How to redirect notifications from payment systems? And should they be redirected? Perhaps you just need to curl'om broadcast the headers and the request body to {dev}, get the response and issue it pl. system on the same {prod}.
How are things like this implemented in projects? This is the first time I've encountered such a problem.
Thank you!
Answer the question
In order to leave comments, you need to log in
Settled on this one
$result = file_get_contents("{$site}/callback.php?{$_SERVER["QUERY_STRING"]}", false, stream_context_create(array('http' =>
array(
'method' => 'POST',
'header' => "Content-type: application/x-www-form-urlencoded\r\n" .
"Authorization: Basic " . base64_encode("dev:$dev_pass"),
'content' => http_build_query($_POST)
)
)));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question