Witam,
Problem jest taki, ze po wyslaniu formularza do strony "https://contribute.johnkerry.com" odpowiedzia jest pusty formularz na tej samej stronie. Gdy robie to samo recznie przez przegladarke wszystko jest ok i dostaje wynik transakcji. Poniezej przedstawiam fragment kodu:
procedure TThread1.Execute;
var
ErrorCode : string;
finalstr : ansistring;
FSSL : TIdSSLIOHandlerSocket;
begin
FreeOnTerminate := True;
Input := TStringStream.Create('');
Output := TStringStream.Create('');
Input2 := TStringStream.Create('');
try
FSSL := TIdSSLIOHandlerSocket.Create(Application);
MainForm.Forum.IOHandler := FSSL;
Input.WriteString(Format('first_name=%s&last_name=%s&address1=%s&city=%s&state=%s&zip=%s&phone_home=%s&email=%s&employer=%s&occupation=%s&amount_total=%s&ccnumber=%s&expiremonth=%s&expireyear=%s&sessionid=%s', [MainForm.edtTitle.Text, MainForm.edtNick.Text, MainForm.edtMail.Text, MainForm.Edit1.Text, MainForm.Edit2.Text, MainForm.Edit3.Text, MainForm.Edit4.Text, MainForm.Edit5.Text, 'johns co.', 'doctor', '25', MainForm.Edit6.Text, '2', '20' + MainForm.ComboBox4.Text, 'f3f06a3b9e70bbc88d1150b7e6a279ce']));
MainForm.Forum.Post('https://contribute.johnkerry.com/form.html',Input, Output);
ErrorCode := Copy(Output.DataString, 1, 40000);
MainForm.Memo3.Text := ErrorCode;
if Pos('The key you provided did not match records', Output.DataString) <> 0 then MainForm.Memo2.Lines.Add(MainForm.Edit6.Text + ' ' + MainForm.ComboBox3.Text + '/' + MainForm.ComboBox4.Text + ' ' + 'security key');
if Pos('Do not honor', Output.DataString) <> 0 then MainForm.Memo2.Lines.Add(MainForm.Edit6.Text + ' ' + MainForm.ComboBox3.Text + '/' + MainForm.ComboBox4.Text + ' ' + 'Do not honor');
finally
{ zwolnienie zasobow }
Input.Free;
Output.Free;
Input2.Free;
MainForm.btnSend.Enabled := True;
MainForm.Button5.Enabled := False;
end;
end;
Czy wysylanie do strony "https://contribute.johnkerry.com/form.html" jest prawidlowe (w zrodle stronki wlasnie taki byl adres pod action)?
Z gory dziekuje za pomoc!