简体   繁体   English

贝宝PDT IIS服务器

[英]PAYPAL PDT IIS SErVER

I'm using this as my pdt for my paypal 我正在使用它作为我的PayPal的产品

this does not work when i upload to my IIS server..do i missing something? 当我上传到IIS服务器时,这不起作用..我丢失了什么吗?

     $pp_hostname = "www.sandbox.paypal.com"; 
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "https://$pp_hostname/cgi-bin/webscr");
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
    //set cacert.pem verisign certificate path in curl using 'CURLOPT_CAINFO' field here,
    //if your server does not bundled with default verisign certificates.
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array("Host: $pp_hostname"));
    $res = curl_exec($ch);
    curl_close($ch);

    if(!$res)
    {
        echo "HTTP ERROR";
    }else
    {
          //my code here
    }

I figured it out . 我想到了 。 i downloaded the cacert.pem and added it..and it works ! 我下载了cacert.pem并添加了它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM