Skip to content

Commit

Permalink
feat: 결제 검증 api ExternalApiFailedException 체크 (#164)
Browse files Browse the repository at this point in the history
* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* feat: update db schema (#25)

initial setting for season4

* feat: add git actions for validating dev branch

* build: fix version of kotest

* build: add testcontainers

* feat: add sending code, verification code, checking email is already certificated (#35)

* feat: add Cert Entity

* feat: add send mail function to start certification

* feat: verify certification code

* feat: check email is already certificated

* chore: apply spotless

* fix: change variable name explicitly

* fix: remove nullablility from variables that should not be null

* fix: change from Random to SecureRandom

* fix: change hard coding email address

* chore: change status variables explicitly

* feat: add validation to request DTOs

* feat: validate email only 경희대 and 한국외대

* chore: change package name

* feat: change mail text pretty

* chore: run spotlessApply

* feat: set kotest and swagger with restdocs (#34)

- restdocs기반으로 swagger 세팅을 진행하였습니다.
- kotest 버전 수정을 하였습니다

* refactor: updateUser and createMeetingTeam

* refactor: joinMeetingTeam and getMeetingTeamUserList

* refactor: updateMeetingTeamInformation

* refactor: updateMeetingTeamPreference

* refactor: getMeetingTeamInformation

* feat: getMeetingTeamInformationByKakaoId

* fix: solve conflict

* style: change kotlin lang style

* fix: delete trash file

* feat: create payment api (#37)

* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* feat: create method by portone

* feat: create requestPayment

* feat: create checkPayment

* feat: create refundPaymentById

* feat: create refundPayment

* style: format kotlin code style

* fix: add transactional

* fix: optimize file

* feat: add swagger form

* fix: add requestEntity and exception

* style: change kotline lang style

* refactor: change dao package location

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>

* fix: delete nickname and change api endpoint

* feat: 이메일 인증 구현 (#41)

* feat: copy and paste uoslife-server

* feat: add university column to seperate students

* feat: add redis dependency

* fix: change 한국외대 email

* feat: change domain name from Cerification to Verification

* feat: change unique code only number

* feat: change package name from certification to verification

* feat: change package name from certification to verification

* feat: change DB to redis to verify email

* feat: change DB to redis to verify email

* chore: annotate ttl for verification

* fix: checkVerification for redis cache

* fix: checkVerification for redis cache

* feat: reset verification if it already exists

* chore: apply spotless

* chore: change url

* feat: add aws dependency

* fix: fix getUniqueCode

* feat: remove university in VerificationRequest

* feat: change order to create verification

* feat: apply transaction when saving

* feat: methodize sending mail

* fix: change to fit crudrepository

* chore: remove the rest

* chore: apply spotlessApply

* feat: add swagger example

* feat: extract university from email

* feat: create user and save when checking verification code

* chore: import classes

* feat: change variables type for saving user have only email

* chore: change service reponse type to see clearly

* chore: add blank for push

* chore: remove blank for push

* feat: set id when creating empty User Entity

* feat: 이메일 인증 uri 수정

* feat: check user by email

* feat: change university enum capital

* chore: apply spotless things

* chore: merge test

* chore: validate test

* chore: apply spotless

* chore: apply lint

* refactor: change verification send request name

* fix: add whitelist uos email

* refactor: change verification code check DTO

* refactor: change verification code check response DTO

* refactor: delete useless DTO

* refactor: change verification send response DTO name

* refactor: change verification code check response DTO name

* refactor: change verification code send request, response DTO name

* feat: 인증코드 전송 요청 DTO에 대학 구분(University) 추가

* feat: 인증코드 검증 요청 DTO에 대학 구분(University) 추가

* refactor: request에 대학 구분 담겨있어 대학 추출 로직 삭제

* chore: 이메일 제목 변경

* chore: apply lint

* fix: update code based pr review

* Refactor: change api dto based season4 figma (#40)

* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* refactor: updateUser and createMeetingTeam

* refactor: joinMeetingTeam and getMeetingTeamUserList

* refactor: updateMeetingTeamInformation

* refactor: updateMeetingTeamPreference

* refactor: getMeetingTeamInformation

* feat: getMeetingTeamInformationByKakaoId

* fix: solve conflict

* style: change kotlin lang style

* fix: delete trash file

* fix: delete nickname and change api endpoint

* fix: update code based pr review

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>

* feat: how to update meetingTeamInformationUpdateReqeust?

* refactor: decide MeetingTeamInformationUpdateRequest

* style: kotlin lang style

* feat: change request in refundPaymentById  (#46)

* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* feat: create method by portone

* feat: create requestPayment

* feat: create checkPayment

* feat: create refundPaymentById

* feat: create refundPayment

* style: format kotlin code style

* fix: add transactional

* fix: optimize file

* feat: add swagger form

* fix: add requestEntity and exception

* style: change kotline lang style

* refactor: change dao package location

* fix: change request in refundById

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>

* feat: 로그인 JWT 구현 (#42)

* feat: copy and paste from rebuild-server

* feat: add exceptions

* feat: add tokens

* feat: add jwts

* feat: add dependency for jwt

* chore: pull from dev/season4

* feat: 토큰 검사 미실시 리스트 추가

* feat: 토큰 검사 로직 추가

* feat: 유저 이메일 유니크 속성 추가

* feat: 리퀘스트 인증코드와 DB 인증코드가 같은지 체크

* feat: 인증코드 인증 시 유저 생성

* feat: 이메일로 토큰 생성

* feat: 인증코드 인증 로직 구현

* feat: 토큰 DTO 추가

* feat: 이메일로 토큰 생성 로직 구현

* feat: 이메일로 유저 찾기

* feat: 토큰 refresh 로직 구현

* chore: apply spotless

* chore: 미사용 클래스 삭제

* chore: 미사용 메서드 삭제

* chore: 불필요한 주석 삭제

* chore: 미사용 메서드 삭제

* feat: 인증코드 검증 매치시 캐시에서 삭제

* chore: apply spotless

* chore: 잘못 머지해서 다시 PR 올립니다 (#48)

* feat: copy and paste from rebuild-server

* feat: add exceptions

* feat: add tokens

* feat: add jwts

* feat: add dependency for jwt

* chore: pull from dev/season4

* feat: 토큰 검사 미실시 리스트 추가

* feat: 토큰 검사 로직 추가

* feat: 유저 이메일 유니크 속성 추가

* feat: 리퀘스트 인증코드와 DB 인증코드가 같은지 체크

* feat: 인증코드 인증 시 유저 생성

* feat: 이메일로 토큰 생성

* feat: 인증코드 인증 로직 구현

* feat: 토큰 DTO 추가

* feat: 이메일로 토큰 생성 로직 구현

* feat: 이메일로 유저 찾기

* feat: 토큰 refresh 로직 구현

* chore: apply spotless

* chore: 미사용 클래스 삭제

* chore: 미사용 메서드 삭제

* chore: 불필요한 주석 삭제

* chore: 미사용 메서드 삭제

* feat: 인증코드 검증 매치시 캐시에서 삭제

* chore: apply spotless

* fix: JWT에 email말고 id 담기로 변경

* chore: 유저 테스트 엔드포인트 변경

* chore: apply spotless

* chore: add blank for push

* refactor: test meetingTeam and match (#49)

* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* fix: update findUserWithMeeting Query

* fix: update param in findUserWithMeetingTeam from single to triple

* fix: add religion in UserFindResponse

* style: kotlin lang style

* fix: delete test file

* fix: fix eror in query

* fix: delete exception in toMeetingTeamInformationGetResponse

* style: kotlin lang style

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>

* refactor: change request param in refundByID (#52)

* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* feat: create method by portone

* feat: create requestPayment

* feat: create checkPayment

* feat: create refundPaymentById

* feat: create refundPayment

* style: format kotlin code style

* fix: add transactional

* fix: optimize file

* feat: add swagger form

* fix: add requestEntity and exception

* style: change kotline lang style

* refactor: change dao package location

* fix: change request in refundById

* feat: change refundByID Id to email

* feat: change name sex to gender

* style: kotlin lang style

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>

* refactor: need to decide question type in MeetingTeamInformationUpdateRequest (#45)

* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* refactor: updateUser and createMeetingTeam

* refactor: joinMeetingTeam and getMeetingTeamUserList

* refactor: updateMeetingTeamInformation

* refactor: updateMeetingTeamPreference

* refactor: getMeetingTeamInformation

* feat: getMeetingTeamInformationByKakaoId

* fix: solve conflict

* style: change kotlin lang style

* fix: delete trash file

* fix: delete nickname and change api endpoint

* fix: update code based pr review

* feat: how to update meetingTeamInformationUpdateReqeust?

* refactor: decide MeetingTeamInformationUpdateRequest

* style: kotlin lang style

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>

* fix: 인증코드 캐시 TTL 1시간으로 변경 (#51)

* feat: copy and paste from rebuild-server

* feat: add exceptions

* feat: add tokens

* feat: add jwts

* feat: add dependency for jwt

* chore: pull from dev/season4

* feat: 토큰 검사 미실시 리스트 추가

* feat: 토큰 검사 로직 추가

* feat: 유저 이메일 유니크 속성 추가

* feat: 리퀘스트 인증코드와 DB 인증코드가 같은지 체크

* feat: 인증코드 인증 시 유저 생성

* feat: 이메일로 토큰 생성

* feat: 인증코드 인증 로직 구현

* feat: 토큰 DTO 추가

* feat: 이메일로 토큰 생성 로직 구현

* feat: 이메일로 유저 찾기

* feat: 토큰 refresh 로직 구현

* chore: apply spotless

* chore: 미사용 클래스 삭제

* chore: 미사용 메서드 삭제

* chore: 불필요한 주석 삭제

* chore: 미사용 메서드 삭제

* feat: 인증코드 검증 매치시 캐시에서 삭제

* chore: apply spotless

* fix: JWT에 email말고 id 담기로 변경

* chore: 유저 테스트 엔드포인트 변경

* chore: apply spotless

* chore: add blank for push

* feat: rebuild-server로부터 시대팅 User 생성 기능 구현

* refactor: 불필요한 메서드 제거

* fix: 유저 생성 시 id에 random uuid 삽입

* fix: User save를 위한 Transactional read only 제거

* feat: 시대생 마이그레이션 url 개방

* fix: 대학명 위치 userPersonalInformation 안으로 변경

* refactor: 유저 초기화 시즌4에 맞게 변경

* chore: apply spotless

* fix: 인증코드 캐시 TTL 1시간으로 변경

* feat: 시대생 마이그레이션 기능 추가 (#50)

* feat: copy and paste from rebuild-server

* feat: add exceptions

* feat: add tokens

* feat: add jwts

* feat: add dependency for jwt

* chore: pull from dev/season4

* feat: 토큰 검사 미실시 리스트 추가

* feat: 토큰 검사 로직 추가

* feat: 유저 이메일 유니크 속성 추가

* feat: 리퀘스트 인증코드와 DB 인증코드가 같은지 체크

* feat: 인증코드 인증 시 유저 생성

* feat: 이메일로 토큰 생성

* feat: 인증코드 인증 로직 구현

* feat: 토큰 DTO 추가

* feat: 이메일로 토큰 생성 로직 구현

* feat: 이메일로 유저 찾기

* feat: 토큰 refresh 로직 구현

* chore: apply spotless

* chore: 미사용 클래스 삭제

* chore: 미사용 메서드 삭제

* chore: 불필요한 주석 삭제

* chore: 미사용 메서드 삭제

* feat: 인증코드 검증 매치시 캐시에서 삭제

* chore: apply spotless

* fix: JWT에 email말고 id 담기로 변경

* chore: 유저 테스트 엔드포인트 변경

* chore: apply spotless

* chore: add blank for push

* feat: rebuild-server로부터 시대팅 User 생성 기능 구현

* refactor: 불필요한 메서드 제거

* fix: 유저 생성 시 id에 random uuid 삽입

* fix: User save를 위한 Transactional read only 제거

* feat: 시대생 마이그레이션 url 개방

* fix: 대학명 위치 userPersonalInformation 안으로 변경

* refactor: 유저 초기화 시즌4에 맞게 변경

* chore: apply spotless

* feat: 시대생 유저를 위한 로그인 기능 질문입니다 (#53)

* feat: 로그인 실패 예외 구현

* feat: 로그인 요청 DTO 구현

* feat: 시대생 로그인을 위한 device secret 추가

* feat: 시대생 로그인을 위한 device secret 추가

* feat: 로그인 jwt 필터 경유

* feat: 시대생 로그인 기능 구현

* feat: apply lint

* chore: 시대생만 사용하는 api uri 변경

* chore: 시대생만 사용하는 api uri 변경

* chore: 로그인 실패 예외 Http Status 변경

* feat: 유저 이용약관 기능 추가 (#54)

* feat: 유저 Tos 추가

* chore: 예외명 변경

* chore: 불필요 import 제거

* chore: apply lint

* ci: dockerfile 및 docker-compose 파일을 추가해 docker 환경에서 작동하도록 설정 (#56)

* chore: update swagger url in config (#57)

* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: update swagger url in config

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>

* feat: docker-compose 환경에서 redis container도 함께 실행시킬 수 있도록 변경 (#58)

* docs: write exception in swagger

* style: kotlin lang style

* feat: apply validation in verification, match, user

* fix: teamName can be  null

* fix: 유저 정보 업데이트 기능 변경 (#55)

* feat: 상대에게 전하는 첫 메시지 message 컬럼 추가

* feat: 유저 정보 업데이트 기능 변경

* chore: apply lint

* refactor: 유저 개인정보 업데이트 메서드화

* chore: apply lint

* refactor: add error message(Exception) in swagger (#60)

* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* refactor: updateUser and createMeetingTeam

* refactor: joinMeetingTeam and getMeetingTeamUserList

* refactor: updateMeetingTeamInformation

* refactor: updateMeetingTeamPreference

* refactor: getMeetingTeamInformation

* feat: getMeetingTeamInformationByKakaoId

* fix: solve conflict

* style: change kotlin lang style

* fix: delete trash file

* fix: delete nickname and change api endpoint

* fix: update code based pr review

* feat: how to update meetingTeamInformationUpdateReqeust?

* refactor: decide MeetingTeamInformationUpdateRequest

* style: kotlin lang style

* docs: write exception in swagger

* style: kotlin lang style

* feat: apply validation in verification, match, user

* fix: teamName can be  null

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>
Co-authored-by: 유현승 <gustmd5715@gmail.com>

* fix: 토큰 만료를 status 401 에러로 프론트에게 전송 (#59)

* feat: 상대에게 전하는 첫 메시지 message 컬럼 추가

* feat: 유저 정보 업데이트 기능 변경

* fix: 토큰 만료를 status 401 에러로 프론트에게 전송

* fix: 토큰 만료, 인가되지 않은 사용자만 예외 처리

* fix: Jwt 필터에서 default로 모든 Exception 예외 처리

* chore: 변수에 주석 추가

* chore: apply spotless

* refactor: add updateMeetingTeamMessage (#61)

* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* fix: update findUserWithMeeting Query

* fix: update param in findUserWithMeetingTeam from single to triple

* fix: add religion in UserFindResponse

* style: kotlin lang style

* fix: delete test file

* fix: fix eror in query

* fix: delete exception in toMeetingTeamInformationGetResponse

* style: kotlin lang style

* fix: update error code

* feat: add updateMeetingTeamMessage

* style: kotlin lang style

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>

* feat: 시대생 토큰으로 회원가입 기능 구현 (#62)

* feat: 시대생으로부터 받아올 데이터

* feat: 시대생으로부터 유저 데이터 반환 기능 구현

* feat: Tos 삭제

* feat: 전화번호로 유저 중복 확인

* feat: 시대생 token으로 시대팅 로그인 기능 구현

* refactor: 토큰 발급 로직 위치 변경

* chore: apply spotless

* refactor: add field schema

* fix: change type

* style: kotlin lang style

* fix: update schema example

* style: kotlin lang style

* refactor: add schema in request (#63)

* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* refactor: updateUser and createMeetingTeam

* refactor: joinMeetingTeam and getMeetingTeamUserList

* refactor: updateMeetingTeamInformation

* refactor: updateMeetingTeamPreference

* refactor: getMeetingTeamInformation

* feat: getMeetingTeamInformationByKakaoId

* fix: solve conflict

* style: change kotlin lang style

* fix: delete trash file

* fix: delete nickname and change api endpoint

* fix: update code based pr review

* feat: how to update meetingTeamInformationUpdateReqeust?

* refactor: decide MeetingTeamInformationUpdateRequest

* style: kotlin lang style

* docs: write exception in swagger

* style: kotlin lang style

* feat: apply validation in verification, match, user

* fix: teamName can be  null

* refactor: add field schema

* fix: change type

* style: kotlin lang style

* fix: update schema example

* style: kotlin lang style

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>

* refactor: delete unused field

* refactor: delete readOnly = true

* refactor: change param name

* style: kotlin lang style

* fix: 환불 파라미터 email에서 phonNumber 변경 (#65)

* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* fix: change email to phoneNumber

* style: kotlin lang style

* fix: delete test

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>

* fix: add swagger url

* refactor: 유저 도메인 request 스키마 추가 (#64)

* refactor: UserUpdateRequest 스키마 추가

* feat: 이메일로 유저 유무 체크 endpoint 활성화

* chore: apply lint

* fix: 최소 주량 스키마 수정

* fix: 스키마 enum type 단수 변경

* fix: 스키마 enum type 복수 변경

* refactor: field name

* refactor: delete unused field (#66)

* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* refactor: updateUser and createMeetingTeam

* refactor: joinMeetingTeam and getMeetingTeamUserList

* refactor: updateMeetingTeamInformation

* refactor: updateMeetingTeamPreference

* refactor: getMeetingTeamInformation

* feat: getMeetingTeamInformationByKakaoId

* fix: solve conflict

* style: change kotlin lang style

* fix: delete trash file

* fix: delete nickname and change api endpoint

* fix: update code based pr review

* feat: how to update meetingTeamInformationUpdateReqeust?

* refactor: decide MeetingTeamInformationUpdateRequest

* style: kotlin lang style

* docs: write exception in swagger

* style: kotlin lang style

* feat: apply validation in verification, match, user

* fix: teamName can be  null

* refactor: add field schema

* fix: change type

* style: kotlin lang style

* fix: update schema example

* style: kotlin lang style

* refactor: delete unused field

* refactor: delete readOnly = true

* refactor: change param name

* style: kotlin lang style

* fix: add swagger url

* refactor: field name

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>

* feat: add yaml

* fix: change field type

* fix: add secret

* fix: solve conflict

* refactor: add phoneNumber and myName in MeetingTeamInformationGetResponse

* refactor: update MatchInformationResponse

* style: kotlin lang style

* fix: update paymentGateway from kakao to welcome

* fix: add allowMethod options

* fix: delete message in user

* fix: update prod ses service

* docs: update swagger schema

* fix: add cors url

* fix: add allowheader for cors error

* refactor: refactor swagger api

* fix: change user attribute name in payment

* fix: update db migration

* fix: change user field name and update flyway

* fix: change ddl-auto from create to validate

* fix: update content-type

* chore: update accessToken expire time

* refactor: update dto

* fix: solve json parsing error

* docs: add description

* docs: add schema

* docs: add nullable in swagger

* feat: add constraint

* fix: accept nullable phoneNumber

* fix: update nullable of phoneNumber

* style: kotlin lang style

* feat: update accessToken expireTime

* fix: fix content type error

* feat: add message exception exception

* fix: update drink nullable

* docs: add notnull field

* fix: 환불시 미팅팀 지우는 로직 추가

* fix: 미팅팀 삭제시 예외처리

* feat: 결제 여부 확인하는 api 작성

* fix: aws ses isLocal false

* refactor: 서비스 코드 리팩터링

* chore: ses isLocal false

* feat: 계정 서비스 생성에 따른 user 생성 api

* refactor: update function inline

* refactor: update function inline

* feat: 유저 생성 api whitelist 추가

* feat: ses isLocal false

* style: kotlin lang style

* feat: admin 프로필 조회 api로 변경

* fix: 계정서비스 url 변수로 변경

* feat: refreshtoken cookie set 추가

* feat: update price

* feat: 마이그레이션 삭제

* feat: 결제 검증 api 추가

* feat: check ExternalApiFailedException

* feat: 결제취소됐지만 DB에 SUCCESS인 경우 REFUND로 변경하는 기능 추가

* chore: apply lint

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>
Co-authored-by: SangMinLeeAI <96653505+SangMinLeeAI@users.noreply.github.com>
Co-authored-by: 유현승 <gustmd5715@gmail.com>
Co-authored-by: Hyeongjun Kang <86903678+marsboy02@users.noreply.github.com>
  • Loading branch information
5 people authored May 25, 2024
1 parent f72c849 commit 6cf1993
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class SecurityConfig(
web.ignoring()
.requestMatchers("/swagger-ui/**")
.requestMatchers("/meeting/actuator/health/**")
.requestMatchers("/api/payment/verify/error")
.requestMatchers("/api/payment/verify/error", "/api/payment/verify/error/cancel")
.requestMatchers("/api/user/isDuplicatedKakaoTalkId") // 카카오톡 중복 확인
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ package uoslife.servermeeting.global.error
import feign.Response
import feign.codec.ErrorDecoder
import java.lang.Exception
import org.slf4j.LoggerFactory
import uoslife.servermeeting.global.auth.exception.ExternalApiFailedException

class FeginClientErrorDecoder : ErrorDecoder {
companion object {
private val logger = LoggerFactory.getLogger(FeginClientErrorDecoder::class.java)
}
override fun decode(methodKey: String, response: Response): Exception {
logger.info("Error Description: " + response.reason())
return ExternalApiFailedException()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -388,4 +388,14 @@ class PaymentApi(@Qualifier("PortOneService") private val paymentService: Paymen
paymentService.verifyPaymentError()
return ResponseEntity.status(HttpStatus.NO_CONTENT).build()
}

@Operation(
summary = "결제취소 에러 검증",
description = "결제취소가 적용되지 않은 데이터 RFUND로 변경(결제취소 했음에도 불구하고 DB 상에서 SUCCESS로 남아있는 경우)"
)
@PostMapping("/verify/error/cancel")
fun verifyPaymentErrorRefundedButSuccess(): ResponseEntity<Unit> {
paymentService.verifyPaymentErrorRefundedButSuccess()
return ResponseEntity.status(HttpStatus.NO_CONTENT).build()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ interface PaymentService {
fun verifyPayment(userId: Long): PaymentResponseDto.PaymentRequestResponse
fun deleteUserPayment(user: User)
fun verifyPaymentError(): Unit
fun verifyPaymentErrorRefundedButSuccess(): Unit
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package uoslife.servermeeting.meetingteam.service.impl

import jakarta.transaction.Transactional
import java.util.*
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Qualifier
import org.springframework.beans.factory.annotation.Value
import org.springframework.data.repository.findByIdOrNull
Expand Down Expand Up @@ -39,6 +40,9 @@ class PortOneService(
@Value("\${portone.api.imp.key}") private val impKey: String,
@Value("\${portone.api.imp.secret}") private val impSecret: String,
) : PaymentService {
companion object {
private val logger = LoggerFactory.getLogger(PaymentService::class.java)
}
@Transactional
override fun requestPayment(
userId: Long,
Expand Down Expand Up @@ -196,15 +200,53 @@ class PortOneService(
val paymentList = paymentRepository.findByStatus(PaymentStatus.REQUEST)
val accessToken = portOneAPIService.getAccessToken(impKey, impSecret)
for (payment in paymentList) {
val result =
portOneAPIService.findPaymentByMID(
accessToken.response!!.access_token,
payment.marchantUid!!
)
try {
val result =
portOneAPIService.findPaymentByMID(
accessToken.response!!.access_token,
payment.marchantUid!!
)
if (result.response!!.failed_at == 0) {
payment.impUid = result.response!!.imp_uid
payment.status = PaymentStatus.SUCCESS // 결제 성공
}
} catch (e: ExternalApiFailedException) {
logger.info("MarchantUid-Name: " + payment.marchantUid + " " + payment.user!!.name)
}
}
}

if (result.response!!.failed_at == 0) {
payment.impUid = result.response!!.imp_uid
payment.status = PaymentStatus.SUCCESS // 결제 성공
/** 결제취소지만 DB에는 SUCCESS로 남아있는 데이터 REFUND로 변경 */
@Transactional
override fun verifyPaymentErrorRefundedButSuccess() {
val paymentList = paymentRepository.findByStatus(PaymentStatus.SUCCESS)
val accessToken = portOneAPIService.getAccessToken(impKey, impSecret)

for (payment in paymentList) {
try {
val result =
portOneAPIService.findPaymentByMID(
accessToken.response!!.access_token,
payment.marchantUid!!
)
if (result.response!!.cancelled_at != 0) { // DB에는 SUCCESS이지만 결제취소한 경우
logger.info(
"결제취소 MarchantUid-Name: " +
payment.marchantUid +
" " +
payment.user!!.name +
" " +
payment.status
)
payment.status = PaymentStatus.REFUND // 결제취소로 변경
}
} catch (e: ExternalApiFailedException) {
logger.info(
"[Exception] MarchantUid-Name: " +
payment.marchantUid +
" " +
payment.user!!.name
)
}
}
}
Expand Down

0 comments on commit 6cf1993

Please sign in to comment.