feat(ecommerce,pay): 확장 결제수단(간편결제) 1급화
PG 플러그인이 등록하는 간편결제(네이버페이 등)를 코어가 정식 결제수단으로 인식하도록 결제수단 카탈로그를 SSoT 로 전환했다. 확장 결제수단이 pg_provider=null 로 등록돼 서버가 "PG 결제가 아닌 주문"으로 오인, 결제 실패 주문에 관리자 신규주문 알림이 발송되고 TempOrder 가 즉시 삭제돼 재결제가 막히던 두 결함을 하나의 원인(능력 해석을 enum 이 답하지 못함)으로 근본 해결. - PaymentMethodResolver 신규: 능력(PG 필요/라벨/환불수단/PG 고정) 해석을 카탈로그 SSoT 로 통일, enum case 없는 확장 ID 도 동일 판정 - 프론트 결제수단 위장(card) 제거, provider-agnostic 결제 진입(pg_payment_handler) - 관리자 주문설정 결제수단 목록 PG 고정 3분기 UI (pg_locked/needs_pg) - 저장된 pg_provider=null 자가치유(read-time merge) + 백필 업그레이드 스텝 - 사용자 주문완료 화면 즉시 결제완료 헤더를 입금대기 여집합으로 판정(basic 1.0.3) - 전 계층 회귀 테스트: 훅 발화 스파이(관리자 알림 미발화/PG 환불 훅 진입), 주문 응답 계약(requires_pg_payment/pg_payment_handler)+TempOrder 보존, 관리자 3분기 렌더, 확장 E2E 인프라
This commit is contained in:
1 parent
10fe28a16d
commit
e896a47d4f
107 files changed
+4002
-1778
No files matched your search
@@ -237,15 +237,11 @@ class OrderProcessingService
|
||||
*/
|
||||
protected function orderRequiresPgPayment(Order $order): bool
|
||||
{
|
||||
$methodValue = $order->payment?->payment_method;
|
||||
$methodValue = $methodValue instanceof \BackedEnum ? $methodValue->value : $methodValue;
|
||||
$paymentMethod = PaymentMethodEnum::tryFrom((string) $methodValue);
|
||||
|
||||
if ($paymentMethod === null || ! $paymentMethod->needsPgProvider()) {
|
||||
if (! $order->payment || ! $order->payment->needsPgProvider()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$pgProvider = $this->determinePgProvider($paymentMethod->value);
|
||||
$pgProvider = $this->determinePgProvider($order->payment->paymentMethodId());
|
||||
|
||||
return ! in_array($pgProvider, ['manual', 'internal', 'none'], true)
|
||||
&& (float) $order->total_due_amount > 0;
|
||||
@@ -1495,7 +1491,7 @@ class OrderProcessingService
|
||||
}
|
||||
|
||||
// 재고 차감 + 장바구니 처리 (payment_complete 타이밍: 트랜잭션 내부에서 실행)
|
||||
$paymentMethodId = $order->payment->payment_method->value;
|
||||
$paymentMethodId = $order->payment->paymentMethodId();
|
||||
$timing = $this->settingsService->getStockDeductionTiming($paymentMethodId);
|
||||
if ($timing === 'payment_complete') {
|
||||
$this->stockService->deductStock($order->load('options'));
|
||||
|
||||
Reference in new issue
Block a user