Hey Guys, did not post the code but here it is now. Oh and basically what is happening is I am now getting and error. The $message variable is what's causing problems. Everything works if I take out the $message. How do I get this to work? Here is the code:
<?php
include_once("gatewayapi/inc_gatewayapi.php");
$transaction = new GatewayTransaction($_REQUEST, $_SERVER['REMOTE_ADDR']);
if($transaction->ProcessTransaction($responseString, $errorCode))
{
$response = new GatewayResponse($responseString, $GatewaySettings['delim_char']);
// Check MD5 Hash Value
//
if($GatewaySettings['MD5Hash']
&& !$response->VerifyMD5Hash($GatewaySettings['MD5Hash'],
$transaction->username,
$transaction->amount))
{
header("Location: " . $GatewaySettings['PaymentDeniedPage'] . "?gateway_error=" . rawurlencode($transaction->GetErrorString("INVALID_MD5HASH")));
exit();
}
if($response->IsApproved())
{
$to = 'donation@mysite.org';
$subject = 'New Donation';
$header = 'From: no-reply@mysite.org';
$message = '<html><body>';
$message .= '<img src="http://mysite.org/images/emailbanner.jpg" alt="Email Banner" />';
$message .= '<table rules="all" style="border-color: #666;" cellpadding="10">';
$message .= "<head>"
$message .= "<title>Donation Information</title>"
$message .= "</head>"
$message .= "<body>"
$message .= "<p>Donation Information</p>"
$message .= "<table>"
$message .= "<tr>"
$message .= "<th>Donation Amount:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["amount"]; ?></td>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<th>Designation:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["Desc"]; ?></td>"
$message .= "</tr>"
$message .= "</table>"
$message .= "<p>Billing Information</p>"
$message .= "<table>"
$message .= "<tr>"
$message .= "<th>First Name:</th>"
$message .= "<th>Last Name:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["first_name"]; ?></td>"
$message .= "<td><?php echo $_GET["last_name"]; ?></td>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<th>Spouse Name:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["Spouse"]; ?></td>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<th>Address:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["address"]; ?></td>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<th>City:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["city"]; ?></td>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<th>State:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["state"]; ?></td>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<th>Zip Code:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["zip"]; ?></td>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<th>Country:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["country"]; ?></td>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<th>Phone Number:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["phone"]; ?></td>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<th>Email Address:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["email"]; ?></td>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<th>Credit Card:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $cc_number = "XXXX-XXXX-XXXX-" . substr($cc_number,-4,4); ?></td>"
$message .= "</tr>"
$message .= "</table>"
$message .= "<p>Shipping Information</p>"
$message .= "<table>"
$message .= "<tr>"
$message .= "<th>First Name:</th>"
$message .= "<th>Last Name:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["shipping_first_name"]; ?></td>"
$message .= "<td><?php echo $_GET["shipping_last_name"]; ?></td>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<th>Address:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["shipping_address"]; ?></td>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<th>City:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["shipping_city"]; ?></td>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<th>State:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["shipping_state"]; ?></td>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<th>Zip Code:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["shipping_zip"]; ?></td>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<th>Country:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["shipping_country"]; ?></td>"
$message .= "</tr>"
$message .= "</table>"
$message .= "<p>Gift of Love</p>"
$message .= "<table>"
$message .= "<tr>"
$message .= "<th>This gift is:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["GiftDesc1"]; ?></td>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<th>Is this a pet?</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["IsThisaPet"]; ?></td>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<th>If a pet what kind:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["TypeofPet"]; ?></td>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<th>Name:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["GiftDesc2"]; ?></td>"
$message .= "</tr>
$message .= "<tr>"
$message .= "<th>Address:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["GOLAddress"]; ?></td>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<th>City:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["GOLCity"]; ?></td>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<th>State:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["GOLState"]; ?></td>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<th>Zip:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["GOLZip"]; ?></td>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<th>Country:</th>"
$message .= "</tr>"
$message .= "<tr>"
$message .= "<td><?php echo $_GET["GOLCountry"]; ?></td>"
$message .= "</tr>"
$message .= "</table>"
if (mail($to, $subject, $message, $header)) {
header("Location: " . $GatewaySettings['PaymentApprovedPage']);
}
}
else
header("Location: " . $GatewaySettings['PaymentDeniedPage'] . "?gateway_error=" . rawurlencode($response->GetField("ResponseReasonText")));
}
else
header("Location: " . $GatewaySettings['PaymentDeniedPage'] . "?gateway_error=" . rawurlencode($transaction->GetErrorString($errorCode)));
?>