[251103] fix: PinCodeInput,ConfirmPanel Mock Mode

🕐 커밋 시간: 2025. 11. 03. 10:10:17

📊 변경 통계:
  • 총 파일: 2개
  • 추가: +62줄

📁 추가된 파일:
  + code/

📝 수정된 파일:
  ~ com.twin.app.shoptime/src/views/CheckOutPanel/components/PinCodeInput.jsx

🔧 주요 변경 내용:
  • UI 컴포넌트 아키텍처 개선
  • 소규모 기능 개선
This commit is contained in:
2025-11-03 10:10:17 +09:00
parent a39c999e81
commit 1bbe60a801

View File

@@ -194,6 +194,68 @@ export default function PinCodeInput({
}
setOkClicked(true);
// Mock Mode: 핀코드 검증 및 주문 생성 API 우회
if (BUYNOW_CONFIG.isMockMode()) {
console.log('%c[PinCodeInput] 🚨 Mock Mode - Bypassing PIN code verification and order creation APIs', 'background: green; color: white; font-weight: bold; padding: 5px;');
// Mock 로그 전송
dispatch(sendLogTotalRecommend({ ...params, status: "true" }));
// Mock 주문 데이터 생성
const mockOrderInfo = {
retCode: 0,
data: {
retCode: 0,
data: {
ordNo: `MOCK_ORDER_${Date.now()}`,
expsOrdNo: `MOCK_EXPS_${Date.now()}`,
bilCityNm: "Mock City",
bilCtpt: "Mock Phone",
bilDtlAddr: "Mock Detail Address",
bilEmalAddr: "mock@example.com",
bilOdrFnm: "Mock",
bilOdrLnm: "User",
bilStatNm: "Mock State",
bilZpcd: "12345",
cardKnd: "MOCK_CARD",
dlvrCityNm: "Mock City",
dlvrCtpt: "Mock Phone",
dlvrDate: new Date().toISOString().split('T')[0],
dlvrDtlAddr: "Mock Detail Address",
dlvrEmalAddr: "mock@example.com",
dlvrOdrFnm: "Mock",
dlvrOdrLnm: "User",
dlvrZpcd: "12345",
realTotAmt: productList?.finalPrice || 99999,
totDlvrAmt: 0,
}
}
};
// Mock 주문 성공 처리
setIsOrderSuccessful(true);
setPlaceOrderPopup(false);
// 바로 ConfirmPanel로 이동
dispatch(
pushPanel({
name: Config.panel_names.CONFIRM_PANEL,
panelInfo: {
orderInfo: mockOrderInfo.data.data,
auctProdYn: auctProdYn || 'N',
auctFinalPriceChgDt: auctFinalPriceChgDt || null,
currSign: productList?.currSign || '$',
currSignLoc: productList?.currSignLoc || 'left',
logInfo: logInfo || {},
},
})
);
console.log('%c[PinCodeInput] ✅ Mock Mode - Order completed successfully, navigating to ConfirmPanel', 'background: green; color: white; font-weight: bold; padding: 5px;');
return;
}
// API Mode: 기존 로직 그대로 실행
const pinString = pin.join("");
const encryptedPin = sha256(pinString);