duanbimo7212 2015-03-08 22:40
浏览 55

如何在使用wamp本地工作时摆脱payum“SSL证书问题:无法获取本地颁发者证书”错误

With payumBundle under symfony2, when trying to complete a payment on my local server with wamp and windows I get an error:

SSL certificate problem: unable to get local issuer certificate

I understood I could solve it by either:

  • download a certificate and set curl.cainfo=cacert.pem in php.ini PROBLEM : when I do so, the error does not disappear

  • set CURLOPT_SSL_VERIFYPEER option to false PROBLEM : Where do I do this with wamp/windows ?

  • 写回答

1条回答 默认 最新

  • duanemei2194 2015-03-09 13:03
    关注

    I found a temporary fix :

    update the vendor class

    vendor/payum/core/Payum/Core/Bridge/Buzz/ClientFactory.php
    

    and add the following code in the createCurl method:

        $client = new Curl();
        $client->setVerifyPeer(false);
    

    Would be nice to find a way to update this from within the controller action... if someone has an idea, I'll take it!

    EDIT : see the following answer which does it without modifying vendors :

    Overload symfony2 vendor class to set curl verify_peer option to false

    评论

报告相同问题?

悬赏问题

  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?