<?php

require_once '../conexion.php';

$db = new Database();
$conexion = $db->conectar();

$conexion = new mysqli("localhost","root","","hamburguesas",3306);

$json = file_get_contents('php://input');

$data = json_decode($json, true);

$ed = $data['ed'];
$metodo = $data['metodo'];

$stmt = $conexion->query("UPDATE ventas SET pago = '$metodo' WHERE idVenta = $ed");



$valido['success'] = true;

echo json_encode($valido);

?>