Jump to content

Customer is not updating when I am trying to update it through webservices using C#


Recommended Posts

Hi All,

 

I am new to the PrestaShop development and I am developing an application using C# which will interact with the PrestaShop website through webservices. I have created the customer successfully but when I have tried to update the customer using the 'PUT' method it is giving the error

 

The remote server returned an error: (500) Internal Server Error

 

I have written the code like this .

 

 

 

HttpWebRequest request = (HttpWebRequest)WebRequest.Create(http://mysite.com/dev/prestashop/prestashop/api/customers);

 

NetworkCredential nc = new NetworkCredential("8MMSYQ2VJIIJZKRLAVVRD50RHLP6TQSJ", "");

 

request.Credentials = nc;

request.Method = "PUT";

request.ContentType = "application/xml";

//// customer xml string which I am sending

<p><font face="Consolas" size="2"><font face="Consolas" size="2"><font face="Consolas" size="2">string str = "<?xml version="1.0" encoding="UTF-8"?><prestashop xmlns:xlink="http://templatebar.com/dev/prestashop/prestashop/api/groups/3">3</id_default_group><id_lang xlink:href="

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...