Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
integration:foxycart:test_xml_post_with_csharp [2011/06/02 06:15] – Added ASP.Net to Systemss ssyladin | integration:foxycart:test_xml_post_with_csharp [2017/04/26 07:02] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 4: | Line 4: | ||
name : FoxyCart XML Test Generator in C\# # the name of the integration | name : FoxyCart XML Test Generator in C\# # the name of the integration | ||
description | description | ||
- | tags_tags | + | tags |
date_dt | date_dt | ||
version | version | ||
Line 12: | Line 12: | ||
====== test xml post with csharp ====== | ====== test xml post with csharp ====== | ||
+ | |||
+ | <WRAP important round> | ||
+ | //**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 [[http:// | ||
+ | </ | ||
+ | |||
===== Description ===== | ===== Description ===== | ||
The purpose of this file is to help you set up and debug your FoxyCart XML DataFeed scripts. It's designed to mimic FoxyCart.com and send [[: | The purpose of this file is to help you set up and debug your FoxyCart XML DataFeed scripts. It's designed to mimic FoxyCart.com and send [[: | ||
Line 17: | Line 23: | ||
===== Installation ===== | ===== Installation ===== | ||
- | Compile the following code. Create or use a sample datafeed document that is saved as "SampleData.xml" in the output executable' | + | Compile the following code. Create or use a sample datafeed document that is saved as "data.xml" in the output executable' |
+ | You can get the sample XML for v0.7.2 from [[v: | ||
===== Requirements ===== | ===== Requirements ===== | ||
Requires .Net Framework 2.0 or compatible. | Requires .Net Framework 2.0 or compatible. | ||
- | ===== Code ===== | + | ===== |
+ | Code ===== | ||
<code C#> | <code C#> | ||
using System; | using System; | ||
Line 28: | Line 36: | ||
using System.Net; | using System.Net; | ||
using System.Text; | using System.Text; | ||
- | using System.Web; | + | using System.Web; |
class Program | class Program | ||
{ | { | ||
- | private static string DataFeedKey = "[Your API key here]"; | + | private static string DataFeedKey = "[Your API key here, remove square brackets]"; |
static void Main(string[] args) | static void Main(string[] args) | ||
Line 49: | Line 57: | ||
//Create a web request to send the data | //Create a web request to send the data | ||
- | HttpWebRequest req = (HttpWebRequest)WebRequest.Create(" | + | HttpWebRequest req = (HttpWebRequest)WebRequest.Create(" |
req.Method = " | req.Method = " | ||
req.ContentType = " | req.ContentType = " | ||
Line 238: | Line 246: | ||
</ | </ | ||
- | |||