@alipay/ams-checkout 0.0.1717141544-dev.0 → 0.0.1717141544-dev.5
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.
@@ -81,6 +81,7 @@ export default class ComponentApp {
|
|
81
81
|
_handleAppMessage(data: eventPayload): void;
|
82
82
|
private dismissLoadingFunc;
|
83
83
|
private handleSizeChanged;
|
84
|
+
private handleAuthUrlInfo;
|
84
85
|
private handleRedirect;
|
85
86
|
private handleDeclareInfo;
|
86
87
|
private handleDeclarePopWindowCallback;
|
@@ -247,6 +247,10 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
247
247
|
key: "appendIframeNodes",
|
248
248
|
value: function appendIframeNodes(componentSign, renderParams) {
|
249
249
|
var _renderParams,
|
250
|
+
_this$_renderParams5,
|
251
|
+
_this$_renderParams6,
|
252
|
+
_this$_renderParams7,
|
253
|
+
_this$_renderParams8,
|
250
254
|
_this3 = this;
|
251
255
|
if (this._isInitComponent) {
|
252
256
|
this.dispatchToSDK(EVENT.error.name, ERRORMESSAGE.CREATECOMPONENT_ERROR.SINGLETON_COMPONENT_ERROR);
|
@@ -266,6 +270,49 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
266
270
|
key: 'sdk_create_component',
|
267
271
|
value: Date.now()
|
268
272
|
});
|
273
|
+
var params = {
|
274
|
+
paymentSessionData: this._renderParams && ((_this$_renderParams5 = this._renderParams) === null || _this$_renderParams5 === void 0 ? void 0 : _this$_renderParams5.sessionData) || '',
|
275
|
+
paymentSessionConfig: (_this$_renderParams6 = this._renderParams) === null || _this$_renderParams6 === void 0 || (_this$_renderParams6 = _this$_renderParams6.paymentSessionMetaData) === null || _this$_renderParams6 === void 0 ? void 0 : _this$_renderParams6.paymentSessionConfig
|
276
|
+
};
|
277
|
+
var _ref2 = params.paymentSessionConfig || {},
|
278
|
+
_ref2$productSceneVer = _ref2.productSceneVersion,
|
279
|
+
productSceneVersion = _ref2$productSceneVer === void 0 ? '' : _ref2$productSceneVer,
|
280
|
+
_ref2$productScene = _ref2.productScene,
|
281
|
+
productScene = _ref2$productScene === void 0 ? '' : _ref2$productScene;
|
282
|
+
var _ref3 = ((_this$_renderParams7 = this._renderParams) === null || _this$_renderParams7 === void 0 ? void 0 : _this$_renderParams7.paymentSessionMetaData) || {},
|
283
|
+
_ref3$action = _ref3.action,
|
284
|
+
_ref3$action2 = _ref3$action === void 0 ? {} : _ref3$action,
|
285
|
+
_ref3$action2$autoDeb = _ref3$action2.autoDebitWithToken,
|
286
|
+
autoDebitWithToken = _ref3$action2$autoDeb === void 0 ? false : _ref3$action2$autoDeb,
|
287
|
+
_ref3$action2$require = _ref3$action2.requireFastSdk,
|
288
|
+
requireFastSdk = _ref3$action2$require === void 0 ? false : _ref3$action2$require;
|
289
|
+
var _ref4 = ((_this$_renderParams8 = this._renderParams) === null || _this$_renderParams8 === void 0 ? void 0 : _this$_renderParams8.paymentSessionMetaData) || {},
|
290
|
+
_ref4$authUrlInfo = _ref4.authUrlInfo,
|
291
|
+
authUrlInfo = _ref4$authUrlInfo === void 0 ? {} : _ref4$authUrlInfo;
|
292
|
+
this.AMSSDK.logger.logInfo({
|
293
|
+
title: 'sdk_event_createComponent'
|
294
|
+
}, {
|
295
|
+
version: productSceneVersion,
|
296
|
+
product: this.AMSSDK.options.product
|
297
|
+
}).send();
|
298
|
+
if (componentSignEnum.EASY_PAY_WALLET === this._componentSign) {
|
299
|
+
if (productScene === productSceneEnum.EASY_PAY && productSceneVersion === '1.0' && !autoDebitWithToken && requireFastSdk) {
|
300
|
+
// EASY_PAY 1.0首次支付,requireFastSdk为true,不需要接口请求
|
301
|
+
this.handleAuthUrlInfo(authUrlInfo);
|
302
|
+
return;
|
303
|
+
}
|
304
|
+
}
|
305
|
+
if (componentSignEnum.AUTO_DEBIT_WALLET === this._componentSign) {
|
306
|
+
var _this$_renderParams9, _action$web, _action$wap;
|
307
|
+
var action = ((_this$_renderParams9 = this._renderParams) === null || _this$_renderParams9 === void 0 || (_this$_renderParams9 = _this$_renderParams9.paymentSessionMetaData) === null || _this$_renderParams9 === void 0 ? void 0 : _this$_renderParams9.action) || {};
|
308
|
+
var signType = isPC() ? action === null || action === void 0 || (_action$web = action.web) === null || _action$web === void 0 ? void 0 : _action$web.signType : action === null || action === void 0 || (_action$wap = action.wap) === null || _action$wap === void 0 ? void 0 : _action$wap.signType;
|
309
|
+
var _requireFastSdk = (action === null || action === void 0 ? void 0 : action.requireFastSdk) || false;
|
310
|
+
if (signType === 'REDIRECT' && _requireFastSdk === true) {
|
311
|
+
// REDIRECT,requireFastSdk为true,不需要接口请求
|
312
|
+
this.handleAuthUrlInfo(authUrlInfo);
|
313
|
+
return;
|
314
|
+
}
|
315
|
+
}
|
269
316
|
this.dispatchToSDK(EVENT.eventCallback.name, {
|
270
317
|
code: eventCodeEnum.SDK_START_OF_LOADING
|
271
318
|
});
|
@@ -275,10 +322,10 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
275
322
|
insertStyleSheet();
|
276
323
|
}
|
277
324
|
if (this._renderDisplayType === renderDisplayTypeEnum.popup) {
|
278
|
-
var _this$
|
325
|
+
var _this$_renderParams10;
|
279
326
|
createBaseElement(this.platform, this.closeBtnFunc.bind(this));
|
280
327
|
createRetentionPopup(this.platform, this.hideRetentionPopupFunc.bind(this), this.retentionPopupLeaveFunc.bind(this));
|
281
|
-
var channelBehavior = getChannelBehavior((_this$
|
328
|
+
var channelBehavior = getChannelBehavior((_this$_renderParams10 = this._renderParams) === null || _this$_renderParams10 === void 0 ? void 0 : _this$_renderParams10.paymentSessionMetaData);
|
282
329
|
var onClickOutside = function onClickOutside() {};
|
283
330
|
if (channelBehavior !== null && channelBehavior !== void 0 && channelBehavior.allowClickOutsideClose) {
|
284
331
|
onClickOutside = this.closeBtnFunc.bind(this);
|
@@ -366,9 +413,9 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
366
413
|
}, {
|
367
414
|
key: "createActionQueryPromise",
|
368
415
|
value: function createActionQueryPromise() {
|
369
|
-
var _this$
|
416
|
+
var _this$_renderParams11,
|
370
417
|
_this5 = this;
|
371
|
-
var paymentMethodType = (_this$
|
418
|
+
var paymentMethodType = (_this$_renderParams11 = this._renderParams) === null || _this$_renderParams11 === void 0 || (_this$_renderParams11 = _this$_renderParams11.paymentSessionMetaData) === null || _this$_renderParams11 === void 0 || (_this$_renderParams11 = _this$_renderParams11.paymentMethodInfoView) === null || _this$_renderParams11 === void 0 ? void 0 : _this$_renderParams11.paymentMethodType;
|
372
419
|
this._performanceData.push({
|
373
420
|
key: 'sdk_action_query_start',
|
374
421
|
value: Date.now()
|
@@ -376,9 +423,9 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
376
423
|
|
377
424
|
// eslint-disable-next-line no-async-promise-executor
|
378
425
|
this._actionQueryPromise = new Promise( /*#__PURE__*/function () {
|
379
|
-
var
|
426
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(resolve, reject) {
|
380
427
|
var _this5$_renderParams, _this5$_renderParams2, _this5$_renderParams3, _this5$_renderParams4, _this5$_renderParams5, _this5$_renderParams6;
|
381
|
-
var envInfo, params,
|
428
|
+
var envInfo, params, _ref6, _ref6$extendInfo, extendInfo, actionData, enableVaultingApiOptimize, enableEasypayApiOptimize, _ref7, skipSdkQuery, skipSdkQueryForm, extendInfoData, ifSkip, channelBehavior, _this5$_renderParams7, _this5$_renderParams8, _ref8, _ref8$productSceneVer, productSceneVersion, _ref8$productScene, productScene, _ref9, _ref9$action, _ref9$action2, _ref9$action2$autoDeb, autoDebitWithToken, _this5$_renderParams9, _action$web2, _action$wap2, action, signType;
|
382
429
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
383
430
|
while (1) switch (_context2.prev = _context2.next) {
|
384
431
|
case 0:
|
@@ -394,10 +441,10 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
394
441
|
/**
|
395
442
|
* @description Simulated or unnecessary scenarios
|
396
443
|
*/
|
397
|
-
|
444
|
+
_ref6 = ((_this5$_renderParams4 = _this5._renderParams) === null || _this5$_renderParams4 === void 0 ? void 0 : _this5$_renderParams4.paymentSessionMetaData) || {}, _ref6$extendInfo = _ref6.extendInfo, extendInfo = _ref6$extendInfo === void 0 ? '' : _ref6$extendInfo, actionData = _ref6.action;
|
398
445
|
enableVaultingApiOptimize = false;
|
399
446
|
enableEasypayApiOptimize = false;
|
400
|
-
|
447
|
+
_ref7 = ((_this5$_renderParams5 = _this5._renderParams) === null || _this5$_renderParams5 === void 0 || (_this5$_renderParams5 = _this5$_renderParams5.paymentSessionMetaData) === null || _this5$_renderParams5 === void 0 ? void 0 : _this5$_renderParams5.action) || {}, skipSdkQuery = _ref7.skipSdkQuery, skipSdkQueryForm = _ref7.skipSdkQueryForm;
|
401
448
|
try {
|
402
449
|
extendInfoData = JSON.parse(extendInfo);
|
403
450
|
enableVaultingApiOptimize = extendInfoData.enableVaultingApiOptimize || false;
|
@@ -481,8 +528,8 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
481
528
|
_context2.next = 40;
|
482
529
|
break;
|
483
530
|
}
|
484
|
-
|
485
|
-
|
531
|
+
_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;
|
532
|
+
_ref9 = ((_this5$_renderParams7 = _this5._renderParams) === null || _this5$_renderParams7 === void 0 ? void 0 : _this5$_renderParams7.paymentSessionMetaData) || {}, _ref9$action = _ref9.action, _ref9$action2 = _ref9$action === void 0 ? {} : _ref9$action, _ref9$action2$autoDeb = _ref9$action2.autoDebitWithToken, autoDebitWithToken = _ref9$action2$autoDeb === void 0 ? false : _ref9$action2$autoDeb;
|
486
533
|
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)) {
|
487
534
|
_context2.next = 35;
|
488
535
|
break;
|
@@ -511,7 +558,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
511
558
|
break;
|
512
559
|
}
|
513
560
|
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) || {};
|
514
|
-
signType = isPC() ? action === null || action === void 0 || (_action$
|
561
|
+
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;
|
515
562
|
if (!(signType === 'SMS')) {
|
516
563
|
_context2.next = 45;
|
517
564
|
break;
|
@@ -579,7 +626,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
579
626
|
}, _callee2);
|
580
627
|
}));
|
581
628
|
return function (_x, _x2) {
|
582
|
-
return
|
629
|
+
return _ref5.apply(this, arguments);
|
583
630
|
};
|
584
631
|
}());
|
585
632
|
return this._actionQueryPromise;
|
@@ -589,24 +636,24 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
589
636
|
}, {
|
590
637
|
key: "createSubmitPromise",
|
591
638
|
value: function createSubmitPromise() {
|
592
|
-
var _this$
|
593
|
-
_this$
|
594
|
-
_this$
|
639
|
+
var _this$_renderParams12,
|
640
|
+
_this$_renderParams13,
|
641
|
+
_this$_renderParams14,
|
595
642
|
_this6 = this;
|
596
643
|
this._performanceData.push({
|
597
644
|
key: 'sdk_submit_start',
|
598
645
|
value: Date.now()
|
599
646
|
});
|
600
647
|
var params = {
|
601
|
-
paymentSessionData: this._renderParams && ((_this$
|
602
|
-
paymentSessionConfig: (_this$
|
648
|
+
paymentSessionData: this._renderParams && ((_this$_renderParams12 = this._renderParams) === null || _this$_renderParams12 === void 0 ? void 0 : _this$_renderParams12.sessionData) || '',
|
649
|
+
paymentSessionConfig: (_this$_renderParams13 = this._renderParams) === null || _this$_renderParams13 === void 0 || (_this$_renderParams13 = _this$_renderParams13.paymentSessionMetaData) === null || _this$_renderParams13 === void 0 ? void 0 : _this$_renderParams13.paymentSessionConfig
|
603
650
|
};
|
604
|
-
var channelBehavior = getChannelBehavior((_this$
|
651
|
+
var channelBehavior = getChannelBehavior((_this$_renderParams14 = this._renderParams) === null || _this$_renderParams14 === void 0 ? void 0 : _this$_renderParams14.paymentSessionMetaData);
|
605
652
|
// eslint-disable-next-line no-async-promise-executor
|
606
653
|
this._actionSubmitPromise = new Promise( /*#__PURE__*/function () {
|
607
|
-
var
|
654
|
+
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(resolve) {
|
608
655
|
var _channelBehavior$buil, _this6$_renderParams$;
|
609
|
-
var shouldSkipSubmitPayInSDK, _this6$_renderParams, extParams;
|
656
|
+
var shouldSkipSubmitPayInSDK, _this6$_renderParams, _this6$_renderParams2, _ref11, _ref11$productSceneVe, productSceneVersion, _ref11$productScene, productScene, _ref12, _ref12$action, _ref12$action2, _ref12$action2$enable, enableSignAgreement, extParams;
|
610
657
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
611
658
|
while (1) switch (_context3.prev = _context3.next) {
|
612
659
|
case 0:
|
@@ -617,15 +664,22 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
617
664
|
} else {
|
618
665
|
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;
|
619
666
|
}
|
667
|
+
if (componentSignEnum.EASY_PAY_WALLET === _this6._componentSign) {
|
668
|
+
_ref11 = params.paymentSessionConfig || {}, _ref11$productSceneVe = _ref11.productSceneVersion, productSceneVersion = _ref11$productSceneVe === void 0 ? '' : _ref11$productSceneVe, _ref11$productScene = _ref11.productScene, productScene = _ref11$productScene === void 0 ? '' : _ref11$productScene;
|
669
|
+
_ref12 = ((_this6$_renderParams2 = _this6._renderParams) === null || _this6$_renderParams2 === void 0 ? void 0 : _this6$_renderParams2.paymentSessionMetaData) || {}, _ref12$action = _ref12.action, _ref12$action2 = _ref12$action === void 0 ? {} : _ref12$action, _ref12$action2$enable = _ref12$action2.enableSignAgreement, enableSignAgreement = _ref12$action2$enable === void 0 ? false : _ref12$action2$enable;
|
670
|
+
if (productScene === productSceneEnum.EASY_PAY && productSceneVersion === '2.0') {
|
671
|
+
params['signAgreement'] = enableSignAgreement;
|
672
|
+
}
|
673
|
+
}
|
620
674
|
if (!shouldSkipSubmitPayInSDK) {
|
621
|
-
_context3.next =
|
675
|
+
_context3.next = 5;
|
622
676
|
break;
|
623
677
|
}
|
624
678
|
return _context3.abrupt("return", resolve({
|
625
679
|
message: 'sdk no need to make submitPay request',
|
626
680
|
success: true
|
627
681
|
}));
|
628
|
-
case
|
682
|
+
case 5:
|
629
683
|
_this6.AMSSDK.logger.logInfo({
|
630
684
|
title: 'sdk_event_submitPay'
|
631
685
|
}, {
|
@@ -644,9 +698,9 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
644
698
|
_context3.t0 = submitPayInfo;
|
645
699
|
_context3.t1 = params;
|
646
700
|
_context3.t2 = _this6.AMSSDK.options.env.environment;
|
647
|
-
_context3.next =
|
701
|
+
_context3.next = 13;
|
648
702
|
return _this6.getDeviceIdAndLog();
|
649
|
-
case
|
703
|
+
case 13:
|
650
704
|
_context3.t3 = _context3.sent;
|
651
705
|
_context3.t4 = {
|
652
706
|
deviceId: _context3.t3
|
@@ -680,14 +734,14 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
680
734
|
success: false
|
681
735
|
});
|
682
736
|
});
|
683
|
-
case
|
737
|
+
case 18:
|
684
738
|
case "end":
|
685
739
|
return _context3.stop();
|
686
740
|
}
|
687
741
|
}, _callee3);
|
688
742
|
}));
|
689
743
|
return function (_x3) {
|
690
|
-
return
|
744
|
+
return _ref10.apply(this, arguments);
|
691
745
|
};
|
692
746
|
}());
|
693
747
|
}
|
@@ -1213,11 +1267,31 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1213
1267
|
this.app.style.height = "".concat(data.context.data.height, "px");
|
1214
1268
|
}
|
1215
1269
|
}
|
1270
|
+
}, {
|
1271
|
+
key: "handleAuthUrlInfo",
|
1272
|
+
value: function handleAuthUrlInfo(authUrlInfo) {
|
1273
|
+
var data = {};
|
1274
|
+
if (!(authUrlInfo !== null && authUrlInfo !== void 0 && authUrlInfo.normalUrl) && !(authUrlInfo !== null && authUrlInfo !== void 0 && authUrlInfo.schemeUrl) && !(authUrlInfo !== null && authUrlInfo !== void 0 && authUrlInfo.applinkUrl) && authUrlInfo !== null && authUrlInfo !== void 0 && authUrlInfo.authUrl) {
|
1275
|
+
data = {
|
1276
|
+
normalUrl: authUrlInfo === null || authUrlInfo === void 0 ? void 0 : authUrlInfo.authUrl,
|
1277
|
+
schemeUrl: authUrlInfo === null || authUrlInfo === void 0 ? void 0 : authUrlInfo.authUrl,
|
1278
|
+
applinkUrl: authUrlInfo === null || authUrlInfo === void 0 ? void 0 : authUrlInfo.authUrl
|
1279
|
+
};
|
1280
|
+
} else {
|
1281
|
+
data = {
|
1282
|
+
normalUrl: authUrlInfo === null || authUrlInfo === void 0 ? void 0 : authUrlInfo.normalUrl,
|
1283
|
+
schemeUrl: authUrlInfo === null || authUrlInfo === void 0 ? void 0 : authUrlInfo.schemeUrl,
|
1284
|
+
applinkUrl: authUrlInfo === null || authUrlInfo === void 0 ? void 0 : authUrlInfo.applinkUrl
|
1285
|
+
};
|
1286
|
+
}
|
1287
|
+
this.handleRedirect(data, true);
|
1288
|
+
}
|
1216
1289
|
}, {
|
1217
1290
|
key: "handleRedirect",
|
1218
1291
|
value: function handleRedirect(data) {
|
1219
1292
|
var _data$isDestroy,
|
1220
1293
|
_this7 = this;
|
1294
|
+
var fromFastSdk = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
1221
1295
|
var _data = typeof data === 'string' ? {
|
1222
1296
|
normalUrl: data
|
1223
1297
|
} : _objectSpread(_objectSpread({}, data), {}, {
|
@@ -1240,7 +1314,8 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1240
1314
|
}, {
|
1241
1315
|
redirectInfo: JSON.stringify(_data),
|
1242
1316
|
openType: type,
|
1243
|
-
url: url
|
1317
|
+
url: url,
|
1318
|
+
fromFastSdk: fromFastSdk
|
1244
1319
|
}).send();
|
1245
1320
|
};
|
1246
1321
|
var failCallback = function failCallback(type, url) {
|
@@ -1253,7 +1328,8 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1253
1328
|
}, {
|
1254
1329
|
redirectInfo: JSON.stringify(_data),
|
1255
1330
|
openType: type,
|
1256
|
-
url: url
|
1331
|
+
url: url,
|
1332
|
+
fromFastSdk: fromFastSdk
|
1257
1333
|
}).send();
|
1258
1334
|
};
|
1259
1335
|
|
@@ -1296,9 +1372,9 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1296
1372
|
}
|
1297
1373
|
}, {
|
1298
1374
|
key: "handleDeclareInfo",
|
1299
|
-
value: function handleDeclareInfo(
|
1300
|
-
var
|
1301
|
-
closeDialogData =
|
1375
|
+
value: function handleDeclareInfo(_ref13) {
|
1376
|
+
var _ref13$closeDialogDat = _ref13.closeDialogData,
|
1377
|
+
closeDialogData = _ref13$closeDialogDat === void 0 ? {} : _ref13$closeDialogDat;
|
1302
1378
|
_handleDeclareInfo({
|
1303
1379
|
closeDialogData: closeDialogData
|
1304
1380
|
});
|
@@ -1439,7 +1515,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1439
1515
|
key: "sendRenderEvent",
|
1440
1516
|
value: (function () {
|
1441
1517
|
var _sendRenderEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
1442
|
-
var _this$
|
1518
|
+
var _this$_renderParams15, _this$_renderParams16, _this$_renderParams17, _this$_renderParams18, _this$_renderParams19, _this$_renderParams20, _this$AMSSDK$logger, _this$_renderParams21, _this$_renderParams22, _this$_renderParams23, _this$AMSSDK, _this$_renderParams24, res, submitRes;
|
1443
1519
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
1444
1520
|
while (1) switch (_context8.prev = _context8.next) {
|
1445
1521
|
case 0:
|
@@ -1468,28 +1544,28 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1468
1544
|
data: {
|
1469
1545
|
queryResult: res,
|
1470
1546
|
submitResult: submitRes,
|
1471
|
-
sessionResult: (_this$
|
1472
|
-
paymentSessionData: (_this$
|
1547
|
+
sessionResult: (_this$_renderParams15 = this._renderParams) === null || _this$_renderParams15 === void 0 ? void 0 : _this$_renderParams15.paymentSessionMetaData,
|
1548
|
+
paymentSessionData: (_this$_renderParams16 = this._renderParams) === null || _this$_renderParams16 === void 0 ? void 0 : _this$_renderParams16.sessionData,
|
1473
1549
|
heightOfVisible: Math.max(window.changingPageHeight, window.innerHeight),
|
1474
|
-
renderDisplayType: (_this$
|
1475
|
-
appearance: (_this$
|
1476
|
-
notRedirectAfterComplete: ((_this$
|
1550
|
+
renderDisplayType: (_this$_renderParams17 = this._renderParams) === null || _this$_renderParams17 === void 0 ? void 0 : _this$_renderParams17.renderDisplayType,
|
1551
|
+
appearance: (_this$_renderParams18 = this._renderParams) === null || _this$_renderParams18 === void 0 ? void 0 : _this$_renderParams18.appearance,
|
1552
|
+
notRedirectAfterComplete: ((_this$_renderParams19 = this._renderParams) === null || _this$_renderParams19 === void 0 ? void 0 : _this$_renderParams19.notRedirectAfterComplete) === true,
|
1477
1553
|
merchantAppointParam: this._merchantAppointParam,
|
1478
1554
|
envInfo: {
|
1479
1555
|
screenHeight: screen.height,
|
1480
1556
|
screenWidth: screen.width
|
1481
1557
|
},
|
1482
1558
|
logMetaData: _objectSpread(_objectSpread({
|
1483
|
-
trackId: (_this$
|
1559
|
+
trackId: (_this$_renderParams20 = this._renderParams) === null || _this$_renderParams20 === void 0 ? void 0 : _this$_renderParams20.sessionData,
|
1484
1560
|
platform: this.platform,
|
1485
1561
|
firstLogTime: (_this$AMSSDK$logger = this.AMSSDK.logger) === null || _this$AMSSDK$logger === void 0 ? void 0 : _this$AMSSDK$logger.getComponentStartTime()
|
1486
|
-
}, ((_this$
|
1487
|
-
renderDisplayType: (_this$
|
1562
|
+
}, ((_this$_renderParams21 = this._renderParams) === null || _this$_renderParams21 === void 0 || (_this$_renderParams21 = _this$_renderParams21.paymentSessionMetaData) === null || _this$_renderParams21 === void 0 ? void 0 : _this$_renderParams21.paymentSessionConfig) || {}), {}, {
|
1563
|
+
renderDisplayType: (_this$_renderParams22 = this._renderParams) === null || _this$_renderParams22 === void 0 ? void 0 : _this$_renderParams22.renderDisplayType,
|
1488
1564
|
sdkVersion: this._appVersion,
|
1489
|
-
merchantId: (_this$
|
1565
|
+
merchantId: (_this$_renderParams23 = this._renderParams) === null || _this$_renderParams23 === void 0 || (_this$_renderParams23 = _this$_renderParams23.paymentSessionMetaData) === null || _this$_renderParams23 === void 0 ? void 0 : _this$_renderParams23.clientId,
|
1490
1566
|
instanceId: (_this$AMSSDK = this.AMSSDK) === null || _this$AMSSDK === void 0 ? void 0 : _this$AMSSDK._instanceId,
|
1491
1567
|
performanceData: this._performanceData,
|
1492
|
-
paymentMethodType: (_this$
|
1568
|
+
paymentMethodType: (_this$_renderParams24 = this._renderParams) === null || _this$_renderParams24 === void 0 || (_this$_renderParams24 = _this$_renderParams24.paymentSessionMetaData) === null || _this$_renderParams24 === void 0 || (_this$_renderParams24 = _this$_renderParams24.paymentMethodInfoView) === null || _this$_renderParams24 === void 0 ? void 0 : _this$_renderParams24.paymentMethodType
|
1493
1569
|
})
|
1494
1570
|
}
|
1495
1571
|
}
|
package/esm/types/index.d.ts
CHANGED
@@ -147,13 +147,22 @@ export interface IpaymentSessionMetaData {
|
|
147
147
|
action?: {
|
148
148
|
amountConfirmRequired?: boolean;
|
149
149
|
autoDebitWithToken: boolean;
|
150
|
+
enableSignAgreement?: boolean;
|
150
151
|
skipSdkQuery: boolean;
|
152
|
+
requireFastSdk: boolean;
|
151
153
|
skipSdkQueryForm?: {
|
152
154
|
value: boolean;
|
153
155
|
version: string;
|
154
156
|
platform: string;
|
155
157
|
};
|
156
158
|
};
|
159
|
+
authUrlInfo?: {
|
160
|
+
appIdentifier?: string;
|
161
|
+
applinkUrl?: string;
|
162
|
+
normalUrl?: string;
|
163
|
+
schemeUrl?: string;
|
164
|
+
authUrl?: string;
|
165
|
+
};
|
157
166
|
paymentSessionFactor?: {
|
158
167
|
extendInfo?: {
|
159
168
|
merchantCapabilities?: string[];
|