@fat-zebra/sdk 1.2.2 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sca/index.js
CHANGED
|
@@ -13,6 +13,7 @@ import { PublicEvent, } from '../shared/types';
|
|
|
13
13
|
import { CardinalManager, } from './cardinal';
|
|
14
14
|
import { emit, } from '../shared/event-manager';
|
|
15
15
|
import { toFzSli } from './eci-mappings';
|
|
16
|
+
import * as env from "../shared/env";
|
|
16
17
|
class Sca {
|
|
17
18
|
constructor({ gatewayClient, successCallback, failureCallback }) {
|
|
18
19
|
this.sessionId = null;
|
|
@@ -23,7 +24,7 @@ class Sca {
|
|
|
23
24
|
loadScript() {
|
|
24
25
|
const script = document.createElement('script');
|
|
25
26
|
script.type = 'text/javascript';
|
|
26
|
-
script.src =
|
|
27
|
+
script.src = env.songbirdUrl;
|
|
27
28
|
script.async = true;
|
|
28
29
|
script.onload = () => {
|
|
29
30
|
this._cardinal = new CardinalManager();
|
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { RequestHeaderSdkVersion, RequestHeaderMerchantUsername, RequestTimeout, LongRequestTimeout, } from "./constants";
|
|
11
11
|
import axios from "axios";
|
|
12
12
|
import { getSdkVersionNumber } from "./util";
|
|
13
|
-
|
|
13
|
+
import * as env from "../shared/env";
|
|
14
14
|
class GatewayClient {
|
|
15
15
|
constructor({ accessToken, username }) {
|
|
16
16
|
const headers = {};
|
|
@@ -18,7 +18,7 @@ class GatewayClient {
|
|
|
18
18
|
headers[RequestHeaderSdkVersion] = getSdkVersionNumber();
|
|
19
19
|
headers[RequestHeaderMerchantUsername] = username;
|
|
20
20
|
this.client = axios.create({
|
|
21
|
-
baseURL:
|
|
21
|
+
baseURL: env.apiUrl,
|
|
22
22
|
timeout: RequestTimeout,
|
|
23
23
|
headers,
|
|
24
24
|
responseType: "json",
|