c2bRegisterUrl method
Register validation and confirmation URLs on M-Pesa
responseType
parameter specifies what is to happen if for any reason the validation URL is not reachable. Only two value are allowed: Completed or Cancelled .
confirmationURL
is the URL that receives the confirmation request from API upon payment completion
validationURL
is the URL that receives the validation request from API upon payment submission. The validation URL is only called if external validation on the registered shortcode is enabled. (By default external validation is disabled)
Implementation
Future<MpesaResponse> c2bRegisterUrl({
required String responseType,
required String validationURL,
required String confirmationURL,
}) {
var _res = MpesaC2BRegisterUrl(
this,
responseType: responseType,
validationURL: validationURL,
confirmationURL: confirmationURL,
);
return _res.process();
}