Giter VIP home page Giter VIP logo

fake-payment-gateway's Introduction

fake-payment-gateway

Dummy payment gateway for testng purposes. Can pay using card details as well as using the phone number.

fake-payment-gateway, that handle

  • payment via card details
  • payment via phone number
  • each payment send email notification for customer
  • can fetch all card/ phone payment history

Tech


fake-payment-gateway uses:

Installation

  1. download the project.

    [email protected]:ShalithaCell/fake-payment-gateway.git

    or

    https://github.com/ShalithaCell/fake-payment-gateway.git
  2. Goto inside to 'fake-payment-gateway' folder and run the command.

     npm install
  3. Configure email sender

    • create .env file in project root folder. execute following command,

      In windows

      cd > .env
      

      In Mac/ Linux

       touch .env
      
    • add following code to the .env file with your email address credentials,

      MAIL_SENDER_IDENTITY="please enter your email address here"
      MAIL_SENDER_PASSWORD="please enter your email password here"
      
    • make sure you should enable, less secure apps in gmail account. * How to enable less secure apps

  4. Run the Project

    npm run start

How to use

  • Before integration the fake-payment gateway, please simulate the api end-points using the postman. You can find the Postman collection inside the doc folder.

You can get all api end-points invoking the following link,

  1. For card payment

    {
        "app_name": "ABC",
        "service": "Electronic Items",
        "customer_email":"[email protected]",
        "card_type  ": "VISA",
        "card_holder_name": "Example",
        "card_number": "4242424242424242",
        "expiryMonth": "01",
        "expiryYear": "2020",
        "cvv": "123",
        "amount": "5000.00",
        "currency": "USD"
    }
  2. For payment using phone number

    {
        "app_name": "ABC",
        "service": "Electronic Items",
        "customer_email":"[email protected]",
        "phone_number  ": "0771940055",
        "phone_holder_name": "shalitha",
        "amount": "5000.00",
        "currency": "USD"
    }
  3. Get card payment transaction history

  4. Get phone payment transaction history


Development


Want to contribute? Great!

  • I'm here for your pull-request.

The best way to contribute is by spreading the word about the library:

  • Blog it
  • Comment it
  • Fork it
  • Star it
  • Share it

License


MIT

Free Software, Hell Yeah!

fake-payment-gateway's People

Contributors

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