UNPKG

@spreeloop/mtn_momo

Version:
39 lines 2 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 sandbox payment for testing in sandbox environment. */ export declare class MtnMomoPaymentSandbox implements MtnMomoInterface { protected readonly config: MtnMomoPaymentConfigs; protected readonly route: Routes; /** * Creates a new instance of the MtnMomoPaymentSandbox class. * * @param {MtnMomoPaymentConfigs} config - The configuration for the payment instance. */ constructor(config: MtnMomoPaymentConfigs); /** * Gets an access token from the sandbox environment. * * @return {Promise<GetAccessTokenResponse>} the access token response */ getAccessToken(): Promise<GetAccessTokenResponse>; /** * Initializes the MTN MOMO payment in sandbox environment. * * @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(mobileInitParams: InitializeMtnMomoPaymentRequest, accessToken: string): Promise<InitializeMtnMomoResponse>; /** * Gets the status of a payment in sandbox environment. * * @param {GetMtnMomoPaymentRequest} request - 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=sandbox.d.ts.map