UNPKG

@spreeloop/mtn_momo

Version:
39 lines 1.93 kB
import { Routes } from "../routes/routes"; import { GetAccessTokenResponse, GetMtnMomoPaymentRequest, GetMtnMomoPaymentResponse, InitializeMtnMomoPaymentRequest, InitializeMtnMomoResponse, MtnMomoPaymentConfigs } from "../utils/request_model"; import { MtnMomoInterface } from "../payments"; /** * Implements the MTN MOMO fake payment for testing purposes. */ export declare class MtnMomoPaymentFake implements MtnMomoInterface { protected readonly config: MtnMomoPaymentConfigs; protected readonly route: Routes; /** * Creates a new instance of the MtnMomoPaymentFake class. * * @param {MtnMomoPaymentConfigs} config - The configuration for the payment instance. */ constructor(config: MtnMomoPaymentConfigs); /** * Gets a fake access token. * * @return {Promise<GetAccessTokenResponse>} the access token response */ getAccessToken(): Promise<GetAccessTokenResponse>; /** * Initializes the MTN MOMO payment in fake mode. * * @param {InitializeMtnMomoPaymentRequest} mobileInitParams - Parameters for mobile initialization * @param {string} accessToken - The access token for the request * @return {Promise<InitializeMtnMomoResponse>} A promise that resolves with the mobile payment initialization response */ initializeMtnMomoPayment(request: InitializeMtnMomoPaymentRequest, accessToken: string): Promise<InitializeMtnMomoResponse>; /** * Gets the status of a payment in fake mode. * * @param {GetMtnMomoPaymentRequest} checkStatusParams - The parameters for checking the status * @param {string} accessToken - The access token for the request * @return {Promise<GetMtnMomoPaymentResponse>} The response containing the payment status */ getMtnMomoPaymentStatus(request: GetMtnMomoPaymentRequest, accessToken: string): Promise<GetMtnMomoPaymentResponse>; } //# sourceMappingURL=fake.d.ts.map