This is a Flutter-based mobile application that serves as a grocery shopping app, allowing users to browse and purchase grocery items. The app integrates with the Daraja API to enable secure and seamless payment processing.
- Browse a variety of grocery items.
- Add items to the cart.
- View the cart and adjust quantities.
- Proceed to checkout and make payments using the Daraja API.
- Receive order confirmation and payment receipts.
- Flutter SDK: Install Flutter
- Daraja API Credentials: You'll need to obtain API keys from Safaricom's Daraja API.
- Clone the repository:
git clone https://github.com/yourusername/grocery_app.git
- Navigate to the project directory:
cd grocery_app
- Install dependencies:
flutter pub get
-
Configure Daraja API keys:
Open
lib/utils/daraja_config.dart
and replace the placeholders with your actual Daraja API credentials:class DarajaConfig { static const consumerKey = 'YOUR_CONSUMER_KEY'; static const consumerSecret = 'YOUR_CONSUMER_SECRET'; }
Run the app on your preferred emulator or physical device:
flutter run
- The app uses Flutter for the frontend UI.
- The Daraja API is integrated for payment processing.
- The payment process involves generating access tokens, initiating transactions, and handling payment callbacks.