Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
integration:coldfusion [2017/04/26 07:02] – external edit 127.0.0.1integration:coldfusion [2017/10/30 12:32] (current) – [XML Datafeed] adam
Line 25: Line 25:
  
 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/ 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, [[https://gist.github.com/sebduggan/10e5e97aee44e28221fced6e775ae8bf|the following function]] can be used in ColdFusion to sign a link or form value:
 +
 +<code>
 +<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>
 +</code>

Site Tools