pay method

Future<String?> pay(
  1. InfoPayResponse infoPay,
  2. String? otc,
  3. String? password,
  4. List<Voucher> vouchers,
)

Implementation

Future<String?> pay(InfoPayResponse infoPay, String? otc, String? password,
    List<Voucher> vouchers) async {
  if (infoPay.amount! > vouchers.length) {
    throw InsufficientVouchers();
  }
  final paymentResponse =
      await _pocketRepository.pay(otc, password, infoPay, vouchers);
  return paymentResponse;
}