Code Monkey home page Code Monkey logo

rdp-notif-handler's Introduction

RDP-Notif-Handler

Micro service to handle notification post-payment. For testing purpose. Repo for testcase here

Services

Endpoint

Endpoint Method Description
/notif-handler-with-hosting POST Save JSON String sent to http://www.jsonblob.com
/notif-handler-v2 POST Save JSON String sent to database.
/get-last-notification GET Get last notification that stored in database.

Sample

/notif-handler-with-hosting

Request

{  
   "redirect_url":"http:\/\/localhost\/rdp\/service\/test-suite\/T_redirection_hosted_single\/redirect_url",
   "notify_url":"http:\/\/localhost\/rdp\/notif_server\/payment_api\/notif-url.php",
   "back_url":"http:\/\/localhost\/rdp\/service\/test-suite\/T_redirection_hosted_single\/back_url",
   "mid":"1000089029",
   "order_id":"TST102",
   "amount":"0.01",
   "ccy":"SGD",
   "api_mode":"redirection_hosted",
   "payment_type":"S",
   "merchant_reference":"the things to reference",
   "signature":"325cda0dc4a0dfa523afc542c245ae008ca73910779e670f96b3ed4bd241b966e752036afd1920ae9690ca475b82eda302a3b0a7ad9157a4d4cdb0cc38b36e52"
}

Response

Response code : 200

{
    "data": "https:\/\/jsonblob.com\/api\/jsonBlob\/7d1d524c-701f-11e7-9e0d-cb4350d25f03"
}

/notif-handler-v2

Request

{
	"redirect_url":"http:\/\/localhost\/rdp\/service\/test-suite\/T_redirection_hosted_single\/redirect_url",
	"notify_url":"http:\/\/localhost\/rdp\/notif_server\/payment_api\/notif-url.php",
	"back_url":"http:\/\/localhost\/rdp\/service\/test-suite\/T_redirection_hosted_single\/back_url",
	"mid":"1000089029",
	"order_id":"TST102",
	"amount":"0.01",
	"ccy":"SGD",
	"api_mode":"redirection_hosted",
	"payment_type":"S",
	"merchant_reference":"the things to reference",
	"signature":"325cda0dc4a0dfa523afc542c245ae008ca73910779e670f96b3ed4bd241b966e752036afd1920ae9690ca475b82eda302a3b0a7ad9157a4d4cdb0cc38b36e52"
}

Response

Response code : 200

{
    "resp_msg": "success"
}

/get-last-notification

Response

{
    "response_msg": "success",
    "response_value": {
        "ccy": "SGD",
        "mid": "1000089029",
        "amount": "0.01",
        "api_mode": "redirection_hosted",
        "back_url": "http://localhost/rdp/service/test-suite/T_redirection_hosted_single/back_url",
        "order_id": "TST102",
        "signature": "325cda0dc4a0dfa523afc542c245ae008ca73910779e670f96b3ed4bd241b966e752036afd1920ae9690ca475b82eda302a3b0a7ad9157a4d4cdb0cc38b36e52",
        "notify_url": "http://localhost/rdp/notif_server/payment_api/notif-url.php",
        "payment_type": "S",
        "redirect_url": "http://localhost/rdp/service/test-suite/T_redirection_hosted_single/redirect_url",
        "merchant_reference": "the things to reference"
    }
}

Deploying

Use heroku to deploy the application. Follow this guide

rdp-notif-handler's People

Contributors

bolon avatar

Watchers

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