Skip to content

Commit

Permalink
Merge pull request #414 from Winter-Seminar-Series/payment
Browse files Browse the repository at this point in the history
Added the payment service
  • Loading branch information
AlisaLC authored Jan 5, 2024
2 parents 083051a + cc1b279 commit eeafcd2
Show file tree
Hide file tree
Showing 21 changed files with 1,405 additions and 0 deletions.
1 change: 1 addition & 0 deletions payment/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
16 changes: 16 additions & 0 deletions payment/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Payment service
Payment service is the adaptor that connects to IDPay in and logs all of the payments.

## Compiling
Compiling is easy with go 1.21. Just run `go build ./cmd/payment/` in project directory.

## Running
Configuration is done via environment variables. These are the list of environment variables that the program supports:

* `DATABASE_URL`: The URL used to connect to PostgreSQL database. For example: `host=localhost user=gorm password=gorm dbname=gorm port=9920`. [Read More](https://gorm.io/docs/connecting_to_the_database.html#PostgreSQL)
* `LISTEN_ADDRESS`: On what address should we listen? For example `127.0.0.1:12345`
* `IDPAY_APIKEY`: The API token of IDPay.
* `IDPAY_SANDBOX`: Should we run IDPay in sandbox environment for testing? This value should be a boolean and defaults to false.
* `GIN_MODE`: Set this value to `release` in production.

After setting these variables, just run the compiled program.
Loading

0 comments on commit eeafcd2

Please # to comment.