46 lines
1.9 KiB
PHP
46 lines
1.9 KiB
PHP
<?php
|
|
|
|
namespace Config;
|
|
|
|
use CodeIgniter\Config\BaseConfig;
|
|
|
|
class DigitMotor extends BaseConfig
|
|
{
|
|
public string $baseUrl;
|
|
public string $authPath;
|
|
public string $executorPath;
|
|
public string $username;
|
|
public string $password;
|
|
public string $environment;
|
|
public int $timeout;
|
|
public int $tokenLeewaySec;
|
|
/** Partner key required by Digit policy PDF headerParam.Authorization */
|
|
public string $pdfAuthKey;
|
|
public array $integrationIds;
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
|
|
$this->baseUrl = rtrim((string) env('DIGIT_MOTOR_BASE_URL', 'https://preprod-oneapi.godigit.com'), '/');
|
|
$this->authPath = (string) env('DIGIT_MOTOR_AUTH_PATH', '/OneAPI/v1/auth');
|
|
$this->executorPath = (string) env('DIGIT_MOTOR_EXECUTOR_PATH', '/OneAPI/v1/executor');
|
|
$this->username = (string) env('DIGIT_MOTOR_USERNAME', '');
|
|
$this->password = (string) env('DIGIT_MOTOR_PASSWORD', '');
|
|
$this->environment = (string) env('DIGIT_MOTOR_ENVIRONMENT', 'staging');
|
|
$this->timeout = (int) env('DIGIT_MOTOR_TIMEOUT', 30);
|
|
$this->tokenLeewaySec = (int) env('DIGIT_MOTOR_TOKEN_LEEWAY_SEC', 60);
|
|
$this->pdfAuthKey = (string) env('DIGIT_MOTOR_PDF_AUTH_KEY', '');
|
|
|
|
// Integration IDs from NHANCE Digit API kit (CURL / Bruno export)
|
|
$this->integrationIds = [
|
|
'quickQuote' => (string) env('DIGIT_MOTOR_IID_QUICK_QUOTE', '29266-0100'),
|
|
'createQuote' => (string) env('DIGIT_MOTOR_IID_CREATE_QUOTE', '29268-0100'),
|
|
'kycStatus' => (string) env('DIGIT_MOTOR_IID_KYC', '29269-0100'),
|
|
'payment' => (string) env('DIGIT_MOTOR_IID_PAYMENT', '29270-0100'),
|
|
'policyStatus' => (string) env('DIGIT_MOTOR_IID_POLICY_STATUS', '29271-0100'),
|
|
'policyPdf' => (string) env('DIGIT_MOTOR_IID_POLICY_PDF', '29272-0100'),
|
|
];
|
|
}
|
|
}
|