@fat-zebra/sdk 2.1.1-beta.2 → 2.1.2-beta.1
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.
|
@@ -58,13 +58,18 @@ class DeviceDataCollection {
|
|
|
58
58
|
this.handleCollectionResponse(event);
|
|
59
59
|
}
|
|
60
60
|
static handleCollectionResponse(event) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
try {
|
|
62
|
+
const response = typeof event.data === "string" ? JSON.parse(event.data) : event.data;
|
|
63
|
+
if (response["MessageType"] == "profile.completed") {
|
|
64
|
+
emit(PublicEvent.DEVICE_PROFILE_READY_THREE_D_SECURE_EVENT, { message: null, data: null });
|
|
65
|
+
}
|
|
66
|
+
else if (response["Status"] == false) {
|
|
67
|
+
// Still proceed, even if status is false (as per recommendations from cybersource support team.
|
|
68
|
+
emit(PublicEvent.DEVICE_PROFILE_READY_THREE_D_SECURE_EVENT, { message: null, data: null });
|
|
69
|
+
}
|
|
64
70
|
}
|
|
65
|
-
|
|
66
|
-
//
|
|
67
|
-
emit(PublicEvent.DEVICE_PROFILE_READY_THREE_D_SECURE_EVENT, { message: null, data: null });
|
|
71
|
+
catch (_a) {
|
|
72
|
+
// Unparseable payload — do not proceed
|
|
68
73
|
}
|
|
69
74
|
}
|
|
70
75
|
static collectDeviceData() {
|
|
@@ -138,8 +143,13 @@ export default DeviceDataCollection;
|
|
|
138
143
|
__decorate([
|
|
139
144
|
logMethod({
|
|
140
145
|
mapArgs: (args) => {
|
|
141
|
-
const params = args[0];
|
|
142
|
-
|
|
146
|
+
const params = args[0];
|
|
147
|
+
try {
|
|
148
|
+
return typeof params.data === "string" ? JSON.parse(params.data) : params.data;
|
|
149
|
+
}
|
|
150
|
+
catch (_a) {
|
|
151
|
+
return params.data;
|
|
152
|
+
}
|
|
143
153
|
},
|
|
144
154
|
})
|
|
145
155
|
], DeviceDataCollection, "handleCollectionResponse", null);
|
package/dist/version.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! fatzebra-sdk-commit:
|
|
1
|
+
/*! fatzebra-sdk-commit: 1b09b7f09dc61eb5ac900a9ae3604f704a7befcb */
|
|
2
2
|
export const version = '1.5.9';
|
|
3
3
|
// Placeholder replaced at build time by .github/scripts/stamp-version.js with the
|
|
4
4
|
// deployed commit hash (`git rev-parse HEAD`). Stays as the placeholder for builds
|
|
5
5
|
// that don't run the stamp step (e.g. local/package builds).
|
|
6
|
-
export const commitHash = '
|
|
6
|
+
export const commitHash = '1b09b7f09dc61eb5ac900a9ae3604f704a7befcb';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fat-zebra/sdk",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2-beta.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@types/react-dom": "^19.1.9",
|
|
31
31
|
"audit-ci": "^7.1.0",
|
|
32
32
|
"dotenv": "^16.0.1",
|
|
33
|
-
"esbuild": "^0.
|
|
33
|
+
"esbuild": "^0.28.1",
|
|
34
34
|
"husky": "^9.1.7",
|
|
35
35
|
"jest": "^30.2.0",
|
|
36
36
|
"jest-environment-jsdom": "^30.2.0",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"overrides": {
|
|
50
50
|
"test-exclude": "^7.0.1",
|
|
51
51
|
"minimatch": "^10.2.2",
|
|
52
|
+
"form-data": "^4.0.6",
|
|
52
53
|
"jest-util": {
|
|
53
54
|
"picomatch": "^4.0.4"
|
|
54
55
|
},
|