Code Monkey home page Code Monkey logo

city_bank_payment_gateway's Introduction

City Bank Payment Gateway

City Bank Payment Gateway Implementation using NodeJs

Environment Setup

  • Install Stunnel & configure stunnel. Configuration will be found from city bank. Contact with them.

Server Setup

  1. To install dependencies type this command on terminal
> npm install
  1. To start the server type this command on terminal
> npm start

Gateway API

Pay payment through Gateway

  1. Open your browser & type on the url :
> http://localhost:3000

This url will hit our api & this api will send request to city Bank gateway to initiate create order session. Order amount & description will needed to send the request. Amount must needed to multiply by 100 before sending the request. You must need to provide approved url, denied url & canceled url for this request also. this url will be hit after payment will successful or unsuccessful. If this request will successful you will get redirect url, orderId & sessionId from the request. This redirect url will be used to redirect your browser url & this url redirect to payment page. Need to fill Card No, Expire date, CVV No properly. Then submit your info for payment. If your payment will be successful, then you will get the response on

> http://localhost:3000/approved

Now you will get this response & retrieve payment information from app.js & api will be

/approved

If you payment will be denied then you will get response on

> http://localhost:3000/denied

Now you will get this response & retrieve order information from app.js & api will be

/denied

If your payment will be canceled, then you will get the response on

> http://localhost:3000/canceled

Now you will get this response & retrieve order information from app.js & api will be

/canceled

Get Payment Information

To get existing payment information you need to type on your browser:

http://localhost:3000/payment?orderId='XXXX'&sessionId='XXXXXXXXXXXX'

Here, OrderId & sessionId must be that orderId & sessionId; which you will get from initiate create order session.

On successful request you will get full details of the payment.

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.