Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
0b80a61
add doc
malwarebo Nov 27, 2021
cadc102
Get album by ID
malwarebo Nov 27, 2021
88b0d95
Add editor config
malwarebo Nov 28, 2021
e297a5b
init error helper
malwarebo May 1, 2022
e5f047d
define error
malwarebo May 1, 2022
205c3e9
add mysql driver
malwarebo May 2, 2022
20a307c
add xendit config and sdk
malwarebo May 2, 2022
83a1ca7
refactor main
malwarebo May 3, 2022
0af2c31
define payment routes
malwarebo May 3, 2022
15fd3b1
add type structs
malwarebo May 3, 2022
2aa77c5
update wiki
malwarebo May 4, 2022
0970a4e
add more routes
malwarebo May 5, 2022
2e2cf2e
add beta wiki docs
malwarebo May 11, 2022
e4440f5
add more dirs
malwarebo May 11, 2022
e260c86
add dep bot workflow
malwarebo Jun 19, 2022
c8fd077
add package ecosystem
malwarebo Jul 2, 2022
720e3f7
Bump github.com/gin-gonic/gin from 1.7.7 to 1.8.1
dependabot[bot] Jul 2, 2022
8d6d249
Merge pull request #1 from malwarebo/dependabot/go_modules/github.com…
malwarebo Jul 17, 2022
988df64
chore: update workflow
malwarebo Aug 7, 2022
dfd44f1
(build)-deps(deps): Bump github.com/gin-gonic/gin from 1.8.1 to 1.8.2
dependabot[bot] Dec 22, 2022
9eb8015
Merge pull request #2 from malwarebo/dependabot-go_modules-github.com…
malwarebo Dec 23, 2022
64c2373
(build)-deps(deps): Bump golang.org/x/net from 0.4.0 to 0.7.0
dependabot[bot] Feb 18, 2023
64a9ca8
Merge pull request #3 from malwarebo/dependabot-go_modules-golang.org…
malwarebo Feb 20, 2023
bb60e77
rebuild app
malwarebo Feb 26, 2023
348c728
Fix package system
malwarebo Feb 26, 2023
47dfc8b
Update README.md
malwarebo Feb 26, 2023
61b8ba9
add make support
malwarebo Feb 26, 2023
36c2850
Update dependabot.yml
malwarebo Apr 9, 2023
a476fe1
Merge pull request #5 from malwarebo/malwarebo-patch-1
malwarebo Apr 9, 2023
82667b1
(build)-(deps): Bump github.com/xendit/xendit-go from 1.0.15 to 1.0.19
dependabot[bot] May 29, 2023
fa642bc
Merge pull request #9 from malwarebo/dependabot-go_modules-github.com…
malwarebo May 29, 2023
a2131cc
(build)-(deps): Bump github.com/xendit/xendit-go from 1.0.19 to 1.0.25
dependabot[bot] Jul 11, 2023
f136c8a
Merge pull request #14 from malwarebo/dependabot-go_modules-github.co…
malwarebo Nov 25, 2023
0c8f065
(init): setup project structure and deps
malwarebo Aug 11, 2024
2b15744
Merge branch 'master' of https://github.com/malwarebo/gopay
malwarebo Aug 11, 2024
4930701
docs: add a readme file
malwarebo Aug 11, 2024
f730458
feat: implement xendit and stripe charge/refund functions
malwarebo Jan 26, 2025
718a799
refactor: reorganize codebase and implement payment orchestration
malwarebo Jan 26, 2025
64c95b3
feat: implement subscription and dispute management
malwarebo Jan 26, 2025
4450f2c
chore: add api usage documentation
malwarebo Jan 26, 2025
4f6eeb3
feat(database): integrate PostgreSQL for persistent storage
malwarebo Jan 26, 2025
730d8e6
feat: use gorm instead of raw mysql queries
malwarebo Jan 26, 2025
69c5f4d
chore: add architecture documentation
malwarebo Jan 26, 2025
1b06937
chore(docs): add arch diagram
malwarebo Jan 26, 2025
201ae19
chore(docs): add reference to main docs for arch
malwarebo Jan 26, 2025
db8837d
feat: pretty up the data before saving to datastore
malwarebo Jan 26, 2025
d05f0f8
chore: fix licensing
malwarebo Jan 26, 2025
b620399
feat(build): dockerize service for easier use
malwarebo Jan 26, 2025
dfa91e9
build: use xendit v6 package
malwarebo Jan 28, 2025
9c87729
chore(docs): rearrange documents
malwarebo Jan 31, 2025
dba2c67
build: configure dependabot runner
malwarebo Feb 23, 2025
1921004
build: configure go-build workflow
malwarebo Feb 23, 2025
39e203b
chore: add push status for go build
malwarebo Feb 23, 2025
be69dcf
feat: add invoice handling mechanism
malwarebo Feb 23, 2025
5936a03
chore: remove push event status
malwarebo Feb 23, 2025
f5128f0
chore(docs): update documentation
malwarebo Apr 1, 2025
20fc5f3
feat(cahing): add redis support
malwarebo Apr 4, 2025
d6af3c1
chore: improved editor support
malwarebo Apr 4, 2025
c0616e7
feat(provider): check for provider availability
malwarebo Apr 4, 2025
c75dd0b
Update gopay
malwarebo Apr 4, 2025
d87b32f
Revert "Update gopay"
malwarebo Apr 4, 2025
cde7192
chore(docs): add cache info to wiki
malwarebo Apr 4, 2025
69b3422
refactor: caching use and database setup
malwarebo Apr 4, 2025
9e19187
chore(docs): add docs
malwarebo Apr 8, 2025
a0106c9
build(deps/stripe): upgrade packages and stripe to v82
malwarebo Apr 8, 2025
a921f8e
feat(stripe/subscriptions): implement create subscription handler
malwarebo Apr 8, 2025
90794d0
build(docker): update go version
malwarebo Apr 8, 2025
f976b55
feat(stripe): implement update subscription handler
malwarebo Apr 8, 2025
a2949aa
chore(entrypoint): remove duplicate api handlers
malwarebo Apr 8, 2025
226b1c0
feat(postgres): add support for read replicas
malwarebo Apr 8, 2025
eef9ce5
feat(providers/stripe): impl subscription handlers
malwarebo Apr 9, 2025
506aa17
deps: bump direct and indirect packages (#28)
malwarebo Jun 23, 2025
b633e8f
feat: add provider handling tracking
malwarebo Jun 27, 2025
5866984
chore: Add linting and security checks to CI
malwarebo Jun 27, 2025
9303330
chore: download packages in lint step
malwarebo Jun 27, 2025
3870b3e
feat: implement remaining stripe provider handlers
malwarebo Aug 8, 2025
9342337
feat: enhance system performance
malwarebo Aug 8, 2025
01e785d
feat: improve type safety and error handling
malwarebo Aug 8, 2025
ac543c7
fix ci setup and imports
malwarebo Aug 8, 2025
dc28a0f
docs: enhance api use documentation
malwarebo Aug 8, 2025
5a15a9f
chore: remove lint and security ci jobs
malwarebo Aug 8, 2025
da228ff
feat: make debug console output more verbose
malwarebo Aug 8, 2025
0f57598
feat(fraud:phase-1): implement LLM based fraud detection
malwarebo Aug 10, 2025
be2f1e4
docs: add fraud detection feature overview to README
malwarebo Aug 10, 2025
10fedca
Add auth, security and txn improvements (#29)
malwarebo Sep 21, 2025
e73ae23
Improve logging, retrying and observability (#30)
malwarebo Sep 21, 2025
06d4114
refactor: Remove empty directories and rename files for clarity
malwarebo Sep 24, 2025
50095ed
chore: update project dependencies
malwarebo Sep 24, 2025
b45c52b
chore: use go 1.24 image for docker
malwarebo Sep 24, 2025
3e02ad2
chore: add docs about routing (#33)
malwarebo Sep 29, 2025
779ef3c
feat: add smart routing layer (#32)
malwarebo Sep 29, 2025
3e8d99e
refactor: consolidate configuration and implement security features
malwarebo Oct 5, 2025
e177d25
feat(infra): add monitoring and more prod ready features
malwarebo Oct 5, 2025
5d4b06a
feat: improve observability and testing infra
malwarebo Oct 5, 2025
a3b8f98
docs: add api reference docs
malwarebo Oct 5, 2025
0f92e37
feat: migrate to stripe payment intents
malwarebo Oct 13, 2025
1e101ad
fix: security-check script export PATH
malwarebo Oct 13, 2025
a124fe5
feat: add Xendit auth flow for regional compliance
malwarebo Oct 13, 2025
cc1cac2
refactor(webhooks): use a secure unified webhook handler
malwarebo Oct 13, 2025
8eca279
refactor: address community feedback & rename dirs/files
malwarebo Nov 7, 2025
293dd31
feat: Setup unit testing and add some initial tests
malwarebo Nov 7, 2025
52fab7c
chore: remove performance files meant for local testing only
malwarebo Nov 7, 2025
70b7dc4
fix: test setup helpers
malwarebo Nov 7, 2025
b7f48fe
chore: rebrand because of TM issues
malwarebo Nov 7, 2025
e566a13
chore: update docs wrt rebrand
malwarebo Nov 7, 2025
abf2251
feat: add customer/payment method management and persistent provider …
malwarebo Nov 8, 2025
690c674
chore: remove unused dependencies
malwarebo Nov 8, 2025
f289fe6
chore: remove test files, binary, and fix gitignore
malwarebo Nov 8, 2025
e24d8d7
chore: remove /api from endpoint path
malwarebo Nov 10, 2025
cc7160d
refactor: remove observability & perf code added for experimental use
malwarebo Nov 15, 2025
406997a
chore: use more concise naming for api handlers
malwarebo Nov 15, 2025
1159c5b
chore: update system docs to reflect new updates
malwarebo Nov 15, 2025
f3298d8
chore: update system dependencies
malwarebo Nov 15, 2025
89994b9
chore: refine and improve usage documentation
malwarebo Nov 17, 2025
2c60285
chore:update architecture diagram
malwarebo Nov 17, 2025
155ae92
chore: revise readme and format a bit
malwarebo Nov 17, 2025
17905d6
chore: improve code quality for config and middleware
malwarebo Dec 1, 2025
837efd4
refactor: use the shared GetDB(ctx) method
malwarebo Dec 1, 2025
84052aa
security(deps): bump github.com/redis/go-redis/v9 from 9.16.0 to 9.17.2
dependabot[bot] Dec 1, 2025
aaf3872
Merge pull request #43 from malwarebo/dependabot/go_modules/github.co…
malwarebo Dec 6, 2025
3073a59
feat: add webhooks, idempotency, 3DS, auth+capture, audit logs and mu…
malwarebo Dec 6, 2025
0401714
feat: implement gateway-agnostic payment abstraction
malwarebo Dec 7, 2025
dccd6e7
chore: move utils under provider
malwarebo Dec 7, 2025
f356bd4
chore: add project logo
malwarebo Dec 7, 2025
d10026c
chore: make fraud check optional since it is experimental
malwarebo Dec 7, 2025
62e8630
feat: - Add Invoice/Payout/Customer/PaymentMethod/Balance routes
malwarebo Dec 7, 2025
4a4590a
fix: Discarded error after customer update may cause nil pointer in r…
malwarebo Dec 7, 2025
490a78b
feat: Add initial Razorpay support
malwarebo Dec 7, 2025
dd87812
chore: Remove temp ip analyzer
malwarebo Dec 7, 2025
9458e56
deps: bump crypto version
malwarebo Dec 7, 2025
dc6a57c
feat(providers): implement Razorpay disputes, payouts and Xendit paym…
malwarebo Jan 6, 2026
b1e3e91
chore: cleanup and organize docs
malwarebo Jan 6, 2026
440a9fb
chore: add interactive architecture diagram
malwarebo Jan 6, 2026
ab13a5c
chore: clean up go.sum transitive dependency versions
malwarebo Jan 6, 2026
c8253c0
feat: integrate dispute accept/contest operations with payment providers
malwarebo Jan 18, 2026
3adb281
feat: use xendit api to create susbcriptions
malwarebo Jan 18, 2026
33b5894
feat: bootstrap airwallex integration
malwarebo Jan 18, 2026
b9b1a75
chore: upgrade stripe to latest
malwarebo Jan 18, 2026
d4b4600
fix: resolve high and medium severity security issues
malwarebo Jan 18, 2026
34c62a8
fix: resolve code security vulnerabilities
malwarebo Jan 18, 2026
804a398
docs: add security policy
malwarebo Jan 18, 2026
f330c57
security(deps): bump golang.org/x/crypto from 0.46.0 to 0.47.0
dependabot[bot] Jan 19, 2026
1479d52
Merge pull request #44 from malwarebo/dependabot/go_modules/golang.or…
malwarebo Jan 19, 2026
ce427f3
security(deps): bump github.com/redis/go-redis/v9 from 9.17.2 to 9.17.3
dependabot[bot] Jan 26, 2026
97f32df
Merge pull request #45 from malwarebo/dependabot/go_modules/github.co…
malwarebo Jan 27, 2026
07f0a84
docker(deps): bump golang from 1.24-alpine to 1.26-alpine
dependabot[bot] Feb 16, 2026
97f7c46
fix: resolve critical bugs, security issues, and standardize API
malwarebo Feb 25, 2026
ed7d789
Merge pull request #52 from malwarebo/fix/critical-bugs-and-api-stand…
malwarebo Feb 25, 2026
1e12425
security(deps): bump github.com/redis/go-redis/v9 from 9.17.3 to 9.18.0
dependabot[bot] Feb 25, 2026
a21cf9f
Merge branch 'master' into dependabot/docker/golang-1.26-alpine
malwarebo Feb 25, 2026
e0317ce
Merge pull request #49 from malwarebo/dependabot/docker/golang-1.26-a…
malwarebo Feb 25, 2026
ceb40e9
Merge branch 'master' into dependabot/go_modules/github.com/redis/go-…
malwarebo Feb 25, 2026
a914323
Merge pull request #48 from malwarebo/dependabot/go_modules/github.co…
malwarebo Feb 25, 2026
31ff61f
security(deps): bump github.com/stripe/stripe-go/v84
dependabot[bot] Mar 9, 2026
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
29 changes: 29 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Git
.git
.gitignore

# Docker
Dockerfile
docker-compose.yml

# Go
*.exe
*.exe~
*.dll
*.so
*.dylib
*.test
*.out
go.work

# IDE
.vscode/
.idea/

# Misc
.DS_Store
*.swp
*.swo

# Dependency directories
vendor/
36 changes: 36 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# EditorConfig helps maintain consistent coding styles across various editors and IDEs
# See: https://editorconfig.org/
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2

# Go files follow Go conventions (tabs with width=8)
[{*.go,go.mod,go.sum}]
indent_style = tab
indent_size = 8

# Makefiles require tabs
[Makefile]
indent_style = tab

# Markdown files
[*.md]
indent_style = space
indent_size = 4
trim_trailing_whitespace = false

# Config files
[*.{yml,yaml,json,toml}]
indent_style = space
indent_size = 2

# Shell scripts
[*.{sh,bash}]
indent_style = space
indent_size = 2
35 changes: 35 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
reviewers:
- "malwarebo"
assignees:
- "malwarebo"
commit-message:
prefix: "security"
include: "scope"
labels:
- "security"
- "dependencies"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
reviewers:
- "malwarebo"
assignees:
- "malwarebo"
commit-message:
prefix: "docker"
include: "scope"
labels:
- "docker"
- "security"
52 changes: 52 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'

- name: Setup CI environment
run: ./scripts/ci-setup.sh

- name: Install golangci-lint
uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.0
with:
version: v1.62.2

- name: Run golangci-lint
run: golangci-lint run --timeout=5m

test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'

- name: Setup CI environment
run: ./scripts/ci-setup.sh

- name: Run tests
run: go test -v ./...
24 changes: 24 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: conductor docker build

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:

build:

runs-on: ubuntu-latest

permissions:
contents: read

steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag conductor:$(date +%s)
26 changes: 26 additions & 0 deletions .github/workflows/go-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: build

on:
push:
branches:
- master
pull_request:
branches:
- master

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23.0'
- name: Build
run: go build ./...
94 changes: 94 additions & 0 deletions .github/workflows/security-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Security Scan

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
schedule:
- cron: '0 2 * * 1'

permissions:
contents: read
security-events: write

jobs:
dependency-scan:
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'

- name: Run govulncheck
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...

- name: Run gosec
uses: securego/gosec@d4617f51baf75f4f809066386a4f9d27b3ac3e46 # v2.21.4
with:
args: '-fmt sarif -out gosec.sarif ./...'

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: gosec.sarif

license-scan:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'

- name: Install go-licenses
run: go install github.com/google/go-licenses@latest

- name: Check licenses
run: |
go-licenses report ./... --template="{{.Name}} {{.Version}} {{.License}}"

- name: Generate SBOM
run: |
go-licenses csv ./... > sbom.csv
echo "SBOM generated: sbom.csv"

docker-scan:
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Build Docker image
run: docker build -t conductor:security-scan .

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # v0.29.0
with:
image-ref: 'conductor:security-scan'
format: 'sarif'
output: 'trivy-results.sarif'

- name: Upload Trivy scan results
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: 'trivy-results.sarif'
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
conductor

/vendor/
go.work

.env
.env.local

config/secure.json

*.log
*.tmp

.DS_Store
34 changes: 34 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Start from the official Golang image
FROM golang:1.26-alpine AS builder

# Set the working directory inside the container
WORKDIR /app

# Copy go mod and sum files
COPY go.mod go.sum ./

# Download all dependencies
RUN go mod download

# Copy the source code into the container
COPY . .

# Build the application
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o conductor .

# Start a new stage from scratch
FROM alpine:latest

# Install CA certificates for HTTPS
RUN apk --no-cache add ca-certificates

WORKDIR /root/

# Copy the pre-built binary file from the previous stage
COPY --from=builder /app/conductor .

# Expose port 8080 (adjust if your app uses a different port)
EXPOSE 8080

# Command to run the executable
CMD ["./conductor"]
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Irfan

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading