From 8ce10783050b837472282810ef7831698d58f001 Mon Sep 17 00:00:00 2001 From: Josue Date: Sun, 23 Nov 2025 23:23:17 -0600 Subject: [PATCH 1/2] feat: update useUat flag to environment --- src/services/basis-theory-js.ts | 8 ++++---- src/useBasisTheory.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) 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(); From 099ff25709c6b1b5381c40834430ada61f2ec0b1 Mon Sep 17 00:00:00 2001 From: Josue Date: Sun, 23 Nov 2025 23:24:00 -0600 Subject: [PATCH 2/2] chore: update pr template --- .github/PULL_REQUEST_TEMPLATE.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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