Skip to content

Envía facturas electrónicas al api de Begranda para DIAN

Notifications You must be signed in to change notification settings

fvalenciabg/begrandafe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Begranda facturación electrónica

Habilita enviar facturas electrónicas a la DIAN por medio del API de Begranda

Acerca de

Packagist StyleCI License

Usando la libería en PHP de begranda, podrás enviar facturas electronicas a la DIAN de una forma sencilla y limpia

Requerimientos

Instalación con Composer

Ejecuta composer require fvalenciabg/begrandafe.

Enviar una factura

El proceso para enviar una factura electronica simple

$endpoint = getenv("BG_ENDPOINT");
$key = getenv("BG_KEY");

$invoice = new Invoice($endpoint,$key);
$datetime = date("Y-m-d h:i:s");
$invoice->
    setInvoice("990000072")->
    setSeller([
        "nit"=>"3534533",
        "name"=>"Vendedor",
        "location"=>[
            "address"=>"Cl 46 AA 43",
            "countryCode"=>"CO",
            "city"=>"Medellín",
            "subdivission"=>"Poblado",
            "department"=>"Antioquia"
        ]
    ])->
    setDate($datetime)->
    setBase(100000.00)->
    setTotal(119000.00)->
    setIva(19000.00)->
    setIca(0)->
    setIpo(0)->
    setPaymentMethod(10)->
    setPaymentChannel(9)->
    setAuthorizationNumber("9000000123303363")->
    setAuthorizationPeriod("2018-05-05","2028-05-05")->
    setAuthorizationInvoiceFrom(990000000)->
    setAuthorizationInvoiceTo(995000000)->
    setBuyer([
        "nit"=>"45747373",
        "name"=>"Comprador",
        "type"=>31,
        "location"=>[
            "address"=>"CR 33 56 34",
            "countryCode"=>"CO",
            "city"=>"Medellin",
            "subdivission"=>"Belen",
            "department"=>"Antioquia"
        ]
    ]);
$invoice->send();

Dudas

Si tienes dudas o inconveninentes no dudes en escribirnos a soporte@begranda.com.

About

Envía facturas electrónicas al api de Begranda para DIAN

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages