diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 01f6ed2..7f0302b 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -6,17 +6,17 @@ ## Testing required outside of automated testing? -- [ ] Not Applicable +- [x] Not Applicable ### Screenshots (if appropriate): -- [ ] Not Applicable +- [x] Not Applicable ## Rollback / Rollforward Procedure -- [ ] Roll Forward +- [x] Roll Forward - [ ] Roll Back ## Reviewer Checklist diff --git a/src/services/basis-theory-js.ts b/src/services/basis-theory-js.ts index 49393c5..b93504f 100644 --- a/src/services/basis-theory-js.ts +++ b/src/services/basis-theory-js.ts @@ -30,7 +30,7 @@ const isDevEnvironment = (apiBaseUrl?: string): boolean => const getDefaultApiBaseUrl = ( apiBaseUrl?: string, useNgApi?: boolean, - useUat?: boolean + environment?: string ): string => { // If custom URL provided, use it if (apiBaseUrl) { @@ -38,7 +38,7 @@ const getDefaultApiBaseUrl = ( } // UAT environment - if (useUat) { + if (environment === 'test') { return API_URLS.UAT; } @@ -56,13 +56,13 @@ const loadBasisTheoryInstance = async ( apiBaseUrl?: string, useNgApi?: boolean, debug?: boolean, - useUat?: boolean + environment?: string ): Promise => { if (basisTheoryApi && proxyClient) { return; } - const baseUrl = getDefaultApiBaseUrl(apiBaseUrl, useNgApi, useUat); + const baseUrl = getDefaultApiBaseUrl(apiBaseUrl, useNgApi, environment); basisTheoryConfig = { apiKey, diff --git a/src/useBasisTheory.ts b/src/useBasisTheory.ts index 8cfc1df..315f781 100644 --- a/src/useBasisTheory.ts +++ b/src/useBasisTheory.ts @@ -15,7 +15,7 @@ interface BasisTheoryInitOptions { apiBaseUrl?: string; useNgApi?: boolean; debug?: boolean; - useUat?: boolean; + environment?: string; } const _BasisTheoryElements = async ({ @@ -23,10 +23,10 @@ const _BasisTheoryElements = async ({ apiBaseUrl, useNgApi, debug, - useUat, + environment, }: BasisTheoryInitOptions & { apiKey: string }) => { - await loadBasisTheoryInstance(apiKey, apiBaseUrl, useNgApi, debug, useUat); - + await loadBasisTheoryInstance(apiKey, apiBaseUrl, useNgApi, debug, environment); + const bt: BasisTheoryInstance = getBasisTheoryInstance(); const { setConfig } = _useConfigManager();