flutterwave-flutter
flutterwave-flutter copied to clipboard
Trippledes issue
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);
}
}