IPCharge is a form of VeriFone Payment Processing Software, which allows credit cards to be charged through a payment gateway. It is similar to PCCharge, but doesn’t require any proprietary software installed on the computer. The credit card information (name, address, zip, card data and client info) is stored in an XML document then passed to VeriFone’s server. The server then returns an XML file that must be parsed to determine if the transaction was successful or if any other transaction information is needed.

IPCharge includes a variety of methods, including but not limited to Sale, Pre-Auth, Void, Post-Auth, and Credit. Post-Auth validates the card then stores the information on the gateways server to be processed in a settlement when the items ship to the customer. Credit transfers funds to the card. Sale charges the credit card. Void cancels a transaction that has not been charged. Pre-Auth stores the credit card data, validates it, and reserves the amount on the credit card in order for it to be processed at a later time.

When I downloaded the documentation for IPCharge, they had code samples for ASP, Visual Basic 6, and C#. So I had to adapt the method for Coldfusion 6. The code below stores the XML into a variable then posts the data to the IPCharge server.

<cfsavecontent variable=”strXML”><?xml version=”1.0″ encoding=”utf-8″?><TRANSACTION>

<cfhttp url=”https://IPCharge.net/IPCHAPI/rh.aspx” timeout=”1000″ port=”443″ method=”post”>
<cfhttpparam type=”body” name=”transaction” value=”#strXML.trim()#” encoded=”yes”>
cfhttpparamtype=”HEADER” name=”Content-Type” value=”text/xml” encoded=”yes”>