@paydock/client-sdk 1.108.2-beta → 1.108.2
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/bundles/index.cjs +14 -5
- package/bundles/index.mjs +14 -5
- package/bundles/widget.umd.js +14 -5
- package/bundles/widget.umd.min.js +2 -2
- package/package.json +2 -2
package/bundles/index.cjs
CHANGED
|
@@ -927,7 +927,7 @@ SDK.headerKeys = Object.freeze({
|
|
|
927
927
|
version: 'x-sdk-version',
|
|
928
928
|
type: 'x-sdk-type'
|
|
929
929
|
});
|
|
930
|
-
SDK._version = 'v1.108.2
|
|
930
|
+
SDK._version = 'v1.108.2';
|
|
931
931
|
|
|
932
932
|
var ACCESS_HEADER_NAME = {
|
|
933
933
|
accessToken: 'x-access-token',
|
|
@@ -3441,8 +3441,8 @@ function createNewrelicConfig() {
|
|
|
3441
3441
|
var params = {
|
|
3442
3442
|
enabled: 'true',
|
|
3443
3443
|
accountId: '974691',
|
|
3444
|
-
agentId: '
|
|
3445
|
-
applicationId: '
|
|
3444
|
+
agentId: '1386157152',
|
|
3445
|
+
applicationId: '1386157152',
|
|
3446
3446
|
licenseKey: '4848a32285',
|
|
3447
3447
|
trustKey: '974691'
|
|
3448
3448
|
};
|
|
@@ -10853,11 +10853,13 @@ var Checkout = class {
|
|
|
10853
10853
|
refreshToken;
|
|
10854
10854
|
clientId;
|
|
10855
10855
|
onCheckoutClosed;
|
|
10856
|
+
redirectUrl;
|
|
10856
10857
|
rootUrl;
|
|
10857
10858
|
targetOrigin;
|
|
10858
10859
|
title;
|
|
10859
10860
|
windowFeatures;
|
|
10860
10861
|
windowObserver;
|
|
10862
|
+
// eslint-disable-next-line sonarjs/cognitive-complexity
|
|
10861
10863
|
constructor({
|
|
10862
10864
|
auth,
|
|
10863
10865
|
url,
|
|
@@ -10869,6 +10871,7 @@ var Checkout = class {
|
|
|
10869
10871
|
onTokensChanged,
|
|
10870
10872
|
onPaymentSuccess,
|
|
10871
10873
|
onPaymentError,
|
|
10874
|
+
redirectUrl,
|
|
10872
10875
|
title,
|
|
10873
10876
|
windowFeatures
|
|
10874
10877
|
}) {
|
|
@@ -10922,9 +10925,14 @@ var Checkout = class {
|
|
|
10922
10925
|
}
|
|
10923
10926
|
};
|
|
10924
10927
|
const checkoutMode = mode || "default" /* DEFAULT */;
|
|
10925
|
-
|
|
10928
|
+
const TRAILING_SLASH_REGEX = /\/+$/g;
|
|
10929
|
+
const redirectQueryString = !!redirectUrl ? `&redirectUrl=${redirectUrl}` : "";
|
|
10930
|
+
const appClientId = !!clientId ? `&clientId=${clientId}` : "";
|
|
10931
|
+
this.rootUrl = url.replaceAll(TRAILING_SLASH_REGEX, "");
|
|
10926
10932
|
this.targetOrigin = window.location.href.replace(/\/$/, "");
|
|
10927
|
-
this.url = `${
|
|
10933
|
+
this.url = `${this.rootUrl}?orderId=${orderId}&merchantUrl=${encodeURIComponent(
|
|
10934
|
+
this.targetOrigin
|
|
10935
|
+
)}&mode=${checkoutMode}${redirectQueryString}${appClientId}`;
|
|
10928
10936
|
this.orderId = orderId;
|
|
10929
10937
|
this.clientId = clientId;
|
|
10930
10938
|
this.onCheckoutClosed = onCheckoutClosed;
|
|
@@ -10945,6 +10953,7 @@ var Checkout = class {
|
|
|
10945
10953
|
}
|
|
10946
10954
|
};
|
|
10947
10955
|
close = () => {
|
|
10956
|
+
this.frame?.close();
|
|
10948
10957
|
this.frame = void 0;
|
|
10949
10958
|
this.isCheckoutOpen = false;
|
|
10950
10959
|
this.stopWindowObserver();
|
package/bundles/index.mjs
CHANGED
|
@@ -925,7 +925,7 @@ SDK.headerKeys = Object.freeze({
|
|
|
925
925
|
version: 'x-sdk-version',
|
|
926
926
|
type: 'x-sdk-type'
|
|
927
927
|
});
|
|
928
|
-
SDK._version = 'v1.108.2
|
|
928
|
+
SDK._version = 'v1.108.2';
|
|
929
929
|
|
|
930
930
|
var ACCESS_HEADER_NAME = {
|
|
931
931
|
accessToken: 'x-access-token',
|
|
@@ -3439,8 +3439,8 @@ function createNewrelicConfig() {
|
|
|
3439
3439
|
var params = {
|
|
3440
3440
|
enabled: 'true',
|
|
3441
3441
|
accountId: '974691',
|
|
3442
|
-
agentId: '
|
|
3443
|
-
applicationId: '
|
|
3442
|
+
agentId: '1386157152',
|
|
3443
|
+
applicationId: '1386157152',
|
|
3444
3444
|
licenseKey: '4848a32285',
|
|
3445
3445
|
trustKey: '974691'
|
|
3446
3446
|
};
|
|
@@ -10851,11 +10851,13 @@ var Checkout = class {
|
|
|
10851
10851
|
refreshToken;
|
|
10852
10852
|
clientId;
|
|
10853
10853
|
onCheckoutClosed;
|
|
10854
|
+
redirectUrl;
|
|
10854
10855
|
rootUrl;
|
|
10855
10856
|
targetOrigin;
|
|
10856
10857
|
title;
|
|
10857
10858
|
windowFeatures;
|
|
10858
10859
|
windowObserver;
|
|
10860
|
+
// eslint-disable-next-line sonarjs/cognitive-complexity
|
|
10859
10861
|
constructor({
|
|
10860
10862
|
auth,
|
|
10861
10863
|
url,
|
|
@@ -10867,6 +10869,7 @@ var Checkout = class {
|
|
|
10867
10869
|
onTokensChanged,
|
|
10868
10870
|
onPaymentSuccess,
|
|
10869
10871
|
onPaymentError,
|
|
10872
|
+
redirectUrl,
|
|
10870
10873
|
title,
|
|
10871
10874
|
windowFeatures
|
|
10872
10875
|
}) {
|
|
@@ -10920,9 +10923,14 @@ var Checkout = class {
|
|
|
10920
10923
|
}
|
|
10921
10924
|
};
|
|
10922
10925
|
const checkoutMode = mode || "default" /* DEFAULT */;
|
|
10923
|
-
|
|
10926
|
+
const TRAILING_SLASH_REGEX = /\/+$/g;
|
|
10927
|
+
const redirectQueryString = !!redirectUrl ? `&redirectUrl=${redirectUrl}` : "";
|
|
10928
|
+
const appClientId = !!clientId ? `&clientId=${clientId}` : "";
|
|
10929
|
+
this.rootUrl = url.replaceAll(TRAILING_SLASH_REGEX, "");
|
|
10924
10930
|
this.targetOrigin = window.location.href.replace(/\/$/, "");
|
|
10925
|
-
this.url = `${
|
|
10931
|
+
this.url = `${this.rootUrl}?orderId=${orderId}&merchantUrl=${encodeURIComponent(
|
|
10932
|
+
this.targetOrigin
|
|
10933
|
+
)}&mode=${checkoutMode}${redirectQueryString}${appClientId}`;
|
|
10926
10934
|
this.orderId = orderId;
|
|
10927
10935
|
this.clientId = clientId;
|
|
10928
10936
|
this.onCheckoutClosed = onCheckoutClosed;
|
|
@@ -10943,6 +10951,7 @@ var Checkout = class {
|
|
|
10943
10951
|
}
|
|
10944
10952
|
};
|
|
10945
10953
|
close = () => {
|
|
10954
|
+
this.frame?.close();
|
|
10946
10955
|
this.frame = void 0;
|
|
10947
10956
|
this.isCheckoutOpen = false;
|
|
10948
10957
|
this.stopWindowObserver();
|
package/bundles/widget.umd.js
CHANGED
|
@@ -929,7 +929,7 @@
|
|
|
929
929
|
version: 'x-sdk-version',
|
|
930
930
|
type: 'x-sdk-type'
|
|
931
931
|
});
|
|
932
|
-
SDK._version = 'v1.108.2
|
|
932
|
+
SDK._version = 'v1.108.2';
|
|
933
933
|
|
|
934
934
|
var ACCESS_HEADER_NAME = {
|
|
935
935
|
accessToken: 'x-access-token',
|
|
@@ -3443,8 +3443,8 @@
|
|
|
3443
3443
|
var params = {
|
|
3444
3444
|
enabled: 'true',
|
|
3445
3445
|
accountId: '974691',
|
|
3446
|
-
agentId: '
|
|
3447
|
-
applicationId: '
|
|
3446
|
+
agentId: '1386157152',
|
|
3447
|
+
applicationId: '1386157152',
|
|
3448
3448
|
licenseKey: '4848a32285',
|
|
3449
3449
|
trustKey: '974691'
|
|
3450
3450
|
};
|
|
@@ -10855,11 +10855,13 @@
|
|
|
10855
10855
|
refreshToken;
|
|
10856
10856
|
clientId;
|
|
10857
10857
|
onCheckoutClosed;
|
|
10858
|
+
redirectUrl;
|
|
10858
10859
|
rootUrl;
|
|
10859
10860
|
targetOrigin;
|
|
10860
10861
|
title;
|
|
10861
10862
|
windowFeatures;
|
|
10862
10863
|
windowObserver;
|
|
10864
|
+
// eslint-disable-next-line sonarjs/cognitive-complexity
|
|
10863
10865
|
constructor({
|
|
10864
10866
|
auth,
|
|
10865
10867
|
url,
|
|
@@ -10871,6 +10873,7 @@
|
|
|
10871
10873
|
onTokensChanged,
|
|
10872
10874
|
onPaymentSuccess,
|
|
10873
10875
|
onPaymentError,
|
|
10876
|
+
redirectUrl,
|
|
10874
10877
|
title,
|
|
10875
10878
|
windowFeatures
|
|
10876
10879
|
}) {
|
|
@@ -10924,9 +10927,14 @@
|
|
|
10924
10927
|
}
|
|
10925
10928
|
};
|
|
10926
10929
|
const checkoutMode = mode || "default" /* DEFAULT */;
|
|
10927
|
-
|
|
10930
|
+
const TRAILING_SLASH_REGEX = /\/+$/g;
|
|
10931
|
+
const redirectQueryString = !!redirectUrl ? `&redirectUrl=${redirectUrl}` : "";
|
|
10932
|
+
const appClientId = !!clientId ? `&clientId=${clientId}` : "";
|
|
10933
|
+
this.rootUrl = url.replaceAll(TRAILING_SLASH_REGEX, "");
|
|
10928
10934
|
this.targetOrigin = window.location.href.replace(/\/$/, "");
|
|
10929
|
-
this.url = `${
|
|
10935
|
+
this.url = `${this.rootUrl}?orderId=${orderId}&merchantUrl=${encodeURIComponent(
|
|
10936
|
+
this.targetOrigin
|
|
10937
|
+
)}&mode=${checkoutMode}${redirectQueryString}${appClientId}`;
|
|
10930
10938
|
this.orderId = orderId;
|
|
10931
10939
|
this.clientId = clientId;
|
|
10932
10940
|
this.onCheckoutClosed = onCheckoutClosed;
|
|
@@ -10947,6 +10955,7 @@
|
|
|
10947
10955
|
}
|
|
10948
10956
|
};
|
|
10949
10957
|
close = () => {
|
|
10958
|
+
this.frame?.close();
|
|
10950
10959
|
this.frame = void 0;
|
|
10951
10960
|
this.isCheckoutOpen = false;
|
|
10952
10961
|
this.stopWindowObserver();
|