initializeForUiPayments method

Future<ChargeResponse> initializeForUiPayments()

Launches payment screen Returns a future ChargeResponse intance Nullable

Implementation

Future<ChargeResponse> initializeForUiPayments() async {
  FlutterwavePaymentManager paymentManager = FlutterwavePaymentManager(
      publicKey: this.publicKey,
      encryptionKey: this.encryptionKey,
      currency: this.currency,
      email: this.email,
      fullName: this.fullName,
      amount: this.amount,
      txRef: this.txRef,
      isDebugMode: this.isDebugMode,
      narration: this.narration,
      isPermanent: this.isPermanent,
      phoneNumber: this.phoneNumber,
      frequency: this.frequency,
      duration: this.duration,
      redirectUrl: this.redirectUrl,
      acceptAccountPayment: this.acceptAccountPayment,
      acceptCardPayment: this.acceptCardPayment,
      acceptUSSDPayment: this.acceptUSSDPayment,
      acceptRwandaMoneyPayment: this.acceptRwandaMoneyPayment,
      acceptMpesaPayment: this.acceptMpesaPayment,
      acceptZambiaPayment: this.acceptZambiaPayment,
      acceptGhanaPayment: this.acceptGhanaPayment,
      acceptUgandaPayment: this.acceptUgandaPayment,
      acceptBankTransferPayment: this.acceptBankTransfer,
      acceptFancophoneMobileMoney: this.acceptFrancophoneMobileMoney,
      country: this._setCountry());

  final chargeResponse = await this._launchPaymentScreen(paymentManager);
  return chargeResponse;
}