-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bf5dc06
commit cc1b279
Showing
1 changed file
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,16 @@ | ||
# Payment service | ||
# 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. |