@alipay/ams-checkout 0.0.1730107332-dev.17 → 0.0.1730107332-dev.19
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/foundation/product-processor/easysafepay/deps.d.ts +1 -1
- package/esm/foundation/product-processor/easysafepay/deps.js +1 -1
- package/esm/foundation/product-processor/easysafepay/index.js +8 -15
- package/esm/foundation/service/security/index.js +20 -4
- package/esm/util/index.d.ts +1 -2
- package/esm/util/index.js +1 -14
- package/package.json +1 -1
@@ -5,7 +5,7 @@ export * as ChannelCustomize from '../../../component/channel';
|
|
5
5
|
export type { IChannelBehavior } from '../../../component/channel';
|
6
6
|
export { DisplayTypeEnum, PaymentMethodCategoryTypeEnum, ProductSceneEnum } from '../../../types';
|
7
7
|
export type { CashierSdkActionQueryRequest, CashierSdkActionQueryResult, CashierSubmitPayRequest, CashierSubmitPayResult, IOptionsParams, } from '../../../types';
|
8
|
-
export {
|
8
|
+
export { isPC } from '../../../util';
|
9
9
|
export { getBackScheme } from '../../../util/getBackScheme';
|
10
10
|
export { isLocalMock } from '../../../util/mock';
|
11
11
|
export { ServiceProvider } from '../../service';
|
@@ -2,7 +2,7 @@ export { v4 as uuid } from 'uuid';
|
|
2
2
|
import * as _ChannelCustomize from "../../../component/channel";
|
3
3
|
export { _ChannelCustomize as ChannelCustomize };
|
4
4
|
export { DisplayTypeEnum, PaymentMethodCategoryTypeEnum, ProductSceneEnum } from "../../../types";
|
5
|
-
export {
|
5
|
+
export { isPC } from "../../../util";
|
6
6
|
export { getBackScheme } from "../../../util/getBackScheme";
|
7
7
|
export { isLocalMock } from "../../../util/mock";
|
8
8
|
export { ServiceProvider } from "../../service";
|
@@ -16,7 +16,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
16
16
|
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; }
|
17
17
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
18
18
|
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); }
|
19
|
-
import { ChannelCustomize, DisplayTypeEnum, getBackScheme, isPC, ProductInfoCacheUtil, ProductSceneEnum, ServiceProvider, uuid, WebAppUrlUtil
|
19
|
+
import { ChannelCustomize, DisplayTypeEnum, getBackScheme, isPC, ProductInfoCacheUtil, ProductSceneEnum, ServiceProvider, uuid, WebAppUrlUtil } from "./deps";
|
20
20
|
export var EasySafePayProcessor = /*#__PURE__*/function () {
|
21
21
|
function EasySafePayProcessor() {
|
22
22
|
_classCallCheck(this, EasySafePayProcessor);
|
@@ -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
|
217
|
+
var _this2$paymentContext, _this2$paymentContext2, _this2$paymentContext3, _this2$paymentContext4, _this2$paymentContext5, _this2$paymentContext6;
|
218
218
|
var _ref2 = _slicedToArray(_ref, 3),
|
219
219
|
_initSecurityRes = _ref2[0],
|
220
220
|
submitRes = _ref2[1],
|
@@ -223,22 +223,15 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
|
|
223
223
|
eventCenter.dispatchToApp({
|
224
224
|
event: 'renderComponent',
|
225
225
|
data: {
|
226
|
-
|
227
|
-
queryResult: isEmpty((_this2$paymentContext = _this2.paymentContext) === null || _this2$paymentContext === void 0 ? void 0 : _this2$paymentContext.paymentSessionObj) ? {
|
228
|
-
success: false
|
229
|
-
} : _objectSpread(_objectSpread({
|
230
|
-
success: true,
|
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
|
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,
|
226
|
+
sessionResult: (_this2$paymentContext = _this2.paymentContext) === null || _this2$paymentContext === void 0 ? void 0 : _this2$paymentContext.paymentSessionObj,
|
234
227
|
submitResult: submitRes,
|
235
|
-
paymentSessionData: (_this2$
|
228
|
+
paymentSessionData: (_this2$paymentContext2 = _this2.paymentContext) === null || _this2$paymentContext2 === void 0 ? void 0 : _this2$paymentContext2.paymentSession,
|
236
229
|
heightOfVisible: Math.max(window.changingPageHeight, window.innerHeight),
|
237
230
|
renderDisplayType: _this2.paymentContext.displayInfo.type,
|
238
|
-
appearance: (_this2$
|
239
|
-
notRedirectAfterComplete: ((_this2$
|
231
|
+
appearance: (_this2$paymentContext3 = _this2.paymentContext.displayInfo) === null || _this2$paymentContext3 === void 0 ? void 0 : _this2$paymentContext3.appearance,
|
232
|
+
notRedirectAfterComplete: ((_this2$paymentContext4 = _this2.paymentContext.startBizFlowOptions.submitPayRequestExtra) === null || _this2$paymentContext4 === void 0 ? void 0 : _this2$paymentContext4.notRedirectAfterComplete) === true,
|
240
233
|
isAppWebview: _this2.paymentContext.startBizFlowOptions.isAppWebview,
|
241
|
-
merchantAppointParam: (_this2$
|
234
|
+
merchantAppointParam: (_this2$paymentContext5 = _this2.paymentContext.startBizFlowOptions.submitPayRequestExtra) === null || _this2$paymentContext5 === void 0 ? void 0 : _this2$paymentContext5.merchantAppointParam,
|
242
235
|
allowSubmitPayCallAhead: _this2.allowSubmitPayCallAhead,
|
243
236
|
envInfo: {
|
244
237
|
screenHeight: screen.height,
|
@@ -248,7 +241,7 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
|
|
248
241
|
trackId: logMetaData.requestSeq,
|
249
242
|
platform: logMetaData.platform,
|
250
243
|
firstLogTime: logMetaData.firstLogTime
|
251
|
-
}, ((_this2$
|
244
|
+
}, ((_this2$paymentContext6 = _this2.paymentContext.paymentSessionObj) === null || _this2$paymentContext6 === void 0 ? void 0 : _this2$paymentContext6.paymentSessionConfig) || {}), {}, {
|
252
245
|
renderDisplayType: logMetaData.renderDisplayType,
|
253
246
|
sdkVersion: logMetaData.sdkVersion,
|
254
247
|
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":
|
package/esm/util/index.d.ts
CHANGED
@@ -36,5 +36,4 @@ declare function loadSDKScript({ src, attrOptions, timeOut, loadCallback }: {
|
|
36
36
|
timeOut?: number;
|
37
37
|
loadCallback?: any;
|
38
38
|
}, logger: any): Promise<unknown>;
|
39
|
-
|
40
|
-
export { getType, getViewPort, getOrigin, serialize, isJsonString, isDom, isFunction, isEmpty, device, safeJson, isPC, queryParse, getDesignFontSize, amsSetSize, addSetFontSizeEvent, getOrSetStorageId, checkTimeElapsed, parseBase64ToString, loadSDKScript, };
|
39
|
+
export { getType, getViewPort, getOrigin, serialize, isJsonString, isDom, isFunction, device, safeJson, isPC, queryParse, getDesignFontSize, amsSetSize, addSetFontSizeEvent, getOrSetStorageId, checkTimeElapsed, parseBase64ToString, loadSDKScript, };
|
package/esm/util/index.js
CHANGED
@@ -251,17 +251,4 @@ function loadSDKScript(_ref, logger) {
|
|
251
251
|
document.head.appendChild(script);
|
252
252
|
});
|
253
253
|
}
|
254
|
-
|
255
|
-
if (value == null) {
|
256
|
-
// Checks for null and undefined
|
257
|
-
return true;
|
258
|
-
}
|
259
|
-
if (typeof value === 'string' || Array.isArray(value)) {
|
260
|
-
return value.length === 0;
|
261
|
-
}
|
262
|
-
if (_typeof(value) === 'object') {
|
263
|
-
return Object.keys(value).length === 0;
|
264
|
-
}
|
265
|
-
return false; // For other types (like numbers, functions, etc.)
|
266
|
-
};
|
267
|
-
export { getType, getViewPort, getOrigin, serialize, isJsonString, isDom, isFunction, isEmpty, device, safeJson, isPC, queryParse, getDesignFontSize, amsSetSize, addSetFontSizeEvent, getOrSetStorageId, checkTimeElapsed, parseBase64ToString, loadSDKScript };
|
254
|
+
export { getType, getViewPort, getOrigin, serialize, isJsonString, isDom, isFunction, device, safeJson, isPC, queryParse, getDesignFontSize, amsSetSize, addSetFontSizeEvent, getOrSetStorageId, checkTimeElapsed, parseBase64ToString, loadSDKScript };
|