The protocol is based on SSL encrypted HTTP communication and all actions are perfomed by sending a HTTP POST request to https://secure.quickpay.dk/api.
HTTP POST request for cancel:
POST /api HTTP/1.1
Host: secure.quickpay.dk
User-Agent: Mozilla/4.0
Content-Length: 107
Content-Type: application/x-www-form-urlencoded
//XmlHttpConn is the 'Microsoft XML, v5.0'.ServerXMLHTTP50 automation object //L_XMLDoc is a 'Microsoft XML, v5.0'.DOMDocument50 automation object //DataString is a text variable in which a set of values are simply concatenated without separators, thus not key-value pairs IF ISCLEAR(XmlHttpConn) THEN CREATE(XmlHttpConn); XmlHttpConn.open('POST','https://secure.quickpay.dk/api',FALSE); //false is synchronous as compared to asynchronous XmlHttpConn.setRequestHeader('POST','/api HTTP/1.1'); XmlHttpConn.setRequestHeader('Host','secure.quickpay.dk'); XmlHttpConn.setRequestHeader('User-Agent','Mozilla/4.0'); XmlHttpConn.setRequestHeader('Content-Length',FORMAT(STRLEN(A_ReqURL))); //XmlHttpConn.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); XmlHttpConn.setRequestHeader('Content-Type','text/plain; charset="utf-8"'); XmlHttpConn.send(DataString); IF ISCLEAR(L_XMLDoc) THEN CREATE(L_XMLDoc); IF XmlHttpConn.status <> 200 THEN MESSAGE('Status %1 %2 %3',XmlHttpConn.status, XmlHttpConn.statusText, XmlHttpConn.responseXML, );
Answers
In Content Length tag you should post exact length of your http request with it's headers.
2 cases: 1) check if you could delete this string from your code to let HTTPServer object calculate length by itself.
2) if the 1st case won't helps you could save your XML request in file and calculate it lenght by yourself like: Hope this helps!
Follow my blog at http://x-dynamics.blogspot.com