How can I obtaine sales information using the objectmanager and $ _POST.
I attached my code to tell me if it is correct ?
public function tomval(){
#fucnion que se encarga de hacer la conexion
$objectmanager = \Magento\Framework\App\ObjectManager::getInstance();
$resource = $objectManager->get('Magento\Framework\App\ResourceConnection');
$connection = $resource->getConnection();
$day = date(Y,m,d);
$DeliveryType= $_POST['DeliveryType'];
$Address= $_POST['Address'];
$Province= $_POST['Province'];
$City= $_POST['City'];
$PostalCode= $_POST['PostalCode'];
$Email= $_POST['Email'];
$Phone= $_POST['Phone'];
$FirstName= $_POST['FirstName'];
$LastName= $_POST['LastName'];
$PaymentMethod= $_POST['PaymentMethod'];
$Amount= $_POST['Amount'];
/* $Order= $_POST['']
$nota=
*/
ObjectManager
magento.stackexchange.com/q/117098/48355