orders[i].setLines(orderLine);
//Saco las lineas de pago
Payment[] paymentLine = new Payment[ticket.getPayments().size()];
for (int j = 0; j < ticket.getPayments().size(); j++){
PaymentInfo payment = ticket.getPayments().get(j);
paymentLine[j] = new Payment();
paymentLine[j].setAmount(payment.getTotal());
if ("magcard".equals(payment.getName())) {
paymentLine[j].setPaymentType("K");
} else if ("cheque".equals(payment.getName())) {
paymentLine[j].setPaymentType("2");
} else if ("cash".equals(payment.getName())) {
paymentLine[j].setPaymentType("B");
} else {
paymentLine[j].setPaymentType(null); // unknown
}
}