diff --git a/404.html b/404.html index 2c0b4a9f..8378a8c9 100644 --- a/404.html +++ b/404.html @@ -4,7 +4,7 @@
MomoCallback for MomoAPI API MomoResponse returns onResponse for successful calls and onFailure for errors.
Constructor for MomoException with a message.
The message associated with the exception.
Constructor for MomoException with an ErrorResponse.
The error response associated with the exception.
Handles exceptions and messages for the exceptions.
Transaction MomoCallback for the MTN MOMO API The MTN MOMO API returns the a 200 OK even for transfers that failed. We use TransactionCallback to identify the difference between 200 OK and 400 This returns the MomoTransaction on the ResponseBody
MomoCallback for MomoAPI API MomoResponse returns onResponse for successful calls and onFailure for errors.
Handles exceptions and messages for the exceptions.
Holds the state for Payment status.
Transaction MomoCallback for the MTN MOMO API The MTN MOMO API returns the a 200 OK even for transfers that failed. We use TransactionCallback to identify the difference between 200 OK and 400 This returns the MomoTransaction on the ResponseBody
Data class representing an access token received from the MTN MOMO API.
Data class representing an access token received from the MTN MOMO API.
Data class representing a Momo notification.
The credentials containing the access token.
Interceptor used to add Bearer Token authentication headers to requests.
This interceptor adds the access token to the request headers for endpoints that require Bearer Token Authentication.
The credentials containing the access token.
Intercepts the request and adds the Bearer Token header.
The response after adding the authorization header.
The interceptor chain.
If an I/O error occurs.
The credentials containing the API user ID and API key.
Interceptor used to add Basic Authentication headers to requests.
This interceptor encodes the API user ID and API key in Base64 and adds them to the request headers for endpoints that require Basic Authentication.
The credentials containing the API user ID and API key.
Intercepts the request and adds the Basic Authentication header.
The response after adding the authorization header.
The interceptor chain.
If an I/O error occurs.
Interceptor used to add Bearer Token authentication headers to requests.
Interceptor used to add Basic Authentication headers to requests.
This class allows Retrofit to accept any, even bad SSL Certificates.
This class allows Retrofit to accept any, even bad SSL Certificates.
Clear all authentication credentials.
Check if basic auth credentials are set.
Boolean indicating if basic auth is configured.
Check if access token is set and valid.
Boolean indicating if access token is valid.
Interface for managing authentication credentials.
This interface defines methods for setting, clearing, and checking the status of basic authentication and access token credentials.
Clear all authentication credentials.
Check if basic auth credentials are set.
Check if access token is set and valid.
Set the access token credentials.
Set the basic authentication credentials.
Set the access token credentials.
The access token.
Set the basic authentication credentials.
The API user ID.
The API key.
Interface for managing authentication credentials.
The credentials for basic authentication.
The credentials for access token authentication.
Clears all authentication credentials.
Checks if basic authentication credentials are set.
Boolean indicating if basic auth is configured.
Checks if the access token is set and valid.
Boolean indicating if the access token is valid.
Implementation of the AuthInterface for managing authentication credentials.
This class handles setting and clearing basic authentication and access token credentials.
The credentials for basic authentication.
The credentials for access token authentication.
Clears all authentication credentials.
Checks if basic authentication credentials are set.
Checks if the access token is set and valid.
Sets the access token credentials.
Sets the basic authentication credentials.
Sets the access token credentials.
The access token.
Sets the basic authentication credentials.
The API user ID.
The API key.
Implementation of the AuthInterface for managing authentication credentials.
This is the retrofit interface to handle the various calls to the CollectionService API. This interface defines the method, the request and response from the API.
Makes a request to get the Account Balance
Makes a request to get the Account Balance with a currency.
Makes a request to get the Basic ApiUser Info
Makes a request to get the ApiUser Info with Consent
Makes a request to get the ApiUser Info with Consent
Makes a request to pay a specific user
Makes a request to send the delivery notification
Makes a request to check the status of the payment request
Makes a request to withdraw from a specific user
Makes a request to check the status fo the withdrawal
Makes a request to get the ApiUser Info with Consent
Makes a request to check the account holder status
Makes a request to check the status of the payment request
ResponseBody -- Returns the Transfer Status
-- The Transfer Reference ID. This is a UUID V4. This is the ID used here requestToPay
-- The app Version (v1_0 or v2_0)
-- The Product subscription Key (Ocp-Apim-Subscription-Key)
-- The API environment (X-Target-Environment)
Makes a request to pay a specific user
Unit -- Returns the Transfer Status
-- This is the Transfer Payload MomoTransaction
-- The app Version (v1_0 or v2_0)
-- The Product subscription Key (Ocp-Apim-Subscription-Key)
-- The API environment (X-Target-Environment)
Makes a request to check the status fo the withdrawal
ResponseBody -- Returns the Transfer Status
-- The Transfer Reference ID. This is a UUID V4. This is the ID used here requestToWithdraw
-- The app Version (v1_0 or v2_0)
-- The Product subscription Key (Ocp-Apim-Subscription-Key)
-- The API environment (X-Target-Environment)
Makes a request to withdraw from a specific user
Unit -- Returns the Transfer Status
-- This is the Transfer Payload MomoTransaction
-- The app Version (v1_0 or v2_0)
-- The Product subscription Key (Ocp-Apim-Subscription-Key)
-- The API environment (X-Target-Environment)
Makes a request to get the Account Balance with a currency.
AccountBalance -- Returns the Account Balance
-- This is the Currency based on the ISO standard. Read more here https://www.iban.com/currency-codes
-- The API Products (MomoConstants.ProductTypes)
-- The app Version (v1_0 or v2_0)
-- The Product subscription Key (Ocp-Apim-Subscription-Key)
-- The API environment (X-Target-Environment)
Makes a request to get the Account Balance
AccountBalance -- Returns the Account Balance
-- The API Products (MomoConstants.ProductTypes)
-- The app Version (v1_0 or v2_0)
-- The Product subscription Key (Ocp-Apim-Subscription-Key)
-- The API environment (X-Target-Environment)
Makes a request to get the Basic ApiUser Info
BasicUserInfo -- Returns the Basic ApiUser Info
-- The API Products (MomoConstants.ProductTypes)
-- The app Version (v1_0 or v2_0)
-- The Product subscription Key (Ocp-Apim-Subscription-Key)
-- The API environment (X-Target-Environment)
Makes a request to get the ApiUser Info with Consent
ResponseBody -- Returns the Transfer Status
-- The Transfer Reference ID. This is a UUID V4. This is the ID used here transfer
-- The API Products (MomoConstants.ProductTypes)
-- The app Version (v1_0 or v2_0)
-- The Product subscription Key (Ocp-Apim-Subscription-Key)
-- The API environment (X-Target-Environment)
Makes a request to get the ApiUser Info with Consent
UserInfoWithConsent -- Returns the ApiUser Info with Consent
-- The API Products (MomoConstants.ProductTypes)
-- The app Version (v1_0 or v2_0)
-- The Product subscription Key (Ocp-Apim-Subscription-Key)
-- The API environment (X-Target-Environment)
This is the retrofit interface to handle the various calls to the Shared Product APIs. This interface defines the method, the request and response from the API.
Makes a request to get the Account Balance
Makes a request to get the Account Balance with a currency.
Makes a request to get the Basic ApiUser Info
Makes a request to get the ApiUser Info with Consent
Makes a request to get the ApiUser Info with Consent
Makes a request to send the delivery notification
Makes a request to get the ApiUser Info with Consent
Makes a request to check the account holder status
Makes a request to send the delivery notification
ResponseBody -- Returns the Transfer Status
-- The notification message. This is by default capped 1t 160 characters. Use the Setting.checkNotificationMessageLength to check the length
-- The Transfer Reference ID. This is a UUID V4. It should be the customer Id.
-- The app Version (v1_0 or v2_0)
-- The API Products (MomoConstants.ProductTypes)
-- The Product subscription Key (Ocp-Apim-Subscription-Key)
-- The API environment (X-Target-Environment)
-- This is the notification message to be sent to the user. It's the same as the MomoNotification.notificationMessage added on the momoNotification
Makes a request to get the ApiUser Info with Consent
Unit -- Returns the Transfer Status
-- This is the Transfer Payload MomoTransaction
-- The app Version (v1_0 or v2_0)
-- The API Products (MomoConstants.ProductTypes)
-- The Product subscription Key (Ocp-Apim-Subscription-Key)
-- The API environment (X-Target-Environment)
Makes a request to check the account holder status
ResponseBody -- Returns the Transfer Status
-- This is the account holder unique Id e.g the phone number
-- This is the account holder type. e.g MSISDN
-- The app Version (v1_0 or v2_0)
-- The API Products (MomoConstants.ProductTypes)
-- The Product subscription Key (Ocp-Apim-Subscription-Key)
-- The API environment (X-Target-Environment)
Makes a request to deposit to a specific user
Unit -- Returns the Transfer Status
-- This is the Transfer Payload MomoTransaction
-- The app Version (v1_0 or v2_0)
-- The Product subscription Key (Ocp-Apim-Subscription-Key)
-- The API environment (X-Target-Environment)
Makes a request to check the status of the deposit request
ResponseBody -- Returns the Transfer Status
-- The Transfer Reference ID. This is a UUID V4. This is the ID used here deposit
-- The app Version (v1_0 or v2_0)
-- The Product subscription Key (Ocp-Apim-Subscription-Key)
-- The API environment (X-Target-Environment)
Makes a request to check the status of the refund
ResponseBody -- Returns the Transfer Status
-- The Transfer Reference ID. This is a UUID V4. This is the ID used here refund
-- The app Version (v1_0 or v2_0)
-- The Product subscription Key (Ocp-Apim-Subscription-Key)
-- The API environment (X-Target-Environment)
This is the retrofit interface to handle the various calls to the DisbursementsService API. This interface defines the method, the request and response from the API.
Makes a request to deposit to a specific user
Makes a request to get the Account Balance
Makes a request to get the Account Balance with a currency.
Makes a request to get the Basic ApiUser Info
Makes a request to check the status of the deposit request
Makes a request to check the status of the refund
Makes a request to get the ApiUser Info with Consent
Makes a request to get the ApiUser Info with Consent
Makes a request to refund a specific user
Makes a request to send the delivery notification
Makes a request to get the ApiUser Info with Consent
Makes a request to check the account holder status
Makes a request to refund a specific user
Unit -- Returns the Transfer Status
-- This is the Transfer Payload MomoTransaction
-- The app Version (v1_0 or v2_0)
-- The Product subscription Key (Ocp-Apim-Subscription-Key)
-- The API environment (X-Target-Environment)
This is the retrofit interface to handle the various calls to the CollectionService API. This interface defines the method, the request and response from the API.
This is the retrofit interface to handle the various calls to the Shared Product APIs. This interface defines the method, the request and response from the API.
This is the retrofit interface to handle the various calls to the DisbursementsService API. This interface defines the method, the request and response from the API.
Creates a new API key for the specified API user.
A Response containing the generated ApiKey.
The version of the API (e.g., v1_0 or v2_0).
The ID of the API user for whom to create the key.
The subscription key for the product.
Obtains an access token for the specified product type.
A Response containing the obtained AccessToken.
The type of product for which to obtain the access token.
The subscription key for the product.
Retrieves the details of an existing API user.
A Response containing the requested ApiUser.
The version of the API (e.g., v1_0 or v2_0).
The ID of the API user to retrieve.
The subscription key for the product.
This interface defines the Retrofit service for handling various authentication-related API calls.
It includes methods for creating API users, retrieving API user details, generating API keys, and obtaining access tokens.
Creates a new API key for the specified API user.
Obtains an access token for the specified product type.
Retrieves the details of an existing API user.
Provides an instance of AuthenticationService.
An instance of AuthenticationService.
The Retrofit instance used to create the service.
Provides an instance of CollectionService.
An instance of CollectionService.
The Retrofit instance used to create the service.
Provides an instance of CommonService.
An instance of CommonService.
The Retrofit instance used to create the service.
Provides an instance of DisbursementsService.
An instance of DisbursementsService.
The Retrofit instance used to create the service.
Provides network-related dependencies using Dagger Hilt.
This module includes methods to provide instances of Retrofit, OkHttpClient, authentication credentials, and various services used in the application.
Provides an instance of AuthenticationService.
Provides an instance of CollectionService.
Provides an instance of CommonService.
Provides an instance of DisbursementsService.
Provides an instance of AccessTokenCredentials.
Provides an instance of AuthInterface.
Provides an instance of BasicAuthCredentials.
Provides an instance of Gson.
Provides an instance of OkHttpClient.
Provides an instance of Retrofit.
Provides the base URL for the API.
Provides an instance of HttpLoggingInterceptor.
Provides an instance of AccessTokenCredentials.
A new instance of AccessTokenCredentials initialized with an empty string.
Provides an instance of AuthInterface.
An instance of AuthInterface implemented by AuthImplementation.
The basic authentication credentials.
The access token credentials.
Provides an instance of BasicAuthCredentials.
A new instance of BasicAuthCredentials initialized with empty strings.
Provides an instance of Gson.
A new instance of Gson created using GsonBuilder.
Provides an instance of OkHttpClient.
A configured instance of OkHttpClient.
The logging interceptor for HTTP requests.
The basic authentication credentials.
The access token credentials.
The base URL for the API.
Provides an instance of Retrofit.
A configured instance of Retrofit.
The OkHttpClient instance to be used by Retrofit.
The Gson instance for JSON serialization/deserialization.
The base URL for the API.
Provides the base URL for the API.
The base URL defined in the BuildConfig.
Provides an instance of HttpLoggingInterceptor.
A configured instance of HttpLoggingInterceptor with body logging enabled.
Checks whether the supplied API user exists.
A Response containing the ApiUser if found.
The version of the API to use.
The subscription key for the product.
Gets the API Key based on the ApiUser Id and OCP Subscription Id.
A Response containing the created ApiKey.
The version of the API to use.
The subscription key for the product.
Creates a new API user.
A Response containing the created ApiUser.
The version of the API to use.
A unique identifier for the request.
The subscription key for the product.
Requests a deposit to be processed.
A Response indicating the result of the request.
The access token for authentication.
The transaction details.
The version of the API to use.
The subscription key for the product.
A unique identifier for the request.
Gets the Access Token based on the ApiUser ID, OCP Subscription Id, and the API Key.
A Response containing the obtained AccessToken.
The subscription key for the product.
The type of product for which to obtain the access token.
Gets the account balance of the entity/user initiating the transaction.
A Response containing the AccountBalance.
The currency for which to get the account balance.
The subscription key for the product.
The access token for authentication.
The version of the API to use.
The type of product for which to get the account balance.
Retrieves the basic user information for a specified MTN MOMO user.
A Response containing the BasicUserInfo of the specified user.
The identifier for the account holder.
The subscription key for the product.
The access token for authentication.
The version of the API to use.
The type of product for which to retrieve the user information.
Gets the status of a deposit transaction.
A Response containing the status of the deposit transaction.
The reference ID of the transaction.
The version of the API to use.
The subscription key for the product.
The access token for authentication.
Gets the status of a refund transaction.
A Response containing the status of the refund transaction.
The reference ID of the transaction.
The version of the API to use.
The subscription key for the product.
The access token for authentication.
Retrieves the status of a transfer based on the provided transfer ID.
A Response containing the status of the transfer.
The reference ID of the transfer.
The version of the API to use.
The type of product for the transfer.
The subscription key for the product.
The access token for authentication.
Retrieves the user information for a specified MTN MOMO user with consent.
A Response containing the UserInfoWithConsent of the specified user.
The subscription key for the product.
The access token for authentication.
The version of the API to use.
The type of product for which to retrieve the user information.
The DefaultRepository class is responsible for making network calls to the MTN MOMO APIs.
This class holds all the common API methods for various MTN MOMO products, including user management, transaction processing, and status checks.
Checks whether the supplied API user exists.
Gets the API Key based on the ApiUser Id and OCP Subscription Id.
Creates a new API user.
Gets the Access Token based on the ApiUser ID, OCP Subscription Id, and the API Key.
Gets the account balance of the entity/user initiating the transaction.
Retrieves the basic user information for a specified MTN MOMO user.
Gets the status of a deposit transaction.
Gets the status of a refund transaction.
Retrieves the user information for a specified MTN MOMO user with consent.
Requests a payment to be processed.
Sends a request to pay a user, identified by the provided reference ID.
Requests the status of a payment transaction.
Requests a withdrawal to be processed.
Requests the status of a withdrawal transaction.
Sets up access token authentication credentials.
Sets up basic authentication credentials.
Validates the status of an account holder.
Requests a refund to be processed.
A Response indicating the result of the request.
The access token for authentication.
The transaction details.
The version of the API to use.
The subscription key for the product.
A unique identifier for the request.
Sends a request to pay a user, identified by the provided reference ID.
A Response indicating the result of the payment request.
The notification details for the payment.
The reference ID of the user to pay.
The version of the API to use.
The type of product for the payment.
The subscription key for the product.
The access token for authentication.
Requests the status of a payment transaction.
A Response containing the status of the transaction.
The reference ID of the transaction.
The version of the API to use.
The subscription key for the product.
The access token for authentication.
Requests a payment to be processed.
A Response indicating the result of the request.
The access token for authentication.
The transaction details.
The version of the API to use.
The subscription key for the product.
A unique identifier for the request.
Requests the status of a withdrawal transaction.
A Response containing the status of the transaction.
The reference ID of the transaction.
The version of the API to use.
The subscription key for the product.
The access token for authentication.
Requests a withdrawal to be processed.
A Response indicating the result of the request.
The access token for authentication.
The transaction details.
The version of the API to use.
The subscription key for the product.
A unique identifier for the request.
Sets up access token authentication credentials.
The access token credentials to set.
Sets up basic authentication credentials.
The basic authentication credentials to set.
Sends a request to transfer funds to a specified account.
A Response indicating the result of the transfer request.
The access token for authentication.
The transaction details for the transfer.
The version of the API to use.
The type of product for the transfer.
The subscription key for the product.
A unique identifier for the request.
Validates the status of an account holder.
A Response indicating the result of the account holder status validation.
The account holder details to validate.
The version of the API to use.
The type of product for the validation.
The subscription key for the product.
The access token for authentication.
The DefaultRepository class is responsible for making network calls to the MTN MOMO APIs.
Returns a representation of an immutable list of all enum entries, in the order they're declared.
This method may be used to iterate over the enum entries.
Enum class representing the different types of account holders in the MTN MOMO system.
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
Returns an array containing the constants of this enum type, in the order they're declared.
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
if this enum type has no constant with the specified name
Returns an array containing the constants of this enum type, in the order they're declared.
This method may be used to iterate over the constants.
Indicates that the transaction could not be performed.
Indicates that there is an informational scope instruction.
Indicates that an internal processing error occurred.
Indicates that a required scope instruction is missing.
Indicates that more than one financial scope is not supported.
Indicates that the target environment is not allowed.
Indicates that the payee is not allowed to receive the payment.
Indicates that the payer has reached their limit for transactions.
Indicates that the transaction has not been completed.
Indicates that the combination of scopes is unsupported.
Returns a representation of an immutable list of all enum entries, in the order they're declared.
This method may be used to iterate over the enum entries.
Enum class representing the various error responses from the MTN MOMO API.
Each constant corresponds to a specific error that can occur during API interactions.
Indicates that the payer was not found.
Indicates that the payer has reached their limit for transactions.
Indicates that there are not enough funds for the transaction.
Indicates that the action is not allowed.
Indicates that the target environment is not allowed.
Indicates that the callback URL host is invalid.
Indicates that the currency provided is invalid.
Indicates that the service is currently unavailable.
Indicates that the payee is not allowed to receive the payment.
Indicates that the payment has not been approved.
Indicates that the requested resource was not found.
Indicates that the approval for the transaction was rejected.
Indicates that the transaction has been canceled.
Indicates that the resource already exists.
Indicates that the transaction has not been completed.
Indicates that the transaction was not found.
Indicates that there is an informational scope instruction.
Indicates that a required scope instruction is missing.
Indicates that more than one financial scope is not supported.
Indicates that the combination of scopes is unsupported.
Indicates that there is a consent mismatch.
Indicates that the requested scope is unsupported.
Indicates that the payee was not found.
Indicates that an internal processing error occurred.
Indicates that the transaction could not be performed.
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
Returns an array containing the constants of this enum type, in the order they're declared.
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
if this enum type has no constant with the specified name
Returns an array containing the constants of this enum type, in the order they're declared.
This method may be used to iterate over the constants.
Endpoint for creating an API key.
Endpoint for creating an API user.
Endpoint for checking the status of a deposit.
Endpoint for retrieving an access token.
Endpoint for retrieving account balance.
Endpoint for retrieving account balance in a specific currency.
Endpoint for retrieving an API user.
Endpoint for retrieving basic user information.
Endpoint for retrieving transfer status.
Endpoint for retrieving user information with consent.
Endpoint for checking the status of a refund.
Endpoint for requesting to pay.
Endpoint for requesting a payment delivery notification.
Endpoint for checking the status of a payment request.
Endpoint for requesting to withdraw.
Endpoint for checking the status of a withdrawal request.
Endpoint for validating account holder status.
Contains endpoint constants for various API calls.
Endpoint for creating an API key.
Endpoint for creating an API user.
Endpoint for checking the status of a deposit.
Endpoint for retrieving an access token.
Endpoint for retrieving account balance.
Endpoint for retrieving account balance in a specific currency.
Endpoint for retrieving an API user.
Endpoint for retrieving basic user information.
Endpoint for retrieving transfer status.
Endpoint for retrieving user information with consent.
Endpoint for checking the status of a refund.
Endpoint for requesting to pay.
Endpoint for requesting a payment delivery notification.
Endpoint for checking the status of a payment request.
Endpoint for requesting to withdraw.
Endpoint for checking the status of a withdrawal request.
Endpoint for validating account holder status.
The path parameter for the account holder ID.
The path parameter for the account holder type.
The path parameter for the API version.
The path parameter for the product type.
The path parameter for the reference ID.
The path parameter for the reference ID.
Contains endpoint path constants used in API requests.
The path parameter for the account holder ID.
The path parameter for the account holder type.
The path parameter for the API version.
The path parameter for the product type.
The path parameter for the reference ID.
The path parameter for the reference ID.
The header key for authorization.
The header key for the content type.
The header key for the notification message.
The header key for the OCP APIM subscription key.
The header key for the Momo callback URL.
The header key for the reference ID.
The header key for the target environment.
Contains HTTP header constants used in API requests.
The header key for authorization.
The header key for the content type.
The header key for the notification message.
The header key for the OCP APIM subscription key.
The header key for the Momo callback URL.
The header key for the reference ID.
The header key for the target environment.
The maximum length of notification messages.
The format used for timestamps in the SDK.
Contains token type constants used in API requests.
Contains endpoint path constants used in API requests.
Contains token type constants used in API requests.
Returns a representation of an immutable list of all enum entries, in the order they're declared.
This method may be used to iterate over the enum entries.
Enum class representing the different product types available in the MTN MOMO system.
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
Returns an array containing the constants of this enum type, in the order they're declared.
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
if this enum type has no constant with the specified name
Returns an array containing the constants of this enum type, in the order they're declared.
This method may be used to iterate over the constants.
Connection timeout duration in milliseconds.
Connection read timeout duration in milliseconds.
Connection write timeout duration in milliseconds.
Checks if the length of the notification message is within the allowed limit.
True if the message length is within the limit, false otherwise.
The notification message to check.
The maximum allowed length for the notification message.
Formats the phone number based on the provided country code.
A formatted phone number as a String, or null if the input is blank.
The phone number to format.
The country code to prepend if the phone number starts with "0".
Generates a MomoTransaction object from the given response.
A MomoTransaction object, or null if the response body is empty.
The response containing the transaction data.
Retrieves the product subscription keys based on the specified product
The corresponding product key as a String.
The MTN MOMO API product type.
Contains general settings used in the library.
This class provides methods for generating UUIDs, formatting phone numbers, retrieving product subscription keys, and checking notification message lengths.
Connection timeout duration in milliseconds.
Connection read timeout duration in milliseconds.
Connection write timeout duration in milliseconds.
Checks if the length of the notification message is within the allowed limit.
Formats the phone number based on the provided country code.
Generates a MomoTransaction object from the given response.
Generates a new UUID as a String.
Retrieves the product subscription keys based on the specified product
Returns a representation of an immutable list of all enum entries, in the order they're declared.
This method may be used to iterate over the enum entries.
Enum class representing the possible statuses of a transaction in the MTN MOMO system.
Each constant corresponds to a specific state of a transaction.
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
Returns an array containing the constants of this enum type, in the order they're declared.
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
if this enum type has no constant with the specified name
Returns an array containing the constants of this enum type, in the order they're declared.
This method may be used to iterate over the constants.
Enum class representing the different types of account holders in the MTN MOMO system.
Enum class representing the various error responses from the MTN MOMO API.
Enum class representing the different product types available in the MTN MOMO system.
Enum class representing the possible statuses of a transaction in the MTN MOMO system.
This is required to fix keyboard overlapping content in a Composable screen. This functionality is applied after the setContent function of the activity is called.
TODO fix issue with ktfmt formatting annotated high order functions. Current workaround below: lambda in this format content: (@Composable() () -> Unit) to allow spotlessApply
To enable sample theme set darkTheme = isSystemInDarkTheme
Contains constant values used throughout the MTN MOMO SDK sample application.
Converts the given milliseconds to a formatted date string.
A formatted date string in "yyyy-MM-dd" format.
The time in milliseconds to convert.
Retrieves the saved access token from shared preferences.
The saved access token as a String, or an empty string if expired or not found.
The context used to access shared preferences.
Utility object providing various helper functions for the MTN MOMO SDK sample application.
This object contains methods for saving and retrieving API keys and access tokens, as well as checking token expiration and formatting dates.
Converts the given milliseconds to a formatted date string.
Retrieves the saved access token from shared preferences.
Saves the provided access token in the shared preferences along with its expiry date.
Saves the provided API key in the shared preferences.
Saves the provided access token in the shared preferences along with its expiry date.
The context used to access shared preferences.
The access token to be saved.
Saves the provided API key in the shared preferences.
The context used to access shared preferences.
The API key to be saved.
This is required to fix keyboard overlapping content in a Composable screen. This functionality is applied after the setContent function of the activity is called.
This is required to fix keyboard overlapping content in a Composable screen. This functionality is applied after the setContent function of the activity is called.
This function checks if the device is online
Parse this String to a color code to be used in compose. Color code must either a). begin with pound sign ('#') and should be of 6 valid characters or b). be equal to 'primaryColor', 'primaryVariantColor' or 'errorColor'
This function checks if the device is online
Parse this String to a color code to be used in compose. Color code must either a). begin with pound sign ('#') and should be of 6 valid characters or b). be equal to 'primaryColor', 'primaryVariantColor' or 'errorColor'
Main activity for the MTN MOMO SDK sample application.
This activity sets up the navigation host and initializes the main view model.
This is required to fix keyboard overlapping content in a Composable screen. This functionality is applied after the setContent function of the activity is called.
Checks the user status and creates an API user if necessary.
ViewModel for managing authentication and API interactions.
This ViewModel handles setting authentication credentials and making API calls.
Sets the Access Token credentials.
Sets the Basic Authentication credentials.
Sets the Access Token credentials.
The access token.
Sets the Basic Authentication credentials.
The API user ID.
The API key.
Main activity for the MTN MOMO SDK sample application.
ViewModel for managing authentication and API interactions.
The main application class for the MTN MOMO SDK sample application.
This class initializes the application and sets up dependency injection using Dagger Hilt. It also configures Timber for logging in debug builds.
Called when the application is starting, before any activity, service, or receiver objects have been created. This is where you can perform application-wide initialization.
#SONATYPE_HOST=S01
#SONATYPE_HOST=CENTRAL_PORTAL
Update your global gradle.properties
found on ~/.gradle/gradle.properties
with the correct authentication credentials.
Important Reminder: Both Sonatype OSS and Maven Central require tokens for authentication, so log in to the portals and generate the necessary tokens.
To publish and release the SDK to Maven Central, run the following command in your terminal:
@@ -90,6 +94,7 @@By following these guidelines, you can effectively publish the MTN MOMO API SDK, ensuring that it is accessible and usable for developers looking to integrate mobile money services into their applications.