Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ A complete transaction reporting service for Global Payments, providing interact

## Available Implementations

- [.NET Core](./dotnet/) - ASP.NET Core web application
- [Go](./go/) - Go HTTP server application
- [Java](./java/) - Jakarta EE servlet-based web application
- [Node.js](./nodejs/) - Express.js web application
- [PHP](./php/) - PHP web application
- [Python](./python/) - Flask web application
- [.NET Core](./dotnet/) - ([Preview](https://githubbox.com/globalpayments-samples/reporting-service/tree/main/dotnet)) - ASP.NET Core web application
- [Java](./java/) - ([Preview](https://githubbox.com/globalpayments-samples/reporting-service/tree/main/java)) - Jakarta EE servlet-based web application
- [Node.js](./nodejs/) - ([Preview](https://githubbox.com/globalpayments-samples/reporting-service/tree/main/nodejs)) - Express.js web application
- [PHP](./php/) - ([Preview](https://githubbox.com/globalpayments-samples/reporting-service/tree/main/php)) - PHP web application

## Features

Expand Down Expand Up @@ -47,7 +45,7 @@ Each implementation includes comprehensive reporting features:

## Quick Start

1. **Choose your language** - Navigate to any implementation directory (nodejs, python, php, java, dotnet, go)
1. **Choose your language** - Navigate to any implementation directory (nodejs, php, java, dotnet)
2. **Set up credentials** - Copy `.env.sample` to `.env` and add your Global Payments API keys
3. **Install dependencies** - Run the installation command for your language (see individual READMEs)
4. **Start the server** - Execute `./run.sh` or use the language-specific run command
Expand All @@ -71,7 +69,7 @@ This reporting service is ideal for:

- Global Payments account with API credentials
- Development environment for your chosen language
- Package manager (npm, pip, composer, maven, dotnet, go mod)
- Package manager (npm, composer, maven, dotnet)

## Docker Support

Expand All @@ -87,10 +85,8 @@ docker-compose up

# Services will be available at:
# - Node.js: http://localhost:8001
# - Python: http://localhost:8002
# - PHP: http://localhost:8003
# - Java: http://localhost:8004
# - Go: http://localhost:8005
# - .NET: http://localhost:8006
```

Expand Down
38 changes: 0 additions & 38 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,6 @@ services:
retries: 3
start_period: 30s

python:
build:
context: ./python
dockerfile: Dockerfile
ports:
- "8002:8000"
environment:
- PORT=8000
- PUBLIC_API_KEY=${PUBLIC_API_KEY}
- SECRET_API_KEY=${SECRET_API_KEY}
networks:
- payments
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8000/config"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s

php:
build:
context: ./php
Expand Down Expand Up @@ -73,25 +54,6 @@ services:
retries: 3
start_period: 60s

go:
build:
context: ./go
dockerfile: Dockerfile
ports:
- "8005:8000"
environment:
- PORT=8000
- PUBLIC_API_KEY=${PUBLIC_API_KEY}
- SECRET_API_KEY=${SECRET_API_KEY}
networks:
- payments
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8000/config"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s

dotnet:
build:
context: ./dotnet
Expand Down
8 changes: 3 additions & 5 deletions docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ build_images() {

start_services() {
echo -e "${BLUE}🚀 Starting payment services...${NC}"
docker-compose up -d nodejs python php java go dotnet
docker-compose up -d nodejs php java dotnet

echo -e "${YELLOW}⏳ Waiting for services to be healthy...${NC}"
docker-compose ps
Expand All @@ -61,10 +61,8 @@ start_services() {
echo ""
echo "Services available at:"
echo " Node.js: http://localhost:8001"
echo " Python: http://localhost:8002"
echo " PHP: http://localhost:8003"
echo " Java: http://localhost:8004"
echo " Go: http://localhost:8005"
echo " .NET: http://localhost:8006"
}

Expand All @@ -82,7 +80,7 @@ run_tests() {

# Start services if not running
echo -e "${YELLOW}📋 Ensuring services are running...${NC}"
docker-compose up -d nodejs python php java go dotnet
docker-compose up -d nodejs php java dotnet

# Wait for services to be healthy
echo -e "${YELLOW}⏳ Waiting for services to be ready...${NC}"
Expand All @@ -99,7 +97,7 @@ run_tests() {
run_single_test() {
local impl=$1
if [ -z "$impl" ]; then
echo -e "${RED}❌ Please specify implementation: nodejs, python, php, java, go, or dotnet${NC}"
echo -e "${RED}❌ Please specify implementation: nodejs, php, java, or dotnet${NC}"
exit 1
fi

Expand Down
29 changes: 29 additions & 0 deletions dotnet/.codesandbox/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
// These tasks will run in order when initializing your CodeSandbox project.
"setupTasks": [
{
"name": "Install Dependencies",
"command": "dotnet restore"
},
{
"name": "Create .env",
"command": "cp .env.sample .env"
}
],

// These tasks can be run from CodeSandbox. Running one will open a log in the app.
"tasks": {
"start": {
"name": "start",
"command": "dotnet watch -- run",
"runAtStart": true,
"preview": {
"port": 8000
}
},
"install": {
"name": "install dependencies",
"command": "dotnet restore"
}
}
}
7 changes: 7 additions & 0 deletions dotnet/.codesandbox/template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"title": "Global Payments C#",
"description": "The easiest way to get started from Docker in CodeSandbox",
"iconUrl": "https://globalpayments-samples.github.io/assets/img/g-symbol-dev-brand.png",
"tags": ["global-payments", "sample", "csharp"],
"published": false
}
4 changes: 4 additions & 0 deletions dotnet/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Devcontainer",
"image": "mcr.microsoft.com/devcontainers/dotnet"
}
6 changes: 4 additions & 2 deletions dotnet/.env.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# API Keys for Global Payments
# Replace these sample values with your actual API keys
PUBLIC_API_KEY=pkapi_your_public_key_here
SECRET_API_KEY=skapi_your_secret_key_here

# API Platform (GP API)
GP_API_APP_ID=4gPqnGBkppGYvoE5UX9EWQlotTxGUDbs #gitleaks:allow
GP_API_APP_KEY=FQyJA5VuEQfcji2M #gitleaks:allow
4 changes: 0 additions & 4 deletions go/.env.sample

This file was deleted.

28 changes: 0 additions & 28 deletions go/.gitignore

This file was deleted.

32 changes: 0 additions & 32 deletions go/Dockerfile

This file was deleted.

Loading