-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: TossPaymentException 생성 및 적용 * fix: 불필요한 로직 제거 * docs: 결제->예매로 수정 * refactor: TossPaymentException status code 입력받도록 수정 --------- Co-authored-by: Hanna Lee <[email protected]>
- Loading branch information
Showing
4 changed files
with
57 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
- api-event | ||
공연 도메인 | ||
- api-booking | ||
결제 도메인 | ||
예매 도메인 | ||
#### batch | ||
스프링 배치 모듈 | ||
#### core | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
api/api-booking/src/main/java/com/pgms/apibooking/common/exception/TossPaymentException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.pgms.apibooking.common.exception; | ||
|
||
import org.springframework.http.HttpStatus; | ||
|
||
import com.pgms.coredomain.response.ErrorResponse; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public class TossPaymentException extends RuntimeException { | ||
private final String code; | ||
private final HttpStatus status; | ||
|
||
public TossPaymentException(ErrorResponse errorResponse, HttpStatus status) { | ||
super(errorResponse.getErrorMessage()); | ||
this.code = errorResponse.getErrorCode(); | ||
this.status = status; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters