document.write('<div class="php" style="font-family: monospace;"><br />');
document.write('<span style="color: #000000; font-weight: bold;">&lt;?php</span> <br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$config</span> = <a target="_blank"&nbsp; href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//Authnet Stuff</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">&quot;auth_login&quot;</span> =&gt; <span style="color: #ff0000;">&quot;#######&quot;</span>, <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">&quot;auth_transkey&quot;</span> =&gt; <span style="color: #ff0000;">&quot;#######&quot;</span>, <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//Development mode</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">&quot;dev&quot;</span> =&gt; <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #808080; font-style: italic;">//true = sandbox, false = live CC processing</span><br />');
document.write('<span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<span style="color: #000000; font-weight: bold;">?&gt;</span><br />');
document.write('&nbsp;</div><div class="php" style="font-family: monospace;"><br />');
document.write('<span style="color: #000000; font-weight: bold;">&lt;?php</span><br />');
document.write('<br />');
document.write('<span style="color: #000000; font-weight: bold;">class</span> authnet<br />');
document.write('<span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Set these variables prior to use</span><br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0000ff;">$login</span>&nbsp; &nbsp; = <span style="color: #ff0000;">\'\'</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0000ff;">$transkey</span> = <span style="color: #ff0000;">\'\'</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0000ff;">$test</span>&nbsp; &nbsp; &nbsp;= <span style="color: #ff0000;">\'\'</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0000ff;">$params</span>&nbsp; &nbsp;= <a target="_blank"&nbsp; href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0000ff;">$results</span>&nbsp; = <a target="_blank"&nbsp; href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0000ff;">$approved</span> = <span style="color: #000000; font-weight: bold;">false</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0000ff;">$declined</span> = <span style="color: #000000; font-weight: bold;">false</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0000ff;">$error</span>&nbsp; &nbsp; = <span style="color: #000000; font-weight: bold;">true</span>;<br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0000ff;">$fields</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0000ff;">$response</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0000ff;">$url</span>;<br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> authnet<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.php.net/global"><span style="color: #000066;">global</span></a> <span style="color: #0000ff;">$e</span>, <span style="color: #0000ff;">$config</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">login</span>&nbsp; &nbsp; = <span style="color: #0000ff;">$config</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'auth_login\'</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">transkey</span> = <span style="color: #0000ff;">$config</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'auth_transkey\'</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">test</span>&nbsp; &nbsp; &nbsp;= <span style="color: #0000ff;">$config</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'dev\'</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.php.net/empty"><span style="color: #000066;">empty</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">login</span><span style="color: #66cc66;">&#41;</span> || <a target="_blank"&nbsp; href="http://www.php.net/empty"><span style="color: #000066;">empty</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">transkey</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">setError</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;You have not configured your Authnet login credentials.&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$subdomain</span> = <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">test</span><span style="color: #66cc66;">&#41;</span> ? <span style="color: #ff0000;">\'test\'</span> : <span style="color: #ff0000;">\'secure\'</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">url</span> = <span style="color: #ff0000;">&quot;https://&quot;</span> . <span style="color: #0000ff;">$subdomain</span> . <span style="color: #ff0000;">&quot;.authorize.net/gateway/transact.dll&quot;</span>;<br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">params</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'x_delim_data\'</span><span style="color: #66cc66;">&#93;</span>&nbsp; &nbsp; &nbsp;= <span style="color: #ff0000;">&quot;TRUE&quot;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">params</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'x_delim_char\'</span><span style="color: #66cc66;">&#93;</span>&nbsp; &nbsp; &nbsp;= <span style="color: #ff0000;">&quot;|&quot;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">params</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'x_relay_response\'</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">&quot;FALSE&quot;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">params</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'x_url\'</span><span style="color: #66cc66;">&#93;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = <span style="color: #ff0000;">&quot;FALSE&quot;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">params</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'x_version\'</span><span style="color: #66cc66;">&#93;</span>&nbsp; &nbsp; &nbsp; &nbsp; = <span style="color: #ff0000;">&quot;3.1&quot;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">params</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'x_method\'</span><span style="color: #66cc66;">&#93;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= <span style="color: #ff0000;">&quot;CC&quot;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">params</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'x_type\'</span><span style="color: #66cc66;">&#93;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= <span style="color: #ff0000;">&quot;AUTH_CAPTURE&quot;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">params</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'x_login\'</span><span style="color: #66cc66;">&#93;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">login</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">params</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'x_tran_key\'</span><span style="color: #66cc66;">&#93;</span>&nbsp; &nbsp; &nbsp; &nbsp;= <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">transkey</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> toString<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!<span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">params</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">return</span> <span style="color: #66cc66;">&#40;</span>string<span style="color: #66cc66;">&#41;</span> <span style="color: #0000ff;">$this</span>;<br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$output</span>&nbsp; = <span style="color: #ff0000;">&quot;&quot;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$output</span> .= <span style="color: #ff0000;">\'&lt;table summary=&quot;Authnet Results&quot; id=&quot;authnet&quot;&gt;\'</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$output</span> .= <span style="color: #ff0000;">\'&lt;tr&gt;\'</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>&quot;</span> . <span style="color: #ff0000;">\'&lt;th colspan=&quot;2&quot;&gt;&lt;b&gt;Outgoing Parameters&lt;/b&gt;&lt;/th&gt;\'</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> . <span style="color: #ff0000;">\'&lt;/tr&gt;\'</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;<br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">foreach</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">params</span> <span style="color: #b1b100;">as</span> <span style="color: #0000ff;">$key</span> =&gt; <span style="color: #0000ff;">$value</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$output</span> .= <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span> . <span style="color: #ff0000;">\'&lt;tr&gt;\'</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>&quot;</span> . <span style="color: #ff0000;">\'&lt;td&gt;&lt;b&gt;\'</span> . <span style="color: #0000ff;">$key</span> . <span style="color: #ff0000;">\'&lt;/b&gt;&lt;/td&gt;\'</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$output</span> .= <span style="color: #ff0000;">\'&lt;td&gt;\'</span> . <span style="color: #0000ff;">$value</span> . <span style="color: #ff0000;">\'&lt;/td&gt;\'</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> . <span style="color: #ff0000;">\'&lt;/tr&gt;\'</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$output</span> .= <span style="color: #ff0000;">\'&lt;tr&gt;\'</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>&quot;</span> . <span style="color: #ff0000;">\'&lt;th colspan=&quot;2&quot;&gt;&lt;b&gt;Incomming Parameters&lt;/b&gt;&lt;/th&gt;\'</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> . <span style="color: #ff0000;">\'&lt;/tr&gt;\'</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;<br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$response</span> = <a target="_blank"&nbsp; href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Response Code&quot;</span>, <span style="color: #ff0000;">&quot;Response Subcode&quot;</span>, <span style="color: #ff0000;">&quot;Response Reason Code&quot;</span>,<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">&quot;Response Reason Text&quot;</span>, <span style="color: #ff0000;">&quot;Approval Code&quot;</span>, <span style="color: #ff0000;">&quot;AVS Result Code&quot;</span>,<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">&quot;Transaction ID&quot;</span>, <span style="color: #ff0000;">&quot;Invoice Number&quot;</span>, <span style="color: #ff0000;">&quot;Description&quot;</span>, <span style="color: #ff0000;">&quot;Amount&quot;</span>,<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">&quot;Method&quot;</span>, <span style="color: #ff0000;">&quot;Transaction Type&quot;</span>, <span style="color: #ff0000;">&quot;Customer ID&quot;</span>, <span style="color: #ff0000;">&quot;Cardholder First Name&quot;</span>,<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">&quot;Cardholder Last Name&quot;</span>, <span style="color: #ff0000;">&quot;Company&quot;</span>, <span style="color: #ff0000;">&quot;Billing Address&quot;</span>, <span style="color: #ff0000;">&quot;City&quot;</span>,<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">&quot;State&quot;</span>, <span style="color: #ff0000;">&quot;Zip&quot;</span>, <span style="color: #ff0000;">&quot;Country&quot;</span>, <span style="color: #ff0000;">&quot;Phone&quot;</span>, <span style="color: #ff0000;">&quot;Fax&quot;</span>, <span style="color: #ff0000;">&quot;Email&quot;</span>, <span style="color: #ff0000;">&quot;Ship to First Name&quot;</span>,<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">&quot;Ship to Last Name&quot;</span>, <span style="color: #ff0000;">&quot;Ship to Company&quot;</span>, <span style="color: #ff0000;">&quot;Ship to Address&quot;</span>,<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">&quot;Ship to City&quot;</span>, <span style="color: #ff0000;">&quot;Ship to State&quot;</span>, <span style="color: #ff0000;">&quot;Ship to Zip&quot;</span>, <span style="color: #ff0000;">&quot;Ship to Country&quot;</span>,<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">&quot;Tax Amount&quot;</span>, <span style="color: #ff0000;">&quot;Duty Amount&quot;</span>, <span style="color: #ff0000;">&quot;Freight Amount&quot;</span>, <span style="color: #ff0000;">&quot;Tax Exempt Flag&quot;</span>,<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">&quot;PO Number&quot;</span>, <span style="color: #ff0000;">&quot;MD5 Hash&quot;</span>, <span style="color: #ff0000;">&quot;Card Code (CVV2/CVC2/CID) Response Code&quot;</span>,<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">&quot;Cardholder Authentication Verification Value (CAVV) Response Code&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">foreach</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span> <span style="color: #b1b100;">as</span> <span style="color: #0000ff;">$key</span> =&gt; <span style="color: #0000ff;">$value</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$key</span> &gt; <span style="color: #cc66cc;">40</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">break</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$output</span> .= <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span> . <span style="color: #ff0000;">\'&lt;tr&gt;\'</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>&quot;</span> . <span style="color: #ff0000;">\'&lt;td&gt;&lt;b&gt;\'</span> . <span style="color: #0000ff;">$response</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$key</span><span style="color: #66cc66;">&#93;</span> . <span style="color: #ff0000;">\'&lt;/b&gt;&lt;/td&gt;\'</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$output</span> .= <span style="color: #ff0000;">\'&lt;td&gt;\'</span> . <span style="color: #0000ff;">$value</span> . <span style="color: #ff0000;">\'&lt;/td&gt;\'</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> . <span style="color: #ff0000;">\'&lt;/tr&gt;\'</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$output</span> .= <span style="color: #ff0000;">\'&lt;/table&gt;\'</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$output</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> process<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$retries</span> = <span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">prepareParameters</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$ch</span> = curl_init<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">url</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$count</span> = <span style="color: #cc66cc;">0</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$count</span> &lt; <span style="color: #0000ff;">$retries</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; curl_setopt<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$ch</span>, CURLOPT_HEADER, <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; curl_setopt<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$ch</span>, CURLOPT_RETURNTRANSFER, <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; curl_setopt<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$ch</span>, CURLOPT_POSTFIELDS, <a target="_blank"&nbsp; href="http://www.php.net/rtrim"><span style="color: #000066;">rtrim</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">fields</span>, <span style="color: #ff0000;">&quot;&amp; &quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">response</span> = curl_exec<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$ch</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">parseResults</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">getResultResponseFull</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #ff0000;">&quot;Approved&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">approved</span> = <span style="color: #000000; font-weight: bold;">true</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">declined</span> = <span style="color: #000000; font-weight: bold;">false</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">error</span>&nbsp; &nbsp; = <span style="color: #000000; font-weight: bold;">false</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">break</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">elseif</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">getResultResponseFull</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #ff0000;">&quot;Declined&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">approved</span> = <span style="color: #000000; font-weight: bold;">false</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">declined</span> = <span style="color: #000000; font-weight: bold;">true</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">error</span>&nbsp; &nbsp; = <span style="color: #000000; font-weight: bold;">false</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">break</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">approved</span> = <span style="color: #000000; font-weight: bold;">false</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">declined</span> = <span style="color: #000000; font-weight: bold;">false</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">error</span>&nbsp; &nbsp; = <span style="color: #000000; font-weight: bold;">true</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$count</span>++;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; curl_close<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$ch</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> prepareParameters<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">foreach</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">params</span> <span style="color: #b1b100;">as</span> <span style="color: #0000ff;">$key</span> =&gt; <span style="color: #0000ff;">$value</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">fields</span> .= <span style="color: #ff0000;">&quot;$key=&quot;</span> . <a target="_blank"&nbsp; href="http://www.php.net/urlencode"><span style="color: #000066;">urlencode</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$value</span><span style="color: #66cc66;">&#41;</span> . <span style="color: #ff0000;">&quot;&amp;&quot;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> parseResults<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span> = <a target="_blank"&nbsp; href="http://www.php.net/explode"><span style="color: #000066;">explode</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;|&quot;</span>, <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">response</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> setTransaction<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$cardnum</span>, <span style="color: #0000ff;">$expiration</span>, <span style="color: #0000ff;">$amount</span>, <span style="color: #0000ff;">$cvv</span> = <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.php.net/global"><span style="color: #000066;">global</span></a> <span style="color: #0000ff;">$e</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">params</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'x_card_num\'</span><span style="color: #66cc66;">&#93;</span>&nbsp; = <span style="color: #66cc66;">&#40;</span>string<span style="color: #66cc66;">&#41;</span> <a target="_blank"&nbsp; href="http://www.php.net/trim"><span style="color: #000066;">trim</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$cardnum</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">params</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'x_exp_date\'</span><span style="color: #66cc66;">&#93;</span>&nbsp; = <span style="color: #66cc66;">&#40;</span>int<span style="color: #66cc66;">&#41;</span>&nbsp; &nbsp; <span style="color: #0000ff;">$expiration</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">params</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'x_amount\'</span><span style="color: #66cc66;">&#93;</span>&nbsp; &nbsp; = <span style="color: #66cc66;">&#40;</span>float<span style="color: #66cc66;">&#41;</span>&nbsp; <span style="color: #0000ff;">$amount</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">params</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'x_card_code\'</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #66cc66;">&#40;</span>int<span style="color: #66cc66;">&#41;</span>&nbsp; &nbsp; <span style="color: #0000ff;">$cvv</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.php.net/empty"><span style="color: #000066;">empty</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">params</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'x_card_num\'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span> || <a target="_blank"&nbsp; href="http://www.php.net/empty"><span style="color: #000066;">empty</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">params</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'x_exp_date\'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span> || <a target="_blank"&nbsp; href="http://www.php.net/empty"><span style="color: #000066;">empty</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">params</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'x_amount\'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">setError</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Required information for transaction processing omitted.&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> setParameter<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$field</span> = <span style="color: #ff0000;">&quot;&quot;</span>, <span style="color: #0000ff;">$value</span> = <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.php.net/global"><span style="color: #000066;">global</span></a> <span style="color: #0000ff;">$e</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$field</span> = <span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.php.net/is_string"><span style="color: #000066;">is_string</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$field</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> ? <a target="_blank"&nbsp; href="http://www.php.net/trim"><span style="color: #000066;">trim</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$field</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0000ff;">$field</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$value</span> = <span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.php.net/is_string"><span style="color: #000066;">is_string</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$value</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> ? <a target="_blank"&nbsp; href="http://www.php.net/trim"><span style="color: #000066;">trim</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$value</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0000ff;">$value</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!<a target="_blank"&nbsp; href="http://www.php.net/is_string"><span style="color: #000066;">is_string</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$field</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">setError</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;setParameter() arg 1 must be a string or integer: &quot;</span> . <a target="_blank"&nbsp; href="http://www.php.net/gettype"><span style="color: #000066;">gettype</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$field</span><span style="color: #66cc66;">&#41;</span> . <span style="color: #ff0000;">&quot; given.&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!<a target="_blank"&nbsp; href="http://www.php.net/is_string"><span style="color: #000066;">is_string</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$value</span><span style="color: #66cc66;">&#41;</span> &amp;&amp; !<a target="_blank"&nbsp; href="http://www.php.net/is_numeric"><span style="color: #000066;">is_numeric</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$value</span><span style="color: #66cc66;">&#41;</span> &amp;&amp; !<a target="_blank"&nbsp; href="http://www.php.net/is_bool"><span style="color: #000066;">is_bool</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$value</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">setError</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;setParameter() arg 2 must be a string, integer, or boolean value: &quot;</span> . <a target="_blank"&nbsp; href="http://www.php.net/gettype"><span style="color: #000066;">gettype</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$value</span><span style="color: #66cc66;">&#41;</span> . <span style="color: #ff0000;">&quot; given.&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.php.net/empty"><span style="color: #000066;">empty</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$field</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">setError</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;setParameter() requires a parameter field to be named.&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$value</span> === <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">setError</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;setParameter() requires a parameter value to be assigned: $field&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">params</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$field</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #0000ff;">$value</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> setTransactionType<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$type</span> = <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$type</span>&nbsp; &nbsp; &nbsp; = <a target="_blank"&nbsp; href="http://www.php.net/strtoupper"><span style="color: #000066;">strtoupper</span></a><span style="color: #66cc66;">&#40;</span><a target="_blank"&nbsp; href="http://www.php.net/trim"><span style="color: #000066;">trim</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$type</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$typeArray</span> = <a target="_blank"&nbsp; href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;AUTH_CAPTURE&quot;</span>, <span style="color: #ff0000;">&quot;AUTH_ONLY&quot;</span>, <span style="color: #ff0000;">&quot;PRIOR_AUTH_CAPTURE&quot;</span>, <span style="color: #ff0000;">&quot;CREDIT&quot;</span>, <span style="color: #ff0000;">&quot;CAPTURE_ONLY&quot;</span>, <span style="color: #ff0000;">&quot;VOID&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!<a target="_blank"&nbsp; href="http://www.php.net/in_array"><span style="color: #000066;">in_array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$type</span>, <span style="color: #0000ff;">$typeArray</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">setError</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;setTransactionType() requires a valid value to be assigned.&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">params</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'x_type\'</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #0000ff;">$type</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getResultResponse<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getResultResponseFull<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$response</span> = <a target="_blank"&nbsp; href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;&quot;</span>, <span style="color: #ff0000;">&quot;Approved&quot;</span>, <span style="color: #ff0000;">&quot;Declined&quot;</span>, <span style="color: #ff0000;">&quot;Error&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$response</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> isApproved<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">approved</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> isDeclined<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">declined</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> isError<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">error</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getResponseSubcode<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getResponseCode<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getResponseText<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getAuthCode<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getAVSResponse<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">5</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getTransactionID<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">6</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getInvoiceNumber<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">7</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getDescription<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">8</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getAmount<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">9</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getPaymentMethod<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getTransactionType<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">11</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getCustomerID<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">12</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getCHFirstName<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">13</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getCHLastName<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">14</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getCompany<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">15</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getBillingAddress<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">16</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getBillingCity<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">17</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getBillingState<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">18</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getBillingZip<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">19</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getBillingCountry<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getPhone<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">21</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getFax<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">22</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getEmail<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">23</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getShippingFirstName<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">24</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getShippingLastName<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">25</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getShippingCompany<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">26</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getShippingAddress<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">27</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getShippingCity<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">28</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getShippingState<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">29</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getShippingZip<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">30</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getShippingCountry<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">31</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getTaxAmount<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">32</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getDutyAmount<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">33</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getFreightAmount<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">34</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getTaxExemptFlag<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">35</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getPONumber<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">36</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getMD5Hash<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">37</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getCVVResponse<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">38</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> getCAVVResponse<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">39</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<span style="color: #000000; font-weight: bold;">?&gt;</span><br />');
document.write('&nbsp;</div><div class="php" style="font-family: monospace;"><br />');
document.write('<span style="color: #000000; font-weight: bold;">&lt;?php</span> <br />');
document.write('<br />');
document.write('<span style="color: #b1b100;">require_once</span> <span style="color: #ff0000;">&quot;config.php&quot;</span>;<br />');
document.write('<span style="color: #b1b100;">require_once</span> <span style="color: #ff0000;">&quot;class.error.php&quot;</span>; <span style="color: #808080; font-style: italic;">//My Simple Error Class</span><br />');
document.write('<span style="color: #0000ff;">$e</span> = <span style="color: #000000; font-weight: bold;">new</span> error;<br />');
document.write('<span style="color: #b1b100;">require_once</span> <span style="color: #ff0000;">&quot;class.authnet.php&quot;</span>;<br />');
document.write('<span style="color: #0000ff;">$auth</span> = <span style="color: #000000; font-weight: bold;">new</span> authnet;<br />');
document.write('<br />');
document.write('<span style="color: #808080; font-style: italic;">//You get all of the following information from your checkout forms on your site.</span><br />');
document.write('<br />');
document.write('<span style="color: #808080; font-style: italic;">//set new transaction</span><br />');
document.write('<span style="color: #0000ff;">$auth</span>-&gt;<span style="color: #006600;">setTransaction</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$cc_number</span>, <span style="color: #0000ff;">$date</span>, <span style="color: #0000ff;">$total</span>, <span style="color: #0000ff;">$cvv</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<br />');
document.write('<span style="color: #808080; font-style: italic;">//Billing information</span><br />');
document.write('<span style="color: #0000ff;">$auth</span>-&gt;<span style="color: #006600;">setParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;x_email&quot;</span>, <span style="color: #0000ff;">$b_email</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<span style="color: #0000ff;">$auth</span>-&gt;<span style="color: #006600;">setParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;x_first_name&quot;</span>, <span style="color: #0000ff;">$b_fname</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<span style="color: #0000ff;">$auth</span>-&gt;<span style="color: #006600;">setParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;x_last_name&quot;</span>, <span style="color: #0000ff;">$b_lname</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<span style="color: #0000ff;">$auth</span>-&gt;<span style="color: #006600;">setParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;x_address&quot;</span>, <span style="color: #0000ff;">$b_address</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<span style="color: #0000ff;">$auth</span>-&gt;<span style="color: #006600;">setParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;x_city&quot;</span>, <span style="color: #0000ff;">$b_city</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<span style="color: #0000ff;">$auth</span>-&gt;<span style="color: #006600;">setParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;x_state&quot;</span>, <span style="color: #0000ff;">$b_state</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<span style="color: #0000ff;">$auth</span>-&gt;<span style="color: #006600;">setParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;x_zip&quot;</span>, <span style="color: #0000ff;">$b_zip</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<span style="color: #0000ff;">$auth</span>-&gt;<span style="color: #006600;">setParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;x_country&quot;</span>, <span style="color: #0000ff;">$b_country</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<span style="color: #0000ff;">$auth</span>-&gt;<span style="color: #006600;">setParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;x_description&quot;</span>, <span style="color: #0000ff;">$description</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//Purchase description (Order #: 199 from yoursite.com)</span><br />');
document.write('<br />');
document.write('<span style="color: #808080; font-style: italic;">//Shipping information</span><br />');
document.write('<span style="color: #0000ff;">$auth</span>-&gt;<span style="color: #006600;">setParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;x_ship_to_first_name&quot;</span>, <span style="color: #0000ff;">$s_fname</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<span style="color: #0000ff;">$auth</span>-&gt;<span style="color: #006600;">setParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;x_ship_to_last_name&quot;</span>, <span style="color: #0000ff;">$s_lname</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<span style="color: #0000ff;">$auth</span>-&gt;<span style="color: #006600;">setParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;x_ship_to_address&quot;</span>, <span style="color: #0000ff;">$s_address</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<span style="color: #0000ff;">$auth</span>-&gt;<span style="color: #006600;">setParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;x_ship_to_city&quot;</span>, <span style="color: #0000ff;">$s_city</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<span style="color: #0000ff;">$auth</span>-&gt;<span style="color: #006600;">setParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;x_ship_to_state&quot;</span>, <span style="color: #0000ff;">$s_state</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<span style="color: #0000ff;">$auth</span>-&gt;<span style="color: #006600;">setParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;x_ship_to_zip.&quot;</span>, <span style="color: #0000ff;">$s_zip</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<span style="color: #0000ff;">$auth</span>-&gt;<span style="color: #006600;">setParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;x_ship_to_country&quot;</span>, <span style="color: #0000ff;">$s_country</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<br />');
document.write('<span style="color: #808080; font-style: italic;">//Process checkout information</span><br />');
document.write('<span style="color: #0000ff;">$auth</span>-&gt;<span style="color: #006600;">process</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<br />');
document.write('<span style="color: #808080; font-style: italic;">//Get response and do something with it</span><br />');
document.write('<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$auth</span>-&gt;<span style="color: #006600;">isApproved</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">setError</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Transaction Completed! Please print the following for your records&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">showErrors</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//show completed checkout info and write new information to your database</span><br />');
document.write('<span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">elseif</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$auth</span>-&gt;<span style="color: #006600;">isDeclined</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">setError</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$auth</span>-&gt;<span style="color: #006600;">getResponseText</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">showErrors</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">setError</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Transaction Error! Please try again&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">setError</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$auth</span>-&gt;<span style="color: #006600;">getResponseText</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">showErrors</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<span style="color: #000000; font-weight: bold;">?&gt;</span><br />');
document.write('&nbsp;</div><div class="php" style="font-family: monospace;"><br />');
document.write('<span style="color: #000000; font-weight: bold;">&lt;?php</span><br />');
document.write('<span style="color: #0000ff;">$auth</span>-&gt;<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<span style="color: #000000; font-weight: bold;">?&gt;</span><br />');
document.write('&nbsp;</div>');
document.write('<br />&nbsp;<br /><div style="font-size: 12px">Brought to you by the community at <a href="http://www.bytemycode.com/snippets/snippet/716/1/" target="_blank">byteMyCode</a>.</div>');
