This commit is contained in:
focp212@naver.com
2025-11-05 17:29:07 +09:00
parent f1f38551fa
commit 3982b3c745
15 changed files with 79 additions and 235 deletions

View File

@@ -16,6 +16,7 @@ import { showAlert } from '@/widgets/show-alert';
import moment from 'moment';
import NiceCalendar from '@/shared/ui/calendar/nice-calendar';
import { notiBar, snackBar } from '@/shared/lib';
import { BillingChargeParams, BillingChargeResponse } from '@/entities/transaction/model/types';
export const BillingChargePage = () => {
const { navigate } = useNavigate();
@@ -70,7 +71,7 @@ export const BillingChargePage = () => {
showAlert('구매자명은 필수 입력 항목입니다.');
}
let params = {
let params: BillingChargeParams = {
billKey: billKey,
productName: productName,
productAmount: productAmount,
@@ -79,13 +80,12 @@ export const BillingChargePage = () => {
paymentRequestDate: moment(paymentRequestDate).format('YYYYMMDD'),
installmentMonth: installmentMonth
};
billingCharge(params).then((rs) => {
billingCharge(params).then((rs: BillingChargeResponse) => {
snackBar('결제 신청을 성공하였습니다.', function(){
navigate(PATHS.transaction.billing.list);
}, 3000);
}).catch((e: any) => {
console.log(e)
if(e.response?.data?.error?.message){
showAlert(e.response?.data?.error?.message);
return;

View File

@@ -141,6 +141,11 @@ export const BillingListPage = () => {
&& rs.nextCursor !== pageParam.cursor
&& rs.content.length === DEFAULT_PAGE_PARAM.size
);
}).catch((e: any) => {
if(e.response?.data?.error?.message){
showAlert(e.response?.data?.error?.message);
return;
}
});
}