K
Ken Ward
Guest
Ah yes, I was aware of this. Unfortunately, we are in a transition between 11.2 and 11.6, but this code is needed for our 11.2 customers. As best as I can tell, the sample code given by tbergman IS using .net and not an ABL solution. Our 11.2 environment doesn't have the Eclipse editor installed on it, so I don't know of any other way to add references aside from modifying the assemblies.xml file manually. Here is what that file currently contains: and here is my current sample code based on the prior suggested answer: USING System.Net.Http.*. USING Progress.Lang.*. DEF VAR httpClient AS CLASS "System.Net.Http.HttpClient" NO-UNDO. DEF VAR httpRequestMessage AS CLASS "System.Net.Http.HttpRequestMessage" NO-UNDO. DEF VAR httpResponseMessage AS CLASS "System.Net.Http.HttpResponseMessage" NO-UNDO. DEF VAR vRequest AS CHAR NO-UNDO. DEF VAR vResponse AS CHAR NO-UNDO. vRequest = "ParmList=" + "UN~~*******|PSWD~~************|" + "TERMS~~Y|METHOD~~ProcessTranx|TRANXTYPE~~Sale|" + "AMOUNT~~5.00|CC~~****************|" + "EXPMNTH~~03|EXPYR~~2022|TEST~~Y|". httpClient = NEW System.Net.Http.HttpClient(). httpRequestMessage = NEW System.Net.Http.HttpRequestMessage(). httpRequestMessage:Method = System.Net.Http.HttpMethod
ost. httpRequestMessage:RequestUri = NEW System.Uri("https://paytrace.com/api/default.pay"). httpRequestMessage:Content = NEW System.Net.Http.StringContent(vRequest, System.Text.Encoding:UTF8, "application/x-www-form-urlencoded"). httpResponseMessage = httpClient:SendAsync(httpRequestMessage):Result. vResponse = httpResponseMessage:Content:ReadAsStringAsync():RESULT NO-ERROR.
Continue reading...
Continue reading...