diff --git a/src/main/java/com/example/baispolicy/PaymentService.java b/src/main/java/com/example/baispolicy/PaymentService.java new file mode 100644 index 0000000..420d154 --- /dev/null +++ b/src/main/java/com/example/baispolicy/PaymentService.java @@ -0,0 +1,10 @@ +package com.example.baispolicy; + +public class PaymentService { + public String approve(String transactionId) { + if (transactionId == null || transactionId.isBlank()) { + throw new IllegalArgumentException("Transaction ID must not be blank."); + } + return "APPROVED:" + transactionId; + } +}