Konuyu Oyla:
  • Derecelendirme: 0/5 - 0 oy
  • 1
  • 2
  • 3
  • 4
  • 5
IdHTTP ile post
#1
merhaba arkadaşlar,

aşağıdaki gibi birşeyi nasıl idHTTP ile post edebilirim acaba , yardımcı olurmusunuz?

<form method="post" action="https://host/fim/est3dgate">
<input type="hidden" name="clientid" value="990000000000001"/>
<input type="hidden" name="storetype" value="3d_pay_hosting" />
<input type="hidden" name="hash" value="iej6cPOjDd4IKqXWQEznXWqLzLI=" />
<input type="hidden" name="islemtipi" value="Auth" />
<input type="hidden" name="amount" value="91.96" />
<input type="hidden" name="currency" value="949" />
<input type="hidden" name="oid" value="1291899411421" />
<input type="hidden" name="okUrl" value="https://www.teststore.com/success.php"/>
<input type="hidden" name="failUrl" value="https://www.teststore.com/fail.php" />
<input type="hidden" name="callbackurl" value="https://www.teststore.com/fail" />
<input type="hidden" name="lang" value="tr" />
<input type="hidden" name="rnd" value="asdf" />
<input type="hidden" input name="pan" value="4242424242424242">
<input type="hidden" input name="Ecom_Payment_Card_ExpDate_Year" value="28" >
<input type="hidden" input name="Ecom_Payment_Card_ExpDate_Month" value="10">
</form>
Cevapla
#2
(10-06-2019, Saat: 19:51)ermanispir@gmail.com Adlı Kullanıcıdan Alıntı: Linkleri Görebilmeniz İçin Üye Olmanız Gerekiyor. Üye Olabilmek İçin Lütfen Buraya Tıklayınız.merhaba arkadaşlar,

aşağıdaki gibi birşeyi nasıl idHTTP ile post edebilirim acaba , yardımcı olurmusunuz?

<form method="post" action="https://host/fim/est3dgate">
<input type="hidden" name="clientid" value="990000000000001"/>
<input type="hidden" name="storetype" value="3d_pay_hosting" />
<input type="hidden" name="hash" value="iej6cPOjDd4IKqXWQEznXWqLzLI=" />
<input type="hidden" name="islemtipi" value="Auth" />
<input type="hidden" name="amount" value="91.96" />
<input type="hidden" name="currency" value="949" />
<input type="hidden" name="oid" value="1291899411421" />
<input type="hidden" name="okUrl" value="https://www.teststore.com/success.php"/>
<input type="hidden" name="failUrl" value="https://www.teststore.com/fail.php" />
<input type="hidden" name="callbackurl" value="https://www.teststore.com/fail" />
<input type="hidden" name="lang" value="tr" />
<input type="hidden" name="rnd" value="asdf" />
<input type="hidden" input name="pan" value="4242424242424242">
<input type="hidden" input name="Ecom_Payment_Card_ExpDate_Year" value="28" >
<input type="hidden" input name="Ecom_Payment_Card_ExpDate_Month" value="10">
</form>

function GetInfo(Url: String; XMLSendData: String; GetPost: String): String;
var
 IdHTTP1: TIdHTTP;
 Stream1: TStringStream;
begin
  (*
 if Logging then
 begin
   LogEkle('SMS_LOG', '********** GÖNDERİLEN BİLGİ PAKETİ: ');
   LogEkle('SMS_LOG', '');
   LogEkle('SMS_LOG', 'URL = ' + Url);
   LogEkle('SMS_LOG', '');
   LogEkle('SMS_LOG', #13#10 + XMLSendData + #13#10);
 end;
  *)

 IdHTTP1 := TIdHTTP.Create(nil);
 try
   Stream1 := TStringStream.Create('');
   try
     Stream1.Position := 0;
     Stream1.WriteString(XMLSendData);
     Stream1.Position := 0;
     Result := IdHTTP1.Post(Url, Stream1);
   finally
     Stream1.Free;
   end;

    (*
   if Logging then
   begin
     LogEkle('SMS_LOG', '********** CEVAP OLARAK GELEN BİLGİ PAKETİ: ');
     LogEkle('SMS_LOG', '');
     LogEkle('SMS_LOG', 'URL = ' + Url);
     LogEkle('SMS_LOG', '');
     LogEkle('SMS_LOG', #13#10+ Result + #13#10);
   end;
    *)
finally
   FreeAndNil(IdHTTP1);
 end;
end;

KULLANIM:
function FalanFilan: Boolean;
var
 StrXML: String;
 XmlDataResponse: TStringList;
begin
 XmlDataResponse := TStringList.Create;
 try
   strXML := '<xml>FalanFilan</xml>';
   XmlDataResponse.Text := GetInfo(Url1, strXML, 'POST');
   if XmlDataResponse.Count > 1 then
   begin
     // Başarılı
   end;
 finally
   XmlDataResponse.Free;
 end;
end;
WWW
Cevapla




Konuyu Okuyanlar: 1 Ziyaretçi