In this article, we'll be looking at card payment integration using Paystack package called flutter_paystack Paystack is a Modern online and offline payments for Africa Paystack helps businesses in Africa get paid by anyone, anywhere in the world H...
alemsbaja.hashnode.dev4 min read
Kings Samuel Abimbola
Hey there! you did a great job turning those scary codes on other blog to something simple and intuitive... Thanks alot.
Thanks for this tutorial. It works just fine. I'm however having a little challenge in the e-commerce app I'm building while trying to pass the total amount of the cart to Paystack "amount". Whenever I do so, the Paystack popup payment window does not open. Please what could be wrong? Here is my code
chargeCard(BuildContext context) async { var cartItems = Provider.of<CartProvider>(context, listen: false); cartItems.fetchCartItems(); var charge = Charge() ..amount = (cartItems.totalAmount * 100) as int ..reference = _getReference() ..putCustomField('custom_id','846gey6w') //to pass extra parameters to be retrieved on the response from Paystack ..email = 'support@jumbocheap.com';