lipanaMpesaOnline method Null safety

Future<MpesaResponse> lipanaMpesaOnline(
  1. {required String phoneNumber,
  2. required double amount,
  3. required String accountReference,
  4. required String transactionDesc,
  5. required String callBackURL}
)

LIPA NA M-PESA ONLINE API also know as M-PESA express (STK Push) is a Merchant/Business initiated C2B (Customer to Business) Payment. phoneNumber The Mobile Number to receive the STK Pin Prompt. amount The amount of money being sent to the customer. accountReference Account Reference: This is an Alpha-Numeric parameter that is defined by your system as an Identifier of the transaction for CustomerPayBillOnline transaction type. Maximum of 12 characters. transactionDesc This is any additional information/comment that can be sent along with the request from your system. Any string between 1 and 13 characters. callBackURL A CallBack URL is a valid secure URL that is used to receive notifications from M-Pesa API. It is the endpoint to which the results will be sent by M-Pesa API.

Implementation

Future<MpesaResponse> lipanaMpesaOnline({
  required String phoneNumber, required double amount, required String accountReference,
  required String transactionDesc, required String callBackURL,
}){
  var _res = MpesaLipanaMpesa(
    this,
    phoneNumber: phoneNumber, amount: amount, accountReference: accountReference, transactionDesc: transactionDesc,
    callBackURL: callBackURL
  );

  return _res.process();
}