Daneesv Posted May 26, 2018 Share Posted May 26, 2018 Error onboarding Paypal: An error occurred. Please, check your credentials Paypal. Error onboarding Braintree: An error occurred. Please, check your credentials Braintree. https://paypal-sandbox.pp-ps-auth.com/https://paypal-live.pp-ps-auth.com/https://sandbox.pp-ps-auth.com/https://pp-ps-auth.com/ --------------------------------------------------------------- 503 Service Unavailable No server is available to handle this request. --------------------------------------------------------------- (on any version of PrestaShop 1.7) class PaypalSDK { private $action; private $endpoint; private $urlAPI; private $urlSI; public function __construct($sandbox=0) { $this->action = 'POST'; if ($sandbox) { $this->urlSI = 'https://paypal-sandbox.pp-ps-auth.com/'; } else { $this->urlSI = 'https://paypal-live.pp-ps-auth.com/'; } } public function getUrlOnboarding($body) { $this->endpoint = 'getUrl'; $response = $this->makeCallSI(http_build_query($body, '', '&')); return $response; } private function makeCallSI($body = null) { $curl = curl_init(); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_URL, $this->urlSI.$this->endpoint.'?'.$body ); curl_setopt($curl, CURLOPT_URL, $this->urlSI.$this->endpoint.'?'.$body ); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true); curl_setopt($curl, CURLOPT_CAINFO, _PS_CACHE_CA_CERT_FILE_); $response = curl_exec($curl); return $response; } } 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now