Primus has provided a custom ColdFusion tag to allow you to include credit card processing in your application. A new version of the tag, CFX_CaledonSSL, has recently been released. It includes new features that will allow you to include Card Verification Value 2 (CVV2) data.
- CFX_CaledonSSL (new version)
- CFX_Caledon (original version)
| Description: | These tags require six (6) parameters and return two (2) variables. | |||||||||||||||||||||||||||||||||
| Return Variables: | Two ColdFusion variables: 
 CFX_CaledonSSL if ERROR == 0 (successful), RESULT will contain the transaction details in a string of key/value pairs, delimited by '&'. if ERROR == 1 (failed), RESULT will contain the error message in the string of key/value pairs, delimited by '&' A successful transaction will return the TEXT key containing the authorization number and the dollar amount used, an AUTH key containing just the authorization number, and a CODE key containing the string 0000 (the success code). An unsuccessful transaction will return the TEXT key with a description of the error that occurred, and the CODE key with the number associated to the error.CFX_Caledon if ERROR == 0 (successful), RESULT will contain the authorization number and the amount separated by spaces if ERROR == 1 (failed), RESULT will contain the reason why the transaction failed | |||||||||||||||||||||||||||||||||
| Syntax: | < CFX_CaledonSSL EXPDATE="string" CREDITCARD="string" AMOUNT="string" INVOICE="string" TERMINALID="string" TRANSTYPE="string" SERVER="string" OPERATOR="string" CVV2="string"> < CFX_Caledon EXPDATE="string" CREDITCARD="string" AMOUNT="string" INVOICE="string" TERMINALID="string" TRANSTYPE="string" SERVER="string" DEVICE="string" OPERATOR="string"> | |||||||||||||||||||||||||||||||||
| Tag Attributes: | 
 | 
Code Examples:
| <CFSET ERROR = 0> | |
| <cfset ReceiptID = UNIQUE NUMBER > | |
| <cfset totalInvoice = #subtotaltax# + #subtotal#> | |
| <cfset TransAmount = #Replace( #NumberFormat( totalInvoice, "__________.__" )#, ".", "")#> | |
| <cfset ccParsed = #REReplace( #CCNUMBER#, "[ -]", "", "ALL" )#> | |
| <cfset expDateParsed = #Replace( #CCEXP#, "/", "" )#> | |
- OR -
| <CFX_CALEDON | |
| EXPDATE=#expDateParsed# | |
| CREDITCARD=#ccParsed# | |
| AMOUNT=#TransAmount# | |
| INVOICE=#ReceiptID# | |
| TRANSTYPE="s" | |
| TERMINALID="xxxxxxxxxx"> | |
**Note: Be sure to replace the terminal ID with your correct one**
| <CFX_CaledonSSL | |
| EXPDATE=#expDateParsed# | |
| CREDITCARD=#ccParsed# | |
| AMOUNT=#TransAmount# | |
| INVOICE=#ReceiptID# | |
| TRANSTYPE="s" | |
| TERMINALID="xxxxxxxxxx" | |
| CVV2="#CardCVV2#"> | |
| <CFIF #ERROR# = 1> | |
| <CFOUTPUT>Error: #RESULT#</CFOUTPUT> | |
| <CFELSE> | |
| Credit card has been successfully processed. Thank you for your purchase. | |
| </CFIF> | |




