flutter_paystack
flutter_paystack copied to clipboard
Invalid Transaction when using Bank to make payment

Please all i get is Invalid Transaction when trying to make payment using bank below is my function. what could be the problem ?
processPaystackPayment({required skKey, context}) async {
Charge charge = Charge()
..amount = (widget.paymentAmount * 100)
..reference = _getReference()
..accessCode = await _paymentRepository.createAccessCode(
_getReference(),
widget.paymentAmount * 100,
userDetails.emailAddress.toString(),
skKey)
..email = userDetails.emailAddress.toString();
CheckoutResponse response = await plugin.checkout(context,
method:
CheckoutMethod.selectable,
charge: charge,
fullscreen: true);
print(response);
if (response.status == true) {
var res = await _paymentRepository.verifyOnServer(
response.reference.toString(), skKey);
if (res == 'success') {
var obj = widget.bookingModel;
obj.paymentReference = response.reference.toString();
transacRefernceId = response.reference.toString();
log(jsonEncode(obj));
ref.read(bookingFutureProvider.notifier).initiateReservation(obj);
}
} else {
if (kDebugMode) {
print('failed here');
}
Navigator.of(context).pop();
}
}
Please can someone answer me Please i running out of time.
have you found solution ?
have you found solution ?
Nope, what I did was, I just made the app process card payment instead. And I was thinking of using paystack web plugin in a web view probably if I am still in need of the bank payment