warn rather than die when payment method not found.

We still want to pay ready-for-payment tickets that have no payment method
found.
This commit is contained in:
Bradley M. Kuhn 2018-08-07 10:28:40 -07:00
parent e003313256
commit 56441180e4

View file

@ -54,7 +54,8 @@ my @ticketSpecs = TicketIDsReadyForPayment();
my %payments;
foreach my $ticketSpec (@ticketSpecs) {
my $paymentMethod = FindMostRecentPaymentMethodForTicket($ticketSpec);
die "Cannot find payment method for ticket, $ticketSpec" unless defined $paymentMethod;
warn "Cannot find payment method for ticket, $ticketSpec" unless defined $paymentMethod;
$paymentMethod = "UNKNOWN PAYMENT METHOD";
push(@{$payments{$paymentMethod}}, $ticketSpec);
}
foreach my $paymentMethod (sort { $a cmp $b } keys %payments) {