UNPKG

react-native-tosspayments-v2

Version:
46 lines 1.81 kB
/// <reference types="react" /> import { type WebViewProps } from 'react-native-webview'; import { type StyleProp, type ViewStyle } from 'react-native'; /** * https://docs.tosspayments.com/sdk/v2/js#widgetsrequestpayment */ type TossPaymentsV2WidgetProps = { style?: StyleProp<ViewStyle>; webViewProps?: Omit<WebViewProps, 'source' | 'onShouldStartLoadWithRequest' | 'onMessage'>; clientKey: string; customerKey: 'ANONYMOUS' | (string & {}); paymentMethodsVariantKey?: string; agreementVariantKey?: string; paymentRequest: TossPaymentsV2WidgetPaymentRequest; onPaymentSuccess: (response: TossPaymentsV2WidgetPaymentSuccessResponse) => void; onPaymentFail: (response: TossPaymentsV2WidgetPaymentFailResponse) => void; onPaymentError?: (e: any) => void; }; type TossPaymentsV2WidgetRef = {}; type TossPaymentsV2WidgetPaymentSuccessResponse = { paymentType: string; orderId: string; paymentKey: string; amount: number; }; type TossPaymentsV2WidgetPaymentFailResponse = { code: string; message: string; orderId: string; }; type TossPaymentsV2WidgetPaymentRequest = { amount: number; orderId: string; orderName: string; customerEmail?: string; customerName?: string; customerMobilePhone?: string; taxFreeAmount?: number; card?: { taxExemptionAmount?: number; }; }; declare const TossPaymentsV2Widget: import("react").ForwardRefExoticComponent<TossPaymentsV2WidgetProps & import("react").RefAttributes<TossPaymentsV2WidgetRef>>; export { TossPaymentsV2Widget }; export type { TossPaymentsV2WidgetProps, TossPaymentsV2WidgetRef, TossPaymentsV2WidgetPaymentSuccessResponse, TossPaymentsV2WidgetPaymentFailResponse, TossPaymentsV2WidgetPaymentRequest, }; //# sourceMappingURL=TossPaymentsV2Widget.d.ts.map