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