DoDirectPayment失败:无法连接到主机(7)

编程入门 行业动态 更新时间:2024-10-25 22:28:39
本文介绍了DoDirectPayment失败:无法连接到主机(7)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用来自PHP的Paypal示例代码 cms.paypal/us/cgi-bin/?cmd = _render-content& content_ID = developer/library_code

I am using the sample code of paypal in php from cms.paypal/us/cgi-bin/?cmd=_render-content&content_ID=developer/library_code

但是每当我运行此示例代码时,我都会收到此错误.

but whenever i am running this sample code i am getting this error.

"DoDirectPayment失败:无法连接到主机(7)"

"DoDirectPayment failed: couldn't connect to host(7)"

我不知道出了什么问题.

I have no clue what's the problem.

注意:我正在使用本地WAMP服务器来运行此示例.

Note: I am using local WAMP server for running this sample.

推荐答案

// Set the curl parameters. - $ch = curl_init(); curl_setopt($ch, CURLOPT_PROXY, " username:password@proxyserver:port/";); curl_setopt($ch, CURLOPT_URL, $API_Endpoint); curl_setopt($ch, CURLOPT_VERBOSE, 1); // Turn off the server and peer //verification(TrustManager Concept). curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); //The rest of the code from paypal site

更多推荐

DoDirectPayment失败:无法连接到主机(7)

本文发布于:2023-06-05 01:12:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/508809.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:连接到   主机   DoDirectPayment

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!