Error "The website could not be accessed." when writing a comment into an Ecom Order
I'm trying to write a comment in an order timeline, but it's throwing an error "The website could not be accessed."
I reviewed the Website Name and Security Key, which are matching with the ones under global security in the CMS.
Here's my code:
public int InsertOrderComment(int orderID, string comment)
//in order for the order to be calculated we need to have this order status set to Draft
using (var client = CreateHttpClient())
var postObj = new
orderID = orderID,
comment = comment
var response = client.SyncPostJson("/json/OrderCommentService/Insert", postObj);
string str = response.Content.ReadAsStringAsync().Result;
JsonResponse<int> res = JsonConvert.DeserializeObject<JsonResponse<int>>(str);