无法解析主机:api-3t.sandbox.paypal.com
Could not resolve host: api-3t.sandbox.paypal.com
我正在尝试在 php
中实施 paypal pro 信用卡支付
无论我做什么,我都会收到以下错误。
- 无法解析主机:api-3t.sandbox.paypal.com
我认为是电脑的DNS问题。但是CODE有可能出错吗?
我成功了。
这是关于使用代理。
必须为其配置代理主机和端口、用户名和密码。
我的示例代码如下。
class classname
{
var $useProxy = TRUE;
var $proxyHost = '192.135.2.1';//your host
var $proxyPort = 0000;//your port
public function(Params){
curl_setopt($ch, CURLOPT_PROXYTYPE, 'HTTP');
curl_setopt($ch, CURLOPT_PROXY, $this->proxyHost.":".$this->proxyPort);
curl_setopt($ch, CURLOPT_PROXYUSERPWD, "user:password"); //username:pass
}
PS:或者您可以不使用 类 和函数。
希望对您有所帮助!
我正在尝试在 php
中实施 paypal pro 信用卡支付无论我做什么,我都会收到以下错误。
- 无法解析主机:api-3t.sandbox.paypal.com
我认为是电脑的DNS问题。但是CODE有可能出错吗?
我成功了。 这是关于使用代理。 必须为其配置代理主机和端口、用户名和密码。 我的示例代码如下。
class classname
{
var $useProxy = TRUE;
var $proxyHost = '192.135.2.1';//your host
var $proxyPort = 0000;//your port
public function(Params){
curl_setopt($ch, CURLOPT_PROXYTYPE, 'HTTP');
curl_setopt($ch, CURLOPT_PROXY, $this->proxyHost.":".$this->proxyPort);
curl_setopt($ch, CURLOPT_PROXYUSERPWD, "user:password"); //username:pass
}
PS:或者您可以不使用 类 和函数。
希望对您有所帮助!