refactor: improve sandbox configuration parsing
This commit is contained in:
@@ -35,7 +35,7 @@ class OxapayProvider implements PaymentProviderContract
|
||||
$config = array_merge($dbConfig, $config);
|
||||
|
||||
$this->config = $config;
|
||||
$this->sandbox = (bool) ($config['sandbox'] ?? false);
|
||||
$this->sandbox = $config['sandbox'] === "true" ?? false;
|
||||
$this->merchantApiKey = $this->sandbox ? ($config['sandbox_merchant_api_key'] ?? '') : ($config['merchant_api_key'] ?? '');
|
||||
|
||||
$this->baseUrl = 'https://api.oxapay.com/v1';
|
||||
|
||||
Reference in New Issue
Block a user