UNPKG

@spreeloop/mtn_momo

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