javascript - load page from POST url sended by external popup

I'm generate an popup Url by PHP. This popup is open by this button : ($FormElements is a PHP Array to buit Url with all the arguments asked by PayFip)
<button class="btn btn-flat btn-success"
type="button"
onclick="window.open('<?=$modalUrl?>','_blank','height=700, width=900,
toolbar=no, menubar=no,
scrollbars=no, resizable=yes,
location=no, directories=no, status=no');" >
<i class="far fa-paper-plane mr5"></i>Cliquer pour tester le paiement par PayFip
</button>
Where PHP $modalUrl is built with different arguments :
$modalUrl = 'https://www.payfip.gouv.fr/tpa/paiement.web?numcli=' . $FormElements['numcli'] . '&exer=' . $FormElements['exer'] . '&refdet=' . $FormElements['refdet'] . '&objet=' . $FormElements['objet'] . '&montant=' . $FormElements['montant'] . '&urlcl=' . $FormElements['urlcl'] . '&mel=' . $FormElements['mel'] . '&saisie=' . $FormElements['saisie'];
I don't have the access to modify the script of this popup because it's a "PayFip" (French government payment process). Depending about the payment status the process generate a return URL starting by "urlcl" (argument passing in "$modalUrl") + different arguments (status, date, ...).
This return URL is sent by POST when the payment form is sent without closing popup. The popup will be manually closed after payment informations and a button to download PDF resume are displayed.
- The original page is not reloaded. I try to listening by js but it's not working.
- I tried different ways but I don't have the level to code this alone.
- How can I get the different arguments of this POST ?
- What is the logical process to solve my problem ?
- Js or Jquery at first and PHP after or PHP directly ?
Information : The PayFip process is an IPN - Instant Payment Notification... Maybe it's clearer for you.
I'm really sorry for my poor English but I'm French and I don't have the opportunity to write often in English.
Thanks for Ur help...
Answer
Solution:
I tried to use the commun practice of IPN by using a different return Url (https://www.*****.fr/payfip_notifications_treatment.php - with access rights value = 777).
in codes : ***** = my website
The code page of the return URL is just a re-direction only to check if it's working :
<html>
<?php
header('Location: https://*****.fr/');
exit;
?>
The logs of the server are :
145.242.11.3 www.*****.fr - [22/Jun/2021:05:10:19 +0200] "POST /payfip_notifications_treatment.php HTTP/1.1" 301 260 "-" "Jakarta Commons-HttpClient/3.1"
145.242.11.3 www.*****.fr - [22/Jun/2021:05:10:44 +0200] "POST /payfip_notifications_treatment.php HTTP/1.1" 301 260 "-" "Jakarta Commons-HttpClient/3.1"
The logs are proving the good Url is touched but the header location is not running...
I don't understand why. :(
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: call to undefined function illuminate\encryption\openssl_cipher_iv_length()
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.