1

我需要在网站中集成先进的贝宝付款。我已经在 manager.paypal.com 上配置了所需的设置。

现在我正在使用 curl 发出安全的 http 请求。但是 curl_exec 不返回任何东西。这是我的代码。我已经确认所有变量都有正确的值。

$ch=curl_init();
curl_setopt($ch, CURLOPT_URL, $pf_host_addr);
curl_setopt($ch, CURLOPT_RETURNTRANSFER , TRUE);
curl_setopt($ch,CURLOPT_POST,TRUE);
curl_setopt($ch,CURLOPT_POSTFIELDS, $postdata);
$resp=curl_exec($ch);

if(!$resp)
{
    return "<p>Failed</p>";
}

我作为输出失败。

4

1 回答 1

0

此页面上的官方文档非常有帮助

https://www.x.com/developers/paypal/documentation-tools/quick-start-guides/paypal-payments-advanced-hosted-pages

于 2012-11-04T16:35:04.753 回答