@alipay/ams-checkout 0.0.1763724075-dev.3 → 0.0.1763724075-dev.4
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/ams-checkout.js +1 -1
- package/dist/umd/ams-checkout.min.js +1 -1
- package/package.json +1 -1
- package/LEGAL.md +0 -6
- package/LICENSE +0 -6
- package/README.md +0 -49
- package/esm/component/channel.d.ts +0 -21
- package/esm/component/component.inline.style.d.ts +0 -10
- package/esm/component/component.popup.style.d.ts +0 -26
- package/esm/component/popupWindow.style.d.ts +0 -24
- package/esm/config/index.d.ts +0 -16
- package/esm/config/request.d.ts +0 -21
- package/esm/constant/auto-debit.d.ts +0 -12
- package/esm/constant/easysafepay.d.ts +0 -16
- package/esm/constant/element.d.ts +0 -26
- package/esm/constant/index.d.ts +0 -344
- package/esm/core/bus/ability/callback.d.ts +0 -9
- package/esm/core/bus/ability/security.d.ts +0 -10
- package/esm/core/bus/ability/tracker.d.ts +0 -9
- package/esm/core/bus/index.d.ts +0 -125
- package/esm/core/bus/interface.d.ts +0 -36
- package/esm/core/component/address.d.ts +0 -8
- package/esm/core/component/appPreloadProcessing.d.ts +0 -1
- package/esm/core/component/ckp/index.d.ts +0 -29
- package/esm/core/component/element/EventCenter/index.d.ts +0 -31
- package/esm/core/component/element/elementContainerService/containerService.d.ts +0 -34
- package/esm/core/component/element/elementContainerService/index.d.ts +0 -20
- package/esm/core/component/element/elementController/index.d.ts +0 -48
- package/esm/core/component/element/elementProcessor/addressProcessor.d.ts +0 -20
- package/esm/core/component/element/elementProcessor/authProcessor.d.ts +0 -20
- package/esm/core/component/element/elementProcessor/baseElementProcessor.d.ts +0 -41
- package/esm/core/component/element/elementProcessor/paymentProcessor.d.ts +0 -22
- package/esm/core/component/element/index.d.ts +0 -13
- package/esm/core/component/element/mock.d.ts +0 -10
- package/esm/core/component/element/type.d.ts +0 -443
- package/esm/core/component/element/util.d.ts +0 -85
- package/esm/core/component/index.d.ts +0 -58
- package/esm/core/drop-in/index.d.ts +0 -22
- package/esm/core/instance/index.d.ts +0 -89
- package/esm/foundation/core/index.d.ts +0 -36
- package/esm/foundation/index.d.ts +0 -97
- package/esm/foundation/product-processor/autoDebit/deps.d.ts +0 -14
- package/esm/foundation/product-processor/autoDebit/index.d.ts +0 -48
- package/esm/foundation/product-processor/easysafepay/deps.d.ts +0 -20
- package/esm/foundation/product-processor/easysafepay/index.d.ts +0 -29
- package/esm/foundation/product-processor/element/index.d.ts +0 -7
- package/esm/foundation/service/api-bus/ability/callback.d.ts +0 -9
- package/esm/foundation/service/api-bus/ability/globalData.d.ts +0 -10
- package/esm/foundation/service/api-bus/ability/request.d.ts +0 -10
- package/esm/foundation/service/api-bus/ability/security.d.ts +0 -12
- package/esm/foundation/service/api-bus/ability/tracker.d.ts +0 -9
- package/esm/foundation/service/api-bus/busManager.d.ts +0 -127
- package/esm/foundation/service/api-bus/index.d.ts +0 -20
- package/esm/foundation/service/api-bus/interface.d.ts +0 -48
- package/esm/foundation/service/container/index.d.ts +0 -42
- package/esm/foundation/service/container/popup.d.ts +0 -31
- package/esm/foundation/service/container/utils.d.ts +0 -7
- package/esm/foundation/service/event-center.d.ts +0 -82
- package/esm/foundation/service/global-data/index.d.ts +0 -11
- package/esm/foundation/service/index.d.ts +0 -19
- package/esm/foundation/service/log/index.d.ts +0 -43
- package/esm/foundation/service/log/keys.d.ts +0 -13
- package/esm/foundation/service/log/processor.d.ts +0 -9
- package/esm/foundation/service/log/types.d.ts +0 -33
- package/esm/foundation/service/requester/deps.d.ts +0 -17
- package/esm/foundation/service/requester/requester.d.ts +0 -22
- package/esm/foundation/service/security/index.d.ts +0 -28
- package/esm/foundation/service/security/security.d.ts +0 -33
- package/esm/foundation/utils/gray_scale_utils.d.ts +0 -7
- package/esm/foundation/utils/payment_context_utils.d.ts +0 -13
- package/esm/foundation/utils/payment_product_utils.d.ts +0 -13
- package/esm/foundation/utils/preload_helper.d.ts +0 -21
- package/esm/foundation/utils/redirect_utils.d.ts +0 -11
- package/esm/foundation/utils/system_events.d.ts +0 -4
- package/esm/foundation/utils/web_app_url_utils.d.ts +0 -114
- package/esm/index.d.ts +0 -5
- package/esm/loader/Proxy.d.ts +0 -5
- package/esm/loader/constant.d.ts +0 -36
- package/esm/loader/index.d.ts +0 -20
- package/esm/loader/utils/common.d.ts +0 -13
- package/esm/loader/utils/debugger.d.ts +0 -7
- package/esm/loader/utils/loadSDK.d.ts +0 -8
- package/esm/loader/utils/logger.d.ts +0 -10
- package/esm/loader/utils/proxyPerformance.d.ts +0 -20
- package/esm/main.d.ts +0 -45
- package/esm/plugin/applepay/component.d.ts +0 -50
- package/esm/plugin/applepay/index.d.ts +0 -17
- package/esm/plugin/applepay/interface.d.ts +0 -161
- package/esm/plugin/applepay/service.d.ts +0 -54
- package/esm/plugin/component/cashierApp.d.ts +0 -38
- package/esm/plugin/component/channel.d.ts +0 -57
- package/esm/plugin/component/component.inline.style.d.ts +0 -10
- package/esm/plugin/component/component.popup.style.d.ts +0 -25
- package/esm/plugin/component/index.d.ts +0 -133
- package/esm/plugin/component/popupWindow.style.d.ts +0 -11
- package/esm/plugin/const.d.ts +0 -2
- package/esm/plugin/drop-in/index.d.ts +0 -71
- package/esm/plugin/payment-element/utils.d.ts +0 -2
- package/esm/plugin/paypal/index.d.ts +0 -20
- package/esm/plugin/type.d.ts +0 -34
- package/esm/plugin/utils.d.ts +0 -6
- package/esm/request/index.d.ts +0 -9
- package/esm/request/utils.d.ts +0 -28
- package/esm/service/index.d.ts +0 -13
- package/esm/types/index.d.ts +0 -854
- package/esm/util/createIframeNode.d.ts +0 -6
- package/esm/util/debug.d.ts +0 -1
- package/esm/util/get.d.ts +0 -25
- package/esm/util/getBackScheme.d.ts +0 -5
- package/esm/util/index.d.ts +0 -61
- package/esm/util/integrationType.d.ts +0 -21
- package/esm/util/intl-callapp/es/browser.d.ts +0 -21
- package/esm/util/intl-callapp/es/evoke.d.ts +0 -13
- package/esm/util/intl-callapp/es/generate.d.ts +0 -29
- package/esm/util/intl-callapp/es/index.d.ts +0 -43
- package/esm/util/intl-callapp/es/main.d.ts +0 -41
- package/esm/util/intl-callapp/es/openWallet.d.ts +0 -15
- package/esm/util/intl-callapp/es/types.d.ts +0 -46
- package/esm/util/intl-callapp/es/utils/config.d.ts +0 -24
- package/esm/util/intl-callapp/es/utils/index.d.ts +0 -15
- package/esm/util/logger.d.ts +0 -66
- package/esm/util/mock.d.ts +0 -1
- package/esm/util/redirect.d.ts +0 -6
- package/esm/util/security.d.ts +0 -34
- package/esm/util/spm-map.d.ts +0 -211
- package/esm/util/storage.d.ts +0 -2
- package/esm/util/upgrade.d.ts +0 -39
- package/esm/util/versionCompare.d.ts +0 -15
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import type AMSCheckout from '../../core/instance';
|
|
2
|
-
import type { IcreatePaymentParams, EventPayload } from '../../types';
|
|
3
|
-
export default class CheckoutApp {
|
|
4
|
-
app: any;
|
|
5
|
-
paymentMethodsResult: any;
|
|
6
|
-
appDomain: string;
|
|
7
|
-
AMSSDK: AMSCheckout;
|
|
8
|
-
private _render;
|
|
9
|
-
private _selector;
|
|
10
|
-
private _version;
|
|
11
|
-
constructor();
|
|
12
|
-
/**
|
|
13
|
-
* @description When SDK registers plug-ins, it is a required function to receive SDK instances
|
|
14
|
-
*/
|
|
15
|
-
applyPlugin(AMSSDK: AMSCheckout): void;
|
|
16
|
-
/**
|
|
17
|
-
* @description Set the rendering capability of the cashier plug-in. Different technology stacks have some differences in the packaging and use of rendering functions
|
|
18
|
-
*/
|
|
19
|
-
setRender(createIframeNode: any): void;
|
|
20
|
-
/**
|
|
21
|
-
* @description High order function of rendering capability
|
|
22
|
-
*/
|
|
23
|
-
render(renderParams: IcreatePaymentParams): Promise<void>;
|
|
24
|
-
/**
|
|
25
|
-
* @description Cancel listening and destroy the dom
|
|
26
|
-
*/
|
|
27
|
-
logoutPlugin(): void;
|
|
28
|
-
/**
|
|
29
|
-
* @description Create app
|
|
30
|
-
*/
|
|
31
|
-
private _createApp;
|
|
32
|
-
private _getIframeUrl;
|
|
33
|
-
/**
|
|
34
|
-
* @description Create iframe
|
|
35
|
-
*/
|
|
36
|
-
private _createIframe;
|
|
37
|
-
/**
|
|
38
|
-
* @description Get iftame id
|
|
39
|
-
*/
|
|
40
|
-
private _getIframeId;
|
|
41
|
-
_listener(e: any): void;
|
|
42
|
-
/**
|
|
43
|
-
* @description Initialize subscription iframe message
|
|
44
|
-
*/
|
|
45
|
-
_addEventListener(): void;
|
|
46
|
-
_removeEventListener(): void;
|
|
47
|
-
/**
|
|
48
|
-
* @description Processing messages from iframe
|
|
49
|
-
*/
|
|
50
|
-
_handleAppMessage(data: EventPayload): void;
|
|
51
|
-
/**
|
|
52
|
-
* @description Send message to SDK
|
|
53
|
-
*/
|
|
54
|
-
_dispatchToSDK(data: EventPayload): void;
|
|
55
|
-
/**
|
|
56
|
-
* @description Send message to iframe
|
|
57
|
-
*/
|
|
58
|
-
_dispatchToApp(data: EventPayload): void;
|
|
59
|
-
/**
|
|
60
|
-
* @description Subscribe to messages from SDK
|
|
61
|
-
*/
|
|
62
|
-
_subscribeFromSDK(): void;
|
|
63
|
-
/**
|
|
64
|
-
* @description Send rendering events to iframe
|
|
65
|
-
*/
|
|
66
|
-
_renderPaymentMethods(paymentResult: any): void;
|
|
67
|
-
/**
|
|
68
|
-
* @description Send the post submission processing event, and the cashier applies the consumption result
|
|
69
|
-
*/
|
|
70
|
-
_handleRequestPayment(data: EventPayload): void;
|
|
71
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { BusContext, BusMessage, BusSubscriber } from '../../core/bus';
|
|
2
|
-
import { Logger } from '../../util/logger';
|
|
3
|
-
export declare class PaypalBusSubscriber extends BusSubscriber {
|
|
4
|
-
logger: Logger;
|
|
5
|
-
constructor(logger: Logger);
|
|
6
|
-
actionNames(): string[];
|
|
7
|
-
private onEventCallback;
|
|
8
|
-
protected renderPaypalButton(context: BusContext, message: BusMessage): Promise<never>;
|
|
9
|
-
private appendPaypalLoading;
|
|
10
|
-
private removePaypalLoading;
|
|
11
|
-
private preCheck;
|
|
12
|
-
private loadPaypalResource;
|
|
13
|
-
private createPaypalScript;
|
|
14
|
-
private onShippingChange;
|
|
15
|
-
private createOrder;
|
|
16
|
-
private onApprove;
|
|
17
|
-
private onCancel;
|
|
18
|
-
private destroyComponent;
|
|
19
|
-
onMessage(context: BusContext, message: BusMessage): void;
|
|
20
|
-
}
|
package/esm/plugin/type.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { BusSubscriber } from '../core/bus';
|
|
2
|
-
import { PaymentMethodCategoryTypeEnum, ProductSceneEnum, ProductSceneVersion } from '../types';
|
|
3
|
-
export type IExtendPlugin = IExtendPluginItem[];
|
|
4
|
-
export interface ComponentActionNamesType {
|
|
5
|
-
canMakePayments?: string;
|
|
6
|
-
optional_init?: string;
|
|
7
|
-
createComponent?: string;
|
|
8
|
-
mountComponent?: string;
|
|
9
|
-
submit?: string;
|
|
10
|
-
destroyComponent?: string;
|
|
11
|
-
getValue?: string;
|
|
12
|
-
}
|
|
13
|
-
export type IExtendPluginItem = {
|
|
14
|
-
/**
|
|
15
|
-
* 以下为sessionData匹配的场景
|
|
16
|
-
*/
|
|
17
|
-
sessionMatcher?: {
|
|
18
|
-
productScene: ProductSceneEnum;
|
|
19
|
-
productSceneVersion: ProductSceneVersion;
|
|
20
|
-
paymentMethodCategoryType: PaymentMethodCategoryTypeEnum;
|
|
21
|
-
paymentMethodTypes: string[];
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* 用于无sessionData场景,比如:canMakePayments
|
|
25
|
-
*/
|
|
26
|
-
paymentChannelMatcher?: {
|
|
27
|
-
paymentMethod: string;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* 以下plugin 实现的定义
|
|
31
|
-
*/
|
|
32
|
-
busActionNames: ComponentActionNamesType;
|
|
33
|
-
busSubscriber?: BusSubscriber;
|
|
34
|
-
};
|
package/esm/plugin/utils.d.ts
DELETED
package/esm/request/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { RequestConfig } from '../types';
|
|
2
|
-
import type { Logger } from '../util/logger';
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* @param requestData 请求参数
|
|
6
|
-
* @param options 请求配置
|
|
7
|
-
* @example request({ name: 'test' }, { operation-type: 'xxx.xxx.xxx' })
|
|
8
|
-
*/
|
|
9
|
-
export declare function request<T>(requestData: Record<string, any> | undefined, options: RequestConfig, logger: Logger): Promise<T>;
|
package/esm/request/utils.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2022 International Business Group, Ant Group. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* 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:
|
|
5
|
-
* 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
|
|
6
|
-
* 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.
|
|
7
|
-
*/
|
|
8
|
-
import { errorEnum } from '../types';
|
|
9
|
-
export declare const safeJson: (data: any, obj: any) => any;
|
|
10
|
-
export declare const fomatGetwayError: (headers: Record<string, any>, traceId: string) => {
|
|
11
|
-
success: boolean;
|
|
12
|
-
traceId: string;
|
|
13
|
-
errorCode: errorEnum;
|
|
14
|
-
resultStatus: any;
|
|
15
|
-
errorMessage?: undefined;
|
|
16
|
-
result?: undefined;
|
|
17
|
-
} | {
|
|
18
|
-
success: boolean;
|
|
19
|
-
traceId: string;
|
|
20
|
-
errorCode: errorEnum;
|
|
21
|
-
errorMessage: string;
|
|
22
|
-
result: {
|
|
23
|
-
resultStatus: any;
|
|
24
|
-
tips: string;
|
|
25
|
-
memo: string;
|
|
26
|
-
};
|
|
27
|
-
resultStatus: any;
|
|
28
|
-
};
|
package/esm/service/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ApplePayPaymentSessionRequest, ApplePayPaymentSessionResult, CashierSdkActionQueryRequest, CashierSdkActionQueryResult, CashierSubmitPayRequest, CashierSubmitPayResult, RequestConfig } from '../types';
|
|
2
|
-
import type { Logger } from '../util/logger';
|
|
3
|
-
export declare function queryPaymentInfo(params: CashierSdkActionQueryRequest, options: RequestConfig, logger: Logger): Promise<CashierSdkActionQueryResult>;
|
|
4
|
-
export declare function antomConfig(options: RequestConfig, logger: Logger): Promise<any>;
|
|
5
|
-
export declare function submitPayInfo(params: CashierSubmitPayRequest, options: RequestConfig, logger: Logger): Promise<CashierSubmitPayResult>;
|
|
6
|
-
/**
|
|
7
|
-
* Get merchant session by Apple Pay
|
|
8
|
-
* @param paymentSessionData
|
|
9
|
-
* @param params
|
|
10
|
-
* @param options
|
|
11
|
-
* @param logger
|
|
12
|
-
*/
|
|
13
|
-
export declare function getApplePayPaymentSession(paymentSessionData: string, params: ApplePayPaymentSessionRequest, options: RequestConfig, logger: Logger): Promise<ApplePayPaymentSessionResult>;
|