MpesaResponse class
Response return by Mpesa request. Please Note that this does not indicate the success or failure of the payment. That will be sent to the callback url you provided. This response only indicates whether the payment request was accepted for processing or not.
Constructors
- MpesaResponse({required String MerchantRequestID, required String CheckoutRequestID, required String ResponseCode, required String ResponseDescription, required String CustomerMessage})
- Response return by Mpesa request. Please Note that this does not indicate the success or failure of the payment. That will be sent to the callback url you provided. This response only indicates whether the payment request was accepted for processing or not.
-
MpesaResponse.fromMap(Map<
String, dynamic> map) -
Create an instance of MpesaResponse from a Map
factory
Properties
- CheckoutRequestID ↔ String
-
Unique Checkout request Id. This will be sent along with the success or failure data to the callback url you provide. You can use it to identify a particular payment request.
getter/setter pair
- CustomerMessage ↔ String
-
Message that is user friendly and can be shown to the customer.
Mostly same as ResponseDescription
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setteroverride
- MerchantRequestID ↔ String
-
The merchant request id
getter/setter pair
- ResponseCode ↔ String
-
M-Pesa Result and Response Codes
getter/setter pair
- ResponseDescription ↔ String
-
Description of the response gotten
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{String? MerchantRequestID, String? CheckoutRequestID, String? ResponseCode, String? ResponseDescription, String? CustomerMessage}) → MpesaResponse - Create a new instance of MpesaResponse by copying values from another instance
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> - MpesaResponse as a Map
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override