Fix autogenerated README.md
This commit is contained in:
70
README.md
70
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 <session_token>" \
|
||||
-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 |
|
||||
| Log.Level | Log level | DEBUG |
|
||||
| Log.FilePath | | ./logs/payouts.log
|
||||
| Log.TextOutput | | false
|
||||
| Log.StdoutEnabled | | true
|
||||
| Log.FileEnabled | | false
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user