Table of Contents

type:
integration
system:
ColdFusion
name:
ColdFusion
description:
Integration notes for developing with Adobe ColdFusion

Adobe ColdFusion

Please note: The code on this page is submitted by members of the FoxyCart community, and may not verified by FoxyCart.com LLC in any way, shape, or form. Please double check the code before installing. If you need help with it please post in our forum, but if we cannot offer assistance (due to unfamiliarity with this particular system or language) we apologize in advance.

XML Datafeed

Community member Seb Duggan worked through decrypting and parsing the XML Datafeed using ColdFusion and added some notes to his blog detailing how to successfully approach it. You can read about it here: http://sebduggan.com/blog/working-with-foxycart-data-feeds-in-cfml/

Link/Form Validation

Also provided by Seb Duggan, the following function can be used in ColdFusion to sign a link or form value:

<cffunction name="hmacEncode" returntype="string" output="false">
	<cfargument name="sku"   required="true" />
	<cfargument name="name"  required="true" />
	<cfargument name="value" required="true" />

	<cfset var stringToHash = arguments.sku & arguments.name & arguments.value />
	<cfset var apiKey       = "YOUR_API_KEY_HERE" />
	<cfset var hashedString = hmac( stringToHash, apiKey, "HMACSHA256" ) />

	<cfreturn lcase( hashedString ) />
</cffunction>