Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
integration:foxycart:datafeed_with_csharp [2012/08/15 10:05] – [Requirements] 95.144.180.128 | integration:foxycart:datafeed_with_csharp [2015/10/29 17:05] – [Data entry] foxyluke | ||
---|---|---|---|
Line 1: | Line 1: | ||
---- dataentry integration ---- | ---- dataentry integration ---- | ||
- | type : integration | + | type |
- | supports-foxycart-version-from : | + | supports-foxycart-version-from : # Minimum required FoxyCart version for this to work |
- | supports-foxycart-version-to | + | supports-foxycart-version-to |
- | systems | + | systems |
- | name : ASP.NET C\# API + Datafeed Code | + | name |
- | description | + | description |
- | tags_tags | + | tags : api, datafeed, xml, c\#, csharp, integration # tags, separated by commas. don't include the " |
- | date_dt | + | date_dt |
- | version | + | version |
- | developer_url : | + | developer_url |
---- | ---- | ||
- | ====== ASP.NET with C\# XML Datafeed E-Commerce Integration ====== | + | |
+ | ====== ASP.NET with C# XML Datafeed E-Commerce Integration ====== | ||
<WRAP important round> | <WRAP important round> | ||
Line 49: | Line 50: | ||
try | try | ||
{ | { | ||
- | | + | |
- | | + | |
- | | + | var ffBytes = Encoding.UTF8.GetBytes(foxyFeed); |
- | | + | |
- | + | var unencodedFeed = HttpUtility.UrlDecode(ffBytes, | |
- | //Process | + | |
+ | //At this point, we've decrypted UTF-8 data using the Latin-1 encoding, which functions properly, unless there are special characters in your data. | ||
+ | // | ||
+ | //In order to fix the special characters, you need to turn the string back into Latin-1 bytes, and convert it to a UTF-8 string. | ||
+ | var transaction = Encoding.UTF8.GetString(Encoding.GetEncoding(1252).GetBytes(decryptedTransaction)); | ||
+ | | ||
+ | //Now you can process | ||
+ | | ||
Response.Write(" | Response.Write(" | ||
} | } | ||
catch (Exception) { } // | catch (Exception) { } // | ||
} | } | ||
- | |||
/** | /** |