Skip to content

njaka/Payment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Required

  • .NET 5

Assumptions:

Endpoints

Process Payment

Method: POST

URI: /api/v1.0/payment

e.g of valid request:

{
  "card": {
    "cardNumber": "4111111111111122",
    "expirationDate": "06/21",
    "cvv": "123"
  },
  "amount": 100,
  "currency": "USD",
  "beneficiaryAlias": "merchant-njaka"
}

Retrieve Payment detail

Method: GET

URI: /api/v1.0/payment/{paymentId}

e.g payment details

{
  "paymentId": "00f15e68-c88a-4074-8f0b-2cc02b3d6a64",
  "card": {
    "cardNumber": "411111XXXXXX1122",
    "expirationDate": "2021-06-30T23:59:59",
    "cvv": "123"
  },
  "amount": 100,
  "currency": "USD",
  "beneficiaryAlias": "merchant-njaka",
  "status": 1,
  "paymentDate": "2020-06-18T00:05:20.0491589+02:00"
}

Event Store

Download (EventStoreDB 5.0.8)

https://eventstore.com/downloads/

Extract and using command run the command above to Start

EventStore.ClusterNode.exe --db ./db --log ./logs

Containerization

Build image

docker build -t njakaraz/paymentgateway:latest

Image pushed to Registry

docker push njakaraz/paymentgateway:latest

Run

docker run -it --rm -p 5053:80 njakaraz/paymentgateway --name paymentgateway

Access: http://localhost:5053/index.html

Monitoring

  • HealthCheck : {baseUrl}/health
  • Metrics : {baseUrl}/metrics

Architecture

  • Onion Architecture

Technologies used:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages