@paydock/client-sdk 1.111.0-beta → 1.112.0
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 +219 -235
- package/bundles/index.cjs.d.ts +3 -3
- package/bundles/index.mjs +219 -235
- package/bundles/index.mjs.d.ts +3 -3
- package/bundles/types/api/api-base.d.ts +2 -2
- package/bundles/types/api/api-base.d.ts.map +1 -1
- package/bundles/types/api/api-checkout-internal.d.ts +1 -1
- package/bundles/types/api/api-checkout-internal.d.ts.map +1 -1
- package/bundles/types/checkout/checkout.d.ts.map +1 -1
- package/bundles/types/checkout/helpers/session-helper.d.ts +5 -0
- package/bundles/types/checkout/helpers/session-helper.d.ts.map +1 -0
- package/bundles/types/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts.map +1 -1
- package/bundles/widget.umd.js +219 -235
- package/bundles/widget.umd.js.d.ts +3 -3
- package/bundles/widget.umd.js.min.d.ts +3 -3
- package/bundles/widget.umd.min.js +6 -6
- package/package.json +66 -66
package/bundles/index.mjs
CHANGED
|
@@ -1,8 +1,128 @@
|
|
|
1
1
|
import 'isomorphic-dompurify';
|
|
2
2
|
|
|
3
|
+
function _arrayLikeToArray(r, a) {
|
|
4
|
+
(null == a || a > r.length) && (a = r.length);
|
|
5
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
6
|
+
return n;
|
|
7
|
+
}
|
|
8
|
+
function _arrayWithHoles(r) {
|
|
9
|
+
if (Array.isArray(r)) return r;
|
|
10
|
+
}
|
|
11
|
+
function _arrayWithoutHoles(r) {
|
|
12
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
13
|
+
}
|
|
14
|
+
function _assertThisInitialized(e) {
|
|
15
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
16
|
+
return e;
|
|
17
|
+
}
|
|
3
18
|
function _callSuper(t, o, e) {
|
|
4
19
|
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
5
20
|
}
|
|
21
|
+
function _classCallCheck(a, n) {
|
|
22
|
+
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
23
|
+
}
|
|
24
|
+
function _defineProperties(e, r) {
|
|
25
|
+
for (var t = 0; t < r.length; t++) {
|
|
26
|
+
var o = r[t];
|
|
27
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function _createClass(e, r, t) {
|
|
31
|
+
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
32
|
+
writable: !1
|
|
33
|
+
}), e;
|
|
34
|
+
}
|
|
35
|
+
function _createForOfIteratorHelper(r, e) {
|
|
36
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
37
|
+
if (!t) {
|
|
38
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e ) {
|
|
39
|
+
t && (r = t);
|
|
40
|
+
var n = 0,
|
|
41
|
+
F = function () {};
|
|
42
|
+
return {
|
|
43
|
+
s: F,
|
|
44
|
+
n: function () {
|
|
45
|
+
return n >= r.length ? {
|
|
46
|
+
done: !0
|
|
47
|
+
} : {
|
|
48
|
+
done: !1,
|
|
49
|
+
value: r[n++]
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
e: function (r) {
|
|
53
|
+
throw r;
|
|
54
|
+
},
|
|
55
|
+
f: F
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
59
|
+
}
|
|
60
|
+
var o,
|
|
61
|
+
a = !0,
|
|
62
|
+
u = !1;
|
|
63
|
+
return {
|
|
64
|
+
s: function () {
|
|
65
|
+
t = t.call(r);
|
|
66
|
+
},
|
|
67
|
+
n: function () {
|
|
68
|
+
var r = t.next();
|
|
69
|
+
return a = r.done, r;
|
|
70
|
+
},
|
|
71
|
+
e: function (r) {
|
|
72
|
+
u = !0, o = r;
|
|
73
|
+
},
|
|
74
|
+
f: function () {
|
|
75
|
+
try {
|
|
76
|
+
a || null == t.return || t.return();
|
|
77
|
+
} finally {
|
|
78
|
+
if (u) throw o;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function _defineProperty(e, r, t) {
|
|
84
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
85
|
+
value: t,
|
|
86
|
+
enumerable: !0,
|
|
87
|
+
configurable: !0,
|
|
88
|
+
writable: !0
|
|
89
|
+
}) : e[r] = t, e;
|
|
90
|
+
}
|
|
91
|
+
function _extends() {
|
|
92
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
93
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
94
|
+
var t = arguments[e];
|
|
95
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
96
|
+
}
|
|
97
|
+
return n;
|
|
98
|
+
}, _extends.apply(null, arguments);
|
|
99
|
+
}
|
|
100
|
+
function _get() {
|
|
101
|
+
return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {
|
|
102
|
+
var p = _superPropBase(e, t);
|
|
103
|
+
if (p) {
|
|
104
|
+
var n = Object.getOwnPropertyDescriptor(p, t);
|
|
105
|
+
return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;
|
|
106
|
+
}
|
|
107
|
+
}, _get.apply(null, arguments);
|
|
108
|
+
}
|
|
109
|
+
function _getPrototypeOf(t) {
|
|
110
|
+
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
111
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
112
|
+
}, _getPrototypeOf(t);
|
|
113
|
+
}
|
|
114
|
+
function _inherits(t, e) {
|
|
115
|
+
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
|
|
116
|
+
t.prototype = Object.create(e && e.prototype, {
|
|
117
|
+
constructor: {
|
|
118
|
+
value: t,
|
|
119
|
+
writable: !0,
|
|
120
|
+
configurable: !0
|
|
121
|
+
}
|
|
122
|
+
}), Object.defineProperty(t, "prototype", {
|
|
123
|
+
writable: !1
|
|
124
|
+
}), e && _setPrototypeOf(t, e);
|
|
125
|
+
}
|
|
6
126
|
function _isNativeReflectConstruct() {
|
|
7
127
|
try {
|
|
8
128
|
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
@@ -11,6 +131,9 @@ function _isNativeReflectConstruct() {
|
|
|
11
131
|
return !!t;
|
|
12
132
|
})();
|
|
13
133
|
}
|
|
134
|
+
function _iterableToArray(r) {
|
|
135
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
136
|
+
}
|
|
14
137
|
function _iterableToArrayLimit(r, l) {
|
|
15
138
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
16
139
|
if (null != t) {
|
|
@@ -38,6 +161,17 @@ function _iterableToArrayLimit(r, l) {
|
|
|
38
161
|
return a;
|
|
39
162
|
}
|
|
40
163
|
}
|
|
164
|
+
function _nonIterableRest() {
|
|
165
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
166
|
+
}
|
|
167
|
+
function _nonIterableSpread() {
|
|
168
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
169
|
+
}
|
|
170
|
+
function _possibleConstructorReturn(t, e) {
|
|
171
|
+
if (e && ("object" == typeof e || "function" == typeof e)) return e;
|
|
172
|
+
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
|
|
173
|
+
return _assertThisInitialized(t);
|
|
174
|
+
}
|
|
41
175
|
function _regeneratorRuntime() {
|
|
42
176
|
_regeneratorRuntime = function () {
|
|
43
177
|
return e;
|
|
@@ -339,6 +473,27 @@ function _regeneratorRuntime() {
|
|
|
339
473
|
}
|
|
340
474
|
}, e;
|
|
341
475
|
}
|
|
476
|
+
function _setPrototypeOf(t, e) {
|
|
477
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
478
|
+
return t.__proto__ = e, t;
|
|
479
|
+
}, _setPrototypeOf(t, e);
|
|
480
|
+
}
|
|
481
|
+
function _slicedToArray(r, e) {
|
|
482
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
483
|
+
}
|
|
484
|
+
function _superPropBase(t, o) {
|
|
485
|
+
for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););
|
|
486
|
+
return t;
|
|
487
|
+
}
|
|
488
|
+
function _superPropGet(t, e, o, r) {
|
|
489
|
+
var p = _get(_getPrototypeOf(t.prototype ), e, o);
|
|
490
|
+
return "function" == typeof p ? function (t) {
|
|
491
|
+
return p.apply(o, t);
|
|
492
|
+
} : p;
|
|
493
|
+
}
|
|
494
|
+
function _toConsumableArray(r) {
|
|
495
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
496
|
+
}
|
|
342
497
|
function _toPrimitive(t, r) {
|
|
343
498
|
if ("object" != typeof t || !t) return t;
|
|
344
499
|
var e = t[Symbol.toPrimitive];
|
|
@@ -362,206 +517,12 @@ function _typeof$1(o) {
|
|
|
362
517
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
363
518
|
}, _typeof$1(o);
|
|
364
519
|
}
|
|
365
|
-
function
|
|
366
|
-
if (
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
function _defineProperties(target, props) {
|
|
371
|
-
for (var i = 0; i < props.length; i++) {
|
|
372
|
-
var descriptor = props[i];
|
|
373
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
374
|
-
descriptor.configurable = true;
|
|
375
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
376
|
-
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
380
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
381
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
382
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
383
|
-
writable: false
|
|
384
|
-
});
|
|
385
|
-
return Constructor;
|
|
386
|
-
}
|
|
387
|
-
function _defineProperty(obj, key, value) {
|
|
388
|
-
key = _toPropertyKey(key);
|
|
389
|
-
if (key in obj) {
|
|
390
|
-
Object.defineProperty(obj, key, {
|
|
391
|
-
value: value,
|
|
392
|
-
enumerable: true,
|
|
393
|
-
configurable: true,
|
|
394
|
-
writable: true
|
|
395
|
-
});
|
|
396
|
-
} else {
|
|
397
|
-
obj[key] = value;
|
|
520
|
+
function _unsupportedIterableToArray(r, a) {
|
|
521
|
+
if (r) {
|
|
522
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
523
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
524
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
398
525
|
}
|
|
399
|
-
return obj;
|
|
400
|
-
}
|
|
401
|
-
function _extends() {
|
|
402
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
403
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
404
|
-
var source = arguments[i];
|
|
405
|
-
for (var key in source) {
|
|
406
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
407
|
-
target[key] = source[key];
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
return target;
|
|
412
|
-
};
|
|
413
|
-
return _extends.apply(this, arguments);
|
|
414
|
-
}
|
|
415
|
-
function _inherits(subClass, superClass) {
|
|
416
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
417
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
418
|
-
}
|
|
419
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
420
|
-
constructor: {
|
|
421
|
-
value: subClass,
|
|
422
|
-
writable: true,
|
|
423
|
-
configurable: true
|
|
424
|
-
}
|
|
425
|
-
});
|
|
426
|
-
Object.defineProperty(subClass, "prototype", {
|
|
427
|
-
writable: false
|
|
428
|
-
});
|
|
429
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
430
|
-
}
|
|
431
|
-
function _getPrototypeOf(o) {
|
|
432
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
433
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
434
|
-
};
|
|
435
|
-
return _getPrototypeOf(o);
|
|
436
|
-
}
|
|
437
|
-
function _setPrototypeOf(o, p) {
|
|
438
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
439
|
-
o.__proto__ = p;
|
|
440
|
-
return o;
|
|
441
|
-
};
|
|
442
|
-
return _setPrototypeOf(o, p);
|
|
443
|
-
}
|
|
444
|
-
function _assertThisInitialized(self) {
|
|
445
|
-
if (self === void 0) {
|
|
446
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
447
|
-
}
|
|
448
|
-
return self;
|
|
449
|
-
}
|
|
450
|
-
function _possibleConstructorReturn(self, call) {
|
|
451
|
-
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
452
|
-
return call;
|
|
453
|
-
} else if (call !== void 0) {
|
|
454
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
455
|
-
}
|
|
456
|
-
return _assertThisInitialized(self);
|
|
457
|
-
}
|
|
458
|
-
function _superPropBase(object, property) {
|
|
459
|
-
while (!Object.prototype.hasOwnProperty.call(object, property)) {
|
|
460
|
-
object = _getPrototypeOf(object);
|
|
461
|
-
if (object === null) break;
|
|
462
|
-
}
|
|
463
|
-
return object;
|
|
464
|
-
}
|
|
465
|
-
function _get() {
|
|
466
|
-
if (typeof Reflect !== "undefined" && Reflect.get) {
|
|
467
|
-
_get = Reflect.get.bind();
|
|
468
|
-
} else {
|
|
469
|
-
_get = function _get(target, property, receiver) {
|
|
470
|
-
var base = _superPropBase(target, property);
|
|
471
|
-
if (!base) return;
|
|
472
|
-
var desc = Object.getOwnPropertyDescriptor(base, property);
|
|
473
|
-
if (desc.get) {
|
|
474
|
-
return desc.get.call(arguments.length < 3 ? target : receiver);
|
|
475
|
-
}
|
|
476
|
-
return desc.value;
|
|
477
|
-
};
|
|
478
|
-
}
|
|
479
|
-
return _get.apply(this, arguments);
|
|
480
|
-
}
|
|
481
|
-
function _slicedToArray(arr, i) {
|
|
482
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
483
|
-
}
|
|
484
|
-
function _toConsumableArray(arr) {
|
|
485
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
486
|
-
}
|
|
487
|
-
function _arrayWithoutHoles(arr) {
|
|
488
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
489
|
-
}
|
|
490
|
-
function _arrayWithHoles(arr) {
|
|
491
|
-
if (Array.isArray(arr)) return arr;
|
|
492
|
-
}
|
|
493
|
-
function _iterableToArray(iter) {
|
|
494
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
495
|
-
}
|
|
496
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
497
|
-
if (!o) return;
|
|
498
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
499
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
500
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
501
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
502
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
503
|
-
}
|
|
504
|
-
function _arrayLikeToArray(arr, len) {
|
|
505
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
506
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
507
|
-
return arr2;
|
|
508
|
-
}
|
|
509
|
-
function _nonIterableSpread() {
|
|
510
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
511
|
-
}
|
|
512
|
-
function _nonIterableRest() {
|
|
513
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
514
|
-
}
|
|
515
|
-
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
516
|
-
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
517
|
-
if (!it) {
|
|
518
|
-
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike ) {
|
|
519
|
-
if (it) o = it;
|
|
520
|
-
var i = 0;
|
|
521
|
-
var F = function () {};
|
|
522
|
-
return {
|
|
523
|
-
s: F,
|
|
524
|
-
n: function () {
|
|
525
|
-
if (i >= o.length) return {
|
|
526
|
-
done: true
|
|
527
|
-
};
|
|
528
|
-
return {
|
|
529
|
-
done: false,
|
|
530
|
-
value: o[i++]
|
|
531
|
-
};
|
|
532
|
-
},
|
|
533
|
-
e: function (e) {
|
|
534
|
-
throw e;
|
|
535
|
-
},
|
|
536
|
-
f: F
|
|
537
|
-
};
|
|
538
|
-
}
|
|
539
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
540
|
-
}
|
|
541
|
-
var normalCompletion = true,
|
|
542
|
-
didErr = false,
|
|
543
|
-
err;
|
|
544
|
-
return {
|
|
545
|
-
s: function () {
|
|
546
|
-
it = it.call(o);
|
|
547
|
-
},
|
|
548
|
-
n: function () {
|
|
549
|
-
var step = it.next();
|
|
550
|
-
normalCompletion = step.done;
|
|
551
|
-
return step;
|
|
552
|
-
},
|
|
553
|
-
e: function (e) {
|
|
554
|
-
didErr = true;
|
|
555
|
-
err = e;
|
|
556
|
-
},
|
|
557
|
-
f: function () {
|
|
558
|
-
try {
|
|
559
|
-
if (!normalCompletion && it.return != null) it.return();
|
|
560
|
-
} finally {
|
|
561
|
-
if (didErr) throw err;
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
};
|
|
565
526
|
}
|
|
566
527
|
|
|
567
528
|
var Browser = /*#__PURE__*/function () {
|
|
@@ -928,7 +889,7 @@ SDK.headerKeys = Object.freeze({
|
|
|
928
889
|
version: 'x-sdk-version',
|
|
929
890
|
type: 'x-sdk-type'
|
|
930
891
|
});
|
|
931
|
-
SDK._version = 'v1.
|
|
892
|
+
SDK._version = 'v1.112.0';
|
|
932
893
|
|
|
933
894
|
/******************************************************************************
|
|
934
895
|
Copyright (c) Microsoft Corporation.
|
|
@@ -3995,8 +3956,8 @@ function createNewrelicConfig() {
|
|
|
3995
3956
|
var params = {
|
|
3996
3957
|
enabled: 'true',
|
|
3997
3958
|
accountId: '974691',
|
|
3998
|
-
agentId: '
|
|
3999
|
-
applicationId: '
|
|
3959
|
+
agentId: '1386157152',
|
|
3960
|
+
applicationId: '1386157152',
|
|
4000
3961
|
licenseKey: '4848a32285',
|
|
4001
3962
|
trustKey: '974691'
|
|
4002
3963
|
};
|
|
@@ -4185,6 +4146,21 @@ var EventRepository = /*#__PURE__*/function () {
|
|
|
4185
4146
|
}();
|
|
4186
4147
|
new EventRepository();
|
|
4187
4148
|
|
|
4149
|
+
var SessionHelper = /*#__PURE__*/function () {
|
|
4150
|
+
function SessionHelper() {
|
|
4151
|
+
_classCallCheck(this, SessionHelper);
|
|
4152
|
+
}
|
|
4153
|
+
return _createClass(SessionHelper, null, [{
|
|
4154
|
+
key: "sessionId",
|
|
4155
|
+
get: function get() {
|
|
4156
|
+
return window.sessionStorage.getItem('sessionId');
|
|
4157
|
+
},
|
|
4158
|
+
set: function set(value) {
|
|
4159
|
+
window.sessionStorage.setItem('sessionId', value);
|
|
4160
|
+
}
|
|
4161
|
+
}]);
|
|
4162
|
+
}();
|
|
4163
|
+
|
|
4188
4164
|
var API_AUTH_TYPE;
|
|
4189
4165
|
(function (API_AUTH_TYPE) {
|
|
4190
4166
|
API_AUTH_TYPE[API_AUTH_TYPE["PUBLIC_KEY"] = 0] = "PUBLIC_KEY";
|
|
@@ -4221,16 +4197,16 @@ var ApiBase = /*#__PURE__*/function () {
|
|
|
4221
4197
|
}
|
|
4222
4198
|
}, {
|
|
4223
4199
|
key: "longPollingObservable",
|
|
4224
|
-
value: function longPollingObservable(method, url, requestBody) {
|
|
4200
|
+
value: function longPollingObservable(method, url, requestBody, sessionId) {
|
|
4225
4201
|
var _this = this;
|
|
4226
|
-
var reconnectInterval = arguments.length >
|
|
4202
|
+
var reconnectInterval = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1000;
|
|
4227
4203
|
return new Observable(function (subscriber) {
|
|
4228
|
-
_this.longPull(subscriber, method, _this.env.getConf().url + url, _this.auth, requestBody, reconnectInterval);
|
|
4204
|
+
_this.longPull(subscriber, method, _this.env.getConf().url + url, _this.auth, requestBody, sessionId, reconnectInterval);
|
|
4229
4205
|
});
|
|
4230
4206
|
}
|
|
4231
4207
|
}, {
|
|
4232
4208
|
key: "longPull",
|
|
4233
|
-
value: function longPull(subscriber, method, link, auth, requestBody, reconnectInterval) {
|
|
4209
|
+
value: function longPull(subscriber, method, link, auth, requestBody, sessionId, reconnectInterval) {
|
|
4234
4210
|
var _this2 = this;
|
|
4235
4211
|
if (this.stoppedPooling) return;
|
|
4236
4212
|
var request = new XMLHttpRequest();
|
|
@@ -4242,11 +4218,15 @@ var ApiBase = /*#__PURE__*/function () {
|
|
|
4242
4218
|
if (request.readyState === 4) {
|
|
4243
4219
|
if (request.status === 200 || request.status === 201) {
|
|
4244
4220
|
var data = JSON.parse(request.responseText);
|
|
4221
|
+
if (SessionHelper.sessionId !== data.resource.data.intent_id) {
|
|
4222
|
+
_this2.stoppedPooling = false;
|
|
4223
|
+
return;
|
|
4224
|
+
}
|
|
4245
4225
|
subscriber.next(data.resource.data);
|
|
4246
|
-
_this2.longPull(subscriber, method, link, auth, requestBody, reconnectInterval);
|
|
4226
|
+
_this2.longPull(subscriber, method, link, auth, requestBody, sessionId, reconnectInterval);
|
|
4247
4227
|
} else {
|
|
4248
|
-
setTimeout(function () {
|
|
4249
|
-
_this2.longPull(subscriber, method, link, auth, requestBody, reconnectInterval);
|
|
4228
|
+
if (SessionHelper.sessionId === sessionId) setTimeout(function () {
|
|
4229
|
+
_this2.longPull(subscriber, method, link, auth, requestBody, sessionId, reconnectInterval);
|
|
4250
4230
|
}, reconnectInterval);
|
|
4251
4231
|
}
|
|
4252
4232
|
}
|
|
@@ -5128,8 +5108,8 @@ var ApiCheckoutInternal = /*#__PURE__*/function () {
|
|
|
5128
5108
|
}
|
|
5129
5109
|
return _createClass(ApiCheckoutInternal, [{
|
|
5130
5110
|
key: "instructions",
|
|
5131
|
-
value: function instructions() {
|
|
5132
|
-
return this.api.longPollingObservable('GET', INSTRUCTION_LINK, {}, 1000);
|
|
5111
|
+
value: function instructions(session_id) {
|
|
5112
|
+
return this.api.longPollingObservable('GET', INSTRUCTION_LINK, {}, session_id, 1000);
|
|
5133
5113
|
}
|
|
5134
5114
|
}, {
|
|
5135
5115
|
key: "callback",
|
|
@@ -6179,7 +6159,7 @@ var PopupRunner = /*#__PURE__*/function (_ContextualRunner) {
|
|
|
6179
6159
|
}, {
|
|
6180
6160
|
key: "setEnv",
|
|
6181
6161
|
value: function setEnv(env, alias) {
|
|
6182
|
-
|
|
6162
|
+
_superPropGet(PopupRunner, "setEnv", this)([env, alias]);
|
|
6183
6163
|
this.dispatcher.setEnv(env, alias);
|
|
6184
6164
|
this.popup.setEnv(env);
|
|
6185
6165
|
}
|
|
@@ -7786,7 +7766,7 @@ var ZipmoneyRunner = /*#__PURE__*/function (_BaseRunner) {
|
|
|
7786
7766
|
return _createClass(ZipmoneyRunner, [{
|
|
7787
7767
|
key: "setEnv",
|
|
7788
7768
|
value: function setEnv(env, alias) {
|
|
7789
|
-
|
|
7769
|
+
_superPropGet(ZipmoneyRunner, "setEnv", this)([env, alias]);
|
|
7790
7770
|
this.apiEnv.setEnv(env, alias);
|
|
7791
7771
|
}
|
|
7792
7772
|
}, {
|
|
@@ -7856,7 +7836,7 @@ var ZipmoneyContextualRunner = /*#__PURE__*/function (_ContextualRunner) {
|
|
|
7856
7836
|
}, {
|
|
7857
7837
|
key: "stop",
|
|
7858
7838
|
value: function stop() {
|
|
7859
|
-
|
|
7839
|
+
_superPropGet(ZipmoneyContextualRunner, "stop", this)([]);
|
|
7860
7840
|
this.runs = false;
|
|
7861
7841
|
var element = document.querySelector('.zipmoney-overlay');
|
|
7862
7842
|
if (element) element.remove();
|
|
@@ -8050,7 +8030,7 @@ var ZipmoneyRedirectRunner = /*#__PURE__*/function (_RedirectRunner) {
|
|
|
8050
8030
|
}, {
|
|
8051
8031
|
key: "setEnv",
|
|
8052
8032
|
value: function setEnv(env, alias) {
|
|
8053
|
-
|
|
8033
|
+
_superPropGet(ZipmoneyRedirectRunner, "setEnv", this)([env, alias]);
|
|
8054
8034
|
this.storageDispatcher.setEnv(env, alias);
|
|
8055
8035
|
}
|
|
8056
8036
|
}]);
|
|
@@ -8110,7 +8090,7 @@ var AfterpayRunner = /*#__PURE__*/function (_PopupRunner) {
|
|
|
8110
8090
|
}, {
|
|
8111
8091
|
key: "onCheckout",
|
|
8112
8092
|
value: function onCheckout(event, cb) {
|
|
8113
|
-
|
|
8093
|
+
_superPropGet(AfterpayRunner, "onCheckout", this)([event, function (checkout, data) {
|
|
8114
8094
|
if (!(data === null || data === void 0 ? void 0 : data.status)) return cb(checkout);
|
|
8115
8095
|
var status = data.status,
|
|
8116
8096
|
newData = __rest(data, ["status"]);
|
|
@@ -8121,7 +8101,7 @@ var AfterpayRunner = /*#__PURE__*/function (_PopupRunner) {
|
|
|
8121
8101
|
} else {
|
|
8122
8102
|
cb(checkout, newData);
|
|
8123
8103
|
}
|
|
8124
|
-
});
|
|
8104
|
+
}]);
|
|
8125
8105
|
}
|
|
8126
8106
|
}, {
|
|
8127
8107
|
key: "error",
|
|
@@ -8608,7 +8588,7 @@ var ZipmoneyCheckoutButton = /*#__PURE__*/function (_CheckoutButton) {
|
|
|
8608
8588
|
return _createClass(ZipmoneyCheckoutButton, [{
|
|
8609
8589
|
key: "setSuspendedRedirectUri",
|
|
8610
8590
|
value: function setSuspendedRedirectUri(uri) {
|
|
8611
|
-
|
|
8591
|
+
_superPropGet(ZipmoneyCheckoutButton, "setSuspendedRedirectUri", this)([uri]);
|
|
8612
8592
|
}
|
|
8613
8593
|
/**
|
|
8614
8594
|
* Method for setting the merchant redirect URL.
|
|
@@ -8625,15 +8605,15 @@ var ZipmoneyCheckoutButton = /*#__PURE__*/function (_CheckoutButton) {
|
|
|
8625
8605
|
key: "setRedirectUrl",
|
|
8626
8606
|
value: function setRedirectUrl(url) {
|
|
8627
8607
|
if (isContextualRunner(this.runner)) {
|
|
8628
|
-
|
|
8629
|
-
|
|
8608
|
+
_superPropGet(ZipmoneyCheckoutButton, "chooseRunner", this)([GATEWAY_TYPE.ZIPMONEY, CHECKOUT_MODE.REDIRECT]);
|
|
8609
|
+
_superPropGet(ZipmoneyCheckoutButton, "setEnv", this)([this.env, this.alias]);
|
|
8630
8610
|
}
|
|
8631
|
-
|
|
8611
|
+
_superPropGet(ZipmoneyCheckoutButton, "setRedirectUrl", this)([url]);
|
|
8632
8612
|
}
|
|
8633
8613
|
}, {
|
|
8634
8614
|
key: "buildAdditionalParams",
|
|
8635
8615
|
value: function buildAdditionalParams() {
|
|
8636
|
-
var defaultParams =
|
|
8616
|
+
var defaultParams = _superPropGet(ZipmoneyCheckoutButton, "buildAdditionalParams", this)([]);
|
|
8637
8617
|
var params = _extends(_extends({}, defaultParams), {
|
|
8638
8618
|
public_key: this.publicKey,
|
|
8639
8619
|
gateway_id: this.gatewayId
|
|
@@ -8690,7 +8670,7 @@ var AfterpayCheckoutButton = /*#__PURE__*/function (_CheckoutButton) {
|
|
|
8690
8670
|
}, {
|
|
8691
8671
|
key: "buildAdditionalParams",
|
|
8692
8672
|
value: function buildAdditionalParams() {
|
|
8693
|
-
var params =
|
|
8673
|
+
var params = _superPropGet(AfterpayCheckoutButton, "buildAdditionalParams", this)([]);
|
|
8694
8674
|
if (this.showETP) {
|
|
8695
8675
|
params.show_etp = true;
|
|
8696
8676
|
}
|
|
@@ -9207,9 +9187,12 @@ var ClickToPaySRC = /*#__PURE__*/function () {
|
|
|
9207
9187
|
});
|
|
9208
9188
|
var iframeElement = this.iFrame.getElement();
|
|
9209
9189
|
this.iFrame.setStyle('width', '100%');
|
|
9210
|
-
if (iframeElement)
|
|
9211
|
-
|
|
9212
|
-
|
|
9190
|
+
if (iframeElement) {
|
|
9191
|
+
iframeElement.setAttribute('allow', 'payment; accelerometer;');
|
|
9192
|
+
iframeElement.onload = function () {
|
|
9193
|
+
return _this2.eventEmitter.emit(EVENT$3.IFRAME_LOADED, {});
|
|
9194
|
+
};
|
|
9195
|
+
}
|
|
9213
9196
|
}
|
|
9214
9197
|
}, {
|
|
9215
9198
|
key: "getEnv",
|
|
@@ -9748,7 +9731,7 @@ var AfterPayWalletService = /*#__PURE__*/function (_WalletService) {
|
|
|
9748
9731
|
}, {
|
|
9749
9732
|
key: "setEnv",
|
|
9750
9733
|
value: function setEnv(env) {
|
|
9751
|
-
|
|
9734
|
+
_superPropGet(AfterPayWalletService, "setEnv", this)([env]);
|
|
9752
9735
|
this.storageDispatcher.setEnv(env);
|
|
9753
9736
|
return this;
|
|
9754
9737
|
}
|
|
@@ -10078,14 +10061,14 @@ var WalletBackground = /*#__PURE__*/function (_Background) {
|
|
|
10078
10061
|
key: "initControl",
|
|
10079
10062
|
value: function initControl() {
|
|
10080
10063
|
if (!this.imageStyle) this.createImageStyles();
|
|
10081
|
-
|
|
10064
|
+
_superPropGet(WalletBackground, "initControl", this)([]);
|
|
10082
10065
|
}
|
|
10083
10066
|
}, {
|
|
10084
10067
|
key: "clear",
|
|
10085
10068
|
value: function clear() {
|
|
10086
10069
|
if (this.imageStyle) this.imageStyle.parentNode.removeChild(this.imageStyle);
|
|
10087
10070
|
this.imageStyle = null;
|
|
10088
|
-
|
|
10071
|
+
_superPropGet(WalletBackground, "clear", this)([]);
|
|
10089
10072
|
}
|
|
10090
10073
|
}, {
|
|
10091
10074
|
key: "createTemplate",
|
|
@@ -10201,7 +10184,7 @@ var FlypayV2WalletService = /*#__PURE__*/function (_WalletService) {
|
|
|
10201
10184
|
key: "setEnv",
|
|
10202
10185
|
value: function setEnv(env) {
|
|
10203
10186
|
this.link.setEnv(env);
|
|
10204
|
-
return
|
|
10187
|
+
return _superPropGet(FlypayV2WalletService, "setEnv", this)([env]);
|
|
10205
10188
|
}
|
|
10206
10189
|
}, {
|
|
10207
10190
|
key: "enable",
|
|
@@ -14124,9 +14107,9 @@ var HtmlWidget = /*#__PURE__*/function (_HtmlMultiWidget) {
|
|
|
14124
14107
|
key: "setFormElement",
|
|
14125
14108
|
value: function setFormElement(element) {
|
|
14126
14109
|
this.configs[0].setFormFields([element.field]);
|
|
14127
|
-
|
|
14110
|
+
_superPropGet(HtmlWidget, "setFormElement", this)([_extends(_extends({}, element), {
|
|
14128
14111
|
field: element.field.replace('*', '')
|
|
14129
|
-
}));
|
|
14112
|
+
})]);
|
|
14130
14113
|
}
|
|
14131
14114
|
/**
|
|
14132
14115
|
* The method to set meta information for the checkout page
|
|
@@ -15369,7 +15352,8 @@ var Checkout = /*#__PURE__*/function () {
|
|
|
15369
15352
|
this.setEnv(this.intentTokenPayload.env, this.intentTokenPayload.env_alias);
|
|
15370
15353
|
this.instructions = this.initContractVersion(this.intentTokenPayload.version);
|
|
15371
15354
|
if (this.debug) return;
|
|
15372
|
-
this.listenInstructions(intentToken);
|
|
15355
|
+
this.listenInstructions(intentToken, this.intentTokenPayload.intent_id);
|
|
15356
|
+
SessionHelper.sessionId = this.intentTokenPayload.intent_id;
|
|
15373
15357
|
this.ready();
|
|
15374
15358
|
} catch (e) {
|
|
15375
15359
|
console.error(e.message);
|
|
@@ -15407,10 +15391,10 @@ var Checkout = /*#__PURE__*/function () {
|
|
|
15407
15391
|
}
|
|
15408
15392
|
}, {
|
|
15409
15393
|
key: "listenInstructions",
|
|
15410
|
-
value: function listenInstructions(token) {
|
|
15394
|
+
value: function listenInstructions(token, session_id) {
|
|
15411
15395
|
var _this = this;
|
|
15412
15396
|
this.createWidgetStructure();
|
|
15413
|
-
this.api.checkout().instructions().subscribe({
|
|
15397
|
+
this.api.checkout().instructions(session_id).subscribe({
|
|
15414
15398
|
next: function next(response) {
|
|
15415
15399
|
var _a;
|
|
15416
15400
|
if (!(response === null || response === void 0 ? void 0 : response.event)) throw new Error('Instruction structure inconsistent');
|
package/bundles/index.mjs.d.ts
CHANGED
|
@@ -128,8 +128,8 @@ declare class ApiBase {
|
|
|
128
128
|
* @param {string} [alias] - Own domain alias
|
|
129
129
|
*/
|
|
130
130
|
setEnv(env: string, alias?: string): ApiBase;
|
|
131
|
-
longPollingObservable<Req extends object, Res>(method: 'GET' | 'POST', url: string, requestBody: Req, reconnectInterval?: number): Observable<Res>;
|
|
132
|
-
longPull(subscriber: Subscriber<any>, method: any, link: any, auth: any, requestBody: any, reconnectInterval: any): void;
|
|
131
|
+
longPollingObservable<Req extends object, Res>(method: 'GET' | 'POST', url: string, requestBody: Req, sessionId: string, reconnectInterval?: number): Observable<Res>;
|
|
132
|
+
longPull(subscriber: Subscriber<any>, method: any, link: any, auth: any, requestBody: any, sessionId: any, reconnectInterval: any): void;
|
|
133
133
|
destroyLongPolling(): void;
|
|
134
134
|
setAuthType(): API_AUTH_TYPE;
|
|
135
135
|
getClient(method: Extract<HttpRequestMethod, 'GET' | 'POST'>, link: string): {
|
|
@@ -1913,7 +1913,7 @@ interface GetConfigResponse {
|
|
|
1913
1913
|
declare class ApiCheckoutInternal {
|
|
1914
1914
|
protected api: ApiInternal;
|
|
1915
1915
|
constructor(api: ApiInternal);
|
|
1916
|
-
instructions(): Observable<object>;
|
|
1916
|
+
instructions(session_id: string): Observable<object>;
|
|
1917
1917
|
callback(payload: Object): Promise<Object>;
|
|
1918
1918
|
}
|
|
1919
1919
|
|
|
@@ -22,8 +22,8 @@ export declare class ApiBase {
|
|
|
22
22
|
* @param {string} [alias] - Own domain alias
|
|
23
23
|
*/
|
|
24
24
|
setEnv(env: string, alias?: string): ApiBase;
|
|
25
|
-
longPollingObservable<Req extends object, Res>(method: 'GET' | 'POST', url: string, requestBody: Req, reconnectInterval?: number): Observable<Res>;
|
|
26
|
-
longPull(subscriber: Subscriber<any>, method: any, link: any, auth: any, requestBody: any, reconnectInterval: any): void;
|
|
25
|
+
longPollingObservable<Req extends object, Res>(method: 'GET' | 'POST', url: string, requestBody: Req, sessionId: string, reconnectInterval?: number): Observable<Res>;
|
|
26
|
+
longPull(subscriber: Subscriber<any>, method: any, link: any, auth: any, requestBody: any, sessionId: any, reconnectInterval: any): void;
|
|
27
27
|
destroyLongPolling(): void;
|
|
28
28
|
setAuthType(): API_AUTH_TYPE;
|
|
29
29
|
getClient(method: Extract<HttpRequestMethod, 'GET' | 'POST'>, link: string): {
|