|
|
@@ -0,0 +1,23 @@
|
|
|
+<?php
|
|
|
+header("Access-Control-Allow-Origin: *");
|
|
|
+
|
|
|
+require __DIR__ . '/vendor/autoload.php';
|
|
|
+use Mike42\Escpos\Printer;
|
|
|
+use Mike42\Escpos\PrintConnectors\WindowsPrintConnector;
|
|
|
+use Mike42\Escpos\EscposImage;
|
|
|
+use Mike42\Escpos\PrintConnectors\FilePrintConnector;
|
|
|
+
|
|
|
+$dataPrint = $_POST["dataPrint"];
|
|
|
+$dataPrint = json_decode($dataPrint, true);
|
|
|
+
|
|
|
+if($dataPrint && json_last_error() === JSON_ERROR_NONE) {
|
|
|
+ print_r($dataPrint);
|
|
|
+ $empresa = $dataPrint['empresa'] ?? '';
|
|
|
+ $concepto = $dataPrint['concepto'] ?? '';
|
|
|
+ $productos = $dataPrint['productos'] ?? null;
|
|
|
+ print_r($empresa);
|
|
|
+ echo "<hr>";
|
|
|
+ print_r($concepto);
|
|
|
+ echo "<hr>";
|
|
|
+ print_r($productos);
|
|
|
+}
|