Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
<!-- Please describe in detail how teammates can test your changes. -->
## Testing required outside of automated testing?

- [ ] Not Applicable
- [x] Not Applicable

<!-- Provide Screenshots when applicable -->
### Screenshots (if appropriate):

- [ ] Not Applicable
- [x] Not Applicable

<!-- Describe Rollback or Rollforward Procedure -->
## Rollback / Rollforward Procedure

- [ ] Roll Forward
- [x] Roll Forward
- [ ] Roll Back

## Reviewer Checklist
Expand Down
8 changes: 4 additions & 4 deletions src/services/basis-theory-js.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ const isDevEnvironment = (apiBaseUrl?: string): boolean =>
const getDefaultApiBaseUrl = (
apiBaseUrl?: string,
useNgApi?: boolean,
useUat?: boolean
environment?: string
): string => {
// If custom URL provided, use it
if (apiBaseUrl) {
return apiBaseUrl;
}

// UAT environment
if (useUat) {
if (environment === 'test') {
return API_URLS.UAT;
}

Expand All @@ -56,13 +56,13 @@ const loadBasisTheoryInstance = async (
apiBaseUrl?: string,
useNgApi?: boolean,
debug?: boolean,
useUat?: boolean
environment?: string
): Promise<void> => {
if (basisTheoryApi && proxyClient) {
return;
}

const baseUrl = getDefaultApiBaseUrl(apiBaseUrl, useNgApi, useUat);
const baseUrl = getDefaultApiBaseUrl(apiBaseUrl, useNgApi, environment);

basisTheoryConfig = {
apiKey,
Expand Down
8 changes: 4 additions & 4 deletions src/useBasisTheory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ interface BasisTheoryInitOptions {
apiBaseUrl?: string;
useNgApi?: boolean;
debug?: boolean;
useUat?: boolean;
environment?: string;
}

const _BasisTheoryElements = async ({
apiKey,
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();
Expand Down