En Laravel genera
Unable to create customer: Facturapi\Exceptions\Facturapi_Exception: cURL error: SSL certificate problem: unable to get local issuer certificate in
para resolverlo ir a
vendor\facturapi\facturapi-php\src\Http\BaseClient.php
protected function execute_JSON_post_request( $url, $body ) {
$headers[] = 'Authorization: Basic ' . $this->FACTURAPI_KEY;
$headers[] = 'Content-Type: application/json';
// initialize cURL and send POST data
$ch = curl_init();
curl_setopt( $ch, CURLOPT_POST, true );
curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode( $body ) );
curl_setopt( $ch, CURLOPT_URL, $url );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
Agregar
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );
$output = curl_exec( $ch );
$errno = curl_errno( $ch );
$error = curl_error( $ch );
$this->setLastStatusFromCurl( $ch );
curl_close( $ch );
if ( $errno > 0 ) {
throw new Facturapi_Exception( 'cURL error: ' . $error );
} else {
return $output;
}
}