mirror of
https://github.com/andwati/telecom-platform.git
synced 2026-10-26 06:32:16 +00:00
feat: Add API key authentication support to charging engine client
- Add APIKey field to ChargingEngineConfig struct - Add apiKey field to ChargingEngineClient struct - Add setAPIKeyHeader method to set X-API-Key header when API key is configured - Call setAPIKeyHeader in CheckCredit, DeductCredit, AddCredit, GetBalance, and HealthCheck methods
This commit is contained in:
@@ -19,6 +19,7 @@ type Config struct {
|
||||
type ChargingEngineConfig struct {
|
||||
BaseURL string `json:"base_url"`
|
||||
Timeout time.Duration `json:"timeout"`
|
||||
APIKey string `json:"api_key"`
|
||||
}
|
||||
|
||||
type PaymentConfig struct {
|
||||
|
||||
Reference in New Issue
Block a user