파라미터 오류 수정
This commit is contained in:
@@ -16,12 +16,10 @@ export enum NotifyRowKeys {
|
||||
MobilePayment = 'MobilePayment',
|
||||
EscrowPayment = 'EscrowPayment',
|
||||
};
|
||||
export interface PaymentCommonParams {
|
||||
|
||||
export interface PaymentNotificationDataParams {
|
||||
mid: string;
|
||||
};
|
||||
export interface PaymentNotificationDataParams extends PaymentCommonParams {
|
||||
gid: string;
|
||||
};
|
||||
export interface PaymentNotificationDataResponse {
|
||||
merchantInfo: MerchantInfo;
|
||||
creditCard: CreditCard;
|
||||
@@ -46,7 +44,7 @@ export interface PaymentNotificationDataCommonType {
|
||||
encryptionStatus: string;
|
||||
expandable: boolean;
|
||||
detail: Record<string, any>;
|
||||
}
|
||||
};
|
||||
|
||||
export interface CreditCard extends PaymentNotificationDataCommonType {};
|
||||
export interface AccountTransfer extends PaymentNotificationDataCommonType {};
|
||||
@@ -54,7 +52,8 @@ export interface VirtualAccount extends PaymentNotificationDataCommonType {};
|
||||
export interface MobilePayment extends PaymentNotificationDataCommonType {};
|
||||
export interface EscrowPayment extends PaymentNotificationDataCommonType {};
|
||||
|
||||
export interface PaymentNonCardParams extends PaymentCommonParams {
|
||||
export interface PaymentNonCardParams {
|
||||
mid: string;
|
||||
paymentMethod: string;
|
||||
};
|
||||
export interface PaymentNonCardResponse {
|
||||
@@ -96,7 +95,8 @@ export interface CategoryFees {
|
||||
export interface OtherPaymentData {
|
||||
feeRate: number;
|
||||
};
|
||||
export interface PaymentInstallmentParams extends PaymentCommonParams {
|
||||
export interface PaymentInstallmentParams {
|
||||
mid: string;
|
||||
paymentMethod: string;
|
||||
};
|
||||
export interface PaymentInstallmentResponse {
|
||||
@@ -113,7 +113,8 @@ export interface InstallmentDetails {
|
||||
applicationPeriod: string;
|
||||
applicationAmount: number;
|
||||
};
|
||||
export interface PaymentInstallmentDetailParams extends PaymentCommonParams {
|
||||
export interface PaymentInstallmentDetailParams {
|
||||
mid: string;
|
||||
cardCompany: string;
|
||||
};
|
||||
export interface PaymentInstallmentDetailResponse {
|
||||
@@ -121,7 +122,8 @@ export interface PaymentInstallmentDetailResponse {
|
||||
cardCompanyOptions: Array<string>;
|
||||
installmentDetails: Array<InstallmentDetails>;
|
||||
};
|
||||
export interface PaymentCardParams extends PaymentCommonParams{
|
||||
export interface PaymentCardParams {
|
||||
mid: string;
|
||||
paymentMethod: string;
|
||||
};
|
||||
export interface PaymentCardResponse {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ChangeEvent, useEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { NotifyRowKeys } from '../model/types';
|
||||
import { NotifyRowKeys, PaymentNotificationDataParams, PaymentNotificationDataResponse } from '../model/types';
|
||||
import { usePaymentNotificationDataMutation } from '../api/use-payment-notification-data-mutation';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
import { NotifyRow } from './section/notify-row';
|
||||
@@ -26,13 +26,11 @@ export const NotificationDataWrap = () => {
|
||||
const { mutateAsync: paymentNotificationData } = usePaymentNotificationDataMutation();
|
||||
|
||||
const callPaymentNotificationData = () => {
|
||||
let params = {
|
||||
mid: mid,
|
||||
gid: mid
|
||||
let params: PaymentNotificationDataParams = {
|
||||
mid: mid
|
||||
};
|
||||
|
||||
paymentNotificationData(params).then((rs) => {
|
||||
console.log(rs);
|
||||
paymentNotificationData(params).then((rs: PaymentNotificationDataResponse) => {
|
||||
setMerchantInfo(rs?.merchantInfo);
|
||||
setCreditCard(rs?.creditCard.detail);
|
||||
setAccountTransfer(rs?.accountTransfer.detail);
|
||||
|
||||
Reference in New Issue
Block a user