diff --git a/src/java/ABTProductsPUTGenerator/bin/ABTProductsPUTGenerator.jar b/src/java/ABTProductsPUTGenerator/bin/ABTProductsPUTGenerator.jar index 2cb678f..1e25365 100644 Binary files a/src/java/ABTProductsPUTGenerator/bin/ABTProductsPUTGenerator.jar and b/src/java/ABTProductsPUTGenerator/bin/ABTProductsPUTGenerator.jar differ diff --git a/src/java/ABTProductsPUTGenerator/src/main/java/nl/htm/ovpay/abt/ABTProductsPUTGenerator.java b/src/java/ABTProductsPUTGenerator/src/main/java/nl/htm/ovpay/abt/ABTProductsPUTGenerator.java index 2e53f85..8c87731 100644 --- a/src/java/ABTProductsPUTGenerator/src/main/java/nl/htm/ovpay/abt/ABTProductsPUTGenerator.java +++ b/src/java/ABTProductsPUTGenerator/src/main/java/nl/htm/ovpay/abt/ABTProductsPUTGenerator.java @@ -215,8 +215,13 @@ public class ABTProductsPUTGenerator { } case "paymentMoment" -> { LOGGER.info("Rewriting paymentMoment to paymentMomentId..."); - Long paymentMomentId = jsonField.getValue().get("paymentMomentId").asLong(); - ((ObjectNode)newJsonNode).put("paymentMomentId", paymentMomentId); + if (jsonField.getValue().get("paymentMomentId").isNull()) { + LOGGER.info("Rewriting null paymentMomentId..."); + ((ObjectNode)newJsonNode).putRawValue("paymentMomentId", null); + } else { + Long paymentMomentId = jsonField.getValue().get("paymentMomentId").asLong(); + ((ObjectNode)newJsonNode).put("paymentMomentId", paymentMomentId); + } } case "requiredCustomerLevel" -> { LOGGER.info("Rewriting requiredCustomerLevel to requiredCustomerLevelId...");