Need a little help with my code
Posted: Wed Jul 23, 2008 10:53 am
Before I post my code, let me tell you what you're looking at. I'm working on an ecommerce section for the company I work for. The code you are looking at is to determine if the customer needs to pay sales tax. It then automatically submits the form with all their information to paypal.
Now, I know that I don't have the code to actually log into paypal on here. I didn't think it wise to post that. Now, the problem I'm having is that after my form submits, it goes to the firefox "problem loading page- cannot establish a connection to the server at payment.verisign.com."
I've tried sending the information to different pages on my site, and it doesn't work. So I'm at a loss.
Code: Select all
<body onLoad="document.process.submit()">
<?php
$NAME = $_POST['NAME'];
$USER1 = $_POST['USER1'];
$ADDRESS = $_POST['ADDRESS'];
$CITY = $_POST['CITY'];
$STATE = $_POST['STATE'];
$ZIP = $_POST['ZIP'];
$PHONE = $_POST['PHONE'];
$EMAIL = $_POST['EMAIL'];
$FAX = $_POST['FAX'];
$CustID = $_POST['CustID'];
$NAMETOSHIP = $_POST['NAMETOSHIP'];
$USER2 = $_POST['USER2'];
$ADDRESSTOSHIP = $_POST['ADDRESSTOSHIP'];
$CITYTOSHIP = $_POST['CITYTOSHIP'];
$STATETOSHIP = $_POST['STATETOSHIP'];
$ZIPTOSHIP = $_POST['ZIPTOSHIP'];
$PHONETOSHIP = $_POST['PHONETOSHIP'];
$EMAILTOSHIP = $_POST['EMAILTOSHIP'];
$FAXTOSHIP = $_POST['FAXTOSHIP'];
$total = $_POST['total'];
echo $total;
if ($STATE=="UT"){
$total+=15.18;
}
echo $total;
?>
<form action="http://payments.verisign.com/payflowlink" name="process" method="post">
<input type="hidden" name="NAME" value=<? echo $NAME; ?>>
<input type="hidden" name="USER1" value=<? echo $USER1; ?>>
<input type="hidden" name="ADDRESS" value=<? echo $ADDRESS; ?>>
<input type="hidden" name="CITY" value=<? echo $CITY; ?>>
<input type="hidden" name="STATE" value=<? echo $STATE; ?>>
<input type="hidden" name="ZIP" value=<? echo $ZIP; ?>>
<input type="hidden" name="PHONE" value=<? echo $PHONE; ?>>
<input type="hidden" name="EMAIL" value=<? echo $EMAIL; ?>>
<input type="hidden" name="FAX" value=<? echo $FAX; ?>>
<input type="hidden" name="CustID" value=<? echo $CustID; ?>>
<input type="hidden" name="NAMETOSHIP" value=<? echo $NAMETOSHIP; ?>>
<input type="hidden" name="USER2" value=<? echo $USER2; ?>>
<input type="hidden" name="ADDRESSTOSHIP" value=<? echo $ADDRESSTOSHIP; ?>>
<input type="hidden" name="CITYTOSHIP" value=<? echo $CITYTOSHIP; ?>>
<input type="hidden" name="STATETOSHIP" value=<? echo $STATETOSHIP; ?>>
<input type="hidden" name="ZIPTOSHIP" value=<? echo $ZIPTOSHIP; ?>>
<input type="hidden" name="PHONETOSHIP" value=<? echo $PHONETOSHIP; ?>>
<input type="hidden" name="EMAILTOSHIP" value=<? echo $EMAILTOSHIP; ?>>
<input type="hidden" name="FAXTOSHIP" value=<? echo $FAXTOSHIP; ?>>
<input type="hidden" name="AMOUNT" value=<?php echo $total; ?>>
</form>
</body>
</html>
I've tried sending the information to different pages on my site, and it doesn't work. So I'm at a loss.