Prestashop 贝宝错误
Prestashop PayPal Error
我正在尝试使用 PayPal & Braintree Official Module (v3.11.6) 在 Prestashop (v1.7.3) 商店中添加 PayPal 付款,但直到现在都没有成功。
安装和配置模块没有任何问题,但每次我继续付款时都会向用户显示此错误:
在沙箱和生产环境中测试了该模块,错误仍然存在。
可能是什么问题?
更新: 经过一些调试,我找到了问题的根源。问题是模块无法通过带有 SSL/TLS 的 cURL 连接到 PayPal 的 API。
我在带有 IIS 的 Windows 服务器中使用 Prestashop,在这种环境下,必须通知 cURL 证书颁发机构所在的位置才能建立安全连接。
我从 curl website 下载了 cacert.pem 文件,将其存储在我的服务器中,然后在模块文件 (PPHtmlConfig.php) 中,我在 cURL 选项设置中手动添加了 CA 位置:
CURLOPT_CAINFO => 'C:\(...)\cacert.pem',
现在我可以连接到 PayPal 的 API 并成功付款了!
我已经联系了模块的技术支持团队,他们正在分析这个问题。
经过与模块技术支持的多次联系,这是他们对该问题的最终回应:
We do not know the specialty of your server. This is not a recurring
error in our module. It happens if the CURL can not find the CA
certificate. In general, we advise you to ask your server to verify
that the CA certificate is correctly configured. Otherwise, it is
necessary to specify the route or curl to find the certificate, for
example, as you did in your module.
At the moment there is no way to specify this in our module in
general. So, you should wait for the next update of our Paypal module.
因此,如果有人在使用 Windows 服务器环境时遇到同样的问题,请在模块文件中指定完整的 CA 路径(如问题更新中所述):
I downloaded the cacert.pem file from curl website, stored it in my
server and then, in module files (PPHtmlConfig.php) i added the CA
location in the cURL options settings manually:
CURLOPT_CAINFO => 'C:\(...)\cacert.pem',
我正在尝试使用 PayPal & Braintree Official Module (v3.11.6) 在 Prestashop (v1.7.3) 商店中添加 PayPal 付款,但直到现在都没有成功。
安装和配置模块没有任何问题,但每次我继续付款时都会向用户显示此错误:
在沙箱和生产环境中测试了该模块,错误仍然存在。
可能是什么问题?
更新: 经过一些调试,我找到了问题的根源。问题是模块无法通过带有 SSL/TLS 的 cURL 连接到 PayPal 的 API。 我在带有 IIS 的 Windows 服务器中使用 Prestashop,在这种环境下,必须通知 cURL 证书颁发机构所在的位置才能建立安全连接。 我从 curl website 下载了 cacert.pem 文件,将其存储在我的服务器中,然后在模块文件 (PPHtmlConfig.php) 中,我在 cURL 选项设置中手动添加了 CA 位置:
CURLOPT_CAINFO => 'C:\(...)\cacert.pem',
现在我可以连接到 PayPal 的 API 并成功付款了!
我已经联系了模块的技术支持团队,他们正在分析这个问题。
经过与模块技术支持的多次联系,这是他们对该问题的最终回应:
We do not know the specialty of your server. This is not a recurring error in our module. It happens if the CURL can not find the CA certificate. In general, we advise you to ask your server to verify that the CA certificate is correctly configured. Otherwise, it is necessary to specify the route or curl to find the certificate, for example, as you did in your module.
At the moment there is no way to specify this in our module in general. So, you should wait for the next update of our Paypal module.
因此,如果有人在使用 Windows 服务器环境时遇到同样的问题,请在模块文件中指定完整的 CA 路径(如问题更新中所述):
I downloaded the cacert.pem file from curl website, stored it in my server and then, in module files (PPHtmlConfig.php) i added the CA location in the cURL options settings manually:
CURLOPT_CAINFO => 'C:\(...)\cacert.pem',