Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- An exception of type 'System.Net.WebException' occurred in System.dll but was not handled in user code
- Additional information: The remote server returned an error: (404) Not Found.
- var res = wc.UploadValues("http://ns2278995.ovh.net/proyectos/paymentsystem/trunk/backoffice/en/api/user/insert", nvc);
- TimeSpan unixTicks = new TimeSpan(DateTime.UtcNow.Ticks) - epochTicks;
- string dt = unixTime.ToString();
- string X_PUBLIC = GenerateHash(AccessToken + dt);
- string status = "1",
- name = "test1",
- surnames = "test",
- email = "user@test.com",
- password = "password123",
- language = "ENG",
- country = "Spain",
- region = "Catalonia",
- city = "Barcelona",
- postalCode = "08007",
- streetAddress = "Balmes",
- numberAddress = "24",
- floorAddress = "2",
- phone = "9355552288",
- birthDay = "";
- string DATAs = "<?xml version='1.0' encoding='utf-8'?>" +
- "<TransaxRS>" +
- "' status ='" + status +
- "' name ='" + name +
- "' surnames ='" + surnames +
- "' email ='" + email +
- "' password ='" + password +
- "' language ='" + language +
- "' country ='" + country +
- "' region ='" + region +
- "' city ='" + city +
- "' postalCode ='" + postalCode +
- "' streetAddress ='" + streetAddress +
- "' floorAddress ='" + floorAddress +
- "' numberAddress ='" + numberAddress +
- "' phone ='" + phone +
- "' birthDay ='" + birthDay +
- "'/>" +
- "</TransaxRS>";
- string hmac = GenerateHMAC(AccessToken, DATAs);
- WebClient wc = new WebClient();
- wc.Headers.Add("token", X_PUBLIC);
- wc.Headers.Add("X_HASH", hmac);
- NameValueCollection nvc = new NameValueCollection();
- var res = wc.UploadValues("http://ns2278995.ovh.net/proyectos/paymentsystem/trunk/backoffice/en/api/user/insert", nvc);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement