An open API service indexing awesome lists of open source software.

https://github.com/gbburleigh/quick-gateway

This repository implements a mock payment gateway in Go, simulating transaction processing without connecting to real financial institutions. It supports various transaction types, including charges, refunds, and voids. This project serves as a demonstration of payment processing concepts and software architecture.
https://github.com/gbburleigh/quick-gateway

finance fintech gateway go payments processor settlements transactions

Last synced: 4 months ago
JSON representation

This repository implements a mock payment gateway in Go, simulating transaction processing without connecting to real financial institutions. It supports various transaction types, including charges, refunds, and voids. This project serves as a demonstration of payment processing concepts and software architecture.

Awesome Lists containing this project

README

          

# Quick Gateway

Quick Gateway is a simple gateway for processing payments. It is designed to be easy to use and integrate with existing systems.

## Getting Started

### Installation

```bash
go get github.com/gbburleigh/quick-gateway
```

### API

`quick-gateway` relies on a client-gateway-processor architecture. Transactions are created at the client level, to emulate a POS system such as a terminal. The client is responsible for creating the transaction and sending it to the gateway. The gateway is responsible for processing the transaction, normalizing and logging it as necessary, and sending it to the processor. The processor is responsible for processing the transaction and returning the result to the gateway. Most processors use proprietary APIs and require subscriptions to integrate with them, so `quick-gateway` is designed with a simple mock processor that simulates these services for us.

### Usage

#### Create a Client

```go
client := client.NewClient("terminal_id", "secret_key", "environment", "gateway_id")

// TODO: Hook into POS to read transaction data and trigger client to create transaction
const transaction_data =

const Transaction = client.CreateTransaction(
transaction_data.Type,
transaction_data.Amount,
transaction_data.CardPresent,
transaction_data.ACH,
transaction_data.Method,
)

client.SendTransaction(Transaction)
```

#### Receive a Transaction

```go

const Transaction =

const Gateway = gateway.NewGateway(client)

Gateway.HandleTransaction(Transaction)
```