PXPost Sample Code
ColdFusion
The Sample Code will not work without the following:
* Webserver with the ColdFusion server installed
* Development Account setup with DPS
If you do not have access to a Development account please click here to request it.
Standard Request Page
<cfXml variable="myXml">
<Txn>
<PostUsername>#Insert DPS Username Here#</PostUsername>
<PostPassword>#Insert DPS Password Here#</PostPassword>
<CardHolderName>A J CARDHOULD</CardHolderName>
<CardNumber>4111111111111111</CardNumber>
<Amount>1.23</Amount>
<DateExpiry>0102</DateExpiry>
<Cvc2>123</Cvc2>
<MerchantReference>Order1234</MerchantReference>
<TxnType>Purchase</TxnType>
</Txn>
</cfXml>
<cfhttp url="https://sec.paymentexpress.com/pxpost.aspx" port="443" method="post" resolveurl=1 throwOnError="Yes">
<cfhttpparam type="formField" name="xmlBody" value="#toString(myXml)#">
</cfhttp>
<cfoutput>
#cfhttp.fileContent#
</cfoutput>