Skip to content
This repository has been archived by the owner on Aug 13, 2022. It is now read-only.

[#24] 게임 결제 로직 #61

Open
wants to merge 45 commits into
base: develop
Choose a base branch
from
Open

[#24] 게임 결제 로직 #61

wants to merge 45 commits into from

Conversation

daakludens
Copy link
Collaborator

@daakludens daakludens commented May 23, 2021

게임 결제를 위한 로직
iamport API를 통해 결제를 하면 해당 게임의 정보와 결제 정보를 파라미터로 넘겨 저장.
결제는 카카오와 네이버만 있다는 가정 하에 구현

현재 로직의 뼈대만 잡은 상태로 이후 세부 로직과 단위 테스트를 추가할 예정
@daakludens daakludens added the in progress Working on it label May 23, 2021
@daakludens daakludens requested a review from f-lab-dev May 23, 2021 16:04
@daakludens daakludens self-assigned this May 23, 2021
@@ -74,4 +77,10 @@ public void deleteUser(@PathVariable long id) {

userService.deleteUser(id);
}

@GetMapping("/{id}/games")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

구매목록이니 games보단 purchases가 낫지 않을까요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네, 25번 브랜치 머지 후 수정하겠습니다.

@daakludens daakludens added code review and removed in progress Working on it labels Aug 4, 2021
@@ -28,5 +29,33 @@ pipeline {
}
}
}

stage('Deploy') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

작업내용이 좀 섞여있는 것 같은데 브랜치 확인 부탁드려요~

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jenkins CD 관련 브랜치를 머지한 후에 수정할 점을 발견해서 작업 내용이 섞인 것 같습니다. 이 부분은 새 브랜치를 열어서 다시 머지 요청 받겠습니다.

@AllArgsConstructor
public class AccountDto {

long id;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

접근제어자는 명시적으로 붙여주시는게 좋을 것 같네요~

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네, 지금 보니 다른 DTO 클래스도 접근 제어자를 붙여야 겠네요. 이것도 다른 브랜치에 머지 요청 받겠습니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

우선 현 브랜치와 관계가 있는 AccountDto와 PurchaseDto에만 리뷰 반영하겠습니다.

public class MobileChargeService implements ChargeService {

@Override
public void chargeCash(long userId, int amount) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기는 가짜 결제메소드인건가요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

결제 방법에 따라 메서드를 만들 예정이었습니다. 지금은 mobile 결제 방법의 클래스만 만든 상태이고요.

@daakludens
Copy link
Collaborator Author

develop 브랜치에만 배포되도록 막았던 코드를 revert하면서 Jenkins 커밋이 불발돼 위 실패가 떴습니다. 현 브랜치 코드의 빌드 및 테스트는 정상 작동 확인했습니다.

@f-lab-dev
Copy link
Member

작업 계속 진행해주시면 될 것 같네요~

@f-lab-dev
Copy link
Member

iamport를 연동해봐도 좋을 것 같네요~

@daakludens
Copy link
Collaborator Author

네, 적용해보겠습니다.

@daakludens daakludens changed the title [#24] 게임 구매 로직 [#24] 게임 결제 로직 Sep 7, 2021
@f-lab-dev
Copy link
Member

올리신 커밋에는 아임포트 API를 통한 결제 무결성 검증 등이 빠져있는 것 같아요~ 도큐먼트를 정독하고 모두 구현이 되면 좋을 것 같아요

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants