@alipay/ams-checkout 0.0.1755258862-dev.7 → 0.0.1756796178-dev.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/dist/umd/ams-checkout.min.js +1 -1
- package/esm/component/channel.d.ts +3 -1
- package/esm/component/channel.js +26 -62
- package/esm/component/component.inline.style.js +2 -2
- package/esm/component/popupWindow.style.d.ts +4 -1
- package/esm/component/popupWindow.style.js +37 -2
- package/esm/config/index.d.ts +8 -8
- package/esm/config/index.js +8 -8
- package/esm/constant/easysafepay.d.ts +16 -0
- package/esm/constant/easysafepay.js +19 -0
- package/esm/constant/index.d.ts +41 -2
- package/esm/constant/index.js +43 -5
- package/esm/core/component/ckp/index.d.ts +2 -0
- package/esm/core/component/ckp/index.js +41 -5
- package/esm/core/component/element/elementContainerService/containerService.d.ts +33 -0
- package/esm/core/component/element/elementContainerService/containerService.js +123 -0
- package/esm/core/component/element/elementContainerService/index.d.ts +20 -0
- package/esm/core/component/element/elementContainerService/index.js +63 -0
- package/esm/core/component/element/elementController/index.d.ts +27 -0
- package/esm/core/component/element/elementController/index.js +493 -0
- package/esm/core/component/element/elementProcessor/addressProcessor.d.ts +20 -0
- package/esm/core/component/element/elementProcessor/addressProcessor.js +160 -0
- package/esm/core/component/element/elementProcessor/authProcessor.d.ts +20 -0
- package/esm/core/component/element/elementProcessor/authProcessor.js +125 -0
- package/esm/core/component/element/elementProcessor/baseElementProcessor.d.ts +41 -0
- package/esm/core/component/element/elementProcessor/baseElementProcessor.js +96 -0
- package/esm/core/component/element/elementProcessor/paymentProcessor.d.ts +20 -0
- package/esm/core/component/element/elementProcessor/paymentProcessor.js +380 -0
- package/esm/core/component/element/index.d.ts +7 -46
- package/esm/core/component/element/index.js +31 -923
- package/esm/core/component/element/mock.d.ts +4 -0
- package/esm/core/component/element/mock.js +365 -1
- package/esm/core/component/element/type.d.ts +74 -34
- package/esm/core/component/element/type.js +20 -12
- package/esm/core/component/element/util.d.ts +69 -0
- package/esm/core/component/element/util.js +477 -0
- package/esm/core/component/index.d.ts +5 -1
- package/esm/core/component/index.js +1 -2
- package/esm/core/component/oldElement/index.d.ts +59 -0
- package/esm/core/component/oldElement/index.js +956 -0
- package/esm/core/component/oldElement/mock.d.ts +6 -0
- package/esm/core/component/oldElement/mock.js +567 -0
- package/esm/core/component/oldElement/type.d.ts +354 -0
- package/esm/core/component/oldElement/type.js +81 -0
- package/esm/core/instance/index.d.ts +1 -1
- package/esm/core/instance/index.js +1 -1
- package/esm/foundation/core/index.d.ts +9 -1
- package/esm/foundation/core/index.js +153 -53
- package/esm/foundation/index.d.ts +20 -0
- package/esm/foundation/index.js +13 -2
- package/esm/foundation/product-processor/autoDebit/deps.d.ts +14 -0
- package/esm/foundation/product-processor/autoDebit/deps.js +12 -0
- package/esm/foundation/product-processor/autoDebit/index.d.ts +48 -0
- package/esm/foundation/product-processor/autoDebit/index.js +466 -0
- package/esm/foundation/product-processor/easysafepay/deps.d.ts +3 -1
- package/esm/foundation/product-processor/easysafepay/deps.js +3 -1
- package/esm/foundation/product-processor/easysafepay/index.d.ts +5 -0
- package/esm/foundation/product-processor/easysafepay/index.js +271 -169
- package/esm/foundation/product-processor/element/index.d.ts +7 -0
- package/esm/foundation/product-processor/element/index.js +24 -0
- package/esm/foundation/service/container/index.d.ts +14 -3
- package/esm/foundation/service/container/index.js +178 -25
- package/esm/foundation/service/container/popup.d.ts +10 -7
- package/esm/foundation/service/container/popup.js +3 -1
- package/esm/foundation/service/event-center.js +1 -0
- package/esm/foundation/service/log/keys.js +3 -1
- package/esm/foundation/service/log/types.d.ts +1 -0
- package/esm/foundation/service/requester/requester.js +20 -109
- package/esm/foundation/utils/preload_helper.d.ts +2 -2
- package/esm/foundation/utils/preload_helper.js +8 -6
- package/esm/foundation/utils/redirect_utils.js +34 -18
- package/esm/foundation/utils/web_app_url_utils.d.ts +71 -1
- package/esm/foundation/utils/web_app_url_utils.js +219 -8
- package/esm/index.d.ts +8 -5
- package/esm/index.js +103 -53
- package/esm/plugin/component/cashierApp.d.ts +1 -1
- package/esm/plugin/component/cashierApp.js +5 -5
- package/esm/plugin/component/channel.d.ts +3 -1
- package/esm/plugin/component/channel.js +10 -12
- package/esm/plugin/component/index.js +49 -45
- package/esm/plugin/type.d.ts +1 -1
- package/esm/request/index.js +2 -2
- package/esm/types/index.d.ts +37 -3
- package/esm/types/index.js +10 -2
- package/esm/util/index.d.ts +12 -1
- package/esm/util/index.js +39 -3
- package/esm/util/redirect.d.ts +6 -0
- package/esm/util/redirect.js +54 -0
- package/esm/util/spm-map.d.ts +18 -4
- package/esm/util/spm-map.js +20 -6
- package/package.json +27 -4
- /package/esm/core/component/{element → oldElement}/components/address.d.ts +0 -0
- /package/esm/core/component/{element → oldElement}/components/address.js +0 -0
- /package/esm/core/component/{element → oldElement}/components/auth.d.ts +0 -0
- /package/esm/core/component/{element → oldElement}/components/auth.js +0 -0
- /package/esm/core/component/{element → oldElement}/components/payment.d.ts +0 -0
- /package/esm/core/component/{element → oldElement}/components/payment.js +0 -0
- /package/esm/core/component/{element → oldElement}/utils.d.ts +0 -0
- /package/esm/core/component/{element → oldElement}/utils.js +0 -0
@@ -1,27 +1,27 @@
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
4
2
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
5
3
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
6
4
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
5
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
6
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
7
7
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
8
8
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
9
9
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
10
10
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
11
11
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
12
12
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
13
|
-
import { DisplayTypeEnum, eventCodeEnum } from "../../types";
|
14
|
-
import { DisplayInfo } from "../index";
|
15
13
|
import { v4 as uuid } from 'uuid';
|
14
|
+
import { cleanMockup, createMockup, createRetentionPopup, handleDeclareInfo, hideMockup, hideRetentionPopup, removeRetentionPopup, showRetentionPopup } from "../../component/component.popup.style";
|
15
|
+
import { insertStyleSheet } from "../../component/popupWindow.style";
|
16
|
+
import { sdkVersion } from "../../config";
|
17
|
+
import { COMPONENT_CLOSE_MASK_BLOCK_ID, EVENT, LOADING_ID } from "../../constant";
|
18
|
+
import { DisplayTypeEnum, eventCodeEnum, EventLoggingEventId } from "../../types";
|
19
|
+
import { DisplayInfo, IElementStatus } from "../index";
|
16
20
|
import { ServiceProvider } from "../service";
|
17
|
-
import { convertPaymentSession, getWebAppVersion, saveWebAppVersion } from "../utils/payment_context_utils";
|
18
21
|
import { getGrayscaleId } from "../utils/gray_scale_utils";
|
19
|
-
import {
|
20
|
-
import { parseWebAppMatchConfig } from "../utils/web_app_url_utils";
|
22
|
+
import { convertPaymentSession, getWebAppVersion, saveWebAppVersion } from "../utils/payment_context_utils";
|
21
23
|
import { redirect } from "../utils/redirect_utils";
|
22
|
-
import {
|
23
|
-
import { hideMockup, createMockup, createRetentionPopup, hideRetentionPopup, showRetentionPopup, cleanMockup, removeRetentionPopup, handleDeclareInfo } from "../../component/component.popup.style";
|
24
|
-
import { COMPONENT_CLOSE_MASK_BLOCK_ID, EVENT, LOADING_ID } from "../../constant";
|
24
|
+
import { parseWebAppMatchConfig } from "../utils/web_app_url_utils";
|
25
25
|
/**
|
26
26
|
* @author 谦彧 <zhangmian.zm@alipay.com>
|
27
27
|
* @date 2024/9/17
|
@@ -36,8 +36,36 @@ export var AntomSDKCore = /*#__PURE__*/function () {
|
|
36
36
|
_defineProperty(this, "sdkMetaData", void 0);
|
37
37
|
_defineProperty(this, "productProcessors", {});
|
38
38
|
_defineProperty(this, "enablePopWindowEventCallback", false);
|
39
|
+
_defineProperty(this, "eventLogging", void 0);
|
40
|
+
_defineProperty(this, "status", IElementStatus.UNINIT);
|
41
|
+
_defineProperty(this, "logger", void 0);
|
42
|
+
this.status = IElementStatus.INITING;
|
39
43
|
}
|
40
44
|
_createClass(AntomSDKCore, [{
|
45
|
+
key: "getStatus",
|
46
|
+
value: function getStatus() {
|
47
|
+
return this.status;
|
48
|
+
}
|
49
|
+
}, {
|
50
|
+
key: "setStatus",
|
51
|
+
value: function setStatus(status) {
|
52
|
+
if (status === this.getStatus()) return;
|
53
|
+
console.log("[test] status has changed from ".concat(this.getStatus(), " to ").concat(status));
|
54
|
+
this.status = status;
|
55
|
+
}
|
56
|
+
}, {
|
57
|
+
key: "updatePaymentSessionData",
|
58
|
+
value: function updatePaymentSessionData(paymentSession) {
|
59
|
+
var _convertPaymentSessio = convertPaymentSession(paymentSession),
|
60
|
+
paymentSessionId = _convertPaymentSessio.id,
|
61
|
+
paymentSessionMetaData = _convertPaymentSessio.data;
|
62
|
+
this.paymentContext = _objectSpread(_objectSpread({}, this.paymentContext), {}, {
|
63
|
+
paymentSession: paymentSession,
|
64
|
+
paymentSessionId: paymentSessionId,
|
65
|
+
paymentSessionObj: paymentSessionMetaData
|
66
|
+
});
|
67
|
+
}
|
68
|
+
}, {
|
41
69
|
key: "registerProcessor",
|
42
70
|
value: function registerProcessor(productScene) {
|
43
71
|
var paymentMethod = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
@@ -57,6 +85,7 @@ export var AntomSDKCore = /*#__PURE__*/function () {
|
|
57
85
|
};
|
58
86
|
this.sdkMetaData.webAppVersion = getWebAppVersion(this.sdkMetaData);
|
59
87
|
ServiceProvider.getInstance(this.instanceId).init(options, this.sdkMetaData);
|
88
|
+
this.logger = ServiceProvider.getInstance(this.instanceId).getService('Log');
|
60
89
|
this.prepare(options, this.sdkMetaData);
|
61
90
|
}
|
62
91
|
}, {
|
@@ -151,12 +180,45 @@ export var AntomSDKCore = /*#__PURE__*/function () {
|
|
151
180
|
return _ref2.apply(this, arguments);
|
152
181
|
};
|
153
182
|
}());
|
183
|
+
eventCenter.listen(EVENT.getSdkVersion.name, /*#__PURE__*/function () {
|
184
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(data, payload) {
|
185
|
+
var _payload$context3;
|
186
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
187
|
+
while (1) switch (_context3.prev = _context3.next) {
|
188
|
+
case 0:
|
189
|
+
eventCenter.dispatchToApp({
|
190
|
+
event: 'appEventCallback',
|
191
|
+
eventCallbackId: (_payload$context3 = payload.context) === null || _payload$context3 === void 0 ? void 0 : _payload$context3.eventCallbackId,
|
192
|
+
data: {
|
193
|
+
version: sdkMetaData === null || sdkMetaData === void 0 ? void 0 : sdkMetaData.sdkVersion
|
194
|
+
}
|
195
|
+
});
|
196
|
+
case 1:
|
197
|
+
case "end":
|
198
|
+
return _context3.stop();
|
199
|
+
}
|
200
|
+
}, _callee3);
|
201
|
+
}));
|
202
|
+
return function (_x5, _x6) {
|
203
|
+
return _ref3.apply(this, arguments);
|
204
|
+
};
|
205
|
+
}());
|
206
|
+
eventCenter.listen(EVENT.destroy.name, function (data) {
|
207
|
+
_this.setStatus(IElementStatus.READY);
|
208
|
+
_this.destroy();
|
209
|
+
});
|
154
210
|
eventCenter.listen(EVENT.closeCallback.name, function () {
|
155
211
|
var _options$onClose;
|
156
212
|
(_options$onClose = options.onClose) === null || _options$onClose === void 0 || _options$onClose.call(options);
|
157
213
|
});
|
158
214
|
eventCenter.listen(EVENT.eventCallback.name, function (data) {
|
159
215
|
var _options$onEventCallb;
|
216
|
+
_this.logger.logInfo({
|
217
|
+
title: 'sdk_event_event_callback'
|
218
|
+
}, {
|
219
|
+
eventCode: JSON.stringify((data === null || data === void 0 ? void 0 : data.code) || ''),
|
220
|
+
eventMessage: JSON.stringify((data === null || data === void 0 ? void 0 : data.message) || '')
|
221
|
+
});
|
160
222
|
(_options$onEventCallb = options.onEventCallback) === null || _options$onEventCallb === void 0 || _options$onEventCallb.call(options, data);
|
161
223
|
});
|
162
224
|
eventCenter.listen(EVENT.error.name, function (data) {
|
@@ -166,6 +228,7 @@ export var AntomSDKCore = /*#__PURE__*/function () {
|
|
166
228
|
eventCenter.listen(EVENT.declareEventCallbackInfo.name, function (data) {
|
167
229
|
if (data !== null && data !== void 0 && data.popWindowEventInfo) {
|
168
230
|
_this.enablePopWindowEventCallback = data.popWindowEventInfo.enableCallback;
|
231
|
+
_this.eventLogging = data.popWindowEventInfo.eventLogging;
|
169
232
|
}
|
170
233
|
});
|
171
234
|
|
@@ -177,20 +240,24 @@ export var AntomSDKCore = /*#__PURE__*/function () {
|
|
177
240
|
}, {
|
178
241
|
key: "startBizFlow",
|
179
242
|
value: function () {
|
180
|
-
var _startBizFlow = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
243
|
+
var _startBizFlow = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(options) {
|
181
244
|
var _this$paymentContext$, _this$paymentContext$2, _this$paymentContext$3;
|
182
|
-
var paymentSession, displayInfo,
|
183
|
-
return _regeneratorRuntime().wrap(function
|
184
|
-
while (1) switch (
|
245
|
+
var paymentSession, displayInfo, _convertPaymentSessio2, paymentSessionId, paymentSessionMetaData, mid, webAppMatchConfig, webAppVersion, productScene, paymentMethod, _this$bizFlowStartBeh, payload;
|
246
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
247
|
+
while (1) switch (_context4.prev = _context4.next) {
|
185
248
|
case 0:
|
186
249
|
if (!(!options || !options.paymentSession)) {
|
187
|
-
|
250
|
+
_context4.next = 2;
|
188
251
|
break;
|
189
252
|
}
|
190
253
|
throw new Error('paymentSession is empty');
|
191
254
|
case 2:
|
255
|
+
this.logger.logInfo({
|
256
|
+
title: 'sdk_event_createComponent'
|
257
|
+
});
|
258
|
+
this.setStatus(IElementStatus.IN_BIZ_FLOW);
|
192
259
|
paymentSession = options.paymentSession, displayInfo = options.displayInfo;
|
193
|
-
|
260
|
+
_convertPaymentSessio2 = convertPaymentSession(paymentSession), paymentSessionId = _convertPaymentSessio2.id, paymentSessionMetaData = _convertPaymentSessio2.data;
|
194
261
|
this.paymentContext = {
|
195
262
|
initOptions: this.initOptions,
|
196
263
|
startBizFlowOptions: options,
|
@@ -203,12 +270,8 @@ export var AntomSDKCore = /*#__PURE__*/function () {
|
|
203
270
|
// upgrade WebApp version
|
204
271
|
mid = (_this$paymentContext$ = this.paymentContext.paymentSessionObj) === null || _this$paymentContext$ === void 0 ? void 0 : _this$paymentContext$.clientId;
|
205
272
|
webAppMatchConfig = parseWebAppMatchConfig(this.paymentContext.paymentSessionObj.extendInfo);
|
206
|
-
webAppVersion = getWebAppVersion(this.sdkMetaData, mid, webAppMatchConfig);
|
273
|
+
webAppVersion = getWebAppVersion(this.sdkMetaData, mid, webAppMatchConfig);
|
207
274
|
this.sdkMetaData.webAppVersion = webAppVersion;
|
208
|
-
this.sdkMetaData = _objectSpread(_objectSpread({}, this.sdkMetaData), {}, {
|
209
|
-
"webAppVersion": "1.31.0",
|
210
|
-
"sdkVersion": "1.31.0"
|
211
|
-
});
|
212
275
|
saveWebAppVersion(webAppVersion, this.sdkMetaData);
|
213
276
|
|
214
277
|
// Call service to update via payment context
|
@@ -217,61 +280,61 @@ export var AntomSDKCore = /*#__PURE__*/function () {
|
|
217
280
|
// Invoke processor
|
218
281
|
productScene = (_this$paymentContext$2 = this.paymentContext.paymentSessionObj) === null || _this$paymentContext$2 === void 0 || (_this$paymentContext$2 = _this$paymentContext$2.paymentSessionConfig) === null || _this$paymentContext$2 === void 0 ? void 0 : _this$paymentContext$2.productScene;
|
219
282
|
paymentMethod = (_this$paymentContext$3 = this.paymentContext.paymentSessionObj) === null || _this$paymentContext$3 === void 0 || (_this$paymentContext$3 = _this$paymentContext$3.paymentMethodInfoView) === null || _this$paymentContext$3 === void 0 ? void 0 : _this$paymentContext$3.paymentMethodType;
|
220
|
-
|
283
|
+
_context4.prev = 15;
|
221
284
|
if (!this.productProcessors["".concat(productScene, "|").concat(paymentMethod)]) {
|
222
|
-
|
285
|
+
_context4.next = 22;
|
223
286
|
break;
|
224
287
|
}
|
225
|
-
|
288
|
+
_context4.next = 19;
|
226
289
|
return this.productProcessors["".concat(productScene, "|").concat(paymentMethod)].startBizFlow(this.paymentContext);
|
227
|
-
case
|
228
|
-
this.bizFlowStartBehavior =
|
229
|
-
|
290
|
+
case 19:
|
291
|
+
this.bizFlowStartBehavior = _context4.sent;
|
292
|
+
_context4.next = 26;
|
230
293
|
break;
|
231
|
-
case
|
294
|
+
case 22:
|
232
295
|
if (!this.productProcessors["".concat(productScene)]) {
|
233
|
-
|
296
|
+
_context4.next = 26;
|
234
297
|
break;
|
235
298
|
}
|
236
|
-
|
299
|
+
_context4.next = 25;
|
237
300
|
return this.productProcessors["".concat(productScene)].startBizFlow(this.paymentContext);
|
238
|
-
case 24:
|
239
|
-
this.bizFlowStartBehavior = _context3.sent;
|
240
301
|
case 25:
|
241
|
-
|
302
|
+
this.bizFlowStartBehavior = _context4.sent;
|
303
|
+
case 26:
|
304
|
+
_context4.next = 31;
|
242
305
|
break;
|
243
|
-
case
|
244
|
-
|
245
|
-
|
246
|
-
console.error('Invoke processor failed',
|
247
|
-
case
|
306
|
+
case 28:
|
307
|
+
_context4.prev = 28;
|
308
|
+
_context4.t0 = _context4["catch"](15);
|
309
|
+
console.error('Invoke processor failed', _context4.t0);
|
310
|
+
case 31:
|
248
311
|
if (!(!this.bizFlowStartBehavior || this.bizFlowStartBehavior.behaviorType === 'NONE' || !this.bizFlowStartBehavior.payload)) {
|
249
|
-
|
312
|
+
_context4.next = 33;
|
250
313
|
break;
|
251
314
|
}
|
252
|
-
return
|
253
|
-
case
|
315
|
+
return _context4.abrupt("return");
|
316
|
+
case 33:
|
254
317
|
if (!(this.bizFlowStartBehavior.behaviorType === 'RENDER')) {
|
255
|
-
|
318
|
+
_context4.next = 36;
|
256
319
|
break;
|
257
320
|
}
|
258
321
|
this.handleBehaviorRender();
|
259
|
-
return
|
260
|
-
case
|
322
|
+
return _context4.abrupt("return");
|
323
|
+
case 36:
|
261
324
|
if (!(this.bizFlowStartBehavior.behaviorType === 'REDIRECT')) {
|
262
|
-
|
325
|
+
_context4.next = 40;
|
263
326
|
break;
|
264
327
|
}
|
265
328
|
payload = (_this$bizFlowStartBeh = this.bizFlowStartBehavior) === null || _this$bizFlowStartBeh === void 0 ? void 0 : _this$bizFlowStartBeh.payload;
|
266
329
|
redirect(payload, this.instanceId);
|
267
|
-
return
|
268
|
-
case
|
330
|
+
return _context4.abrupt("return");
|
331
|
+
case 40:
|
269
332
|
case "end":
|
270
|
-
return
|
333
|
+
return _context4.stop();
|
271
334
|
}
|
272
|
-
},
|
335
|
+
}, _callee4, this, [[15, 28]]);
|
273
336
|
}));
|
274
|
-
function startBizFlow(
|
337
|
+
function startBizFlow(_x7) {
|
275
338
|
return _startBizFlow.apply(this, arguments);
|
276
339
|
}
|
277
340
|
return startBizFlow;
|
@@ -314,7 +377,7 @@ export var AntomSDKCore = /*#__PURE__*/function () {
|
|
314
377
|
showRetentionPopup();
|
315
378
|
return;
|
316
379
|
} else {
|
317
|
-
_this2.handleClose(isOnCloseEvent);
|
380
|
+
_this2.handleClose(isOnCloseEvent, 'behavior');
|
318
381
|
}
|
319
382
|
};
|
320
383
|
|
@@ -340,9 +403,10 @@ export var AntomSDKCore = /*#__PURE__*/function () {
|
|
340
403
|
if (displayType == DisplayTypeEnum.popup) {
|
341
404
|
createRetentionPopup(platform, function () {
|
342
405
|
hideRetentionPopup();
|
406
|
+
_this2.handleRemain();
|
343
407
|
}, function () {
|
344
408
|
hideRetentionPopup();
|
345
|
-
_this2.handleClose();
|
409
|
+
_this2.handleClose(false, 'retention');
|
346
410
|
});
|
347
411
|
createMockup({
|
348
412
|
platform: platform,
|
@@ -353,13 +417,40 @@ export var AntomSDKCore = /*#__PURE__*/function () {
|
|
353
417
|
return;
|
354
418
|
}
|
355
419
|
}
|
420
|
+
}, {
|
421
|
+
key: "handleRemain",
|
422
|
+
value: function handleRemain() {
|
423
|
+
if (this.eventLogging && this.eventLogging.enableLogging) {
|
424
|
+
var _this$eventLogging, _this$eventLogging2, _this$eventLogging3, _this$eventLogging4;
|
425
|
+
this.logger.logInfo({
|
426
|
+
code: ((_this$eventLogging = this.eventLogging) === null || _this$eventLogging === void 0 ? void 0 : _this$eventLogging.eventName) || ''
|
427
|
+
}, {
|
428
|
+
eventId: EventLoggingEventId.ContinuePaying,
|
429
|
+
eventName: ((_this$eventLogging2 = this.eventLogging) === null || _this$eventLogging2 === void 0 ? void 0 : _this$eventLogging2.eventName) || '',
|
430
|
+
eventAlias: ((_this$eventLogging3 = this.eventLogging) === null || _this$eventLogging3 === void 0 ? void 0 : _this$eventLogging3.eventAlias) || '',
|
431
|
+
userPath: ((_this$eventLogging4 = this.eventLogging) === null || _this$eventLogging4 === void 0 ? void 0 : _this$eventLogging4.userPath) || ''
|
432
|
+
});
|
433
|
+
}
|
434
|
+
}
|
356
435
|
}, {
|
357
436
|
key: "handleClose",
|
358
437
|
value: function handleClose() {
|
359
438
|
var isOnCloseEvent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
439
|
+
var source = arguments.length > 1 ? arguments[1] : undefined;
|
360
440
|
var eventCenter = ServiceProvider.getInstance(this.instanceId).getService('EventCenter');
|
361
441
|
eventCenter.emit(EVENT.closeCallback.name, {});
|
362
442
|
if (this.enablePopWindowEventCallback && !isOnCloseEvent) {
|
443
|
+
if (this.eventLogging && this.eventLogging.enableLogging) {
|
444
|
+
var _this$eventLogging5, _this$eventLogging6, _this$eventLogging7, _this$eventLogging8;
|
445
|
+
this.logger.logInfo({
|
446
|
+
code: ((_this$eventLogging5 = this.eventLogging) === null || _this$eventLogging5 === void 0 ? void 0 : _this$eventLogging5.eventName) || ''
|
447
|
+
}, {
|
448
|
+
eventId: source === 'behavior' ? EventLoggingEventId.OnlyClose : EventLoggingEventId.LeaveAnyWay,
|
449
|
+
eventName: ((_this$eventLogging6 = this.eventLogging) === null || _this$eventLogging6 === void 0 ? void 0 : _this$eventLogging6.eventName) || '',
|
450
|
+
eventAlias: ((_this$eventLogging7 = this.eventLogging) === null || _this$eventLogging7 === void 0 ? void 0 : _this$eventLogging7.eventAlias) || '',
|
451
|
+
userPath: ((_this$eventLogging8 = this.eventLogging) === null || _this$eventLogging8 === void 0 ? void 0 : _this$eventLogging8.userPath) || ''
|
452
|
+
});
|
453
|
+
}
|
363
454
|
eventCenter.emit(EVENT.eventCallback.name, {
|
364
455
|
code: eventCodeEnum.SDK_PAYMENT_CANCEL,
|
365
456
|
result: {
|
@@ -378,7 +469,8 @@ export var AntomSDKCore = /*#__PURE__*/function () {
|
|
378
469
|
var immediately = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
379
470
|
var containerService = ServiceProvider.getInstance(this.instanceId).getService('Container');
|
380
471
|
var cleanElement = function cleanElement() {
|
381
|
-
|
472
|
+
var _this3$paymentContext;
|
473
|
+
containerService.cleanContainer((_this3$paymentContext = _this3.paymentContext) === null || _this3$paymentContext === void 0 ? void 0 : _this3$paymentContext.displayInfo);
|
382
474
|
cleanMockup();
|
383
475
|
removeRetentionPopup();
|
384
476
|
// TODO @/component this.removeEventListener();
|
@@ -394,6 +486,14 @@ export var AntomSDKCore = /*#__PURE__*/function () {
|
|
394
486
|
setTimeout(function () {
|
395
487
|
cleanElement();
|
396
488
|
}, 300);
|
489
|
+
this.logger.logInfo({
|
490
|
+
title: 'sdk_event_destroyComponent'
|
491
|
+
});
|
492
|
+
}
|
493
|
+
}, {
|
494
|
+
key: "getInstanceId",
|
495
|
+
value: function getInstanceId() {
|
496
|
+
return this.instanceId;
|
397
497
|
}
|
398
498
|
}]);
|
399
499
|
return AntomSDKCore;
|
@@ -28,6 +28,13 @@ export declare class DisplayInfo {
|
|
28
28
|
selector: string;
|
29
29
|
appearance?: Record<string, any>;
|
30
30
|
appendAliasContainerId?: boolean;
|
31
|
+
merchantAppointParam?: {
|
32
|
+
storedCard: {
|
33
|
+
needCVV: boolean;
|
34
|
+
};
|
35
|
+
};
|
36
|
+
iframeStyle?: Partial<CSSStyleDeclaration>;
|
37
|
+
notRedirectAfterComplete?: boolean;
|
31
38
|
constructor();
|
32
39
|
}
|
33
40
|
/**
|
@@ -69,7 +76,20 @@ export interface SDKMetaData {
|
|
69
76
|
webAppVersion: string;
|
70
77
|
greyscaleId?: number;
|
71
78
|
}
|
79
|
+
export interface EventLogging {
|
80
|
+
enableLogging?: boolean;
|
81
|
+
eventName?: string;
|
82
|
+
eventAlias?: string;
|
83
|
+
userPath?: string;
|
84
|
+
}
|
72
85
|
export interface InitContext {
|
73
86
|
initOptions: IoptionsParams;
|
74
87
|
sdkMetaData: SDKMetaData;
|
75
88
|
}
|
89
|
+
export declare enum IElementStatus {
|
90
|
+
UNINIT = "UNINIT",
|
91
|
+
INITING = "INITING",
|
92
|
+
READY = "READY",
|
93
|
+
IN_BIZ_FLOW = "IN_BIZ_FLOW",
|
94
|
+
DESTROYED = "DESTROYED"
|
95
|
+
}
|
package/esm/foundation/index.js
CHANGED
@@ -7,7 +7,6 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
7
7
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
8
8
|
import { DisplayTypeEnum, PlatformEnum } from "../types";
|
9
9
|
import { isPC } from "../util";
|
10
|
-
|
11
10
|
/**
|
12
11
|
* @author 谦彧 <zhangmian.zm@alipay.com>
|
13
12
|
* @date 2024/9/17
|
@@ -27,6 +26,9 @@ export var DisplayInfo = /*#__PURE__*/_createClass(function DisplayInfo() {
|
|
27
26
|
_defineProperty(this, "appearance", void 0);
|
28
27
|
// append selector name to containerId
|
29
28
|
_defineProperty(this, "appendAliasContainerId", void 0);
|
29
|
+
_defineProperty(this, "merchantAppointParam", void 0);
|
30
|
+
_defineProperty(this, "iframeStyle", void 0);
|
31
|
+
_defineProperty(this, "notRedirectAfterComplete", void 0);
|
30
32
|
this.platform = isPC() ? PlatformEnum.desktop : PlatformEnum.mobile;
|
31
33
|
this.isRetention = true;
|
32
34
|
this.type = DisplayTypeEnum.popup;
|
@@ -39,4 +41,13 @@ export var DisplayInfo = /*#__PURE__*/_createClass(function DisplayInfo() {
|
|
39
41
|
|
40
42
|
/**
|
41
43
|
* Provide some capability, such as MonitorService, EventBusService, SecurityService
|
42
|
-
*/
|
44
|
+
*/
|
45
|
+
|
46
|
+
export var IElementStatus = /*#__PURE__*/function (IElementStatus) {
|
47
|
+
IElementStatus["UNINIT"] = "UNINIT";
|
48
|
+
IElementStatus["INITING"] = "INITING";
|
49
|
+
IElementStatus["READY"] = "READY";
|
50
|
+
IElementStatus["IN_BIZ_FLOW"] = "IN_BIZ_FLOW";
|
51
|
+
IElementStatus["DESTROYED"] = "DESTROYED";
|
52
|
+
return IElementStatus;
|
53
|
+
}({});
|
@@ -0,0 +1,14 @@
|
|
1
|
+
export type { BizFlowStartBehavior, PaymentContext, ProductProcessor, RedirectBehaviorPayload, RenderBehaviorPayload, SDKMetaData, } from '../..';
|
2
|
+
export { v2AppMarmotMap } from '../../../config';
|
3
|
+
export { COMPONENT_CONTAINER_ID, COMPONENT_SECTION_ID, ERRORMESSAGE, EVENT, LOADTIME_LIMIT } from '../../../constant';
|
4
|
+
export { getComponentSign } from '../../../core/component';
|
5
|
+
export { ComponentSignEnum, eventCodeEnum, PlatformEnum } from '../../../types';
|
6
|
+
export type { CashierSdkActionQueryRequest, IoptionsParams } from '../../../types';
|
7
|
+
export { isPC, isTrue, queryParse } from '../../../util';
|
8
|
+
export { isLocalMock } from '../../../util/mock';
|
9
|
+
export { EventCenter } from '../..//service/event-center';
|
10
|
+
export { ServiceProvider } from '../../service';
|
11
|
+
export { LogService } from '../../service/log';
|
12
|
+
export { RequesterService } from '../../service/requester/requester';
|
13
|
+
export { SecurityService } from '../../service/security';
|
14
|
+
export { getWebAppV2Url } from '../../utils/web_app_url_utils';
|
@@ -0,0 +1,12 @@
|
|
1
|
+
export { v2AppMarmotMap } from "../../../config";
|
2
|
+
export { COMPONENT_CONTAINER_ID, COMPONENT_SECTION_ID, ERRORMESSAGE, EVENT, LOADTIME_LIMIT } from "../../../constant";
|
3
|
+
export { getComponentSign } from "../../../core/component";
|
4
|
+
export { ComponentSignEnum, eventCodeEnum, PlatformEnum } from "../../../types";
|
5
|
+
export { isPC, isTrue, queryParse } from "../../../util";
|
6
|
+
export { isLocalMock } from "../../../util/mock";
|
7
|
+
export { EventCenter } from "../..//service/event-center";
|
8
|
+
export { ServiceProvider } from "../../service";
|
9
|
+
export { LogService } from "../../service/log";
|
10
|
+
export { RequesterService } from "../../service/requester/requester";
|
11
|
+
export { SecurityService } from "../../service/security";
|
12
|
+
export { getWebAppV2Url } from "../../utils/web_app_url_utils";
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { BizFlowStartBehavior, IoptionsParams, PaymentContext, ProductProcessor, SDKMetaData } from './deps';
|
2
|
+
export declare class AutoDebitProcessor implements ProductProcessor {
|
3
|
+
private paymentContext?;
|
4
|
+
private initConfig;
|
5
|
+
private logger;
|
6
|
+
private eventCenter;
|
7
|
+
private securityService;
|
8
|
+
private instanceId;
|
9
|
+
private componentSign;
|
10
|
+
private hostSign;
|
11
|
+
private _performanceData;
|
12
|
+
private SECURITY_SDK_INIT_TIMEOUT;
|
13
|
+
init(config: IoptionsParams, instanceId: string, sdkMetaData: SDKMetaData): void;
|
14
|
+
startBizFlow(paymentContext: PaymentContext): Promise<BizFlowStartBehavior>;
|
15
|
+
private acquireApdidToken;
|
16
|
+
/**
|
17
|
+
* 获取SDK操作查询请求
|
18
|
+
* @returns {Promise<CashierSdkActionQueryRequest | { message?: string; success: boolean }>} 返回SDK操作查询请求或错误信息
|
19
|
+
*/
|
20
|
+
private getSdkActionQuery;
|
21
|
+
/**
|
22
|
+
* webLaunchPromise方法用于返回一个Promise对象,用于异步加载Web App
|
23
|
+
* @returns {Promise} 返回一个Promise对象
|
24
|
+
*/
|
25
|
+
private webLaunchPromise;
|
26
|
+
private sendRequestAndWaitWebLaunch;
|
27
|
+
private buildRedirectResult;
|
28
|
+
/**
|
29
|
+
* 构建 Web App 的 URL
|
30
|
+
* @returns {string} Web App 的 URL
|
31
|
+
*/
|
32
|
+
private buildWebAppUrl;
|
33
|
+
/**
|
34
|
+
* 初始化安全SDK
|
35
|
+
* @returns {Promise}
|
36
|
+
*/
|
37
|
+
private initSecuritySDK;
|
38
|
+
/**
|
39
|
+
* 设置容器宽度
|
40
|
+
* 如果是 Trustly 支付方式,并且显示平台为桌面端,则设置组件区块和容器的最大宽度为 656px
|
41
|
+
*/
|
42
|
+
private setAchAutoDebitContainerWidth;
|
43
|
+
/**
|
44
|
+
* 判断是否为Trustly支付方式
|
45
|
+
* @returns {boolean} true 表示是Trustly支付方式
|
46
|
+
*/
|
47
|
+
private get isTrustly();
|
48
|
+
}
|