Skip to content

[Fix] 포트원 결제 orderId 길이 제한 대응 - #239

Merged
whc9999 merged 2 commits into
devfrom
fix/portone-order-id-length
Jul 31, 2026
Merged

[Fix] 포트원 결제 orderId 길이 제한 대응#239
whc9999 merged 2 commits into
devfrom
fix/portone-order-id-length

Conversation

@whc9999

@whc9999 whc9999 commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

✨ 어떤 이유로 PR를 하셨나요?

  • feature 병합
  • 버그 수정(아래에 issue #를 남겨주세요)
  • 코드 개선
  • 코드 수정
  • 배포
  • 기타(아래에 자세한 내용 기입해주세요)

📋 세부 내용 - 왜 해당 PR이 필요한지 작업 내용을 자세하게 설명해주세요

  • 결제 준비 시 생성하는 orderId에서 UUID 하이픈을 제거해 40자 이하로 생성
  • Toss/PortOne 결제 준비가 동일한 orderId 생성 로직을 사용하도록 정리
  • 결제 준비 응답의 orderId 길이 제한 테스트 추가

📸 작업 화면 스크린샷

⚠️ PR하기 전에 확인해주세요

  • 로컬테스트를 진행하셨나요?
  • 머지할 브랜치를 확인하셨나요?
  • 관련 label을 선택하셨나요?

🚨 관련 이슈 번호 [#170 ]

Summary by CodeRabbit

  • 개선 사항

    • Toss Pay 및 PortOne 결제 준비 시 주문 ID 형식이 일관되게 적용됩니다.
    • 주문 ID는 jobdri- 접두사로 시작하며, UUID 하이픈이 제거되어 최대 40자 이내로 생성됩니다.
    • 이를 통해 결제 서비스별 주문 식별 방식이 통일되고, 주문 ID 길이 제한을 안정적으로 준수합니다.
  • 테스트

    • Toss Pay 및 PortOne 주문 ID의 접두사와 최대 길이 조건을 검증하는 테스트를 추가했습니다.

- 결제 준비 시 생성하는 orderId에서 UUID 하이픈을 제거해 40자 이하로 생성
- Toss/PortOne 결제 준비가 동일한 orderId 생성 로직을 사용하도록 정리
- 결제 준비 응답의 orderId 길이 제한 테스트 추가
@whc9999 whc9999 self-assigned this Jul 31, 2026
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@whc9999, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 56 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3ed6f2d7-01c0-40c7-bb80-7547e44d8fd9

📥 Commits

Reviewing files that changed from the base of the PR and between d179fa5 and ba1bd1c.

📒 Files selected for processing (1)
  • src/test/java/com/jobdri/jobdri_api/domain/payment/service/PaymentServiceTest.java
📝 Walkthrough

Walkthrough

결제 준비 시 Toss Pay와 PortOne이 jobdri- 접두사와 하이픈을 제거한 UUID를 결합한 주문 ID를 사용합니다. 테스트는 주문 ID의 접두사와 최대 길이를 검증합니다.

Changes

결제 주문 ID 표준화

Layer / File(s) Summary
공통 주문 ID 생성 및 결제 연동
src/main/java/com/jobdri/jobdri_api/domain/payment/service/PaymentService.java
jobdri- 접두사 상수와 공통 generateOrderId() 메서드를 추가했습니다. Toss Pay와 PortOne 결제 준비가 이 메서드를 사용합니다.
주문 ID 형식 검증
src/test/java/com/jobdri/jobdri_api/domain/payment/service/PaymentServiceTest.java
Toss Pay와 PortOne 응답의 주문 ID가 jobdri-로 시작하고 40자 이하인지 검증합니다.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 PortOne의 orderId 길이 제한 대응이라는 핵심 변경을 명확하고 간결하게 설명합니다.
Description check ✅ Passed 필수 섹션과 변경 내용, 테스트 여부, 관련 이슈 번호를 작성했습니다. 스크린샷은 비어 있지만 비핵심 항목입니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/portone-order-id-length

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/test/java/com/jobdri/jobdri_api/domain/payment/service/PaymentServiceTest.java`:
- Line 108: Update the assertions in both payment flows, including the PortOne
verification around response.orderId(), to validate the complete order ID
format: the jobdri- prefix followed by exactly 32 lowercase hexadecimal
characters with no hyphens. Replace the current length-only checks while
preserving the existing response validation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 81a304cb-9c35-4a99-bcf3-7fbe44592e79

📥 Commits

Reviewing files that changed from the base of the PR and between 7fc57b0 and d179fa5.

📒 Files selected for processing (2)
  • src/main/java/com/jobdri/jobdri_api/domain/payment/service/PaymentService.java
  • src/test/java/com/jobdri/jobdri_api/domain/payment/service/PaymentServiceTest.java

- 결제 준비 응답의 orderId 테스트를 길이 검증에서 전체 포맷 검증으로 변경
- jobdri- prefix와 32자리 소문자 hex 문자열 형식을 Toss/PortOne 결제 흐름에 동일하게 적용
@whc9999
whc9999 merged commit dab6c12 into dev Jul 31, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant