UNPKG

@questlabs/react-native-sdk

Version:
64 lines (59 loc) 1.94 kB
import { PaymentIntent, PaymentMethod } from "@stripe/stripe-react-native"; import { TextStyle, ViewStyle } from "react-native"; import { TCard } from "../Payment/Payment.types"; export type PaymentMethod = PaymentMethod.Result; export type PaymentIntent = PaymentIntent.Result; export type TPlan = { id: number | string; plan: string; price: number; description: string; offer: string[]; recurringTimePeriod: string; }; export interface ICreatePaymentIntentProps { card: TCard; paymentMethod: PaymentMethod.Result; } export type Props = { stripePublishableKey: string; createPaymentIntent({ card, paymentMethod, }: ICreatePaymentIntentProps): Promise<{ clientSecret: string; intentId: string; }>; onPaymentSuccess?: (paymentIntent: PaymentIntent.Result) => void; onPlanSelect?: (plan: TPlan | undefined) => void; headerTitle?: string; detaileText?: string; data: TPlan[]; mainViewStyle?: ViewStyle; headerViewStyle?: ViewStyle; headerTextStyle?: TextStyle; headerDetaileViewStyle?: ViewStyle; headerDetaileTextStyle?: TextStyle; planOutterViewStyle?: ViewStyle; boxOutterViewStyle?: ViewStyle; boxViewStyle?: ViewStyle; boxPlanTextViewStyle?: ViewStyle; boxPlanTextStyle?: TextStyle; boxAmountViewStyle?: ViewStyle; boxAmountTextStyle?: TextStyle; openBoxViewStyle?: ViewStyle; boxInnerHeaderViewStyle?: ViewStyle; boxInnerHeaderTextViewStyle?: ViewStyle; boxInnerHeaderTextStyle?: TextStyle; boxInnerIconViewStyle?: ViewStyle; boxInnerDetailsTextViewStyle?: ViewStyle; boxInnerDetailsTextStyle?: TextStyle; boxInnerAmountViewStyle?: ViewStyle; boxInnerAmountTextStyle?: TextStyle; offerViewStyle?: ViewStyle; offerTextViewStyle?: ViewStyle; offerTextStyle?: TextStyle; buttonOutterViewStyle?: ViewStyle; buttonViewStyle?: ViewStyle; buttonTextStyle?: TextStyle; };