alf.io
alf.io copied to clipboard
Various error when selecting/deselecting the payment method
Error 1: Looks like we can save mollie+saferpay or stripe+saferpay when both handle credit cards, thus failing:
java.lang.IllegalStateException: Duplicate key CREDIT_CARD (attempted merging values alfio.controller.api.v2.model.PaymentProxyWithParameters@c4ab5de7 and alfio.controller.api.v2.model.PaymentProxyWithParameters
@73f40e94)
at java.util.stream.Collectors.duplicateKeyException(Collectors.java:133) ~[?:?]
Fix at the PaymentManager.validateSelection level -> this is due to the fact that on one side, it present incomplete payment provider, on the other side, during the validation, it will filter out those incomplete, which then are discarded from the validation and are able to be selected anyway.
Error 2: When adding and then removing all the payment methods, we save "" and thus fails a Enum.valueOf("") call. To check getBlacklistedMethodsForReservation . edit: currently not able to validate it.