@alipay/ams-checkout 0.0.1709715270-dev.2 → 0.0.1709715270-dev.3

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.
@@ -0,0 +1,19 @@
1
+ import { ApplePayActionEnum, PaymentActionEnum } from "../core/bus/interface";
2
+ import { paymentMethodCategoryTypeEnum, productSceneEnum, ProductSceneVersion } from "../types/index";
3
+ export var ExtendPlugin = [{
4
+ sessionMatcher: {
5
+ productScene: productSceneEnum.CASHIER_PAYMENT,
6
+ productSceneVersion: ProductSceneVersion.V1,
7
+ paymentMethodCategoryType: paymentMethodCategoryTypeEnum.CARD,
8
+ paymentMethodTypes: ["CARD_APPLE_PAY"]
9
+ },
10
+ paymentChannelMatcher: {
11
+ paymentMethod: 'ApplePay'
12
+ },
13
+ busActionNames: {
14
+ canMakePayments: ApplePayActionEnum.canMakePayments,
15
+ optional_init: PaymentActionEnum.optional_init,
16
+ createComponent: ApplePayActionEnum.createComponent,
17
+ destoryComponent: ApplePayActionEnum.destoryComponent
18
+ }
19
+ }];
@@ -0,0 +1,33 @@
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
+ destoryComponent?: string;
11
+ }
12
+ export type IExtendPluginItem = {
13
+ /**
14
+ * 以下为sessionData匹配的场景
15
+ */
16
+ sessionMatcher?: {
17
+ productScene: productSceneEnum;
18
+ productSceneVersion: ProductSceneVersion;
19
+ paymentMethodCategoryType: paymentMethodCategoryTypeEnum;
20
+ paymentMethodTypes: string[];
21
+ };
22
+ /**
23
+ * 用于无sessionData场景,比如:canMakePayments
24
+ */
25
+ paymentChannelMatcher?: {
26
+ paymentMethod: string;
27
+ };
28
+ /**
29
+ * 以下plugin 实现的定义
30
+ */
31
+ busActionNames: ComponentActionNamesType;
32
+ busSubscriber?: BusSubscriber;
33
+ };
@@ -0,0 +1,2 @@
1
+ ;
2
+ export {};
@@ -448,9 +448,14 @@ export declare enum eventCodeEnum {
448
448
  SDK_CREATECOMPONENT_ERROR = "SDK_CREATECOMPONENT_ERROR",
449
449
  SDK_CALL_URL_ERROR = "SDK_CALL_URL_ERROR",
450
450
  SDK_CALL_URL_SUCCESS = "SDK_CALL_URL_SUCCESS",
451
- SDK_PAYMENT_FINISH = "SDK_PAYMENT_FINISH",
451
+ SDK_PAYMENT_SUCCESSFUL = "SDK_PAYMENT_SUCCESSFUL",
452
452
  SDK_PAYMENT_FAIL = "SDK_PAYMENT_FAIL",
453
- SDK_PAYMENT_CANCEL = "SDK_PAYMENT_CANCEL"
453
+ SDK_PAYMENT_ERROR = "SDK_PAYMENT_ERROR",
454
+ SDK_PAYMENT_CANCEL = "SDK_PAYMENT_CANCEL",
455
+ /**
456
+ * 当前为Apple Pay发起了Pay请求,但是用户关闭了页面
457
+ */
458
+ SDK_PAYMENT_PROCESSING = "SDK_PAYMENT_PROCESSING"
454
459
  }
455
460
  export declare enum RedirectType {
456
461
  ApplinkUrl = "ApplinkUrl",
@@ -474,4 +479,12 @@ export interface MultipleCallbackEvents {
474
479
  export type PaymentMethodTypeEnum = 'ApplePay';
475
480
  export type ApplePaySubTypeEnum = 'ApplePayRecurringPayment';
476
481
  export type SubPaymentMethodTypeEnum = ApplePaySubTypeEnum;
482
+ export declare enum ProductSceneVersion {
483
+ V1 = "1.0",
484
+ V2 = "2.0"
485
+ }
486
+ export type IAppendParams = {
487
+ componentSign: componentSignEnum;
488
+ iframeNodesParams: IappendIframeNodesParams;
489
+ };
477
490
  export {};
@@ -153,9 +153,11 @@ export var eventCodeEnum = /*#__PURE__*/function (eventCodeEnum) {
153
153
  eventCodeEnum["SDK_CREATECOMPONENT_ERROR"] = "SDK_CREATECOMPONENT_ERROR";
154
154
  eventCodeEnum["SDK_CALL_URL_ERROR"] = "SDK_CALL_URL_ERROR";
155
155
  eventCodeEnum["SDK_CALL_URL_SUCCESS"] = "SDK_CALL_URL_SUCCESS";
156
- eventCodeEnum["SDK_PAYMENT_FINISH"] = "SDK_PAYMENT_FINISH";
156
+ eventCodeEnum["SDK_PAYMENT_SUCCESSFUL"] = "SDK_PAYMENT_SUCCESSFUL";
157
157
  eventCodeEnum["SDK_PAYMENT_FAIL"] = "SDK_PAYMENT_FAIL";
158
+ eventCodeEnum["SDK_PAYMENT_ERROR"] = "SDK_PAYMENT_ERROR";
158
159
  eventCodeEnum["SDK_PAYMENT_CANCEL"] = "SDK_PAYMENT_CANCEL";
160
+ eventCodeEnum["SDK_PAYMENT_PROCESSING"] = "SDK_PAYMENT_PROCESSING";
159
161
  return eventCodeEnum;
160
162
  }({});
161
163
  export var RedirectType = /*#__PURE__*/function (RedirectType) {
@@ -164,4 +166,9 @@ export var RedirectType = /*#__PURE__*/function (RedirectType) {
164
166
  RedirectType["NormalUrl"] = "NormalUrl";
165
167
  RedirectType["Unknown"] = "Unknown";
166
168
  return RedirectType;
169
+ }({});
170
+ export var ProductSceneVersion = /*#__PURE__*/function (ProductSceneVersion) {
171
+ ProductSceneVersion["V1"] = "1.0";
172
+ ProductSceneVersion["V2"] = "2.0";
173
+ return ProductSceneVersion;
167
174
  }({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alipay/ams-checkout",
3
- "version": "0.0.1709715270-dev.2",
3
+ "version": "0.0.1709715270-dev.3",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "esm/index.js",