Git Product home page Git Product logo

xpresspayment's Introduction

XpressPayment

Introduction

XpressPayment is a Spring Boot application designed to facilitate user authentication using JSON Web Tokens (JWT) and enable airtime payments through the Xpress Payment VTU API. Below, you'll find an overview of the project and its key features.

Table of Contents

  1. Introduction
  2. Getting Started
  3. Authentication
  4. Airtime Payments
  5. Unit Tests

Getting Started

Prerequisites

Ensure you have the following installed:

Installation

  1. Clone the repository:

    git clone https://github.com/dejmartins/XpressPayment.git
    
  2. Navigate to the project directory:

    cd XpressPayment
    

Configuration

Adjust configuration settings in application.properties to match your environment.

Authentication

Obtaining a Token

To obtain an authentication token, make a POST request to the /login endpoint with valid credentials. The application comes with a default user:

Airtime Payments

Endpoint Access

Access the airtime purchase endpoint by making a POST request to /api/airtime/purchase. Ensure you include a valid JWT token in the request header.

Token Requirements

Include the JWT token in the request header as follows:

Authorization: Bearer <your-token-here>

Unit Tests

Access Secured Endpoint Without Token

Ensure that attempting to access secured endpoints without a token results in a 401 Unauthorized status.

Access Airtime Purchase Endpoint With Valid Token

Verify that accessing the airtime purchase endpoint with a valid token returns an OK status.

Calculate HMAC512

Test the calculation of HMAC512 with a sample data and key.

Documentation

API documentation can be found here

xpresspayment's People

Contributors

dejmartins 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.