From cc1b279cd459ecba0e77b6135e15c22f47bd5d67 Mon Sep 17 00:00:00 2001 From: Hirbod Behnam Date: Fri, 5 Jan 2024 17:59:52 +0330 Subject: [PATCH] Update README.MD --- payment/README.MD | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/payment/README.MD b/payment/README.MD index 029db6e3..06eec8b4 100644 --- a/payment/README.MD +++ b/payment/README.MD @@ -1 +1,16 @@ -# Payment service \ No newline at end of file +# 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.