@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.
85 lines (83 loc) • 2.73 kB
TypeScript
import { GetMerchantDetailsTax } from '../types/types';
import { PageLoader } from '../views/shared/page-loader';
import { CustomerDetails } from '../types';
type Props = {
container: HTMLElement;
closeModal: () => void;
customer: CustomerDetails;
onSuccess?: (_val?: any) => void;
amount: number;
totalAmount: number;
rdtCode?: string;
metadata: Record<string, unknown>;
url?: string;
reference: string;
callBackUrl: string;
merchantKey: string;
localCurrency: string;
name?: string;
code: string;
currency: string;
token: string;
disablePaymentMethods: (name: string) => void;
onClose: (notClosePayment: boolean) => void;
hidePaymentMethods: () => void;
showPaymentMethods: () => void;
restartTransactionProcess: () => void;
retryingPayment: boolean;
countryCode?: string;
};
declare class MobileMoney {
private contents;
private mobileMoneyForm;
private mobileMoneyValidationForm;
private onSuccess;
private mobileMoneyConfirmation;
private mobileMoneyConfirmationEnd;
private transactionIssuesScreen;
private container;
private pageLoader;
mainLoader: PageLoader;
private _currentStep;
private successScreen;
private customer;
private activeRef;
private warningScreen;
private amount;
private totalAmount;
private url?;
private reference;
private metadata;
private currency;
private localCurrency;
private token;
private callBackUrl;
private rdtCode?;
merchantDetails: GetMerchantDetailsTax;
private onClose;
private hidePaymentMethods;
private showPaymentMethods;
disablePaymentMethods: (name: string) => void;
private paymentResponse;
private paymentResponseHeaders;
private restartTransactionProcess;
private retryingPayment;
isMaxRetriesReached: boolean;
isMobile: boolean;
countryCode?: string;
constructor({ container, merchantKey, localCurrency, metadata, callBackUrl, rdtCode, reference, onSuccess, url, customer, amount, totalAmount, token, currency, disablePaymentMethods, hidePaymentMethods, showPaymentMethods, onClose, restartTransactionProcess, retryingPayment, countryCode, }: Props);
get currentStep(): number;
set currentStep(step: number);
attachInputListeners(): void;
createMobileMoney(e: Event, values: {
code: string;
phoneNumber: string;
otp?: string;
}): Promise<void>;
showLoader(): void;
submitOtp(e: Event, values: string): void;
verifyPaymentProcess(): Promise<void>;
goBackToMerchant(): void;
renderMobileMoneyContent(values?: GetMerchantDetailsTax): void;
}
export default MobileMoney;