0

I integrating Paypal adaptive payment for my site.Itz works perfect in local.but when I tried it in live server it shows me an error.I came to know that the error is due to the curl SSL Connect error.
Can anyone help me with this?

 $ch = curl_init();

    curl_setopt($ch, CURLOPT_URL, $this->apiUrl.$call);

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);

    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);

    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE);

    curl_setopt($ch, CURLOPT_TIMEOUT, 0); 

    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));

    curl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers);

    return json_decode(curl_exec($ch), TRUE);

    print_r( json_decode(curl_exec($ch), TRUE) );   

    echo '<pre>';print_r( curl_getinfo($ch) ); echo '</pre>'; echo '<br>';
1
  • 1
    What is the error shown? Commented Feb 18, 2016 at 5:45

1 Answer 1

1

Try to make ssl verifier false like below. It might help you.

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

EDIT

curl_setopt($ch, CURLOPT_USERPWD, $clientId.":".$secret);
Sign up to request clarification or add additional context in comments.

2 Comments

Try to provide client ID as well. I have edited answer for this.
I dont have a clientId,I have only API User,API Id,API pass,API sig

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.