Conversation
MinYeongPark
approved these changes
Sep 14, 2024
Member
MinYeongPark
left a comment
There was a problem hiding this comment.
고생하셨습니다! 결제 관련 구현 코드는 처음 보는데 덕분에 배워갑니다!
| private Product product; // POINT_1000, POINT_2000 일단 두개 설정해놨습니다. | ||
|
|
||
| @Column(nullable = false) | ||
| private BigDecimal price; |
Member
There was a problem hiding this comment.
BigDecimal 타입을 처음 봐서 찾아봤는데 돈을 나타내는 자료형으로는 BigDecimal 타입이 미세한 숫자의 변동을 허용하지 않아서 더 안전하군요. 덕분에 배워갑니다!
Comment on lines
+11
to
+12
| @Query("SELECT o FROM Order o " + "LEFT JOIN FETCH o.payment p " + "LEFT JOIN FETCH o.user m " + "WHERE o.orderUid = :orderUid") | ||
| Optional<Order> findOrderAndPaymentAndMember(@Param("orderUid") String orderUid); |
Member
There was a problem hiding this comment.
중요한 건 아니고 그냥 궁금한 건데 여쭤봅니다!
jpql문을 한 라인에서 표현하는데 " " + " " 으로 분리해서 나타내신 것은 특별히 의도하신 걸까요??
제 생각에는 한 라인으로 표현한다면 그냥 하나의 " " 안에 담고,
여러 줄로 나타낼 때 분리하는 것도 좋을 것 같습니다!
Collaborator
Author
There was a problem hiding this comment.
복잡해서 보기 쉽게 끊어서 작성하였는데 수정하겠습니다!!
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
iamport를 사용하여 결제 기능을 구현하였습니다.
클라이언트에서 주문 요청시 서버에서 고유 주문 번호를 생성하여 클라이언트에게 전달한 후 클라이언트는 IMP 라이브러리를 사용하여 결제 후
콜백으로 들어온 응답에 대하여 서버로 보내고 서버에서는 iamport client를 이용하여 해당 주문결제가 맞는지 확인하는 검증 과정(결제 금액 변조 검증, 결제 상태 검증)을 거친 후 결제가 되도록 구현하였습니다.