flutterwave-flutter icon indicating copy to clipboard operation
flutterwave-flutter copied to clipboard

Trippledes issue

Open holy-dev opened this issue 2 years ago • 4 comments

Dark version 2.12.0 Flutter version 2.2.3 Plugin version: v1.0.0 Aug 24 update

The error screenshot: https://ibb.co/qDj0dPH

After debugging for hours I found out there's a problem with trippledes package. The package cannot generate.

Unhandled Exception: type 'Null' is not a subtype of type 'int' in type cast

Please help me fix the issue. The code I'm using

beginPayment() async {
    final Flutterwave flutterwave = Flutterwave.forUIPayment(
      context: Get.context!,
      encryptionKey: "FLWSECK_TESTbb6116d78f69",
      publicKey: "FLWPUBK_TEST-e48559ddaa79e0cc00caf1da9e452c81-X",
      currency: this.currency,
      amount: this.amount,
      email: "[email protected]",
      fullName: "Valid Full Name",
      txRef: this.txref,
      isDebugMode: true,
      phoneNumber: "0123456789",
      acceptCardPayment: true,
    );

    try {
      final ChargeResponse response =
          await flutterwave.initializeForUiPayments();
      final isSuccessful = checkPaymentIsSuccessful(response);
      if (isSuccessful) {
        // provide value to customer
      } else {
        // check message
        print(response.message);

        // check status
        print(response.status);

        // check processor error
        print(response.data!.processorResponse);
      }
    } catch (error, stacktrace) {
      print(error);
      print(stacktrace);
      // handleError(error);
    }
  }

holy-dev avatar Sep 03 '21 15:09 holy-dev