本帖最后由 lwq72304052832700 于 2009-10-26 17:21:43 编辑

解决方案 »

  1.   

    对方的支付网关用PHP写的,你直接传参不就行了吗?
    1.
    url:=https://XXXX.XXXXX.XXXXX/a.php?username=''&password=''
    2.
    创建XMLHTTP对象try
        xmlHttp:=CreateOleObject('Msxml2.XMLHTTP');
        xmlHttp.open('GET',url,false);
        xmlHttp.send();
        responseText:=xmlHttp.responseText;
        if xmlHttp.status='200' then
        begin
          Result:=responseText;
        end;
        xmlHttp := Unassigned;
      except
        Result:='';
      end;
      

  2.   

    不过建议LZ最好先用PHP调用一下,看看能否调用成功,再用DELPHI调<?php
     
    $ch = curl_init();
     
    curl_setopt($ch, CURLOPT_URL, "https://XXXX.XXXXX.XXXXX/send.php?username=''&password='' ");
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_COOKIESESSION, 1);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
     
    $result=curl_exec($ch);
    echo  $result;
     
    curl_close($ch);?>
      

  3.   

    谢谢liangpei2008的答复。我现在使用的是一套平台,有服务端和客户端~
    不是纯DELPHI开发的,所以比较模糊,怎么传数据到网银,支付宝~~
      

  4.   

    delphi下使用http協議post方式發送xml數據到asp頁面和aspx頁面 function Tverpipxinfo.postXml(const xmlstr, url: WideString): WideString;
    var
    idHttp:TIdHTTP;
    sends:tstrings;
    IdEncoderMIME1:TIdEncoderMIME;
    begin
      result:='';
      try
       idHttp:= TIdHTTP.Create(nil);
       idHttp.Request.ContentType := 'application/x-www-form-urlencoded';
       IdEncoderMIME1:=TIdEncoderMIME.Create(nil);
       sends:=tstringlist.Create;
       sends.Add('xmlstr='+IdEncoderMIME1.Encode(xmlstr));
       result:=idhttp.Post(url,sends);
      except
       on E:Exception do
         begin
           result:=e.Message;
         end;
      end;
      idHttp.Free;
      IdEncoderMIME1.Free;
      sends.Free;
    end;IdEncoderMIME1这个怎么没有呢 ?