From 0658854f47f0f2b1a7fb3c7d30a75249a5479b77 Mon Sep 17 00:00:00 2001 From: alxeg Date: Mon, 23 Mar 2026 14:02:22 +0300 Subject: [PATCH] Fix autogenerated README.md --- README.md | 70 ++++++++++++++++++++++----------------- config/payouts.properties | 4 +++ 2 files changed, 44 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 9fd4d77..ed6e067 100644 --- a/README.md +++ b/README.md @@ -61,16 +61,13 @@ - **Request Parameters**: None - **Response Parameters**: ```json - { - "type": "string", - "items": [ + [ { "bank_id": "string", "name": "string", "bic": "string" } - ] - } + ] ``` - **Curl Example**: ```bash @@ -80,12 +77,22 @@ #### Create Payout - **Path**: `/api/v1/payout/create` - **Method**: POST -- **Request Parameters**: +- **Request Parameters: SBP**: ```json { - "payout_type": "string (spb or yoo_money)", - "account_number": "string (required for yoo_money)", - "bank_id": "string (required for spb)", + "payout_type": "spb", + "bank_id": "string", + "amount": "float" + } + ``` +> **_NOTE:_** +> Phone number for SBP payout comes from user's profile + +- **Request Parameters: YooMoney**: + ```json + { + "payout_type": "yoo_money", + "account_number": "string", "amount": "float" } ``` @@ -101,7 +108,7 @@ curl -X POST http://localhost:8080/api/v1/payout/create \ -H "Content-Type: application/json" \ -H "Authorization: Bearer " \ - -d '{"payout_type":"spb","bank_id":"123456","amount":1000.00}' + -d '{"payout_type":"spb","bank_id":"123456","amount":10.00}' ``` #### Payout Callback @@ -113,7 +120,7 @@ ```bash curl -X POST http://localhost:8080/api/v1/payout/callback \ -H "Content-Type: application/json" \ - -d '{"id":"payout_123456","status":"succeeded","amount":{"value":"1000.00","currency":"RUB"}}' + -d '{"id":"payout_123456","status":"succeeded","amount":{"value":"10.00","currency":"RUB"}}' ``` ## Service Configuration @@ -121,47 +128,50 @@ ### Server Configuration | Property | Description | Default Value | |----------|-------------|---------------| -| Server.Tls.Enabled | Enable TLS for the server | true | -| Server.Tls.CertFile | Path to TLS certificate file | ../server.pem | -| Server.Tls.KeyFile | Path to TLS key file | ../server-key.pem | +| Server.Tls.Enabled | Enable TLS for the server | false | +| Server.Tls.CertFile | Path to TLS certificate file | (empty) | +| Server.Tls.KeyFile | Path to TLS key file | (empty) | | Server.Port | Server port | :8080 | -| Server.WriteTimeout | Write timeout for requests | 30s | -| Server.ReadTimeout | Read timeout for requests | 30s | +| Server.WriteTimeout | Write timeout for requests | 35s | +| Server.ReadTimeout | Read timeout for requests | 35s | | Server.EnablePProfEndpoints | Enable pprof debug endpoints | false | ### Database Configuration | Property | Description | Default Value | |----------|-------------|---------------| -| Database.Type | Database type (sqlite, postgres, mysql) | sqlite | -| Database.Connection | Database connection string | ../payouts.db | -| Database.LogLevel | Database logging level | Debug | -| Database.TraceRequests | Enable request tracing | true | +| Database.Type | Database type (sqlite, postgres) | (empty) | +| Database.Connection | Database connection string | (empty) | +| Database.LogLevel | Database logging level | Info | +| Database.TraceRequests | Enable request tracing | false | ### YooKassa Configuration | Property | Description | Default Value | |----------|-------------|---------------| -| YooKassa.Test | Enable test mode | true | +| YooKassa.Test | Enable test mode | false | | YooKassa.ApiBaseKey | YooKassa base API key | (empty) | | YooKassa.ApiBaseSecret | YooKassa base API secret | (empty) | | YooKassa.ApiPaymentKey | YooKassa payment API key | (empty) | | YooKassa.ApiPaymentSecret | YooKassa payment API secret | (empty) | | YooKassa.BaseUrl | YooKassa API base URL | https://api.yookassa.ru/v3 | -| YooKassa.Timeout | Request timeout | 30s | -| YooKassa.CheckAllowedCallbackAddress | Check callback IP addresses | false | -| YooKassa.AllowedCallbackSubnets | Allowed callback IP subnets | (empty) | -| YooKassa.CallbackProcessTimeout | Callback processing timeout | 5s | +| YooKassa.Timeout | Request timeout | 2s | +| YooKassa.CheckAllowedCallbackAddress | Check callback IP addresses | true | +| YooKassa.AllowedCallbackSubnets | Allowed callback IP subnets | (list of allowed subnets) | +| YooKassa.CallbackProcessTimeout | Delay to process YooKassa allback | 1s | | YooKassa.Retry.Enabled | Enable request retries | false | | YooKassa.Retry.Count | Number of retry attempts | 3 | -| YooKassa.Retry.WaitTime | Initial wait time between retries | 1s | -| YooKassa.Retry.MaxWaitTime | Maximum wait time between retries | 30s | +| YooKassa.Retry.WaitTime | Initial wait time between retries | 200ms | +| YooKassa.Retry.MaxWaitTime | Maximum wait time between retries | 5s | ### Cache Configuration | Property | Description | Default Value | |----------|-------------|---------------| -| Cache.TTL | Session TTL | 1h | +| Cache.TTL | Session TTL | 24h | ### Logging Configuration | Property | Description | Default Value | |----------|-------------|---------------| -| Log.Level | Log level | info | -| Log.Format | Log format (json, text) | json | \ No newline at end of file +| Log.Level | Log level | DEBUG | +| Log.FilePath | | ./logs/payouts.log +| Log.TextOutput | | false +| Log.StdoutEnabled | | true +| Log.FileEnabled | | false diff --git a/config/payouts.properties b/config/payouts.properties index 9d1a687..6edb3d6 100644 --- a/config/payouts.properties +++ b/config/payouts.properties @@ -3,6 +3,10 @@ Server.WriteTimeout = 35s Server.ReadTimeout = 35s Server.EnablePProfEndpoints = false +Server.Tls.Enabled = false +Server.Tls.CertFile = +Server.Tls.KeyFile = + Socket.MaxHttpBufferSize = 2097152 Socket.PingInterval = 25s Socket.PingTimeout = 20s