@alipay/ams-checkout 0.0.1730878287-dev.9 → 0.0.1732691889-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/umd/ams-checkout.min.js +1 -1
- package/esm/component/channel.d.ts +19 -0
- package/esm/component/channel.js +87 -0
- package/esm/component/component.inline.style.d.ts +10 -0
- package/esm/component/component.inline.style.js +121 -0
- package/esm/component/component.popup.style.d.ts +25 -0
- package/esm/component/component.popup.style.js +204 -0
- package/esm/component/popupWindow.style.d.ts +11 -0
- package/esm/component/popupWindow.style.js +121 -0
- package/esm/config/index.d.ts +7 -7
- package/esm/config/index.js +7 -7
- package/esm/constant/index.d.ts +7 -5
- package/esm/constant/index.js +8 -78
- package/esm/core/bus/interface.d.ts +0 -12
- package/esm/core/bus/interface.js +2 -16
- package/esm/core/component/address.d.ts +2 -2
- package/esm/core/component/appPreloadProcessing.js +0 -2
- package/esm/core/component/ckp/index.d.ts +3 -3
- package/esm/core/component/element/components/address.js +1 -1
- package/esm/core/component/element/components/auth.d.ts +1 -1
- package/esm/core/component/element/components/payment.js +1 -1
- package/esm/core/component/element/index.js +20 -20
- package/esm/core/component/element/type.d.ts +6 -0
- package/esm/core/component/index.d.ts +2 -2
- package/esm/core/component/index.js +2 -6
- package/esm/core/drop-in/index.d.ts +2 -2
- package/esm/core/instance/index.d.ts +5 -5
- package/esm/core/instance/index.js +1 -2
- package/esm/foundation/core/index.d.ts +5 -5
- package/esm/foundation/core/index.js +118 -52
- package/esm/foundation/index.d.ts +10 -7
- package/esm/foundation/product-processor/easysafepay/deps.d.ts +8 -5
- package/esm/foundation/product-processor/easysafepay/deps.js +5 -2
- package/esm/foundation/product-processor/easysafepay/index.d.ts +6 -6
- package/esm/foundation/product-processor/easysafepay/index.js +192 -265
- package/esm/foundation/service/{event-bus → api-bus}/ability/callback.js +1 -1
- package/esm/foundation/service/{event-bus → api-bus}/ability/globalData.d.ts +1 -1
- package/esm/{core/bus → foundation/service/api-bus}/ability/globalData.js +2 -2
- package/esm/{core/bus → foundation/service/api-bus}/ability/request.d.ts +1 -1
- package/esm/{core/bus → foundation/service/api-bus}/ability/request.js +2 -2
- package/esm/foundation/service/{event-bus → api-bus}/ability/security.js +29 -19
- package/esm/foundation/service/{event-bus → api-bus}/ability/tracker.js +1 -1
- package/esm/foundation/service/{event-bus → api-bus}/busManager.js +1 -1
- package/esm/foundation/service/{event-bus → api-bus}/index.d.ts +2 -2
- package/esm/foundation/service/api-bus/interface.d.ts +48 -0
- package/esm/foundation/service/api-bus/interface.js +54 -0
- package/esm/foundation/service/container/index.d.ts +4 -2
- package/esm/foundation/service/container/index.js +47 -5
- package/esm/foundation/service/container/popup.js +1 -1
- package/esm/foundation/service/event-center.d.ts +6 -5
- package/esm/foundation/service/event-center.js +16 -17
- package/esm/foundation/service/global-data/index.d.ts +2 -2
- package/esm/foundation/service/global-data/index.js +4 -5
- package/esm/foundation/service/index.d.ts +2 -2
- package/esm/foundation/service/index.js +1 -1
- package/esm/foundation/service/log/index.d.ts +2 -2
- package/esm/foundation/service/log/index.js +1 -1
- package/esm/foundation/service/requester/deps.d.ts +1 -1
- package/esm/foundation/service/requester/requester.d.ts +2 -2
- package/esm/foundation/service/requester/requester.js +14 -11
- package/esm/foundation/service/security/index.d.ts +11 -9
- package/esm/foundation/service/security/index.js +114 -44
- package/esm/foundation/utils/payment_product_utils.d.ts +13 -0
- package/esm/foundation/utils/payment_product_utils.js +38 -0
- package/esm/foundation/utils/redirect_utils.d.ts +5 -0
- package/esm/foundation/utils/redirect_utils.js +209 -45
- package/esm/foundation/utils/system_events.js +0 -5
- package/esm/foundation/utils/web_app_url_utils.d.ts +11 -2
- package/esm/foundation/utils/web_app_url_utils.js +18 -3
- package/esm/index.d.ts +12 -12
- package/esm/index.js +31 -31
- package/esm/plugin/component/cashierApp.d.ts +3 -3
- package/esm/plugin/component/cashierApp.js +9 -10
- package/esm/plugin/component/channel.js +1 -1
- package/esm/plugin/component/component.inline.style.d.ts +1 -1
- package/esm/plugin/component/component.inline.style.js +2 -3
- package/esm/plugin/component/component.popup.style.d.ts +3 -4
- package/esm/plugin/component/component.popup.style.js +26 -23
- package/esm/plugin/component/index.d.ts +3 -1
- package/esm/plugin/component/index.js +97 -68
- package/esm/plugin/payment-element/utils.d.ts +1 -1
- package/esm/plugin/payment-element/utils.js +1 -2
- package/esm/plugin/type.d.ts +1 -1
- package/esm/types/index.d.ts +17 -11
- package/esm/types/index.js +7 -1
- package/esm/util/getBackScheme.js +95 -3
- package/esm/util/index.d.ts +1 -1
- package/esm/util/index.js +4 -3
- package/esm/util/security.d.ts +33 -0
- package/esm/{foundation/service/event-bus/ability/request.js → util/security.js} +153 -122
- package/package.json +1 -1
- package/esm/core/bus/ability/globalData.d.ts +0 -10
- package/esm/foundation/service/event-bus/ability/globalData.js +0 -89
- package/esm/foundation/service/event-bus/ability/request.d.ts +0 -10
- package/esm/foundation/types/index.d.ts +0 -4
- package/esm/foundation/types/index.js +0 -4
- package/esm/util/ua/index.d.ts +0 -2
- package/esm/util/ua/index.js +0 -2
- package/esm/util/ua/isAndroid.d.ts +0 -4
- package/esm/util/ua/isAndroid.js +0 -7
- package/esm/util/ua/isIOS.d.ts +0 -4
- package/esm/util/ua/isIOS.js +0 -7
- /package/esm/foundation/service/{event-bus → api-bus}/ability/callback.d.ts +0 -0
- /package/esm/foundation/service/{event-bus → api-bus}/ability/security.d.ts +0 -0
- /package/esm/foundation/service/{event-bus → api-bus}/ability/tracker.d.ts +0 -0
- /package/esm/foundation/service/{event-bus → api-bus}/busManager.d.ts +0 -0
- /package/esm/foundation/service/{event-bus → api-bus}/index.js +0 -0
@@ -19,9 +19,9 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
19
19
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
20
20
|
import { v4 as uuid } from 'uuid';
|
21
21
|
import { sdkVersion } from "../../config";
|
22
|
-
import { COMPONENTPLUGINID, COMPONENT_CLOSE_BLOCK_ID, COMPONENT_CONTAINER_ID, COMPONENT_RETENTION_ID, COMPONENT_SECTION_ID, ERRORMESSAGE, EVENT, LISTENER_PREFIX, LOADING_ID, LOADTIME_LIMIT, MOCKUP_ID, POPUP_LOADTIME_LOG_LIMIT, TIMEOUT_WEB_APP_HEART_BEAT, TIME_DELAY_SEND_HEART_BEAT } from "../../constant";
|
22
|
+
import { COMPONENTPLUGINID, COMPONENT_CLOSE_BLOCK_ID, COMPONENT_CLOSE_MASK_ID, COMPONENT_CONTAINER_ID, COMPONENT_RETENTION_ID, COMPONENT_SECTION_ID, ERRORMESSAGE, EVENT, LISTENER_PREFIX, LOADING_ID, LOADTIME_LIMIT, MOCKUP_ID, POPUP_LOADTIME_LOG_LIMIT, TIMEOUT_WEB_APP_HEART_BEAT, TIME_DELAY_SEND_HEART_BEAT } from "../../constant";
|
23
23
|
import { queryPaymentInfo, submitPayInfo } from "../../service";
|
24
|
-
import { ComponentSignEnum,
|
24
|
+
import { ComponentSignEnum, eventCodeEnum, MessageName, PlatformEnum, ProductSceneEnum, RedirectType, DisplayTypeEnum, TargetEnum } from "../../types";
|
25
25
|
import { getType, isJsonString, isPC } from "../../util";
|
26
26
|
import { isLocalMock } from "../../util/mock";
|
27
27
|
import { matchVersion } from "../../util/versionCompare";
|
@@ -252,6 +252,12 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
252
252
|
key: "appendIframeNodes",
|
253
253
|
value: function appendIframeNodes(componentSign, renderParams) {
|
254
254
|
var _renderParams,
|
255
|
+
_renderParams2,
|
256
|
+
_this$_selector,
|
257
|
+
_this$_selector$index,
|
258
|
+
_this$_selector2,
|
259
|
+
_this$_selector2$slic,
|
260
|
+
_renderParams3,
|
255
261
|
_this$_renderParams5,
|
256
262
|
_this$_renderParams6,
|
257
263
|
_this$_renderParams7,
|
@@ -267,13 +273,13 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
267
273
|
this._renderParams = renderParams;
|
268
274
|
this._componentSign = componentSign;
|
269
275
|
if ((_renderParams = renderParams) !== null && _renderParams !== void 0 && _renderParams.selector) this._selector = renderParams.selector;
|
270
|
-
this._renderDisplayType = renderParams.renderDisplayType;
|
276
|
+
this._renderDisplayType = (_renderParams2 = renderParams) === null || _renderParams2 === void 0 ? void 0 : _renderParams2.renderDisplayType;
|
271
277
|
// connect element模式会存在加载多个sdk,appendAliasContainerId为true来判断,给容器inlineId添加标识,id中不能存在#需在这里提前过滤一下
|
272
|
-
var _selector = this._selector.indexOf('#') === -1 ? this._selector : this._selector.slice(1);
|
278
|
+
var _selector = (this === null || this === void 0 || (_this$_selector = this._selector) === null || _this$_selector === void 0 || (_this$_selector$index = _this$_selector.indexOf) === null || _this$_selector$index === void 0 ? void 0 : _this$_selector$index.call(_this$_selector, '#')) === -1 ? this === null || this === void 0 ? void 0 : this._selector : this === null || this === void 0 || (_this$_selector2 = this._selector) === null || _this$_selector2 === void 0 || (_this$_selector2$slic = _this$_selector2.slice) === null || _this$_selector2$slic === void 0 ? void 0 : _this$_selector2$slic.call(_this$_selector2, 1);
|
273
279
|
// 修改需当前文件搜索,这段注释appendAliasContainerId
|
274
|
-
var appendAliasContainerId = renderParams.appendAliasContainerId ? "-".concat(_selector) : '';
|
280
|
+
var appendAliasContainerId = (_renderParams3 = renderParams) !== null && _renderParams3 !== void 0 && _renderParams3.appendAliasContainerId ? "-".concat(_selector) : '';
|
275
281
|
var inlineId = "".concat(COMPONENT_CONTAINER_ID).concat(appendAliasContainerId);
|
276
|
-
var insertedNode = this._renderDisplayType === DisplayTypeEnum.inline ? "#".concat(inlineId) : this._selector;
|
282
|
+
var insertedNode = (this === null || this === void 0 ? void 0 : this._renderDisplayType) === DisplayTypeEnum.inline ? "#".concat(inlineId) : this === null || this === void 0 ? void 0 : this._selector;
|
277
283
|
this._isAppWebview = renderParams.isAppWebview;
|
278
284
|
this.initLoggerMeta();
|
279
285
|
this.initSecurity();
|
@@ -353,9 +359,11 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
353
359
|
if (channelBehavior !== null && channelBehavior !== void 0 && channelBehavior.allowClickOutsideClose) {
|
354
360
|
onClickOutside = this.closeBtnFunc.bind(this);
|
355
361
|
}
|
362
|
+
var closeBtnFunc = this.closeBtnFunc.bind(this);
|
356
363
|
createMockup({
|
357
364
|
platform: this.platform,
|
358
|
-
onClickOutside: onClickOutside
|
365
|
+
onClickOutside: onClickOutside,
|
366
|
+
closeBtnFunc: closeBtnFunc
|
359
367
|
});
|
360
368
|
this.renderPopupLoading(renderParams);
|
361
369
|
}
|
@@ -457,7 +465,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
457
465
|
this._actionQueryPromise = new Promise( /*#__PURE__*/function () {
|
458
466
|
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(resolve, reject) {
|
459
467
|
var _this5$_renderParams, _this5$_renderParams2, _this5$_renderParams3, _this5$_renderParams4, _this5$_renderParams5, _this5$_renderParams6, _this5$_renderParams7;
|
460
|
-
var envInfo, params, _ref6, _ref6$extendInfo, extendInfo, actionData, enableVaultingApiOptimize, enableEasypayApiOptimize, _ref7, skipSdkQuery, skipSdkQueryForm, extendInfoData, ifSkip, channelBehavior, _this5$_renderParams8,
|
468
|
+
var envInfo, params, _ref6, _ref6$extendInfo, extendInfo, actionData, enableVaultingApiOptimize, enableEasypayApiOptimize, _ref7, skipSdkQuery, skipSdkQueryForm, extendInfoData, ifSkip, channelBehavior, _this5$_renderParams8, _ref8, _ref8$productSceneVer, productSceneVersion, _ref8$productScene, productScene, _this5$_renderParams9, _action$web2, _action$wap2, action, signType;
|
461
469
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
462
470
|
while (1) switch (_context2.prev = _context2.next) {
|
463
471
|
case 0:
|
@@ -578,62 +586,61 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
578
586
|
}
|
579
587
|
case 35:
|
580
588
|
if (!(ComponentSignEnum.EASY_PAY_WALLET === _this5._componentSign)) {
|
581
|
-
_context2.next =
|
589
|
+
_context2.next = 44;
|
582
590
|
break;
|
583
591
|
}
|
584
592
|
_ref8 = params.paymentSessionConfig || {}, _ref8$productSceneVer = _ref8.productSceneVersion, productSceneVersion = _ref8$productSceneVer === void 0 ? '' : _ref8$productSceneVer, _ref8$productScene = _ref8.productScene, productScene = _ref8$productScene === void 0 ? '' : _ref8$productScene;
|
585
|
-
|
586
|
-
|
587
|
-
_context2.next = 40;
|
593
|
+
if (!((_this5$_renderParams8 = _this5._renderParams) !== null && _this5$_renderParams8 !== void 0 && (_this5$_renderParams8 = _this5$_renderParams8.paymentSessionMetaData) !== null && _this5$_renderParams8 !== void 0 && (_this5$_renderParams8 = _this5$_renderParams8.action) !== null && _this5$_renderParams8 !== void 0 && _this5$_renderParams8.skipSdkQuery && enableEasypayApiOptimize)) {
|
594
|
+
_context2.next = 39;
|
588
595
|
break;
|
589
596
|
}
|
590
597
|
return _context2.abrupt("return", resolve({
|
591
598
|
message: 'sdk no need to make query request',
|
592
599
|
success: true
|
593
600
|
}));
|
594
|
-
case
|
601
|
+
case 39:
|
595
602
|
if (!(productScene === ProductSceneEnum.EASY_PAY && productSceneVersion === '2.0')) {
|
596
|
-
_context2.next =
|
603
|
+
_context2.next = 41;
|
597
604
|
break;
|
598
605
|
}
|
599
606
|
return _context2.abrupt("return", resolve({
|
600
607
|
message: 'sdk no need to make query request',
|
601
608
|
success: true
|
602
609
|
}));
|
603
|
-
case
|
604
|
-
_context2.next =
|
610
|
+
case 41:
|
611
|
+
_context2.next = 43;
|
605
612
|
return _this5.getDeviceIdAndLog();
|
606
|
-
case
|
613
|
+
case 43:
|
607
614
|
envInfo.deviceId = _context2.sent;
|
608
|
-
case
|
615
|
+
case 44:
|
609
616
|
if (!(ComponentSignEnum.AUTO_DEBIT_WALLET === _this5._componentSign)) {
|
610
|
-
_context2.next =
|
617
|
+
_context2.next = 54;
|
611
618
|
break;
|
612
619
|
}
|
613
|
-
action = ((_this5$
|
620
|
+
action = ((_this5$_renderParams9 = _this5._renderParams) === null || _this5$_renderParams9 === void 0 || (_this5$_renderParams9 = _this5$_renderParams9.paymentSessionMetaData) === null || _this5$_renderParams9 === void 0 ? void 0 : _this5$_renderParams9.action) || {};
|
614
621
|
signType = isPC() ? action === null || action === void 0 || (_action$web2 = action.web) === null || _action$web2 === void 0 ? void 0 : _action$web2.signType : action === null || action === void 0 || (_action$wap2 = action.wap) === null || _action$wap2 === void 0 ? void 0 : _action$wap2.signType;
|
615
622
|
if (!(signType === 'SMS')) {
|
616
|
-
_context2.next =
|
623
|
+
_context2.next = 49;
|
617
624
|
break;
|
618
625
|
}
|
619
626
|
return _context2.abrupt("return", resolve({
|
620
627
|
message: 'sdk no need to make query request',
|
621
628
|
success: true
|
622
629
|
}));
|
623
|
-
case
|
630
|
+
case 49:
|
624
631
|
if (!(!signType || signType !== 'REDIRECT')) {
|
625
|
-
_context2.next =
|
632
|
+
_context2.next = 51;
|
626
633
|
break;
|
627
634
|
}
|
628
635
|
return _context2.abrupt("return", resolve({
|
629
636
|
success: false
|
630
637
|
}));
|
631
|
-
case
|
632
|
-
_context2.next =
|
638
|
+
case 51:
|
639
|
+
_context2.next = 53;
|
633
640
|
return _this5.getDeviceIdAndLog();
|
634
|
-
case
|
641
|
+
case 53:
|
635
642
|
envInfo.deviceId = _context2.sent;
|
636
|
-
case
|
643
|
+
case 54:
|
637
644
|
_this5.AMSSDK.logger.logInfo({
|
638
645
|
title: 'sdk_event_sdkQuery'
|
639
646
|
}, {
|
@@ -672,7 +679,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
672
679
|
}).send();
|
673
680
|
reject(err);
|
674
681
|
});
|
675
|
-
case
|
682
|
+
case 56:
|
676
683
|
case "end":
|
677
684
|
return _context2.stop();
|
678
685
|
}
|
@@ -704,9 +711,9 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
704
711
|
var channelBehavior = getChannelBehavior((_this$_renderParams14 = this._renderParams) === null || _this$_renderParams14 === void 0 ? void 0 : _this$_renderParams14.paymentSessionMetaData);
|
705
712
|
// eslint-disable-next-line no-async-promise-executor
|
706
713
|
this._actionSubmitPromise = new Promise( /*#__PURE__*/function () {
|
707
|
-
var
|
714
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(resolve) {
|
708
715
|
var _channelBehavior$buil, _this6$_renderParams$;
|
709
|
-
var shouldSkipSubmitPayInSDK, _this6$_renderParams, _this6$_renderParams2, _this6$_renderParams3,
|
716
|
+
var shouldSkipSubmitPayInSDK, _this6$_renderParams, _this6$_renderParams2, _this6$_renderParams3, _ref10, _ref10$productSceneVe, productSceneVersion, _ref10$productScene, productScene, _ref11, _ref11$action, _ref11$action2, _ref11$action2$enable, enableSignAgreement, _ref11$action2$autoDe, autoDebitWithToken, _ref12, _ref12$paymentMethodI, _ref12$paymentMethodI2, _ref12$paymentMethodI3, paymentMethodType, isAppWebview, backScheme, extParams;
|
710
717
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
711
718
|
while (1) switch (_context3.prev = _context3.next) {
|
712
719
|
case 0:
|
@@ -727,9 +734,9 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
727
734
|
shouldSkipSubmitPayInSDK = !((_this6$_renderParams = _this6._renderParams) !== null && _this6$_renderParams !== void 0 && (_this6$_renderParams = _this6$_renderParams.paymentSessionMetaData) !== null && _this6$_renderParams !== void 0 && (_this6$_renderParams = _this6$_renderParams.action) !== null && _this6$_renderParams !== void 0 && _this6$_renderParams.skipSdkQuery) || ComponentSignEnum.EASY_PAY_WALLET !== _this6._componentSign;
|
728
735
|
}
|
729
736
|
if (ComponentSignEnum.EASY_PAY_WALLET === _this6._componentSign) {
|
730
|
-
|
731
|
-
|
732
|
-
|
737
|
+
_ref10 = params.paymentSessionConfig || {}, _ref10$productSceneVe = _ref10.productSceneVersion, productSceneVersion = _ref10$productSceneVe === void 0 ? '' : _ref10$productSceneVe, _ref10$productScene = _ref10.productScene, productScene = _ref10$productScene === void 0 ? '' : _ref10$productScene;
|
738
|
+
_ref11 = ((_this6$_renderParams2 = _this6._renderParams) === null || _this6$_renderParams2 === void 0 ? void 0 : _this6$_renderParams2.paymentSessionMetaData) || {}, _ref11$action = _ref11.action, _ref11$action2 = _ref11$action === void 0 ? {} : _ref11$action, _ref11$action2$enable = _ref11$action2.enableSignAgreement, enableSignAgreement = _ref11$action2$enable === void 0 ? false : _ref11$action2$enable, _ref11$action2$autoDe = _ref11$action2.autoDebitWithToken, autoDebitWithToken = _ref11$action2$autoDe === void 0 ? false : _ref11$action2$autoDe;
|
739
|
+
_ref12 = ((_this6$_renderParams3 = _this6._renderParams) === null || _this6$_renderParams3 === void 0 ? void 0 : _this6$_renderParams3.paymentSessionMetaData) || {}, _ref12$paymentMethodI = _ref12.paymentMethodInfoView, _ref12$paymentMethodI2 = _ref12$paymentMethodI === void 0 ? {} : _ref12$paymentMethodI, _ref12$paymentMethodI3 = _ref12$paymentMethodI2.paymentMethodType, paymentMethodType = _ref12$paymentMethodI3 === void 0 ? '' : _ref12$paymentMethodI3;
|
733
740
|
if (productScene === ProductSceneEnum.EASY_PAY && productSceneVersion === '2.0' && !autoDebitWithToken) {
|
734
741
|
isAppWebview = _this6._isAppWebview || false; ///EasyPay 2.0 首次传signAgreement字段
|
735
742
|
params['signAgreement'] = enableSignAgreement;
|
@@ -813,7 +820,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
813
820
|
}, _callee3);
|
814
821
|
}));
|
815
822
|
return function (_x3) {
|
816
|
-
return
|
823
|
+
return _ref9.apply(this, arguments);
|
817
824
|
};
|
818
825
|
}());
|
819
826
|
}
|
@@ -897,7 +904,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
897
904
|
value: Date.now()
|
898
905
|
});
|
899
906
|
try {
|
900
|
-
var _renderParams$payment, _renderParams$payment2, _renderParams$payment3, _renderParams$payment4, _renderParams$
|
907
|
+
var _renderParams$payment, _renderParams$payment2, _renderParams$payment3, _renderParams$payment4, _renderParams$element, _renderParams$element2;
|
901
908
|
var productSceneVersion = (renderParams === null || renderParams === void 0 || (_renderParams$payment = renderParams.paymentSessionMetaData) === null || _renderParams$payment === void 0 || (_renderParams$payment = _renderParams$payment.paymentSessionConfig) === null || _renderParams$payment === void 0 ? void 0 : _renderParams$payment.productSceneVersion) || '';
|
902
909
|
var productScene = (renderParams === null || renderParams === void 0 || (_renderParams$payment2 = renderParams.paymentSessionMetaData) === null || _renderParams$payment2 === void 0 || (_renderParams$payment2 = _renderParams$payment2.paymentSessionConfig) === null || _renderParams$payment2 === void 0 ? void 0 : _renderParams$payment2.productScene) || '';
|
903
910
|
var extendInfo = (renderParams === null || renderParams === void 0 || (_renderParams$payment3 = renderParams.paymentSessionMetaData) === null || _renderParams$payment3 === void 0 ? void 0 : _renderParams$payment3.extendInfo) || '';
|
@@ -911,7 +918,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
911
918
|
productSceneVersion: productSceneVersion,
|
912
919
|
extendInfo: extendInfo,
|
913
920
|
mid: mid,
|
914
|
-
|
921
|
+
elementLink: renderParams === null || renderParams === void 0 || (_renderParams$element = renderParams.elementProps) === null || _renderParams$element === void 0 ? void 0 : _renderParams$element.elementLink // TODO Connect本地调试link
|
915
922
|
});
|
916
923
|
this.app = createIframe(this.AMSSDK.options.mode, this.platform);
|
917
924
|
var hostSign = ((renderParams === null || renderParams === void 0 ? void 0 : renderParams.sessionData) || '').split('&&')[1] || '';
|
@@ -928,7 +935,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
928
935
|
instanceId: this.AMSSDK._instanceId,
|
929
936
|
hostSign: hostSign,
|
930
937
|
mid: mid,
|
931
|
-
|
938
|
+
elementLink: renderParams === null || renderParams === void 0 || (_renderParams$element2 = renderParams.elementProps) === null || _renderParams$element2 === void 0 ? void 0 : _renderParams$element2.elementLink // TODO Connect本地调试link
|
932
939
|
}),
|
933
940
|
path = _getIframeUrl2.path,
|
934
941
|
locationSearch = _getIframeUrl2.locationSearch;
|
@@ -1255,6 +1262,10 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1255
1262
|
this.handleCloseBtnShow(true);
|
1256
1263
|
return;
|
1257
1264
|
}
|
1265
|
+
if (data.context.event === EVENT.setMaskCloseButton.name) {
|
1266
|
+
this.handleMaskCloseBtnShow(data.context.data);
|
1267
|
+
return;
|
1268
|
+
}
|
1258
1269
|
if (data.context.event === EVENT.setAllowRetention.name) {
|
1259
1270
|
if (data.context.data === true) this._isRetention = true;
|
1260
1271
|
if (data.context.data === false) this._isRetention = false;
|
@@ -1360,13 +1371,23 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1360
1371
|
}
|
1361
1372
|
(_document$getElementB2 = document.getElementById(LOADING_ID)) === null || _document$getElementB2 === void 0 || _document$getElementB2.remove();
|
1362
1373
|
}
|
1374
|
+
}, {
|
1375
|
+
key: "updateMaskCloseBtn",
|
1376
|
+
value: function updateMaskCloseBtn(data) {
|
1377
|
+
var _document$getElementB3;
|
1378
|
+
var maskCloseBtn = document.getElementById(COMPONENT_CLOSE_MASK_ID);
|
1379
|
+
if (maskCloseBtn) {
|
1380
|
+
maskCloseBtn.style.bottom = "".concat(data.height + 2, "px");
|
1381
|
+
}
|
1382
|
+
(_document$getElementB3 = document.getElementById(LOADING_ID)) === null || _document$getElementB3 === void 0 || _document$getElementB3.remove();
|
1383
|
+
}
|
1363
1384
|
}, {
|
1364
1385
|
key: "handleSizeChanged",
|
1365
1386
|
value: function handleSizeChanged(data) {
|
1366
|
-
var _this$
|
1367
|
-
var _selector = ((_this$
|
1387
|
+
var _this$_renderParams15, _this$_renderParams16, _this$_renderParams17, _this$_renderParams18, _this$_renderParams19, _this$_renderParams20, _data$context$data4, _cashier$style;
|
1388
|
+
var _selector = (this === null || this === void 0 || (_this$_renderParams15 = this._renderParams) === null || _this$_renderParams15 === void 0 || (_this$_renderParams15 = _this$_renderParams15.selector) === null || _this$_renderParams15 === void 0 || (_this$_renderParams16 = _this$_renderParams15.indexOf) === null || _this$_renderParams16 === void 0 ? void 0 : _this$_renderParams16.call(_this$_renderParams15, '#')) === -1 ? this === null || this === void 0 || (_this$_renderParams17 = this._renderParams) === null || _this$_renderParams17 === void 0 ? void 0 : _this$_renderParams17.selector : this === null || this === void 0 || (_this$_renderParams18 = this._renderParams) === null || _this$_renderParams18 === void 0 || (_this$_renderParams18 = _this$_renderParams18.selector) === null || _this$_renderParams18 === void 0 || (_this$_renderParams19 = _this$_renderParams18.slice) === null || _this$_renderParams19 === void 0 ? void 0 : _this$_renderParams19.call(_this$_renderParams18, 1);
|
1368
1389
|
// 修改需当前文件搜索,这段注释appendAliasContainerId
|
1369
|
-
var appendAliasContainerId = this._renderParams.appendAliasContainerId;
|
1390
|
+
var appendAliasContainerId = this === null || this === void 0 || (_this$_renderParams20 = this._renderParams) === null || _this$_renderParams20 === void 0 ? void 0 : _this$_renderParams20.appendAliasContainerId;
|
1370
1391
|
var selectorId = appendAliasContainerId ? "".concat(COMPONENT_CONTAINER_ID, "-").concat(_selector) : COMPONENT_CONTAINER_ID;
|
1371
1392
|
var cashier = document.getElementById(selectorId);
|
1372
1393
|
if (((_data$context$data4 = data.context.data) === null || _data$context$data4 === void 0 ? void 0 : _data$context$data4.height) <= 1 || data.context.data.height === parseInt(cashier === null || cashier === void 0 || (_cashier$style = cashier.style) === null || _cashier$style === void 0 ? void 0 : _cashier$style.height)) return;
|
@@ -1397,7 +1418,6 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1397
1418
|
style.innerHTML = runkeyframes;
|
1398
1419
|
// 将style样式存放到head标签
|
1399
1420
|
document.getElementsByTagName('head')[0].appendChild(style);
|
1400
|
-
|
1401
1421
|
// size变动时动画
|
1402
1422
|
setTimeout(function () {
|
1403
1423
|
cashier.style.transition = 'height 0.28s ease-in-out';
|
@@ -1406,9 +1426,10 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1406
1426
|
// 关闭loading,保留蒙层
|
1407
1427
|
this.dismissLoadingFunc();
|
1408
1428
|
}
|
1429
|
+
this.updateMaskCloseBtn(data.context.data);
|
1409
1430
|
if (this._renderDisplayType === DisplayTypeEnum.inline) {
|
1410
|
-
var _document$
|
1411
|
-
(_document$
|
1431
|
+
var _document$getElementB4;
|
1432
|
+
(_document$getElementB4 = document.getElementById(LOADING_ID)) === null || _document$getElementB4 === void 0 || _document$getElementB4.remove();
|
1412
1433
|
this.app.style.height = "".concat(data.context.data.height, "px");
|
1413
1434
|
}
|
1414
1435
|
}
|
@@ -1549,9 +1570,9 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1549
1570
|
}
|
1550
1571
|
}, {
|
1551
1572
|
key: "handleDeclareInfo",
|
1552
|
-
value: function handleDeclareInfo(
|
1553
|
-
var
|
1554
|
-
closeDialogData =
|
1573
|
+
value: function handleDeclareInfo(_ref13) {
|
1574
|
+
var _ref13$closeDialogDat = _ref13.closeDialogData,
|
1575
|
+
closeDialogData = _ref13$closeDialogDat === void 0 ? {} : _ref13$closeDialogDat;
|
1555
1576
|
_handleDeclareInfo({
|
1556
1577
|
closeDialogData: closeDialogData
|
1557
1578
|
});
|
@@ -1634,6 +1655,16 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1634
1655
|
closeBlock === null || closeBlock === void 0 || closeBlock.classList.add("".concat(COMPONENT_CLOSE_BLOCK_ID, "-hidden"));
|
1635
1656
|
}
|
1636
1657
|
}
|
1658
|
+
}, {
|
1659
|
+
key: "handleMaskCloseBtnShow",
|
1660
|
+
value: function handleMaskCloseBtnShow(data) {
|
1661
|
+
var closeBlock = document.getElementById(COMPONENT_CLOSE_MASK_ID);
|
1662
|
+
if ((data === null || data === void 0 ? void 0 : data.status) === "show") {
|
1663
|
+
closeBlock === null || closeBlock === void 0 || closeBlock.classList.remove("".concat(COMPONENT_CLOSE_MASK_ID, "-hidden"));
|
1664
|
+
} else {
|
1665
|
+
closeBlock === null || closeBlock === void 0 || closeBlock.classList.add("".concat(COMPONENT_CLOSE_MASK_ID, "-hidden"));
|
1666
|
+
}
|
1667
|
+
}
|
1637
1668
|
|
1638
1669
|
/**
|
1639
1670
|
* @description Send message to SDK
|
@@ -1692,7 +1723,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1692
1723
|
key: "sendRenderEvent",
|
1693
1724
|
value: (function () {
|
1694
1725
|
var _sendRenderEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
1695
|
-
var _this$
|
1726
|
+
var _this$_renderParams21, _this$_renderParams22, _this$_renderParams23, _this$_renderParams24, _this$_renderParams25, _this$_renderParams26, _this$_renderParams27, _this$_renderParams28, _this$_renderParams29, _this$AMSSDK$logger, _this$_renderParams30, _this$_renderParams31, _this$_renderParams32, _this$AMSSDK, _this$_renderParams33, isAddressElement, res, submitRes;
|
1696
1727
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
1697
1728
|
while (1) switch (_context8.prev = _context8.next) {
|
1698
1729
|
case 0:
|
@@ -1722,34 +1753,34 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1722
1753
|
data: {
|
1723
1754
|
queryResult: res,
|
1724
1755
|
submitResult: submitRes,
|
1725
|
-
sessionResult: (_this$
|
1726
|
-
paymentSessionData: (_this$
|
1756
|
+
sessionResult: (_this$_renderParams21 = this._renderParams) === null || _this$_renderParams21 === void 0 ? void 0 : _this$_renderParams21.paymentSessionMetaData,
|
1757
|
+
paymentSessionData: (_this$_renderParams22 = this._renderParams) === null || _this$_renderParams22 === void 0 ? void 0 : _this$_renderParams22.sessionData,
|
1727
1758
|
heightOfVisible: Math.max(window.changingPageHeight, window.innerHeight),
|
1728
|
-
renderDisplayType: (_this$
|
1729
|
-
appearance: (_this$
|
1730
|
-
notRedirectAfterComplete: ((_this$
|
1759
|
+
renderDisplayType: (_this$_renderParams23 = this._renderParams) === null || _this$_renderParams23 === void 0 ? void 0 : _this$_renderParams23.renderDisplayType,
|
1760
|
+
appearance: (_this$_renderParams24 = this._renderParams) === null || _this$_renderParams24 === void 0 ? void 0 : _this$_renderParams24.appearance,
|
1761
|
+
notRedirectAfterComplete: ((_this$_renderParams25 = this._renderParams) === null || _this$_renderParams25 === void 0 ? void 0 : _this$_renderParams25.notRedirectAfterComplete) === true,
|
1731
1762
|
isAppWebview: this._isAppWebview,
|
1732
1763
|
merchantAppointParam: this._merchantAppointParam,
|
1733
1764
|
allowSubmitPayCallAhead: this._allowSubmitPayCallAhead,
|
1734
1765
|
/** 地址组件集成的参数 */
|
1735
|
-
configParams: (_this$
|
1736
|
-
prefillValue: (_this$
|
1737
|
-
componentSession: (_this$
|
1766
|
+
configParams: (_this$_renderParams26 = this._renderParams) === null || _this$_renderParams26 === void 0 ? void 0 : _this$_renderParams26.configParams,
|
1767
|
+
prefillValue: (_this$_renderParams27 = this._renderParams) === null || _this$_renderParams27 === void 0 ? void 0 : _this$_renderParams27.prefillValue,
|
1768
|
+
componentSession: (_this$_renderParams28 = this._renderParams) === null || _this$_renderParams28 === void 0 ? void 0 : _this$_renderParams28.componentSession,
|
1738
1769
|
envInfo: {
|
1739
1770
|
screenHeight: screen.height,
|
1740
1771
|
screenWidth: screen.width
|
1741
1772
|
},
|
1742
1773
|
logMetaData: _objectSpread(_objectSpread({
|
1743
|
-
trackId: (_this$
|
1774
|
+
trackId: (_this$_renderParams29 = this._renderParams) === null || _this$_renderParams29 === void 0 ? void 0 : _this$_renderParams29.sessionData,
|
1744
1775
|
platform: this.platform,
|
1745
1776
|
firstLogTime: (_this$AMSSDK$logger = this.AMSSDK.logger) === null || _this$AMSSDK$logger === void 0 ? void 0 : _this$AMSSDK$logger.getComponentStartTime()
|
1746
|
-
}, ((_this$
|
1747
|
-
renderDisplayType: (_this$
|
1777
|
+
}, ((_this$_renderParams30 = this._renderParams) === null || _this$_renderParams30 === void 0 || (_this$_renderParams30 = _this$_renderParams30.paymentSessionMetaData) === null || _this$_renderParams30 === void 0 ? void 0 : _this$_renderParams30.paymentSessionConfig) || {}), {}, {
|
1778
|
+
renderDisplayType: (_this$_renderParams31 = this._renderParams) === null || _this$_renderParams31 === void 0 ? void 0 : _this$_renderParams31.renderDisplayType,
|
1748
1779
|
sdkVersion: this._appVersion,
|
1749
|
-
merchantId: (_this$
|
1780
|
+
merchantId: (_this$_renderParams32 = this._renderParams) === null || _this$_renderParams32 === void 0 || (_this$_renderParams32 = _this$_renderParams32.paymentSessionMetaData) === null || _this$_renderParams32 === void 0 ? void 0 : _this$_renderParams32.clientId,
|
1750
1781
|
instanceId: (_this$AMSSDK = this.AMSSDK) === null || _this$AMSSDK === void 0 ? void 0 : _this$AMSSDK._instanceId,
|
1751
1782
|
performanceData: this._performanceData,
|
1752
|
-
paymentMethodType: (_this$
|
1783
|
+
paymentMethodType: (_this$_renderParams33 = this._renderParams) === null || _this$_renderParams33 === void 0 || (_this$_renderParams33 = _this$_renderParams33.paymentSessionMetaData) === null || _this$_renderParams33 === void 0 || (_this$_renderParams33 = _this$_renderParams33.paymentMethodInfoView) === null || _this$_renderParams33 === void 0 ? void 0 : _this$_renderParams33.paymentMethodType
|
1753
1784
|
})
|
1754
1785
|
}
|
1755
1786
|
}
|
@@ -1789,10 +1820,10 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1789
1820
|
}, {
|
1790
1821
|
key: "cleanContainer",
|
1791
1822
|
value: function cleanContainer() {
|
1792
|
-
var _document$
|
1823
|
+
var _document$getElementB5,
|
1793
1824
|
_this10 = this;
|
1794
1825
|
var immediately = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
1795
|
-
(_document$
|
1826
|
+
(_document$getElementB5 = document.getElementById(LOADING_ID)) === null || _document$getElementB5 === void 0 || _document$getElementB5.remove();
|
1796
1827
|
this.hideComponentAnimation();
|
1797
1828
|
var mockup = document.getElementById(MOCKUP_ID);
|
1798
1829
|
mockup === null || mockup === void 0 || mockup.classList.add("".concat(MOCKUP_ID, "-hidden"));
|
@@ -1809,10 +1840,10 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1809
1840
|
}, {
|
1810
1841
|
key: "hideComponentAnimation",
|
1811
1842
|
value: function hideComponentAnimation() {
|
1812
|
-
var _this$
|
1843
|
+
var _this$_renderParams34, _this$_renderParams35, _this$_renderParams36, _this$_renderParams37, _this$_renderParams38, _this$_renderParams39, _container$style;
|
1813
1844
|
// 修改需当前文件搜索,这段注释appendAliasContainerId
|
1814
|
-
var _selector = ((_this$
|
1815
|
-
var appendAliasContainerId = this._renderParams.appendAliasContainerId ? "-".concat(_selector) : '';
|
1845
|
+
var _selector = (this === null || this === void 0 || (_this$_renderParams34 = this._renderParams) === null || _this$_renderParams34 === void 0 || (_this$_renderParams34 = _this$_renderParams34.selector) === null || _this$_renderParams34 === void 0 || (_this$_renderParams35 = _this$_renderParams34.indexOf) === null || _this$_renderParams35 === void 0 ? void 0 : _this$_renderParams35.call(_this$_renderParams34, '#')) === -1 ? this === null || this === void 0 || (_this$_renderParams36 = this._renderParams) === null || _this$_renderParams36 === void 0 ? void 0 : _this$_renderParams36.selector : this === null || this === void 0 || (_this$_renderParams37 = this._renderParams) === null || _this$_renderParams37 === void 0 || (_this$_renderParams37 = _this$_renderParams37.selector) === null || _this$_renderParams37 === void 0 || (_this$_renderParams38 = _this$_renderParams37.slice) === null || _this$_renderParams38 === void 0 ? void 0 : _this$_renderParams38.call(_this$_renderParams37, 1);
|
1846
|
+
var appendAliasContainerId = this !== null && this !== void 0 && (_this$_renderParams39 = this._renderParams) !== null && _this$_renderParams39 !== void 0 && _this$_renderParams39.appendAliasContainerId ? "-".concat(_selector) : '';
|
1816
1847
|
var inlineId = "".concat(COMPONENT_CONTAINER_ID).concat(appendAliasContainerId);
|
1817
1848
|
var container = document.getElementById(inlineId);
|
1818
1849
|
if (this.app && container) this.app.style.height = container === null || container === void 0 || (_container$style = container.style) === null || _container$style === void 0 ? void 0 : _container$style.height;
|
@@ -1845,9 +1876,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1845
1876
|
}, {
|
1846
1877
|
key: "removeRetentionPopup",
|
1847
1878
|
value: function removeRetentionPopup(platform) {
|
1848
|
-
_removeRetentionPopup();
|
1849
|
-
// TODO check
|
1850
|
-
// removeRetentionPopup(platform, this.hideRetentionPopupFunc.bind(this), this.retentionPopupLeaveFunc.bind(this));
|
1879
|
+
_removeRetentionPopup(platform, this.hideRetentionPopupFunc.bind(this), this.retentionPopupLeaveFunc.bind(this));
|
1851
1880
|
}
|
1852
1881
|
}, {
|
1853
1882
|
key: "showRetentionPopup",
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import type { IpaymentSessionConfig } from '../../types';
|
2
|
-
export declare const handlePaymentSessionConfig: (config: IpaymentSessionConfig) => Pick<IpaymentSessionConfig, 'productScene' | 'productSceneVersion'
|
2
|
+
export declare const handlePaymentSessionConfig: (config: IpaymentSessionConfig) => Pick<IpaymentSessionConfig, 'productScene' | 'productSceneVersion'>;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
export var handlePaymentSessionConfig = function handlePaymentSessionConfig(config) {
|
2
2
|
return {
|
3
3
|
productScene: config === null || config === void 0 ? void 0 : config.productScene,
|
4
|
-
productSceneVersion: config === null || config === void 0 ? void 0 : config.productSceneVersion
|
5
|
-
paymentMethodCategoryType: config === null || config === void 0 ? void 0 : config.paymentMethodCategoryType
|
4
|
+
productSceneVersion: config === null || config === void 0 ? void 0 : config.productSceneVersion
|
6
5
|
};
|
7
6
|
};
|
package/esm/plugin/type.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { BusSubscriber } from
|
1
|
+
import { BusSubscriber } from 'src/core/bus';
|
2
2
|
import { PaymentMethodCategoryTypeEnum, ProductSceneEnum, ProductSceneVersion } from '../types';
|
3
3
|
export type IExtendPlugin = IExtendPluginItem[];
|
4
4
|
export interface ComponentActionNamesType {
|
package/esm/types/index.d.ts
CHANGED
@@ -20,7 +20,7 @@ interface AddressValueResult {
|
|
20
20
|
/**
|
21
21
|
* SDK options
|
22
22
|
*/
|
23
|
-
export interface
|
23
|
+
export interface IoptionsParams {
|
24
24
|
environment?: string;
|
25
25
|
locale?: string;
|
26
26
|
onError?: callOnError;
|
@@ -30,15 +30,15 @@ export interface IOptionsParams {
|
|
30
30
|
onEventCallback?: callOnEventCallback;
|
31
31
|
onClose?: callOnClose;
|
32
32
|
onChange?: onChange;
|
33
|
-
networkMode?: string;
|
34
|
-
mode?: string;
|
35
33
|
analytics?: {
|
36
34
|
enabled: boolean;
|
37
35
|
};
|
38
|
-
product?: string;
|
39
36
|
onBeforeSubmit?: callOnBeforeSubmit;
|
37
|
+
product?: string;
|
38
|
+
networkMode?: string;
|
39
|
+
mode?: string;
|
40
40
|
}
|
41
|
-
export interface IApplePayOptionsParams extends Pick<
|
41
|
+
export interface IApplePayOptionsParams extends Pick<IoptionsParams, 'locale' | 'environment' | 'onEventCallback' | 'analytics'> {
|
42
42
|
}
|
43
43
|
export type Iselector = string;
|
44
44
|
export declare enum DisplayTypeEnum {
|
@@ -68,6 +68,7 @@ export declare enum ComponentSignEnum {
|
|
68
68
|
'AUTO_DEBIT_PAY_WALLET' = "AUTO_DEBIT_PAY_WALLET",
|
69
69
|
'NONE' = "NONE",
|
70
70
|
'VAULTING_CARD' = "VAULTING_CARD",
|
71
|
+
'CHECKOUT_PAYMENT' = "CHECKOUT_PAYMENT",
|
71
72
|
'ELEMENT_PAYMENT' = "ELEMENT_PAYMENT_ALL",
|
72
73
|
'ELEMENT_ADDRESS' = "ELEMENT_ADDRESS_ALL"
|
73
74
|
}
|
@@ -100,8 +101,8 @@ export interface DeviceIdParameter {
|
|
100
101
|
export interface IcreateComponent {
|
101
102
|
sessionData: string;
|
102
103
|
paymentSessionData?: string;
|
103
|
-
|
104
|
-
|
104
|
+
elementProps?: {
|
105
|
+
elementLink: string;
|
105
106
|
};
|
106
107
|
appendAliasContainerId?: boolean;
|
107
108
|
notRedirectAfterComplete?: boolean;
|
@@ -118,9 +119,6 @@ export interface IappendIframeNodesParams extends IcreateComponent {
|
|
118
119
|
renderDisplayType: DisplayTypeEnum;
|
119
120
|
selector?: Iselector;
|
120
121
|
paypalConfiguration?: IPaypalConfiguration;
|
121
|
-
connectFactor?: {
|
122
|
-
enableConnect: boolean;
|
123
|
-
};
|
124
122
|
/** 将address-element参数定义合入原参数定义 */
|
125
123
|
configParams?: {
|
126
124
|
hideFields?: string[];
|
@@ -205,7 +203,7 @@ export interface Isubmit {
|
|
205
203
|
}
|
206
204
|
export interface IpaymentSessionConfig {
|
207
205
|
productScene: ProductSceneEnum;
|
208
|
-
paymentMethodCategoryType
|
206
|
+
paymentMethodCategoryType?: PaymentMethodCategoryTypeEnum;
|
209
207
|
productSceneVersion: string;
|
210
208
|
}
|
211
209
|
export interface IpaymentSecurityConfig {
|
@@ -236,6 +234,8 @@ export interface PaymentSessionActionData {
|
|
236
234
|
enableSignAgreement?: boolean;
|
237
235
|
skipSdkQuery: boolean;
|
238
236
|
requireFastSdk: boolean;
|
237
|
+
nonCompliant?: boolean;
|
238
|
+
nonInitSecuritySDK?: boolean;
|
239
239
|
skipSdkQueryForm?: {
|
240
240
|
value: boolean;
|
241
241
|
version: string;
|
@@ -250,6 +250,7 @@ export interface IPaymentSessionMetaData {
|
|
250
250
|
moneyView?: any;
|
251
251
|
extendInfo?: string;
|
252
252
|
paymentMethodInfoView?: any;
|
253
|
+
paymentView?: any;
|
253
254
|
action?: PaymentSessionActionData;
|
254
255
|
authUrlInfo?: {
|
255
256
|
appIdentifier?: string;
|
@@ -604,6 +605,7 @@ export interface CashierSubmitPayResult {
|
|
604
605
|
normalUrl?: string;
|
605
606
|
errorStatus?: string;
|
606
607
|
message?: string;
|
608
|
+
traceId?: string;
|
607
609
|
}
|
608
610
|
export declare enum eventCodeEnum {
|
609
611
|
SDK_START_OF_LOADING = "SDK_START_OF_LOADING",
|
@@ -863,3 +865,7 @@ export interface IoptionsAddressParams {
|
|
863
865
|
};
|
864
866
|
product?: string;
|
865
867
|
}
|
868
|
+
export declare enum RiskSdkInfoEnum {
|
869
|
+
NEED = "need",
|
870
|
+
NO_NEED = "noneed"
|
871
|
+
}
|
package/esm/types/index.js
CHANGED
@@ -32,10 +32,11 @@ export var ComponentSignEnum = /*#__PURE__*/function (ComponentSignEnum) {
|
|
32
32
|
ComponentSignEnum["AUTO_DEBIT_PAY_WALLET"] = "AUTO_DEBIT_PAY_WALLET";
|
33
33
|
ComponentSignEnum["NONE"] = "NONE";
|
34
34
|
ComponentSignEnum["VAULTING_CARD"] = "VAULTING_CARD";
|
35
|
+
ComponentSignEnum["CHECKOUT_PAYMENT"] = "CHECKOUT_PAYMENT";
|
35
36
|
ComponentSignEnum["ELEMENT_PAYMENT"] = "ELEMENT_PAYMENT_ALL";
|
36
37
|
ComponentSignEnum["ELEMENT_ADDRESS"] = "ELEMENT_ADDRESS_ALL";
|
37
38
|
return ComponentSignEnum;
|
38
|
-
}({});
|
39
|
+
}({});
|
39
40
|
export var ProductSceneEnum = /*#__PURE__*/function (ProductSceneEnum) {
|
40
41
|
ProductSceneEnum["EASY_PAY"] = "EASY_PAY";
|
41
42
|
ProductSceneEnum["CASHIER_PAYMENT"] = "CASHIER_PAYMENT";
|
@@ -252,4 +253,9 @@ export var ConnectErrorCode = /*#__PURE__*/function (ConnectErrorCode) {
|
|
252
253
|
ConnectErrorCode["USER_AUTH_VERIFICATION_FAILED"] = "USER_AUTH_VERIFICATION_FAILED";
|
253
254
|
ConnectErrorCode["USER_NOT_EXISTS"] = "USER_NOT_EXISTS";
|
254
255
|
return ConnectErrorCode;
|
256
|
+
}({});
|
257
|
+
export var RiskSdkInfoEnum = /*#__PURE__*/function (RiskSdkInfoEnum) {
|
258
|
+
RiskSdkInfoEnum["NEED"] = "need";
|
259
|
+
RiskSdkInfoEnum["NO_NEED"] = "noneed";
|
260
|
+
return RiskSdkInfoEnum;
|
255
261
|
}({});
|