Hello all. Below I have pasted an XML string that will send it to Yourpay.com (a credit card processing company). What I need for this to do is 2 things;
#1 - Send me and the recipient an email confirmation with all of the fields that I've captured.
#2 - I also want to see if I can generate a confirmation page that says "Print This Confirmation Page for Your Records" and it has the fields that I captured previously. I don't have a clue how to do this. PLEASE HELP!
p.s. Mr. Noo-Bee
<?
echo"<html><head><title>Edgelea Stables Credit Card Processing</title></head><body><br>";
/*
<!---------------------------------------------------------------------------------
PHP_FORM_MAX.php - A form processing showing many of the possible fields
This script processes form data passed in from PHP_FORM_MAX.html
Copyright 2003 LinkPoint International, Inc. All Rights Reserved.
This software is the proprietary information of LinkPoint International, Inc.
Use is subject to license terms.
This program is based on the sample SALE_MAXINFO.php
See comments in that file for many field descriptions.
Depending on your server setup, this script may need to
be placed in the cgi-bin directory, and the path in the
calling file PHP_FORM_MAX.html may need to be adjusted
accordingly.
NOTE: older versions of PHP and in cases where the PHP.INI
entry is NOT "register_globals = Off", form data can be
accessed simply by using the form-field name as a varaible
name, eg. $myorder["host"] = $host, instead of using the
global $_POST[] array as we do here. Passing form fields
as demonstrated here provides a higher level of security.
------------------------------------------------------------------------------------>
*/
include"lphp.php";
$mylphp=new lphp;
# constants
$myorder["host"] = "secure.linkpt.net";
$myorder["port"] = "1129";
$myorder["keyfile"] = "/home/edgelea/public_html/3109611952.pem"; # Change this to the name and location of your certificate file
$myorder["configfile"] = "3109611952"; # Change this to your store number
# transaction details
$myorder["ordertype"] = $_POST["ordertype"];
$myorder["result"] = $_POST["result"];
$myorder["transactionorigin"] = $_POST["transactionorigin"];
$myorder["oid"] = $_POST["oid"];
$myorder["ponumber"] = $_POST["campername"];
$myorder["taxexempt"] = $_POST["taxexempt"];
$myorder["terminaltype"] = $_POST["terminaltype"];
$myorder["ip"] = $_POST["homeworknum"];
# totals
$myorder["subtotal"] = $_POST["subtotal"];
$myorder["tax"] = $_POST["tax"];
$myorder["shipping"] = $_POST["shipping"];
$myorder["vattax"] = $_POST["vattax"];
$myorder["chargetotal"] = $_POST["chargetotal"];
# card info
$myorder["cardnumber"] = $_POST["cardnumber"];
$myorder["cardexpmonth"] = $_POST["cardexpmonth"];
$myorder["cardexpyear"] = $_POST["cardexpyear"];
# BILLING INFO
$myorder["name"] = $_POST["parentfirst"];
$myorder["company"] = $_POST["parentlast"];
$myorder["address1"] = $_POST["address1"];
$myorder["address2"] = $_POST["address2"];
$myorder["city"] = $_POST["city"];
$myorder["state"] = $_POST["state"];
$myorder["phone"] = $_POST["mobile"];
$myorder["email"] = $_POST["parentemail"];
$myorder["addrnum"] = $_POST["homeworknum"];
$myorder["zip"] = $_POST["zip"];
# SHIPPING INFO
$myorder["sname"] = $_POST["campername"];
$myorder["saddress1"] = $_POST["camperemail"];
$myorder["saddress2"] = $_POST["age"];
$myorder["scity"] = $_POST["scity"];
$myorder["sstate"] = $_POST["sstate"];
$myorder["szip"] = $_POST["szip"];
$myorder["scountry"] = $_POST["scountry"];
# MISC
$myorder["comments"] = $_POST["experience"];
$myorder["referred"] = $_POST["session"];
# ITEMS AND OPTIONS
# there are several ways to pass items and options; see sample SALE_MAXINFO.php
if ($_POST["debugging"])
$myorder["debugging"]="true";
Send transaction. Use one of two possible methods
// $result = $mylphp->process($myorder); # use shared library model
$result = $mylphp->curl_process($myorder); # use curl methods
if ($result["r_approved"] != "APPROVED") // transaction failed, print the reason
{
print "Status: $result[r_approved]<br>\n";
print "Error: $result[r_error]<br><br>\n";
}
else // success
{
print "Status: $result[r_approved]<br>\n";
print "Transaction Code: $result[r_code]<br><br>\n";
}
if verbose output has been checked,
print complete server response to a table
if ($_POST["verbose"])
{
echo "<table border=1>";
while (list($key, $value) = each($result))
{
# print the returned hash
echo "<tr>";
echo "<td>" . htmlspecialchars($key) . "</td>";
echo "<td><b>" . htmlspecialchars($value) . "</b></td>";
echo "</tr>";
}
echo "</table><br>\n";
}
?>
</body></html>