@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/widget.umd.js
CHANGED
|
@@ -4,9 +4,129 @@
|
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.paydock = {}));
|
|
5
5
|
})(this, (function (exports) { 'use strict';
|
|
6
6
|
|
|
7
|
+
function _arrayLikeToArray(r, a) {
|
|
8
|
+
(null == a || a > r.length) && (a = r.length);
|
|
9
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
10
|
+
return n;
|
|
11
|
+
}
|
|
12
|
+
function _arrayWithHoles(r) {
|
|
13
|
+
if (Array.isArray(r)) return r;
|
|
14
|
+
}
|
|
15
|
+
function _arrayWithoutHoles(r) {
|
|
16
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
17
|
+
}
|
|
18
|
+
function _assertThisInitialized(e) {
|
|
19
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
20
|
+
return e;
|
|
21
|
+
}
|
|
7
22
|
function _callSuper(t, o, e) {
|
|
8
23
|
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
9
24
|
}
|
|
25
|
+
function _classCallCheck(a, n) {
|
|
26
|
+
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
27
|
+
}
|
|
28
|
+
function _defineProperties(e, r) {
|
|
29
|
+
for (var t = 0; t < r.length; t++) {
|
|
30
|
+
var o = r[t];
|
|
31
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function _createClass(e, r, t) {
|
|
35
|
+
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
36
|
+
writable: !1
|
|
37
|
+
}), e;
|
|
38
|
+
}
|
|
39
|
+
function _createForOfIteratorHelper(r, e) {
|
|
40
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
41
|
+
if (!t) {
|
|
42
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e ) {
|
|
43
|
+
t && (r = t);
|
|
44
|
+
var n = 0,
|
|
45
|
+
F = function () {};
|
|
46
|
+
return {
|
|
47
|
+
s: F,
|
|
48
|
+
n: function () {
|
|
49
|
+
return n >= r.length ? {
|
|
50
|
+
done: !0
|
|
51
|
+
} : {
|
|
52
|
+
done: !1,
|
|
53
|
+
value: r[n++]
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
e: function (r) {
|
|
57
|
+
throw r;
|
|
58
|
+
},
|
|
59
|
+
f: F
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
63
|
+
}
|
|
64
|
+
var o,
|
|
65
|
+
a = !0,
|
|
66
|
+
u = !1;
|
|
67
|
+
return {
|
|
68
|
+
s: function () {
|
|
69
|
+
t = t.call(r);
|
|
70
|
+
},
|
|
71
|
+
n: function () {
|
|
72
|
+
var r = t.next();
|
|
73
|
+
return a = r.done, r;
|
|
74
|
+
},
|
|
75
|
+
e: function (r) {
|
|
76
|
+
u = !0, o = r;
|
|
77
|
+
},
|
|
78
|
+
f: function () {
|
|
79
|
+
try {
|
|
80
|
+
a || null == t.return || t.return();
|
|
81
|
+
} finally {
|
|
82
|
+
if (u) throw o;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
function _defineProperty(e, r, t) {
|
|
88
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
89
|
+
value: t,
|
|
90
|
+
enumerable: !0,
|
|
91
|
+
configurable: !0,
|
|
92
|
+
writable: !0
|
|
93
|
+
}) : e[r] = t, e;
|
|
94
|
+
}
|
|
95
|
+
function _extends() {
|
|
96
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
97
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
98
|
+
var t = arguments[e];
|
|
99
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
100
|
+
}
|
|
101
|
+
return n;
|
|
102
|
+
}, _extends.apply(null, arguments);
|
|
103
|
+
}
|
|
104
|
+
function _get() {
|
|
105
|
+
return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {
|
|
106
|
+
var p = _superPropBase(e, t);
|
|
107
|
+
if (p) {
|
|
108
|
+
var n = Object.getOwnPropertyDescriptor(p, t);
|
|
109
|
+
return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;
|
|
110
|
+
}
|
|
111
|
+
}, _get.apply(null, arguments);
|
|
112
|
+
}
|
|
113
|
+
function _getPrototypeOf(t) {
|
|
114
|
+
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
115
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
116
|
+
}, _getPrototypeOf(t);
|
|
117
|
+
}
|
|
118
|
+
function _inherits(t, e) {
|
|
119
|
+
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
|
|
120
|
+
t.prototype = Object.create(e && e.prototype, {
|
|
121
|
+
constructor: {
|
|
122
|
+
value: t,
|
|
123
|
+
writable: !0,
|
|
124
|
+
configurable: !0
|
|
125
|
+
}
|
|
126
|
+
}), Object.defineProperty(t, "prototype", {
|
|
127
|
+
writable: !1
|
|
128
|
+
}), e && _setPrototypeOf(t, e);
|
|
129
|
+
}
|
|
10
130
|
function _isNativeReflectConstruct() {
|
|
11
131
|
try {
|
|
12
132
|
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
@@ -15,6 +135,9 @@
|
|
|
15
135
|
return !!t;
|
|
16
136
|
})();
|
|
17
137
|
}
|
|
138
|
+
function _iterableToArray(r) {
|
|
139
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
140
|
+
}
|
|
18
141
|
function _iterableToArrayLimit(r, l) {
|
|
19
142
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
20
143
|
if (null != t) {
|
|
@@ -42,6 +165,17 @@
|
|
|
42
165
|
return a;
|
|
43
166
|
}
|
|
44
167
|
}
|
|
168
|
+
function _nonIterableRest() {
|
|
169
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
170
|
+
}
|
|
171
|
+
function _nonIterableSpread() {
|
|
172
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
173
|
+
}
|
|
174
|
+
function _possibleConstructorReturn(t, e) {
|
|
175
|
+
if (e && ("object" == typeof e || "function" == typeof e)) return e;
|
|
176
|
+
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
|
|
177
|
+
return _assertThisInitialized(t);
|
|
178
|
+
}
|
|
45
179
|
function _regeneratorRuntime() {
|
|
46
180
|
_regeneratorRuntime = function () {
|
|
47
181
|
return e;
|
|
@@ -343,6 +477,27 @@
|
|
|
343
477
|
}
|
|
344
478
|
}, e;
|
|
345
479
|
}
|
|
480
|
+
function _setPrototypeOf(t, e) {
|
|
481
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
482
|
+
return t.__proto__ = e, t;
|
|
483
|
+
}, _setPrototypeOf(t, e);
|
|
484
|
+
}
|
|
485
|
+
function _slicedToArray(r, e) {
|
|
486
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
487
|
+
}
|
|
488
|
+
function _superPropBase(t, o) {
|
|
489
|
+
for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););
|
|
490
|
+
return t;
|
|
491
|
+
}
|
|
492
|
+
function _superPropGet(t, e, o, r) {
|
|
493
|
+
var p = _get(_getPrototypeOf(t.prototype ), e, o);
|
|
494
|
+
return "function" == typeof p ? function (t) {
|
|
495
|
+
return p.apply(o, t);
|
|
496
|
+
} : p;
|
|
497
|
+
}
|
|
498
|
+
function _toConsumableArray(r) {
|
|
499
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
500
|
+
}
|
|
346
501
|
function _toPrimitive(t, r) {
|
|
347
502
|
if ("object" != typeof t || !t) return t;
|
|
348
503
|
var e = t[Symbol.toPrimitive];
|
|
@@ -366,206 +521,12 @@
|
|
|
366
521
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
367
522
|
}, _typeof$1(o);
|
|
368
523
|
}
|
|
369
|
-
function
|
|
370
|
-
if (
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
function _defineProperties(target, props) {
|
|
375
|
-
for (var i = 0; i < props.length; i++) {
|
|
376
|
-
var descriptor = props[i];
|
|
377
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
378
|
-
descriptor.configurable = true;
|
|
379
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
380
|
-
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
384
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
385
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
386
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
387
|
-
writable: false
|
|
388
|
-
});
|
|
389
|
-
return Constructor;
|
|
390
|
-
}
|
|
391
|
-
function _defineProperty(obj, key, value) {
|
|
392
|
-
key = _toPropertyKey(key);
|
|
393
|
-
if (key in obj) {
|
|
394
|
-
Object.defineProperty(obj, key, {
|
|
395
|
-
value: value,
|
|
396
|
-
enumerable: true,
|
|
397
|
-
configurable: true,
|
|
398
|
-
writable: true
|
|
399
|
-
});
|
|
400
|
-
} else {
|
|
401
|
-
obj[key] = value;
|
|
524
|
+
function _unsupportedIterableToArray(r, a) {
|
|
525
|
+
if (r) {
|
|
526
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
527
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
528
|
+
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;
|
|
402
529
|
}
|
|
403
|
-
return obj;
|
|
404
|
-
}
|
|
405
|
-
function _extends() {
|
|
406
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
407
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
408
|
-
var source = arguments[i];
|
|
409
|
-
for (var key in source) {
|
|
410
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
411
|
-
target[key] = source[key];
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
return target;
|
|
416
|
-
};
|
|
417
|
-
return _extends.apply(this, arguments);
|
|
418
|
-
}
|
|
419
|
-
function _inherits(subClass, superClass) {
|
|
420
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
421
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
422
|
-
}
|
|
423
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
424
|
-
constructor: {
|
|
425
|
-
value: subClass,
|
|
426
|
-
writable: true,
|
|
427
|
-
configurable: true
|
|
428
|
-
}
|
|
429
|
-
});
|
|
430
|
-
Object.defineProperty(subClass, "prototype", {
|
|
431
|
-
writable: false
|
|
432
|
-
});
|
|
433
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
434
|
-
}
|
|
435
|
-
function _getPrototypeOf(o) {
|
|
436
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
437
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
438
|
-
};
|
|
439
|
-
return _getPrototypeOf(o);
|
|
440
|
-
}
|
|
441
|
-
function _setPrototypeOf(o, p) {
|
|
442
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
443
|
-
o.__proto__ = p;
|
|
444
|
-
return o;
|
|
445
|
-
};
|
|
446
|
-
return _setPrototypeOf(o, p);
|
|
447
|
-
}
|
|
448
|
-
function _assertThisInitialized(self) {
|
|
449
|
-
if (self === void 0) {
|
|
450
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
451
|
-
}
|
|
452
|
-
return self;
|
|
453
|
-
}
|
|
454
|
-
function _possibleConstructorReturn(self, call) {
|
|
455
|
-
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
456
|
-
return call;
|
|
457
|
-
} else if (call !== void 0) {
|
|
458
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
459
|
-
}
|
|
460
|
-
return _assertThisInitialized(self);
|
|
461
|
-
}
|
|
462
|
-
function _superPropBase(object, property) {
|
|
463
|
-
while (!Object.prototype.hasOwnProperty.call(object, property)) {
|
|
464
|
-
object = _getPrototypeOf(object);
|
|
465
|
-
if (object === null) break;
|
|
466
|
-
}
|
|
467
|
-
return object;
|
|
468
|
-
}
|
|
469
|
-
function _get() {
|
|
470
|
-
if (typeof Reflect !== "undefined" && Reflect.get) {
|
|
471
|
-
_get = Reflect.get.bind();
|
|
472
|
-
} else {
|
|
473
|
-
_get = function _get(target, property, receiver) {
|
|
474
|
-
var base = _superPropBase(target, property);
|
|
475
|
-
if (!base) return;
|
|
476
|
-
var desc = Object.getOwnPropertyDescriptor(base, property);
|
|
477
|
-
if (desc.get) {
|
|
478
|
-
return desc.get.call(arguments.length < 3 ? target : receiver);
|
|
479
|
-
}
|
|
480
|
-
return desc.value;
|
|
481
|
-
};
|
|
482
|
-
}
|
|
483
|
-
return _get.apply(this, arguments);
|
|
484
|
-
}
|
|
485
|
-
function _slicedToArray(arr, i) {
|
|
486
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
487
|
-
}
|
|
488
|
-
function _toConsumableArray(arr) {
|
|
489
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
490
|
-
}
|
|
491
|
-
function _arrayWithoutHoles(arr) {
|
|
492
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
493
|
-
}
|
|
494
|
-
function _arrayWithHoles(arr) {
|
|
495
|
-
if (Array.isArray(arr)) return arr;
|
|
496
|
-
}
|
|
497
|
-
function _iterableToArray(iter) {
|
|
498
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
499
|
-
}
|
|
500
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
501
|
-
if (!o) return;
|
|
502
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
503
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
504
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
505
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
506
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
507
|
-
}
|
|
508
|
-
function _arrayLikeToArray(arr, len) {
|
|
509
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
510
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
511
|
-
return arr2;
|
|
512
|
-
}
|
|
513
|
-
function _nonIterableSpread() {
|
|
514
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
515
|
-
}
|
|
516
|
-
function _nonIterableRest() {
|
|
517
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
518
|
-
}
|
|
519
|
-
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
520
|
-
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
521
|
-
if (!it) {
|
|
522
|
-
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike ) {
|
|
523
|
-
if (it) o = it;
|
|
524
|
-
var i = 0;
|
|
525
|
-
var F = function () {};
|
|
526
|
-
return {
|
|
527
|
-
s: F,
|
|
528
|
-
n: function () {
|
|
529
|
-
if (i >= o.length) return {
|
|
530
|
-
done: true
|
|
531
|
-
};
|
|
532
|
-
return {
|
|
533
|
-
done: false,
|
|
534
|
-
value: o[i++]
|
|
535
|
-
};
|
|
536
|
-
},
|
|
537
|
-
e: function (e) {
|
|
538
|
-
throw e;
|
|
539
|
-
},
|
|
540
|
-
f: F
|
|
541
|
-
};
|
|
542
|
-
}
|
|
543
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
544
|
-
}
|
|
545
|
-
var normalCompletion = true,
|
|
546
|
-
didErr = false,
|
|
547
|
-
err;
|
|
548
|
-
return {
|
|
549
|
-
s: function () {
|
|
550
|
-
it = it.call(o);
|
|
551
|
-
},
|
|
552
|
-
n: function () {
|
|
553
|
-
var step = it.next();
|
|
554
|
-
normalCompletion = step.done;
|
|
555
|
-
return step;
|
|
556
|
-
},
|
|
557
|
-
e: function (e) {
|
|
558
|
-
didErr = true;
|
|
559
|
-
err = e;
|
|
560
|
-
},
|
|
561
|
-
f: function () {
|
|
562
|
-
try {
|
|
563
|
-
if (!normalCompletion && it.return != null) it.return();
|
|
564
|
-
} finally {
|
|
565
|
-
if (didErr) throw err;
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
};
|
|
569
530
|
}
|
|
570
531
|
|
|
571
532
|
var Browser = /*#__PURE__*/function () {
|
|
@@ -932,7 +893,7 @@
|
|
|
932
893
|
version: 'x-sdk-version',
|
|
933
894
|
type: 'x-sdk-type'
|
|
934
895
|
});
|
|
935
|
-
SDK._version = 'v1.
|
|
896
|
+
SDK._version = 'v1.112.0';
|
|
936
897
|
|
|
937
898
|
/******************************************************************************
|
|
938
899
|
Copyright (c) Microsoft Corporation.
|
|
@@ -3999,8 +3960,8 @@
|
|
|
3999
3960
|
var params = {
|
|
4000
3961
|
enabled: 'true',
|
|
4001
3962
|
accountId: '974691',
|
|
4002
|
-
agentId: '
|
|
4003
|
-
applicationId: '
|
|
3963
|
+
agentId: '1386157152',
|
|
3964
|
+
applicationId: '1386157152',
|
|
4004
3965
|
licenseKey: '4848a32285',
|
|
4005
3966
|
trustKey: '974691'
|
|
4006
3967
|
};
|
|
@@ -4189,6 +4150,21 @@
|
|
|
4189
4150
|
}();
|
|
4190
4151
|
new EventRepository();
|
|
4191
4152
|
|
|
4153
|
+
var SessionHelper = /*#__PURE__*/function () {
|
|
4154
|
+
function SessionHelper() {
|
|
4155
|
+
_classCallCheck(this, SessionHelper);
|
|
4156
|
+
}
|
|
4157
|
+
return _createClass(SessionHelper, null, [{
|
|
4158
|
+
key: "sessionId",
|
|
4159
|
+
get: function get() {
|
|
4160
|
+
return window.sessionStorage.getItem('sessionId');
|
|
4161
|
+
},
|
|
4162
|
+
set: function set(value) {
|
|
4163
|
+
window.sessionStorage.setItem('sessionId', value);
|
|
4164
|
+
}
|
|
4165
|
+
}]);
|
|
4166
|
+
}();
|
|
4167
|
+
|
|
4192
4168
|
var API_AUTH_TYPE;
|
|
4193
4169
|
(function (API_AUTH_TYPE) {
|
|
4194
4170
|
API_AUTH_TYPE[API_AUTH_TYPE["PUBLIC_KEY"] = 0] = "PUBLIC_KEY";
|
|
@@ -4225,16 +4201,16 @@
|
|
|
4225
4201
|
}
|
|
4226
4202
|
}, {
|
|
4227
4203
|
key: "longPollingObservable",
|
|
4228
|
-
value: function longPollingObservable(method, url, requestBody) {
|
|
4204
|
+
value: function longPollingObservable(method, url, requestBody, sessionId) {
|
|
4229
4205
|
var _this = this;
|
|
4230
|
-
var reconnectInterval = arguments.length >
|
|
4206
|
+
var reconnectInterval = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1000;
|
|
4231
4207
|
return new Observable(function (subscriber) {
|
|
4232
|
-
_this.longPull(subscriber, method, _this.env.getConf().url + url, _this.auth, requestBody, reconnectInterval);
|
|
4208
|
+
_this.longPull(subscriber, method, _this.env.getConf().url + url, _this.auth, requestBody, sessionId, reconnectInterval);
|
|
4233
4209
|
});
|
|
4234
4210
|
}
|
|
4235
4211
|
}, {
|
|
4236
4212
|
key: "longPull",
|
|
4237
|
-
value: function longPull(subscriber, method, link, auth, requestBody, reconnectInterval) {
|
|
4213
|
+
value: function longPull(subscriber, method, link, auth, requestBody, sessionId, reconnectInterval) {
|
|
4238
4214
|
var _this2 = this;
|
|
4239
4215
|
if (this.stoppedPooling) return;
|
|
4240
4216
|
var request = new XMLHttpRequest();
|
|
@@ -4246,11 +4222,15 @@
|
|
|
4246
4222
|
if (request.readyState === 4) {
|
|
4247
4223
|
if (request.status === 200 || request.status === 201) {
|
|
4248
4224
|
var data = JSON.parse(request.responseText);
|
|
4225
|
+
if (SessionHelper.sessionId !== data.resource.data.intent_id) {
|
|
4226
|
+
_this2.stoppedPooling = false;
|
|
4227
|
+
return;
|
|
4228
|
+
}
|
|
4249
4229
|
subscriber.next(data.resource.data);
|
|
4250
|
-
_this2.longPull(subscriber, method, link, auth, requestBody, reconnectInterval);
|
|
4230
|
+
_this2.longPull(subscriber, method, link, auth, requestBody, sessionId, reconnectInterval);
|
|
4251
4231
|
} else {
|
|
4252
|
-
setTimeout(function () {
|
|
4253
|
-
_this2.longPull(subscriber, method, link, auth, requestBody, reconnectInterval);
|
|
4232
|
+
if (SessionHelper.sessionId === sessionId) setTimeout(function () {
|
|
4233
|
+
_this2.longPull(subscriber, method, link, auth, requestBody, sessionId, reconnectInterval);
|
|
4254
4234
|
}, reconnectInterval);
|
|
4255
4235
|
}
|
|
4256
4236
|
}
|
|
@@ -5132,8 +5112,8 @@
|
|
|
5132
5112
|
}
|
|
5133
5113
|
return _createClass(ApiCheckoutInternal, [{
|
|
5134
5114
|
key: "instructions",
|
|
5135
|
-
value: function instructions() {
|
|
5136
|
-
return this.api.longPollingObservable('GET', INSTRUCTION_LINK, {}, 1000);
|
|
5115
|
+
value: function instructions(session_id) {
|
|
5116
|
+
return this.api.longPollingObservable('GET', INSTRUCTION_LINK, {}, session_id, 1000);
|
|
5137
5117
|
}
|
|
5138
5118
|
}, {
|
|
5139
5119
|
key: "callback",
|
|
@@ -6183,7 +6163,7 @@
|
|
|
6183
6163
|
}, {
|
|
6184
6164
|
key: "setEnv",
|
|
6185
6165
|
value: function setEnv(env, alias) {
|
|
6186
|
-
|
|
6166
|
+
_superPropGet(PopupRunner, "setEnv", this)([env, alias]);
|
|
6187
6167
|
this.dispatcher.setEnv(env, alias);
|
|
6188
6168
|
this.popup.setEnv(env);
|
|
6189
6169
|
}
|
|
@@ -7790,7 +7770,7 @@
|
|
|
7790
7770
|
return _createClass(ZipmoneyRunner, [{
|
|
7791
7771
|
key: "setEnv",
|
|
7792
7772
|
value: function setEnv(env, alias) {
|
|
7793
|
-
|
|
7773
|
+
_superPropGet(ZipmoneyRunner, "setEnv", this)([env, alias]);
|
|
7794
7774
|
this.apiEnv.setEnv(env, alias);
|
|
7795
7775
|
}
|
|
7796
7776
|
}, {
|
|
@@ -7860,7 +7840,7 @@
|
|
|
7860
7840
|
}, {
|
|
7861
7841
|
key: "stop",
|
|
7862
7842
|
value: function stop() {
|
|
7863
|
-
|
|
7843
|
+
_superPropGet(ZipmoneyContextualRunner, "stop", this)([]);
|
|
7864
7844
|
this.runs = false;
|
|
7865
7845
|
var element = document.querySelector('.zipmoney-overlay');
|
|
7866
7846
|
if (element) element.remove();
|
|
@@ -8054,7 +8034,7 @@
|
|
|
8054
8034
|
}, {
|
|
8055
8035
|
key: "setEnv",
|
|
8056
8036
|
value: function setEnv(env, alias) {
|
|
8057
|
-
|
|
8037
|
+
_superPropGet(ZipmoneyRedirectRunner, "setEnv", this)([env, alias]);
|
|
8058
8038
|
this.storageDispatcher.setEnv(env, alias);
|
|
8059
8039
|
}
|
|
8060
8040
|
}]);
|
|
@@ -8114,7 +8094,7 @@
|
|
|
8114
8094
|
}, {
|
|
8115
8095
|
key: "onCheckout",
|
|
8116
8096
|
value: function onCheckout(event, cb) {
|
|
8117
|
-
|
|
8097
|
+
_superPropGet(AfterpayRunner, "onCheckout", this)([event, function (checkout, data) {
|
|
8118
8098
|
if (!(data === null || data === void 0 ? void 0 : data.status)) return cb(checkout);
|
|
8119
8099
|
var status = data.status,
|
|
8120
8100
|
newData = __rest(data, ["status"]);
|
|
@@ -8125,7 +8105,7 @@
|
|
|
8125
8105
|
} else {
|
|
8126
8106
|
cb(checkout, newData);
|
|
8127
8107
|
}
|
|
8128
|
-
});
|
|
8108
|
+
}]);
|
|
8129
8109
|
}
|
|
8130
8110
|
}, {
|
|
8131
8111
|
key: "error",
|
|
@@ -8612,7 +8592,7 @@
|
|
|
8612
8592
|
return _createClass(ZipmoneyCheckoutButton, [{
|
|
8613
8593
|
key: "setSuspendedRedirectUri",
|
|
8614
8594
|
value: function setSuspendedRedirectUri(uri) {
|
|
8615
|
-
|
|
8595
|
+
_superPropGet(ZipmoneyCheckoutButton, "setSuspendedRedirectUri", this)([uri]);
|
|
8616
8596
|
}
|
|
8617
8597
|
/**
|
|
8618
8598
|
* Method for setting the merchant redirect URL.
|
|
@@ -8629,15 +8609,15 @@
|
|
|
8629
8609
|
key: "setRedirectUrl",
|
|
8630
8610
|
value: function setRedirectUrl(url) {
|
|
8631
8611
|
if (isContextualRunner(this.runner)) {
|
|
8632
|
-
|
|
8633
|
-
|
|
8612
|
+
_superPropGet(ZipmoneyCheckoutButton, "chooseRunner", this)([GATEWAY_TYPE.ZIPMONEY, CHECKOUT_MODE.REDIRECT]);
|
|
8613
|
+
_superPropGet(ZipmoneyCheckoutButton, "setEnv", this)([this.env, this.alias]);
|
|
8634
8614
|
}
|
|
8635
|
-
|
|
8615
|
+
_superPropGet(ZipmoneyCheckoutButton, "setRedirectUrl", this)([url]);
|
|
8636
8616
|
}
|
|
8637
8617
|
}, {
|
|
8638
8618
|
key: "buildAdditionalParams",
|
|
8639
8619
|
value: function buildAdditionalParams() {
|
|
8640
|
-
var defaultParams =
|
|
8620
|
+
var defaultParams = _superPropGet(ZipmoneyCheckoutButton, "buildAdditionalParams", this)([]);
|
|
8641
8621
|
var params = _extends(_extends({}, defaultParams), {
|
|
8642
8622
|
public_key: this.publicKey,
|
|
8643
8623
|
gateway_id: this.gatewayId
|
|
@@ -8694,7 +8674,7 @@
|
|
|
8694
8674
|
}, {
|
|
8695
8675
|
key: "buildAdditionalParams",
|
|
8696
8676
|
value: function buildAdditionalParams() {
|
|
8697
|
-
var params =
|
|
8677
|
+
var params = _superPropGet(AfterpayCheckoutButton, "buildAdditionalParams", this)([]);
|
|
8698
8678
|
if (this.showETP) {
|
|
8699
8679
|
params.show_etp = true;
|
|
8700
8680
|
}
|
|
@@ -9211,9 +9191,12 @@
|
|
|
9211
9191
|
});
|
|
9212
9192
|
var iframeElement = this.iFrame.getElement();
|
|
9213
9193
|
this.iFrame.setStyle('width', '100%');
|
|
9214
|
-
if (iframeElement)
|
|
9215
|
-
|
|
9216
|
-
|
|
9194
|
+
if (iframeElement) {
|
|
9195
|
+
iframeElement.setAttribute('allow', 'payment; accelerometer;');
|
|
9196
|
+
iframeElement.onload = function () {
|
|
9197
|
+
return _this2.eventEmitter.emit(EVENT$3.IFRAME_LOADED, {});
|
|
9198
|
+
};
|
|
9199
|
+
}
|
|
9217
9200
|
}
|
|
9218
9201
|
}, {
|
|
9219
9202
|
key: "getEnv",
|
|
@@ -9752,7 +9735,7 @@
|
|
|
9752
9735
|
}, {
|
|
9753
9736
|
key: "setEnv",
|
|
9754
9737
|
value: function setEnv(env) {
|
|
9755
|
-
|
|
9738
|
+
_superPropGet(AfterPayWalletService, "setEnv", this)([env]);
|
|
9756
9739
|
this.storageDispatcher.setEnv(env);
|
|
9757
9740
|
return this;
|
|
9758
9741
|
}
|
|
@@ -10082,14 +10065,14 @@
|
|
|
10082
10065
|
key: "initControl",
|
|
10083
10066
|
value: function initControl() {
|
|
10084
10067
|
if (!this.imageStyle) this.createImageStyles();
|
|
10085
|
-
|
|
10068
|
+
_superPropGet(WalletBackground, "initControl", this)([]);
|
|
10086
10069
|
}
|
|
10087
10070
|
}, {
|
|
10088
10071
|
key: "clear",
|
|
10089
10072
|
value: function clear() {
|
|
10090
10073
|
if (this.imageStyle) this.imageStyle.parentNode.removeChild(this.imageStyle);
|
|
10091
10074
|
this.imageStyle = null;
|
|
10092
|
-
|
|
10075
|
+
_superPropGet(WalletBackground, "clear", this)([]);
|
|
10093
10076
|
}
|
|
10094
10077
|
}, {
|
|
10095
10078
|
key: "createTemplate",
|
|
@@ -10205,7 +10188,7 @@
|
|
|
10205
10188
|
key: "setEnv",
|
|
10206
10189
|
value: function setEnv(env) {
|
|
10207
10190
|
this.link.setEnv(env);
|
|
10208
|
-
return
|
|
10191
|
+
return _superPropGet(FlypayV2WalletService, "setEnv", this)([env]);
|
|
10209
10192
|
}
|
|
10210
10193
|
}, {
|
|
10211
10194
|
key: "enable",
|
|
@@ -14128,9 +14111,9 @@
|
|
|
14128
14111
|
key: "setFormElement",
|
|
14129
14112
|
value: function setFormElement(element) {
|
|
14130
14113
|
this.configs[0].setFormFields([element.field]);
|
|
14131
|
-
|
|
14114
|
+
_superPropGet(HtmlWidget, "setFormElement", this)([_extends(_extends({}, element), {
|
|
14132
14115
|
field: element.field.replace('*', '')
|
|
14133
|
-
}));
|
|
14116
|
+
})]);
|
|
14134
14117
|
}
|
|
14135
14118
|
/**
|
|
14136
14119
|
* The method to set meta information for the checkout page
|
|
@@ -15373,7 +15356,8 @@
|
|
|
15373
15356
|
this.setEnv(this.intentTokenPayload.env, this.intentTokenPayload.env_alias);
|
|
15374
15357
|
this.instructions = this.initContractVersion(this.intentTokenPayload.version);
|
|
15375
15358
|
if (this.debug) return;
|
|
15376
|
-
this.listenInstructions(intentToken);
|
|
15359
|
+
this.listenInstructions(intentToken, this.intentTokenPayload.intent_id);
|
|
15360
|
+
SessionHelper.sessionId = this.intentTokenPayload.intent_id;
|
|
15377
15361
|
this.ready();
|
|
15378
15362
|
} catch (e) {
|
|
15379
15363
|
console.error(e.message);
|
|
@@ -15411,10 +15395,10 @@
|
|
|
15411
15395
|
}
|
|
15412
15396
|
}, {
|
|
15413
15397
|
key: "listenInstructions",
|
|
15414
|
-
value: function listenInstructions(token) {
|
|
15398
|
+
value: function listenInstructions(token, session_id) {
|
|
15415
15399
|
var _this = this;
|
|
15416
15400
|
this.createWidgetStructure();
|
|
15417
|
-
this.api.checkout().instructions().subscribe({
|
|
15401
|
+
this.api.checkout().instructions(session_id).subscribe({
|
|
15418
15402
|
next: function next(response) {
|
|
15419
15403
|
var _a;
|
|
15420
15404
|
if (!(response === null || response === void 0 ? void 0 : response.event)) throw new Error('Instruction structure inconsistent');
|
|
@@ -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
|
|