How is the integration of the Internet shop with 1c? How to organize this integration? What is the mechanism? What are +/-? If there is a decent article (I searched, I did not find it) - linkanite plz. thank
2 answers
Sample code for sending a POST request from 1 77 to php - script. Surely help! I did this by forming a string in json format in 1 and sending it to a script that saved everything to the database. Everything works great! Successes :)
WinHttp=СоздатьОбъект("WinHttp.WinHttpRequest.5.1"); WinHttp.Option(2,"Windows-1251"); WinHttp.Open("POST","http://sta.gov.ua/control/uk/vat/search",0); // Вторым параметром передаем GET-данные // param1=value1¶m2=value2" // WinHttp.SetProxy(0,"192.168.1.1:3128");// Задаем параметры своего прокси сервера // WinHttp.SetCredentials("ProxyLogin","ProzyPassword",1); // Задаем параметром логин и пароль // Если прямое соединение то так в коментах и оставлем :) WinHttp.SetRequestHeader("Accept-Language", "ru"); WinHttp.SetRequestHeader("Accept-Charset","Windows-1251"); WinHttp.setRequestHeader("Content-Language", "ru"); WinHttp.setRequestHeader("Content-Charset", "Windows-1251"); WinHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=Windows-1251"); ПараметрыПОСТ = "isJuridical=1" + "&individualCode="+СокрЛП(Контрагент.ЕДРПОУ); // Параметром передаем POST-данные для страници тут как раз WinHttp.Send(ПараметрыПОСТ); // Дальше или сохраняем страницу в файл Текст = СоздатьОбъект("Текст"); Текст.ДобавитьСтроку(WinHttp.ResponseText()); Текст.Записать(КаталогИБ() + "otvet.htm");
|
There is a CommerceML format. An open standard developed by several Russian and foreign companies. Links: http://v8.1c.ru/edi/edi_stnd/90/ http://www.commerceml.ru/
|