sendMobile method

Future<InitResponse> sendMobile(
  1. Payment payment,
  2. String phone,
  3. MobilePaymentMethod method
)

Initiate mobile transactions

Implementation

Future<InitResponse> sendMobile(
  Payment payment,
  String phone,
  MobilePaymentMethod method,
) {
  if (!(LocalRegex.isEconet(phone) ||
      LocalRegex.isNetone(phone) ||
      LocalRegex.isTelecel(phone))) {
    throw ValueError('Invalid Mobile Number');
  }

  return this._initMobile(payment, phone, method.toRepresentation);
}