29-03-2021, Saat: 17:27
(29-03-2021, Saat: 17:11)savasabd Adlı Kullanıcıdan Alıntı: procedure TForm1.KimlikONay();
Var
HTMLStream: TStringStream;
PostData: TStringList;
response, Error, status: string;
JSonValue: TJSonValue;
gun, ay, yil: String;
Begin
if cxDateEdit1.Text='' then
Begin
showmessage('Tarih Girin');
exit;
End;
PostData := TStringList.Create;
yil := YearOf(cxDateEdit1.Date).ToString;
ay := MonthOf(cxDateEdit1.Date).ToString;
gun := DayOf(cxDateEdit1.Date).ToString;
PostData.Add('method=verifiedTc');
PostData.Add('tc=' + cxtcED.Text);
PostData.Add('name=' + cxAdEd.Text);
PostData.Add('surname=' + cxSoyadED.Text);
PostData.Add('day=' + gun);
PostData.Add('month=' + ay);
PostData.Add('year=' + yil);
try
try
IdHTTP1.Request.CustomHeaders.Values['Authorization'] :='...........';response := IdHTTP1.Post('https:/....../..../.../index.php?SERVICE=Verified',PostData);
JSonValue := TJSONObject.ParseJSONValue(response);
status := JSonValue.GetValue<string>('status');
if (status = '200') then
Begin
Showmessage('Tc Kimlik No Onaylandı');
Showmessage(status);
cxImage1.visible := True;
cxImage2.visible := False;
End;
if (status<>'200') then
Begin
Error := JSonValue.GetValue<string>('error');
Showmessage('Onaylanmadı');
cxImage1.visible := False;
cxImage2.visible := True;
End;
except
on E: EIdHTTPProtocolException do begin
if E.ErrorCode = 400 then
response := E.ErrorMessage
end;
end;
finally
Memo1.Text := response;
PostData.Free;
end;;
End;
ya ilgi ve yardımlarınız için gerçekten çok teşekkür ederim. sizi uğraştırıyorum muhtemelen ama benim istediğim tam olarak kırmızı ile altını çizdiğim ifadeyi alıp ekranda uyarı olarak göstermek

