resolveConfirmFailure — @gj-kit/toss-payments
A public function from @gj-kit/toss-payments/server. The signature below is taken directly from the 0.6.1 release declaration.
Verified import example
Section titled “Verified import example”import { resolveConfirmFailure } from '@gj-kit/toss-payments/server';Signature, parameters, and return type
Section titled “Signature, parameters, and return type”/** * confirm 실패를 조회 기반으로 판정한다 (설계 §3.7 확정 로직): * - `source === 'network'`(transport) 또는 `ALREADY_PROCESSED_PAYMENT` → * `getPaymentByOrderId` 조회 → status가 DONE|WAITING_FOR_DEPOSIT이면 결제를 확인한다. * 단, 가상계좌 조회의 `secret:null`은 정상 응답이므로 * 'confirmed-without-deposit-secret'으로 명시한다. * - `NOT_FOUND_PAYMENT_SESSION`(10분 초과 — 라이브러리 시한 초과 에러 동일 취급) → * 조회 없이 'retry-payment'. * - 그 외 REJECT/AUTH 계열 → 조회 없이 'definitively-failed'. * * ⚠ 조회 자체가 Err면 진실 미확정이다 — **성공/실패 어느 쪽으로도 사용자에게 단정 안내하지 * 말 것**(재시도 또는 수동 확인으로 넘겨라). * * 미해결(Phase 6 실측 항목): ALREADY_PROCESSED_PAYMENT인데 조회 status가 CANCELED인 희귀 * 케이스(다른 경로로 이미 취소) — 현재는 'definitively-failed'로 분류된다. */declare function resolveConfirmFailure<E extends Env>(client: Pick<TossServerClient<E>, 'getPaymentByOrderId'>, orderId: OrderId, error: ConfirmError): Promise<Result<ConfirmResolution, LookupError$1>>;This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.
Release context
Section titled “Release context”- Package:
@gj-kit/toss-payments - Version:
0.6.1 - Public entry:
./server - Source: GitHub