Problems using cURL

Status
Not open for further replies.

zlassing

New Member
Messages
21
Reaction score
0
Points
1
Hiyo,

I'm having trouble using cURL to make an API call to PayPal on my x10Hosting account - the curl_exec() call works fine on my local machine, but when I run the same script here, I get an empty response. This is what I'm doing:

Code:
$sendPayData = array(
        "METHOD" => "BMCreateButton",
        "VERSION" => "65.2",
        "USER" => "/*UN*/",
        "PWD" => "/*PW*/",
        "SIGNATURE" => "/*API Sig*/",
        "BUTTONCODE" => "ENCRYPTED",
        "BUTTONTYPE" => "CART",
        "L_BUTTONVAR2" => "/*Options*/,
    );

    $curl = curl_init();
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_URL, 'https://api-3t.paypal.com/nvp?'.http_build_query($sendPayData));
    $nvpPayReturn = curl_exec($curl);
    curl_close($curl);

Is there something I'm missing?
 

josh-hummel74

New Member
Messages
4
Reaction score
0
Points
1
A bunch of my scripts that use cURL are also suddenly getting empty responses. curl_error says 'Couldn't resolve host'. file_get_contents throws a similar error. so it looks to be a problem on x10's end
 
Status
Not open for further replies.
Top