I have a form that has information that the user fills out about a class and includes payment information that is redirected to PayPal's payflowlink. Before I added the payflowlink I was posting the the form information to the same page and emailing the class information to an email address. Now with the action of the form set to the payflowlink the class information does not get emailed to me, but the payment information does get passed to the payflowlink.
I thought maybe a redirect page would work using <meta http-equiv="refresh" content="0; url=https://payflowlink.paypal.com">
, but the $_POST does not get passed to the payflowlink. How can I get the $_POST information passed from the redirect page to the payflowlink page?
Right now I have the form page posting the information to the redirect page, the redirect page emails the the information, but the $POST is not passed to the payflowlink. The payflowlink page is hosted by PayPal.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Registration</title>
<meta http-equiv="refresh" content="0; url=https://payflowlink.paypal.com">
</head>
<body>
<?php
ini_set('display_errors', 'On');
error_reporting(E_ALL | E_STRICT);
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (isset($_POST["name"])) {
$name = $_POST['name'];
$EmailBody = "Parent's Name: ".$_POST["name"]."<br>";
}
$subject = "Registration";
SendMail($email, $EmailBody, $subject);
echo ($EmailBody);
}
?>
<main id="main">
<h1>Registration Form</h1>
<p><a href="https://payflowlink.paypal.com">Click this link if you are not redirected</a></p>
</main>
</body>
</html>