@alipay/ams-checkout 0.0.1730107332-dev.15 → 0.0.1730107332-dev.16
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.
@@ -214,7 +214,7 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
|
|
214
214
|
|
215
215
|
// 等请求和 Web启动都Ready之后,发送renderComponent
|
216
216
|
Promise.all([this.initSecuritySDK(), this.processSubmitPay(), webLaunchPromise]).then(function (_ref) {
|
217
|
-
var _this2$paymentContext, _this2$paymentContext2, _this2$paymentContext3, _this2$paymentContext4, _this2$paymentContext5, _this2$paymentContext6, _this2$paymentContext7, _this2$paymentContext8, _this2$paymentContext9;
|
217
|
+
var _this2$paymentContext, _this2$paymentContext2, _this2$paymentContext3, _this2$paymentContext4, _this2$paymentContext5, _this2$paymentContext6, _this2$paymentContext7, _this2$paymentContext8, _this2$paymentContext9, _this2$paymentContext10;
|
218
218
|
var _ref2 = _slicedToArray(_ref, 3),
|
219
219
|
_initSecurityRes = _ref2[0],
|
220
220
|
submitRes = _ref2[1],
|
@@ -223,21 +223,22 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
|
|
223
223
|
eventCenter.dispatchToApp({
|
224
224
|
event: 'renderComponent',
|
225
225
|
data: {
|
226
|
+
// For ESP 1.0
|
226
227
|
queryResult: isEmpty((_this2$paymentContext = _this2.paymentContext) === null || _this2$paymentContext === void 0 ? void 0 : _this2$paymentContext.paymentSessionObj) ? {
|
227
228
|
success: false
|
228
|
-
} : _objectSpread({
|
229
|
+
} : _objectSpread(_objectSpread({
|
229
230
|
success: true,
|
230
231
|
orderAmount: (_this2$paymentContext2 = _this2.paymentContext) === null || _this2$paymentContext2 === void 0 || (_this2$paymentContext2 = _this2$paymentContext2.paymentSessionObj) === null || _this2$paymentContext2 === void 0 ? void 0 : _this2$paymentContext2.paymentView
|
231
|
-
}, (_this2$paymentContext3 = _this2.paymentContext) === null || _this2$paymentContext3 === void 0 ? void 0 : _this2$paymentContext3.paymentSessionObj),
|
232
|
-
sessionResult: (_this2$
|
232
|
+
}, (_this2$paymentContext3 = _this2.paymentContext) === null || _this2$paymentContext3 === void 0 ? void 0 : _this2$paymentContext3.paymentSessionObj), (_this2$paymentContext4 = _this2.paymentContext) === null || _this2$paymentContext4 === void 0 ? void 0 : _this2$paymentContext4.paymentSessionObj.action),
|
233
|
+
sessionResult: (_this2$paymentContext5 = _this2.paymentContext) === null || _this2$paymentContext5 === void 0 ? void 0 : _this2$paymentContext5.paymentSessionObj,
|
233
234
|
submitResult: submitRes,
|
234
|
-
paymentSessionData: (_this2$
|
235
|
+
paymentSessionData: (_this2$paymentContext6 = _this2.paymentContext) === null || _this2$paymentContext6 === void 0 ? void 0 : _this2$paymentContext6.paymentSession,
|
235
236
|
heightOfVisible: Math.max(window.changingPageHeight, window.innerHeight),
|
236
237
|
renderDisplayType: _this2.paymentContext.displayInfo.type,
|
237
|
-
appearance: (_this2$
|
238
|
-
notRedirectAfterComplete: ((_this2$
|
238
|
+
appearance: (_this2$paymentContext7 = _this2.paymentContext.displayInfo) === null || _this2$paymentContext7 === void 0 ? void 0 : _this2$paymentContext7.appearance,
|
239
|
+
notRedirectAfterComplete: ((_this2$paymentContext8 = _this2.paymentContext.startBizFlowOptions.submitPayRequestExtra) === null || _this2$paymentContext8 === void 0 ? void 0 : _this2$paymentContext8.notRedirectAfterComplete) === true,
|
239
240
|
isAppWebview: _this2.paymentContext.startBizFlowOptions.isAppWebview,
|
240
|
-
merchantAppointParam: (_this2$
|
241
|
+
merchantAppointParam: (_this2$paymentContext9 = _this2.paymentContext.startBizFlowOptions.submitPayRequestExtra) === null || _this2$paymentContext9 === void 0 ? void 0 : _this2$paymentContext9.merchantAppointParam,
|
241
242
|
allowSubmitPayCallAhead: _this2.allowSubmitPayCallAhead,
|
242
243
|
envInfo: {
|
243
244
|
screenHeight: screen.height,
|
@@ -247,7 +248,7 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
|
|
247
248
|
trackId: logMetaData.requestSeq,
|
248
249
|
platform: logMetaData.platform,
|
249
250
|
firstLogTime: logMetaData.firstLogTime
|
250
|
-
}, ((_this2$
|
251
|
+
}, ((_this2$paymentContext10 = _this2.paymentContext.paymentSessionObj) === null || _this2$paymentContext10 === void 0 ? void 0 : _this2$paymentContext10.paymentSessionConfig) || {}), {}, {
|
251
252
|
renderDisplayType: logMetaData.renderDisplayType,
|
252
253
|
sdkVersion: logMetaData.sdkVersion,
|
253
254
|
merchantId: logMetaData.merchantId,
|
@@ -9,7 +9,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
9
9
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
10
10
|
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); }
|
11
11
|
import { ProductSceneEnum } from "../../../types";
|
12
|
-
import { Security, getSecurityConfigStorageKey, getSecurityHost, getSecurityScene } from "./security";
|
12
|
+
import { Security, SecurityRegionEnum, getSecurityConfigStorageKey, getSecurityHost, getSecurityScene } from "./security";
|
13
13
|
import { getOrSetStorageId, safeJson } from "../../../util";
|
14
14
|
import { ServiceProvider } from '..';
|
15
15
|
export var SecurityService = /*#__PURE__*/function () {
|
@@ -175,10 +175,26 @@ export var SecurityService = /*#__PURE__*/function () {
|
|
175
175
|
reject();
|
176
176
|
}, timeout);
|
177
177
|
}
|
178
|
-
|
179
|
-
|
178
|
+
_this2._newSecuritySDKByScene({
|
179
|
+
product: _this2.productScene,
|
180
|
+
region: isPre ? SecurityRegionEnum.SG : undefined
|
181
|
+
}, function () {
|
182
|
+
_this2.logger.logInfo({
|
183
|
+
title: "sdk_event_securitySdk".concat(sdkAction, "Success")
|
184
|
+
}, isPre ? {
|
185
|
+
product: _this2.productScene
|
186
|
+
} : undefined).send();
|
187
|
+
resolve();
|
188
|
+
}, function (msg) {
|
189
|
+
_this2.logger.logError({
|
190
|
+
title: 'sdk_error_securitySdkInitFailed',
|
191
|
+
msg: msg || undefined
|
192
|
+
}, {
|
193
|
+
product: _this2.productScene,
|
194
|
+
sign: isPre ? 'Active initialization' : 'SDK internal initialization'
|
195
|
+
}).send();
|
180
196
|
reject();
|
181
|
-
}
|
197
|
+
});
|
182
198
|
}));
|
183
199
|
case 7:
|
184
200
|
case "end":
|