PaymentService 정책 기반 전환 #1
1 changed files with 10 additions and 0 deletions
10
src/main/java/com/example/baispolicy/PaymentService.java
Normal file
10
src/main/java/com/example/baispolicy/PaymentService.java
Normal file
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue