RESTClient1.BaseURL := '
https://api.pay1.de/post-gateway/';
RESTClient1.Accept := '
application/json';
RESTClient1.ContentType := '
application/x-www-form-urlencoded; charset=UTF-8';
RESTRequest1.Method := rmPOST;
RESTRequest1.AddParameter( '
Content-Type', '
application/x-www-form-urlencoded; charset=UTF-8', TRESTRequestParameterKind.pkHTTPHEADER);
RESTRequest1.AddParameter( '
Accept', '
application/json', TRESTRequestParameterKind.pkHTTPHEADER);
LRequestKind := TRESTRequestParameterKind.pkURLSEGMENT;
// wahlweise probiert
LRequestKind := TRESTRequestParameterKind.pkGETorPOST;
// wahlweise probiert
LRequestOpt := [];
// wahlweise probiert
LRequestOpt := [TRESTRequestParameterOption.poDoNotEncode];
// wahlweise probiert
RESTRequest1.AddParameter( '
mid', '
88888', LRequestKind, LRequestOpt);
RESTRequest1.AddParameter( '
portalid', '
88888', LRequestKind, LRequestOpt);
RESTRequest1.AddParameter( '
key', '
0123456789abcdef0123456789abcdef', LRequestKind, LRequestOpt);
RESTRequest1.AddParameter( '
api_version', '
3.11', LRequestKind, LRequestOpt);
RESTRequest1.AddParameter( '
mode', '
live', LRequestKind, LRequestOpt);
RESTRequest1.AddParameter( '
request', '
getuser', LRequestKind, LRequestOpt);
RESTRequest1.AddParameter( '
encoding', '
UTF-8', LRequestKind, LRequestOpt);
RESTRequest1.AddParameter( '
aid', '
88888', LRequestKind, LRequestOpt);
RESTRequest1.AddParameter( '
type', '
userdata', LRequestKind, LRequestOpt);
RESTRequest1.AddParameter( '
customerid', '
88888', LRequestKind, LRequestOpt);
try
RESTRequest1.Execute;
// request ausführen
except
on e:
Exception do begin
s := e.
Message;
memo1.lines.Add(s);
end;
end;
s := RESTResponse1.StatusCode.ToString + '
/ ' + RESTResponse1.Content;
memo1.lines.Add(s);