GithubHelp home page GithubHelp logo

tesypay's Introduction

Modules

  • common - contails common classes for webhook and tespay services
  • payemnt-api - testpay service
  • webhook - callback service

Checksum algorithm

The signature is constructed by performing an SHA-256 calculation on string build up by concatenating the fields sended to to webhook listener. Signature = SHA-256 (currency + amount + SHA-256(ASCII(secretWord)).toUpperCase + paymentId + externalId* + status)

  • if externalId is null, field skipped

How to build

gradlew build

OAuth2

In order to accrue access token send POST request

POST /oauth2/token HTTP/1.1
Host: localhost:8080
Authorization: Basic Y2xpZW50X2lkOmNsaWVudF9zZWNyZXQ=
Cache-Control: no-cache
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials&scope=payments

{
    "access_token": "0dc34cad-791f-46cf-b156-b552dfd62a00",
    "token_type": "bearer",
    "expires_in": 1799,
    "scope": "payments"
}

Where Authorization header values is Base64 encoded string: Base64(cleint_id:client_secret)

To configure clients edit application.yml file:

oauth2:
  clients:
  - clientId: client_id
    clientSecret: client_secret
    scopes:
    - payments
    - scope
    redirectUris:
    - http://example.com
    accessTokenValiditySeconds: 1800
    authorizedGrantTypes:
    - client_credentials

Webhook event properties

testpay:
  secret: secretWord
  webHook:
    readTimeout: 1000
    connectionTimeout: 2000
  job:
    retryCount: 25
    intervalInSeconds: 10368

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.