Giter Site home page Giter Site logo

domains18 / safaricomdarajafrontend Goto Github PK

View Code? Open in Web Editor NEW
32.0 1.0 6.0 1.2 MB

A frontend repository showing how to consume Daraja api from the frontend. Shows how to handle errors and status code recieved from safaricom daraja api.

JavaScript 3.76% HTML 5.27% CSS 0.84% TypeScript 90.13%
daraja-api mpesa-api safaricom-mpesa-apis

safaricomdarajafrontend's Introduction

React Mpesa Stk Push App

This is a React application for initiating Mpesa Stk Push transactions. It utilizes the Mpesa Stk Push API to submit transactions and provides real-time status updates through recursive validation.

Features

  • Submit Mpesa Stk Push transactions with ease.
  • Real-time transaction status updates.
  • User-friendly notifications for transaction success, failure, and cancellation.

Prerequisites

Before running the application, ensure you have the following:

  • Node.js installed
  • npm (Node Package Manager) installed
  • Backend API (Assuming it's available at http://localhost:5000)
  • You can find the backend API here: Domains18/Nodejs/Daraja

Installation

  1. Clone the repository:

    git clone https://github.com/Domains18/SafaricomDarajaFrontEnd.git
  2. Navigate to the project directory:

    cd client
  3. Install dependencies:

    npm install
  4. Start the React application:

    npm run dev

The application should now be running at http://localhost:5173.

Usage

  1. Enter the required details, including phone number and amount.
  2. Click the "Submit" button to initiate the Mpesa Stk Push transaction.
  3. Real-time notifications will inform you of the transaction status.
  4. Loading indicators will appear during the transaction submission.

Additional Information

  • This application uses Axios for making HTTP requests.
  • Toast notifications are implemented using the react-toastify library.

Feel free to customize and extend the application based on your specific requirements.

License

This project is licensed under the MIT License.


safaricomdarajafrontend's People

Contributors

domains18 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.