@alipay/ams-checkout 0.0.1726734012-dev.6 → 0.0.1726734012-dev.8
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/core/component/index.d.ts +3 -1
- package/esm/core/component/index.js +3 -3
- package/esm/core/instance/index.d.ts +1 -1
- package/esm/core/instance/index.js +5 -4
- package/esm/foundation/product-processor/easysafepay/index.js +1 -0
- package/esm/plugin/component/index.js +1 -1
- package/esm/types/index.d.ts +2 -0
- package/package.json +1 -1
@@ -49,5 +49,7 @@ export declare class AMSComponent extends CoreInstance {
|
|
49
49
|
* @param data - Transfer information in the submission interface according to your requirements (optional)
|
50
50
|
*/
|
51
51
|
submit(data?: Isubmit): Promise<unknown>;
|
52
|
-
preload(_options:
|
52
|
+
preload(_options: {
|
53
|
+
securityRegion?: 'US' | 'SG' | 'DE';
|
54
|
+
}): void;
|
53
55
|
}
|
@@ -350,7 +350,6 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
|
|
350
350
|
this.preloadComponent();
|
351
351
|
}
|
352
352
|
;
|
353
|
-
console.log('web-sdk createComponent');
|
354
353
|
this.clearPreloadIframe();
|
355
354
|
this.logger.setComponentStartTime(Date.now());
|
356
355
|
return this.parameterInitAndCheck({
|
@@ -414,7 +413,7 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
|
|
414
413
|
key: "preloadComponent",
|
415
414
|
value: function preloadComponent() {
|
416
415
|
var _this6 = this;
|
417
|
-
console.log('web-
|
416
|
+
console.log('web-preloadpreloadComponent', this.channelType, this.productSceneVersion);
|
418
417
|
var MAX_CLEAR_TIME = 10000;
|
419
418
|
if (Array.isArray(this.channelType)) {
|
420
419
|
for (var i = 0; i < this.channelType.length; i++) {
|
@@ -564,7 +563,8 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
|
|
564
563
|
return val === ComponentSignEnum.EASY_PAY_WALLET || val === ComponentSignEnum.EASY_PAY_APM;
|
565
564
|
})) return;
|
566
565
|
this._componentApp.AMSSDK.initSecurity({
|
567
|
-
product: this.options.product
|
566
|
+
product: this.options.product,
|
567
|
+
securityRegion: _options.securityRegion
|
568
568
|
});
|
569
569
|
} catch (err) {
|
570
570
|
console.log('web-sdk error', err);
|
@@ -33,7 +33,7 @@ export default class AMSSDK {
|
|
33
33
|
* @param product Product Scenarios
|
34
34
|
* @param scene Scenario of the product (compatible with old version parameters, about to be deleted)
|
35
35
|
*/
|
36
|
-
initSecurity({ product, scene, }: InitSecurityConfig & {
|
36
|
+
initSecurity({ product, scene, securityRegion, }: InitSecurityConfig & {
|
37
37
|
scene?: string;
|
38
38
|
}): void;
|
39
39
|
/**
|
@@ -79,7 +79,7 @@ var AMSSDK = /*#__PURE__*/function () {
|
|
79
79
|
key: "preInitSecurity",
|
80
80
|
value: function preInitSecurity(options) {
|
81
81
|
var _this$options;
|
82
|
-
console.log('web-preloadsdk preInitSecurity-success');
|
82
|
+
console.log('web-preloadsdk preInitSecurity-success', options);
|
83
83
|
var antomSDKConfigKey = 'antomSDKConfigKey';
|
84
84
|
var config = safeJson(getOrSetStorageId(antomSDKConfigKey), {});
|
85
85
|
if (![EnvironmentEnum.prod, EnvironmentEnum.sandbox].includes(options === null || options === void 0 ? void 0 : options.environment)) return;
|
@@ -160,8 +160,9 @@ var AMSSDK = /*#__PURE__*/function () {
|
|
160
160
|
var _ref$product = _ref.product,
|
161
161
|
product = _ref$product === void 0 ? ProductSceneEnum.EASY_PAY : _ref$product,
|
162
162
|
_ref$scene = _ref.scene,
|
163
|
-
scene = _ref$scene === void 0 ? ProductSceneEnum.EASY_PAY : _ref$scene
|
164
|
-
|
163
|
+
scene = _ref$scene === void 0 ? ProductSceneEnum.EASY_PAY : _ref$scene,
|
164
|
+
_ref$securityRegion = _ref.securityRegion,
|
165
|
+
securityRegion = _ref$securityRegion === void 0 ? 'SG' : _ref$securityRegion;
|
165
166
|
this.logger.logInfo({
|
166
167
|
title: 'sdk_event_securitySdkPreInit'
|
167
168
|
}, {
|
@@ -173,7 +174,7 @@ var AMSSDK = /*#__PURE__*/function () {
|
|
173
174
|
if (sdk) return;
|
174
175
|
this._newSecuritySDKByScene({
|
175
176
|
product: product || scene,
|
176
|
-
region: SecurityRegionEnum.SG
|
177
|
+
region: securityRegion || SecurityRegionEnum.SG
|
177
178
|
}, function () {
|
178
179
|
_this.logger.logInfo({
|
179
180
|
title: 'sdk_event_securitySdkPreInitSuccess'
|
@@ -35,6 +35,7 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
|
|
35
35
|
_createClass(EasySafePayProcessor, [{
|
36
36
|
key: "init",
|
37
37
|
value: function init(config, instanceId, sdkMetaData) {
|
38
|
+
console.log('执行了EasySafePayProcessor', config, instanceId, sdkMetaData);
|
38
39
|
this.initConfig = config;
|
39
40
|
this.instanceId = instanceId;
|
40
41
|
this.logger = ServiceProvider.getInstance(this.instanceId).getService('Log');
|
@@ -379,7 +379,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
379
379
|
}, {
|
380
380
|
key: "appendPreloadIframeNodes",
|
381
381
|
value: function appendPreloadIframeNodes(componentSign, productSceneVersion) {
|
382
|
-
console.log('web-preloadsdk appendPreloadIframeNodes_success');
|
382
|
+
console.log('web-preloadsdk appendPreloadIframeNodes_success', componentSign, productSceneVersion);
|
383
383
|
var virtualPreloadIframe = this.createPreloadApp(componentSign, productSceneVersion);
|
384
384
|
this.createPreloadIframeNode(virtualPreloadIframe);
|
385
385
|
this.AMSSDK.logger.logInfo({
|
package/esm/types/index.d.ts
CHANGED
@@ -37,6 +37,7 @@ export interface IoptionsParams {
|
|
37
37
|
product?: string;
|
38
38
|
networkMode?: string;
|
39
39
|
mode?: string;
|
40
|
+
securityRegion?: 'US' | 'SG' | 'DE';
|
40
41
|
}
|
41
42
|
export interface IApplePayOptionsParams extends Pick<IoptionsParams, 'locale' | 'environment' | 'onEventCallback' | 'analytics'> {
|
42
43
|
}
|
@@ -223,6 +224,7 @@ export interface IsecurityConfig {
|
|
223
224
|
export interface InitSecurityConfig {
|
224
225
|
product: ProductSceneEnum;
|
225
226
|
region?: string;
|
227
|
+
securityRegion?: 'US' | 'SG' | 'DE';
|
226
228
|
}
|
227
229
|
export interface frontModulesToBeLoadedInterface {
|
228
230
|
acquirerName: string;
|