ARS 결제 신청 페이지 다국어 지원 추가

- 결제 신청 폼의 모든 레이블 현지화
- 페이지 제목 및 버튼 다국어 적용
- 에러 메시지 번역 처리
- 한글/영문 번역 키 추가

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Jay Sheen
2025-11-03 15:48:27 +09:00
parent e1c477f7a7
commit 7b5f93d737
3 changed files with 42 additions and 17 deletions

View File

@@ -875,7 +875,18 @@
"paymentSuccess": "Payment Success",
"expired": "Expired",
"canceled": "Canceled",
"paymentRequest": "Payment Request"
"paymentRequest": "Payment Request",
"merchant": "Merchant",
"orderNumber": "Order Number",
"productName": "Product Name",
"amount": "Amount",
"installmentPeriod": "Installment Period",
"lumpSum": "Lump Sum",
"buyerName": "Buyer Name",
"phoneNumber": "Phone Number",
"email": "Email",
"paymentMethod": "Payment Method",
"requestFailed": "Request failed."
},
"sms": {
"title": "SMS Payment Notification",

View File

@@ -875,7 +875,18 @@
"paymentSuccess": "결제성공",
"expired": "기간만료",
"canceled": "취소완료",
"paymentRequest": "결제 신청"
"paymentRequest": "결제 신청",
"merchant": "가맹점",
"orderNumber": "주문번호",
"productName": "상품명",
"amount": "금액",
"installmentPeriod": "할부기간",
"lumpSum": "일시불",
"buyerName": "구매자명",
"phoneNumber": "휴대폰 번호",
"email": "이메일",
"paymentMethod": "결제 방식",
"requestFailed": "신청을 실패하였습니다."
},
"sms": {
"title": "SMS 결제 통보",

View File

@@ -1,4 +1,5 @@
import { ChangeEvent, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { PATHS } from '@/shared/constants/paths';
import { useLocation } from 'react-router';
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
@@ -18,6 +19,7 @@ import { snackBar } from '@/shared/lib';
import { NumericFormat, PatternFormat } from 'react-number-format';
export const ArsRequestPage = () => {
const { t } = useTranslation();
const { navigate } = useNavigate();
const location = useLocation();
@@ -39,7 +41,7 @@ export const ArsRequestPage = () => {
const [successPageOn, setSuccessPageOn] = useState<boolean>(false);
const [resultMessage, setResultMessage] = useState<string>('');
useSetHeaderTitle('결제 신청');
useSetHeaderTitle(t('additionalService.ars.paymentRequest'));
useSetHeaderType(HeaderType.LeftArrow);
useSetFooterMode(false);
useSetOnBack(() => {
@@ -63,12 +65,13 @@ export const ArsRequestPage = () => {
if (rs.status) {
setSuccessPageOn(true);
} else {
const errorMessage = rs.error?.message || '신청을 실패하였습니다.';
snackBar(`[실패] ${errorMessage}`);
const errorMessage = rs.error?.message || t('additionalService.ars.requestFailed');
snackBar(`[${t('common.failed')}] ${errorMessage}`);
}
})
.catch((error) => {
snackBar(`[실패] ${error?.response?.data?.message || error?.response?.data?.error?.message}` || '[실패] 신청을 실패하였습니다.')
const errorMsg = error?.response?.data?.message || error?.response?.data?.error?.message || t('additionalService.ars.requestFailed');
snackBar(`[${t('common.failed')}] ${errorMsg}`);
})
};
@@ -127,7 +130,7 @@ export const ArsRequestPage = () => {
<div className="option-list">
<div className="billing-form gap-16">
<div className="billing-row">
<div className="billing-label"> <span>*</span></div>
<div className="billing-label">{t('additionalService.ars.merchant')} <span>*</span></div>
<div className="billing-field">
<select
value={mid}
@@ -146,7 +149,7 @@ export const ArsRequestPage = () => {
</div>
<div className="billing-row">
<div className="billing-label"> <span>*</span></div>
<div className="billing-label">{t('additionalService.ars.orderNumber')} <span>*</span></div>
<div className="billing-field">
<input
type="text"
@@ -157,7 +160,7 @@ export const ArsRequestPage = () => {
</div>
<div className="billing-row">
<div className="billing-label"> <span>*</span></div>
<div className="billing-label">{t('additionalService.ars.productName')} <span>*</span></div>
<div className="billing-field">
<input
type="text"
@@ -168,7 +171,7 @@ export const ArsRequestPage = () => {
</div>
<div className="billing-row">
<div className="billing-label"> <span>*</span></div>
<div className="billing-label">{t('additionalService.ars.amount')} <span>*</span></div>
<div className="billing-field">
<NumericFormat
value={amount}
@@ -184,20 +187,20 @@ export const ArsRequestPage = () => {
</div>
<div className="billing-row">
<div className="billing-label"> <span>*</span></div>
<div className="billing-label">{t('additionalService.ars.installmentPeriod')} <span>*</span></div>
<div className="billing-field">
<select
disabled
value={instmntMonth}
onChange={(e: ChangeEvent<HTMLSelectElement>) => setInstmntMonth(e.target.value)}
>
<option value="00"></option>
<option value="00">{t('additionalService.ars.lumpSum')}</option>
</select>
</div>
</div>
<div className="billing-row">
<div className="billing-label"> <span>*</span></div>
<div className="billing-label">{t('additionalService.ars.buyerName')} <span>*</span></div>
<div className="billing-field">
<input
type="text"
@@ -208,7 +211,7 @@ export const ArsRequestPage = () => {
</div>
<div className="billing-row">
<div className="billing-label"> <span>*</span></div>
<div className="billing-label">{t('additionalService.ars.phoneNumber')} <span>*</span></div>
<div className="billing-field">
<input
type="tel"
@@ -227,7 +230,7 @@ export const ArsRequestPage = () => {
</div>
<div className="billing-row">
<div className="billing-label"></div>
<div className="billing-label">{t('additionalService.ars.email')}</div>
<div className="billing-field">
<input
type="text"
@@ -241,7 +244,7 @@ export const ArsRequestPage = () => {
</div>
<div className="billing-row">
<div className="billing-label"> <span>*</span></div>
<div className="billing-label">{t('additionalService.ars.paymentMethod')} <span>*</span></div>
<div className="billing-field">
{getArsPaymentMethodBtns()}
</div>
@@ -253,7 +256,7 @@ export const ArsRequestPage = () => {
className="btn-50 btn-blue flex-1"
onClick={() => onClickToRequest()}
disabled={!isFormValid()}
> </button>
>{t('additionalService.ars.paymentRequest')}</button>
</div>
</div>
</div>