@spot-flow/checkout-inline-js
Version:
This project is an inline library that enables users to make payments seamlessly. It integrates smoothly into your application, providing a streamlined checkout experience.
98 lines (95 loc) • 2.94 kB
TypeScript
import { default as Card } from '../../modules/Card';
import { default as Transfer } from '../../modules/Transfer';
import { default as Ussd } from '../../modules/Ussd';
import { GetMerchantDetailsTax } from '../../types/types';
import { MainHeader } from './main-header';
import { MainFooter } from './main-footer';
import { default as MobileMoney } from '../../modules/MobileMoney';
import { default as Eft } from '../../modules/EFT';
import { TestCard } from './test-card';
type Props = {
container: HTMLDivElement;
modalContainer: HTMLDivElement;
merchantKey: string;
encryption: string;
email: string;
amount?: number;
planId?: string;
rdtCode?: string;
url?: string;
phoneNumber: string;
code: string;
reference: string;
callBackUrl: string;
metadata: Record<string, unknown>;
localCurrency: string;
countryCode?: string;
closePayment: () => void;
};
export declare class MainPageScreen {
validChannels: Array<string>;
disabledChannels: Array<string>;
selectedChannel: string;
modalContainer: HTMLDivElement;
currentPaymentMethod: string;
mainLayout: HTMLDivElement;
mainHeader: MainHeader;
mainFooter: MainFooter;
testCard: TestCard;
private merchantPlanDetail;
mainScreen: MainPageScreen;
currency: string;
card: Card;
transfer: Transfer;
ussd: Ussd;
mobileMoney: MobileMoney;
eft: Eft;
encryption: string;
merchantKey: string;
planId: string;
email: string;
phoneNumber: string;
code: string;
amount: number;
rdtCode?: string;
url?: string;
reference: string;
isMobile: boolean;
callBackUrl: string;
metadata: Record<string, unknown>;
localCurrency: string;
closePayment: () => void;
retryingPayment: boolean;
totalAmount: number;
countryCode?: string;
constructor({ container, email, phoneNumber, code, encryption, merchantKey, modalContainer, amount, planId, rdtCode, url, reference, callBackUrl, metadata, localCurrency, closePayment, countryCode, }: Props);
mountScreen(values: GetMerchantDetailsTax, currency: string, validChannels: Array<string>, disabledChannels: Array<string>): void;
private setupPaymentMethodButtons;
attachListeners(): void;
closeBTN(notClosePayment: boolean): void;
private updatePaymentMethodView;
private renderPaymentMethodContent;
private setCurrentPaymentMethod;
setToDefaultEmptyContainer(): void;
defaultToEmptyContainer(): void;
switchTab(tabName: string): void;
disablePaymentMethods(name: string): void;
enablePaymentMethods(): void;
hidePaymentMethods(): void;
showPaymentMethods(): void;
private cleanup;
closeModal(func?: Function): void;
setupParent(func?: Function): void;
render(): string;
}
export {};
/**
*
*
.content {
@apply hidden;
}
.content.active {
@apply block;
}
*/