I'm a first-time php user trying to implement the php scripts that they offer as downloads at the authorize.net site. I've read the SIM Implementation Guide they also offer there a couple of times and tried to acquaint myself with basic syntax,etc.,by poring over a couple of php manuals.
But I'm still kind of at sea about proper implementation protocols.
All I want to do is help my web client avoid having to pay for a shopping cart and use those SIM scripts to sell multiple items (7 or 8). Hopefully her checkout process can allow for her customers to pay for several items at once. But if necessary she's willing to settle for a process which has her customers to submitting each transaction individually.
Here is the whole sim.php page I've built her which amounts, as you can see, to an Order Confirmation form with multiple fields and a submit button to authorize.net's payment gateway. Any helplful comments would be very appreciated! I've definitely got a lot to learn, here!
The code for that page is as follows:
<!--
DISCLAIMER:
This code is distributed in the hope that it will be useful, but without any warranty;
without even the implied warranty of merchantability or fitness for a particular purpose.
Main PHP that demonstrates how to use the SIM library.
Input (Form or QueryString):
x_Amount
x_Description
-->
<HTML>
<HEAD>
<TITLE>Final Order Confirmation_</TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF">
<table cellspacing="0" cellpadding="0" border="0" width="634" align="center">
<tr>
<td height="51" colspan="8" valign="top">
<div align="left"><img src="tosha_silver_banner.gif" width="807" height="43"></div>
</td>
</tr>
<tr>
<td colspan="8" height="193" valign="top">
<h3 align="center"><br>
</h3>
<form action="https://certification.authorize.net/gateway/transact.dll" method="POST">
<div align="center">
<table width="500" border="0" cellspacing="0" cellpadding="0" height="70">
<tr>
<td><img src="transparent.gif" width="126" height="19"></td>
<td colspan="2">
<h3 align="center"><font color="#FF0000">Final Order</font></h3>
<?
$x_Description = $HTTP_GET_VARS['x_Description'];
$x_Amount = $HTTP_GET_VARS['x_Amount'];
// IF YOU WANT TO PASS CURRENCY CODE do the following:
// Assign the transaction currency (from your shopping cart) to $currencycode variable
if ($x_Description == "")
$x_Description = $HTTP_POST_VARS['x_Description'];
if ($x_Amount == "")
$x_Amount = $HTTP_POST_VARS['x_Amount'];
?>
</td>
<td><img src="transparent.gif" width="126" height="19"></td>
</tr>
<tr>
<td height="31">
<h1 align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>Item</b></font></h1>
</td>
<td height="31">
<input type="text" name="textfield32">
</td>
<td height="31"><b><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Amount</font></b></td>
<td height="31">
<input type="text" name="textfield3222">
</td>
</tr>
<tr>
<td height="31">
<div align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>Item</b></font></div>
</td>
<td height="31">
<input type="text" name="textfield42">
</td>
<td height="31"><b><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Amount</font></b></td>
<td height="31">
<input type="text" name="textfield3322">
</td>
</tr>
<tr>
<td height="31">
<h1 align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>Item</b></font></h1>
</td>
<td height="31">
<input type="text" name="textfield32" maxlength="50">
</td>
<td height="31"><b><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Amount</font></b></td>
<td height="31">
<input type="text" name="textfield3222">
</td>
</tr>
<tr>
<td> </td>
<td colspan="2">
<div align="center">
<input type="submit" value="Accept Order" name="submit">
</div>
</td>
<td> </td>
</tr>
</table>
</div>
</form>
<h1 align="right"> </h1>
<form name="form1" method="post" action="">
</form>
<div align="right"><b><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><br>
</font></b></div>
<h1 align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"></font></h1>
<div align="right"><b><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><br>
</font></b></div>
</td>
</tr>
</table>
<H3 align="center"><br>
<br>
<br>
<br>
</H3>
</BODY>
</HTML>
Please help! I'm floundering! 🙁
Cheela