Fix autogenerated README.md
This commit is contained in:
70
README.md
70
README.md
@@ -61,16 +61,13 @@
|
|||||||
- **Request Parameters**: None
|
- **Request Parameters**: None
|
||||||
- **Response Parameters**:
|
- **Response Parameters**:
|
||||||
```json
|
```json
|
||||||
{
|
[
|
||||||
"type": "string",
|
|
||||||
"items": [
|
|
||||||
{
|
{
|
||||||
"bank_id": "string",
|
"bank_id": "string",
|
||||||
"name": "string",
|
"name": "string",
|
||||||
"bic": "string"
|
"bic": "string"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
|
||||||
```
|
```
|
||||||
- **Curl Example**:
|
- **Curl Example**:
|
||||||
```bash
|
```bash
|
||||||
@@ -80,12 +77,22 @@
|
|||||||
#### Create Payout
|
#### Create Payout
|
||||||
- **Path**: `/api/v1/payout/create`
|
- **Path**: `/api/v1/payout/create`
|
||||||
- **Method**: POST
|
- **Method**: POST
|
||||||
- **Request Parameters**:
|
- **Request Parameters: SBP**:
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"payout_type": "string (spb or yoo_money)",
|
"payout_type": "spb",
|
||||||
"account_number": "string (required for yoo_money)",
|
"bank_id": "string",
|
||||||
"bank_id": "string (required for spb)",
|
"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"
|
"amount": "float"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -101,7 +108,7 @@
|
|||||||
curl -X POST http://localhost:8080/api/v1/payout/create \
|
curl -X POST http://localhost:8080/api/v1/payout/create \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-H "Authorization: Bearer <session_token>" \
|
-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
|
#### Payout Callback
|
||||||
@@ -113,7 +120,7 @@
|
|||||||
```bash
|
```bash
|
||||||
curl -X POST http://localhost:8080/api/v1/payout/callback \
|
curl -X POST http://localhost:8080/api/v1/payout/callback \
|
||||||
-H "Content-Type: application/json" \
|
-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
|
## Service Configuration
|
||||||
@@ -121,47 +128,50 @@
|
|||||||
### Server Configuration
|
### Server Configuration
|
||||||
| Property | Description | Default Value |
|
| Property | Description | Default Value |
|
||||||
|----------|-------------|---------------|
|
|----------|-------------|---------------|
|
||||||
| Server.Tls.Enabled | Enable TLS for the server | true |
|
| Server.Tls.Enabled | Enable TLS for the server | false |
|
||||||
| Server.Tls.CertFile | Path to TLS certificate file | ../server.pem |
|
| Server.Tls.CertFile | Path to TLS certificate file | (empty) |
|
||||||
| Server.Tls.KeyFile | Path to TLS key file | ../server-key.pem |
|
| Server.Tls.KeyFile | Path to TLS key file | (empty) |
|
||||||
| Server.Port | Server port | :8080 |
|
| Server.Port | Server port | :8080 |
|
||||||
| Server.WriteTimeout | Write timeout for requests | 30s |
|
| Server.WriteTimeout | Write timeout for requests | 35s |
|
||||||
| Server.ReadTimeout | Read timeout for requests | 30s |
|
| Server.ReadTimeout | Read timeout for requests | 35s |
|
||||||
| Server.EnablePProfEndpoints | Enable pprof debug endpoints | false |
|
| Server.EnablePProfEndpoints | Enable pprof debug endpoints | false |
|
||||||
|
|
||||||
### Database Configuration
|
### Database Configuration
|
||||||
| Property | Description | Default Value |
|
| Property | Description | Default Value |
|
||||||
|----------|-------------|---------------|
|
|----------|-------------|---------------|
|
||||||
| Database.Type | Database type (sqlite, postgres, mysql) | sqlite |
|
| Database.Type | Database type (sqlite, postgres) | (empty) |
|
||||||
| Database.Connection | Database connection string | ../payouts.db |
|
| Database.Connection | Database connection string | (empty) |
|
||||||
| Database.LogLevel | Database logging level | Debug |
|
| Database.LogLevel | Database logging level | Info |
|
||||||
| Database.TraceRequests | Enable request tracing | true |
|
| Database.TraceRequests | Enable request tracing | false |
|
||||||
|
|
||||||
### YooKassa Configuration
|
### YooKassa Configuration
|
||||||
| Property | Description | Default Value |
|
| Property | Description | Default Value |
|
||||||
|----------|-------------|---------------|
|
|----------|-------------|---------------|
|
||||||
| YooKassa.Test | Enable test mode | true |
|
| YooKassa.Test | Enable test mode | false |
|
||||||
| YooKassa.ApiBaseKey | YooKassa base API key | (empty) |
|
| YooKassa.ApiBaseKey | YooKassa base API key | (empty) |
|
||||||
| YooKassa.ApiBaseSecret | YooKassa base API secret | (empty) |
|
| YooKassa.ApiBaseSecret | YooKassa base API secret | (empty) |
|
||||||
| YooKassa.ApiPaymentKey | YooKassa payment API key | (empty) |
|
| YooKassa.ApiPaymentKey | YooKassa payment API key | (empty) |
|
||||||
| YooKassa.ApiPaymentSecret | YooKassa payment API secret | (empty) |
|
| YooKassa.ApiPaymentSecret | YooKassa payment API secret | (empty) |
|
||||||
| YooKassa.BaseUrl | YooKassa API base URL | https://api.yookassa.ru/v3 |
|
| YooKassa.BaseUrl | YooKassa API base URL | https://api.yookassa.ru/v3 |
|
||||||
| YooKassa.Timeout | Request timeout | 30s |
|
| YooKassa.Timeout | Request timeout | 2s |
|
||||||
| YooKassa.CheckAllowedCallbackAddress | Check callback IP addresses | false |
|
| YooKassa.CheckAllowedCallbackAddress | Check callback IP addresses | true |
|
||||||
| YooKassa.AllowedCallbackSubnets | Allowed callback IP subnets | (empty) |
|
| YooKassa.AllowedCallbackSubnets | Allowed callback IP subnets | (list of allowed subnets) |
|
||||||
| YooKassa.CallbackProcessTimeout | Callback processing timeout | 5s |
|
| YooKassa.CallbackProcessTimeout | Delay to process YooKassa allback | 1s |
|
||||||
| YooKassa.Retry.Enabled | Enable request retries | false |
|
| YooKassa.Retry.Enabled | Enable request retries | false |
|
||||||
| YooKassa.Retry.Count | Number of retry attempts | 3 |
|
| YooKassa.Retry.Count | Number of retry attempts | 3 |
|
||||||
| YooKassa.Retry.WaitTime | Initial wait time between retries | 1s |
|
| YooKassa.Retry.WaitTime | Initial wait time between retries | 200ms |
|
||||||
| YooKassa.Retry.MaxWaitTime | Maximum wait time between retries | 30s |
|
| YooKassa.Retry.MaxWaitTime | Maximum wait time between retries | 5s |
|
||||||
|
|
||||||
### Cache Configuration
|
### Cache Configuration
|
||||||
| Property | Description | Default Value |
|
| Property | Description | Default Value |
|
||||||
|----------|-------------|---------------|
|
|----------|-------------|---------------|
|
||||||
| Cache.TTL | Session TTL | 1h |
|
| Cache.TTL | Session TTL | 24h |
|
||||||
|
|
||||||
### Logging Configuration
|
### Logging Configuration
|
||||||
| Property | Description | Default Value |
|
| Property | Description | Default Value |
|
||||||
|----------|-------------|---------------|
|
|----------|-------------|---------------|
|
||||||
| Log.Level | Log level | info |
|
| Log.Level | Log level | DEBUG |
|
||||||
| Log.Format | Log format (json, text) | json |
|
| 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.ReadTimeout = 35s
|
||||||
Server.EnablePProfEndpoints = false
|
Server.EnablePProfEndpoints = false
|
||||||
|
|
||||||
|
Server.Tls.Enabled = false
|
||||||
|
Server.Tls.CertFile =
|
||||||
|
Server.Tls.KeyFile =
|
||||||
|
|
||||||
Socket.MaxHttpBufferSize = 2097152
|
Socket.MaxHttpBufferSize = 2097152
|
||||||
Socket.PingInterval = 25s
|
Socket.PingInterval = 25s
|
||||||
Socket.PingTimeout = 20s
|
Socket.PingTimeout = 20s
|
||||||
|
|||||||
Reference in New Issue
Block a user