Git Product home page Git Product logo

facturapi-php's People

Contributors

eichgi avatar ingfdoaguirre avatar javorosas avatar jl4guna avatar raul-facturapi avatar wrtisans avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

facturapi-php's Issues

Filtrado por tax_id no esta funcionando

$this->facturapi = new Facturapi('facturapi_user_key');

$params = ['q' => $rfc];

$organizations = $this->facturapi->Organizations->all($params);
stdClass Object
(
    [page] => 1
    [total_pages] => 1
    [total_results] => 0
    [data] => Array
        (
        )

)

Can't create products

$facturapi = new Facturapi("sk_test_---");

$productItem = array(
    "description" => "Banjo",
    "product_key" => "7876543456",
    "price" => 1345.60,
    "sku" => "IMUSXXXX123"
  );

$product = $facturapi->Products->create($productItem);

Response:

object(stdClass)#7 (2) { ["message"]=> string(44) "Invalid product_key, please check it exists." ["ok"]=> bool(false) }

When i make all in one request crates invoice and customer, products were not created.

Filtrado por fecha no esta funcionando

Al mandar los siguientes parametros, the API breaks

Request

$params =[
    'q' => 'XAXX010101000'
    'date' => [
            'gte' => '2019-03-01'
            'lte' => '2019-03-31'
        ]
];

(new Facturapi($apiKey))->Invoices->all($params);

Response

stdClass Object
(
    [message] => Cast to date failed for value "{}" at path "created_at" for model "Invoice"
    [ok] => 
)

customs_keys

after creating a Invoice this message was returned:
object(stdClass)#14 (2) { ["message"]=> string(58) ""items[0]" > "customs_keys" must contain at least 1 items" ["ok"]=> bool(false) }

Unable to create customer: Facturapi\Exceptions\Facturapi_Exception: cURL error: SSL certificate problem: unable to get local issuer certificate in

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;
		}
	}

Feature no disponible

Utilizo la funcionalidad para cargar el catalogo de articulos

$facturapi = new Facturapi($key);
        return $facturapi->Catalogs->searchProducts([
            'q' => request('search')
        ]);

Pero al momento de hacer la consulta, me arroja lo siguiente

{
"message": "Feature no disponible.",
"ok": false
}

Algún error en integración? Help!!!!1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.