alf.io icon indicating copy to clipboard operation
alf.io copied to clipboard

Various error when selecting/deselecting the payment method

Open syjer opened this issue 1 year ago • 0 comments

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.

syjer avatar Aug 06 '22 16:08 syjer