react-native-cashfree-pg-sdk
Version:
Cashfree PG Plugin for React Native
43 lines (42 loc) • 1.4 kB
TypeScript
import { type CheckoutPayment, type CFSession } from 'cashfree-pg-api-contract';
declare class CFPaymentGateway {
private emitter;
private successSubscription;
private failureSubscription;
private eventSubscription;
private upiAppsSubscription;
constructor();
doPayment(checkoutPayment: CheckoutPayment): void;
doUPIPayment(checkoutPayment: CheckoutPayment): void;
doWebPayment(cfSession: CFSession): void;
/**
* @deprecated : Instead call makePayment
*/
doCardPayment(cardPayment: CheckoutPayment): void;
getInstalledUpiApps(): Promise<unknown>;
makePayment(cfPayment: CheckoutPayment): void;
setEventSubscriber(cfEventCallback: CFEventCallback): void;
removeEventSubscriber(): void;
setCallback(cfCallback: CFCallback): void;
removeCallback(): void;
}
export interface CFCallback {
onVerify(orderID: string): void;
onError(error: CFErrorResponse, orderID: string): void;
}
export interface CFEventCallback {
onReceivedEvent(eventName: string, map: Map<string, string>): void;
}
export declare class CFErrorResponse {
private status;
private message;
private code;
private type;
fromJSON(errorString: string): void;
getStatus(): string;
getMessage(): string;
getCode(): string;
getType(): string;
}
export declare const CFPaymentGatewayService: CFPaymentGateway;
export {};