初始化
This commit is contained in:
3
node_modules/@alipay/ams-checkout/esm/config/index.d.ts
generated
vendored
Normal file
3
node_modules/@alipay/ams-checkout/esm/config/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export declare const marmotMap: Record<string, string>;
|
||||
export declare const marmotConfigMap: Record<string, string>;
|
||||
export declare const sdkVersion: string;
|
||||
25
node_modules/@alipay/ams-checkout/esm/config/index.js
generated
vendored
Normal file
25
node_modules/@alipay/ams-checkout/esm/config/index.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Copyright (c) 2022 International Business Group, Ant Group. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, and/or distribute the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
* 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
|
||||
* 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
|
||||
*/
|
||||
import json from "../../package.json";
|
||||
export var marmotMap = {
|
||||
dev: 'http://page.alipay.net/page/antom-web-checkout/src/component-app',
|
||||
sit: 'http://page.test.alipay.net/page/antom-web-checkout/src/component-app',
|
||||
pre: 'https://pre.ac.alipay.com/page/antom-web-checkout/src/component-app',
|
||||
sandbox: 'https://ac.alipay.com/page/antom-web-checkout/src/component-app',
|
||||
light_sandbox: 'https://ac.alipay.com/page/antom-web-checkout/src/component-app',
|
||||
prod: 'https://ac.alipay.com/page/antom-web-checkout/src/component-app'
|
||||
};
|
||||
export var marmotConfigMap = {
|
||||
dev: 'https://config-dev.marmot-cloud.com/config/data/antom-sdk-config/en_US.json',
|
||||
sit: 'https://config-test.marmot-cloud.com/config/data/antom-sdk-config/en_US.json',
|
||||
pre: 'https://config-pre.marmot-cloud.com/config/data/antom-sdk-config/en_US.json',
|
||||
sandbox: 'https://config.marmot-cloud.com/config/data/antom-sdk-config/en_US.json',
|
||||
light_sandbox: 'https://config.marmot-cloud.com/config/data/antom-sdk-config/en_US.json',
|
||||
prod: 'https://config.marmot-cloud.com/config/data/antom-sdk-config/en_US.json'
|
||||
};
|
||||
export var sdkVersion = json.version;
|
||||
21
node_modules/@alipay/ams-checkout/esm/config/request.d.ts
generated
vendored
Normal file
21
node_modules/@alipay/ams-checkout/esm/config/request.d.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Copyright (c) 2022 International Business Group, Ant Group. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, and/or distribute the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
* 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
|
||||
* 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
|
||||
*/
|
||||
export declare const requestHost: {
|
||||
[key: string]: string;
|
||||
};
|
||||
export declare const clientId = "5J5Y8X4E2Y25GR00690";
|
||||
export declare const tntInstId = "ALIPW3SG";
|
||||
export declare const appId = "ANTOM_PAYMENT_WEB";
|
||||
export declare const sofaId: any;
|
||||
export declare const hostSignMap: (hostSign: string | undefined, env: string) => string;
|
||||
export declare const lightSandboxMap: (operationType: string | undefined, env: string) => {
|
||||
appId: string;
|
||||
sofaId: any;
|
||||
baseURL: string;
|
||||
'Operation-Type': string;
|
||||
};
|
||||
67
node_modules/@alipay/ams-checkout/esm/config/request.js
generated
vendored
Normal file
67
node_modules/@alipay/ams-checkout/esm/config/request.js
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* Copyright (c) 2022 International Business Group, Ant Group. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, and/or distribute the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
* 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
|
||||
* 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
|
||||
*/
|
||||
|
||||
import { queryParse } from "../util";
|
||||
var _queryParse = queryParse(),
|
||||
_light_sandbox = _queryParse._light_sandbox,
|
||||
groupId = _queryParse.groupId,
|
||||
host = _queryParse.requestHost;
|
||||
export var requestHost = {
|
||||
local: 'http://imgs-1529.gz00b.dev.alipay.net/mgw.htm',
|
||||
dev: host || 'http://imgs-1529.gz00b.dev.alipay.net/mgw.htm',
|
||||
sit: host || 'http://imgs-9.sggz00a.test.alipay.net/mgw.htm',
|
||||
pre: 'https://imgs-sea-pre.alipay.com/mgw.htm',
|
||||
prod: 'https://imgs-sea-global.alipay.com/mgw.htm',
|
||||
sandbox: 'https://imgs-sea-global.alipay.com/mgw.htm'
|
||||
};
|
||||
export var clientId = '5J5Y8X4E2Y25GR00690';
|
||||
export var tntInstId = 'ALIPW3SG';
|
||||
export var appId = 'ANTOM_PAYMENT_WEB';
|
||||
export var sofaId = groupId || 'GROUP_20231218150235';
|
||||
export var hostSignMap = function hostSignMap(hostSign, env) {
|
||||
var map = {
|
||||
SG: 'https://imgs-sea-global.alipay.com/mgw.htm',
|
||||
US: 'https://imgs-na-global.alipay.com/mgw.htm',
|
||||
DE: 'https://imgs-de-global.alipay.com/mgw.htm'
|
||||
};
|
||||
var preMap = {
|
||||
SG: 'https://imgs-sea-pre.alipay.com/mgw.htm',
|
||||
US: 'https://imgs-pre.alipay.com/mgw.htm',
|
||||
DE: 'https://imgs-de-pre.alipay.com/mgw.htm'
|
||||
};
|
||||
if (env === 'prod' || env === 'sandbox' || env === 'light_sandbox') {
|
||||
return map[hostSign || 'SG'];
|
||||
} else if (env === 'pre') {
|
||||
return preMap[hostSign || 'SG'];
|
||||
} else return '';
|
||||
};
|
||||
export var lightSandboxMap = function lightSandboxMap() {
|
||||
var operationType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||
var env = arguments.length > 1 ? arguments[1] : undefined;
|
||||
var map = {
|
||||
pre: 'https://imgs-sea-pre.alipay.com/mgw.htm',
|
||||
sit: host || 'http://imgs-9.sggz00a.test.alipay.net/mgw.htm',
|
||||
dev: host || 'http://imgs-13.sggz00b.stable.alipay.net/mgw.htm'
|
||||
};
|
||||
var typeMap = {
|
||||
'com.ipay.iexpcashier.sdkAction.query': 'com.ipay.iopensandbox.sdk.paymentSession.query'
|
||||
};
|
||||
var appId = 'SDK_MOCK_SANDBOX';
|
||||
var sofaId = groupId || 'GROUP_20230315210531';
|
||||
if (typeMap[operationType] && env === 'light_sandbox' || _light_sandbox === 'true') return {
|
||||
appId: appId,
|
||||
sofaId: sofaId,
|
||||
baseURL: map[env],
|
||||
'Operation-Type': typeMap[operationType]
|
||||
};else return {
|
||||
appId: '',
|
||||
sofaId: '',
|
||||
baseURL: '',
|
||||
'Operation-Type': ''
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user