PaymentService 승인 규칙 구현 #5
1 changed files with 10 additions and 0 deletions
10
src/main/java/com/example/baisgate/PaymentService.java
Normal file
10
src/main/java/com/example/baisgate/PaymentService.java
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.example.baisgate;
|
||||||
|
|
||||||
|
public class PaymentService {
|
||||||
|
public String approve(String transactionId) {
|
||||||
|
if (transactionId == null || transactionId.trim().isEmpty()) {
|
||||||
|
throw new IllegalArgumentException("Transaction ID cannot be blank");
|
||||||
|
}
|
||||||
|
return "APPROVED:" + transactionId;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue