@commercelayer/react-components
Version:
The Official Commerce Layer React Components
25 lines (24 loc) • 976 B
TypeScript
import type { ChildrenFunction } from "../../typings/index";
import type { StripeElementLocale } from "@stripe/stripe-js";
import { type JSX } from "react";
import type { PaymentSourceProps } from "./PaymentSource";
export interface ExternalPaymentConfig {
/**
* Show the component. Default is false
*/
show?: boolean;
/**
* Use to display information about the external payment or whatever else.
*/
customComponent?: ChildrenFunction<Omit<Props, "customComponent">>;
/**
* The payment source token, as generated by the external gateway SDK. Credit Card numbers are rejected.
*/
payment_source_token: string;
}
interface Props extends Omit<ExternalPaymentConfig, "payment_source_token">, Pick<PaymentSourceProps, "templateCustomerSaveToWallet"> {
paymentSourceToken: string;
locale?: StripeElementLocale;
}
export declare function ExternalPayment(props: Props): JSX.Element | null;
export default ExternalPayment;