Skip to content

Api#confirm posts to /v2/submit (404) instead of /v2/confirm — server approval broken on v2 #1

Description

@wonjaeh

요약

Bootpay::Api#confirm(receipt_id)(승인형 서버승인)이 v2 인증(client_key/secret_key)에서
POST /v2/submit을 호출하는데 그 경로가 없어 실패합니다. 올바른 엔드포인트는 POST /v2/confirm입니다.

환경

  • gem bootpay 1.2.0 (rubygems 최신, backend-ruby main)
  • 인증: Bootpay::Api.new(client_key: ..., secret_key: ...) (v2 Basic Auth)
  • Ruby 3.3, 승인형 결제(separately_confirmed: true)

기대

문서(developers.bootpay.ai 서버승인)상 Ruby 서버승인 메서드는 bootpay.confirm(receipt_id).
승인대기(status 2) 영수증을 이 메서드로 승인(capture)해야 함.

실제

confirmrequest(uri: "submit")POST /v2/submit 호출 → 유효한 승인대기 영수증에서도 실패.

lib/bootpay/verification.rb (main, v1.2.0):

def confirm(receipt_id)
  request(uri: "submit", payload: { receipt_id: receipt_id }.compact)  # ← v2는 "confirm"이어야
end

근거 (동일 인증, 존재하지 않는 receipt_id로 엔드포인트 비교)

GET  /v2/receipt/{id}  → HTTP 404  {"error_code":"RC_NOT_FOUND","message":"영수증 정보를 찾지 못했습니다."}
POST /v2/confirm       → HTTP 400  {"error_code":"RC_NOT_FOUND","message":"영수증 정보를 찾지 못했습니다."}
POST /v2/submit        → HTTP 404  {"status":404,"error":"Not Found"}

receipt·confirm은 Bootpay 앱레벨 응답(error_code: RC_NOT_FOUND)을 주므로 엔드포인트가 실제로 요청을 처리함.
submit만 error_code 없는 generic 404 → 라우트 자체가 없음. 실제 유효 영수증도 /v2/confirm으로만 capture됨.

제안 수정

confirmuri: "submit"uri: "confirm". 레거시 v1 호환 필요 시 인증방식/mode로 분기.

임시 우회

api.send(:request, uri: "confirm", payload: { receipt_id: receipt_id })  # private 접근이라 버전 핀 필요

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions