@alipay/ams-checkout 0.0.1730107332-dev.4 → 0.0.1730706734-dev.0

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.
Files changed (136) hide show
  1. package/dist/umd/ams-checkout.min.js +1 -1
  2. package/esm/config/index.d.ts +7 -7
  3. package/esm/config/index.js +7 -7
  4. package/esm/constant/index.d.ts +6 -1
  5. package/esm/constant/index.js +80 -3
  6. package/esm/core/bus/ability/callback.d.ts +9 -0
  7. package/esm/{foundation/service/api-bus → core/bus}/ability/callback.js +1 -1
  8. package/esm/core/bus/ability/globalData.d.ts +10 -0
  9. package/esm/{foundation/service/api-bus → core/bus}/ability/globalData.js +2 -2
  10. package/esm/{foundation/service/api-bus → core/bus}/ability/request.d.ts +1 -1
  11. package/esm/{foundation/service/api-bus → core/bus}/ability/request.js +2 -2
  12. package/esm/core/bus/ability/security.d.ts +10 -0
  13. package/esm/core/bus/ability/security.js +104 -0
  14. package/esm/core/bus/ability/tracker.d.ts +9 -0
  15. package/esm/core/bus/ability/tracker.js +77 -0
  16. package/esm/core/bus/index.d.ts +125 -0
  17. package/esm/core/bus/index.js +366 -0
  18. package/esm/core/component/address.d.ts +8 -0
  19. package/esm/core/component/address.js +72 -0
  20. package/esm/core/component/appPreloadProcessing.d.ts +1 -0
  21. package/esm/core/component/appPreloadProcessing.js +91 -0
  22. package/esm/core/component/ckp/index.d.ts +27 -0
  23. package/esm/core/component/ckp/index.js +166 -0
  24. package/esm/core/component/element/components/address.d.ts +19 -0
  25. package/esm/core/component/element/components/address.js +68 -0
  26. package/esm/core/component/element/components/auth.d.ts +17 -0
  27. package/esm/core/component/element/components/auth.js +59 -0
  28. package/esm/core/component/element/components/payment.d.ts +19 -0
  29. package/esm/core/component/element/components/payment.js +74 -0
  30. package/esm/core/component/element/element-mock.d.ts +2 -0
  31. package/esm/core/component/element/element-mock.js +263 -0
  32. package/esm/core/component/element/index.d.ts +47 -0
  33. package/esm/core/component/element/index.js +776 -0
  34. package/esm/core/component/element/mock.d.ts +3 -0
  35. package/esm/core/component/element/mock.js +1156 -0
  36. package/esm/core/component/element/type.d.ts +176 -0
  37. package/esm/core/component/element/type.js +34 -0
  38. package/esm/core/component/element/utils.d.ts +13 -0
  39. package/esm/core/component/element/utils.js +6 -0
  40. package/esm/core/component/index.d.ts +51 -0
  41. package/esm/core/component/index.js +535 -0
  42. package/esm/core/drop-in/index.d.ts +22 -0
  43. package/esm/core/drop-in/index.js +104 -0
  44. package/esm/core/instance/index.d.ts +89 -0
  45. package/esm/core/instance/index.js +500 -0
  46. package/esm/foundation/core/index.d.ts +3 -3
  47. package/esm/foundation/core/index.js +51 -114
  48. package/esm/foundation/index.d.ts +3 -5
  49. package/esm/foundation/product-processor/easysafepay/deps.d.ts +4 -7
  50. package/esm/foundation/product-processor/easysafepay/deps.js +2 -5
  51. package/esm/foundation/product-processor/easysafepay/index.d.ts +4 -5
  52. package/esm/foundation/product-processor/easysafepay/index.js +114 -174
  53. package/esm/foundation/service/container/index.js +5 -5
  54. package/esm/foundation/service/container/popup.js +1 -1
  55. package/esm/foundation/service/event-bus/ability/callback.js +55 -0
  56. package/esm/foundation/service/{api-bus → event-bus}/ability/globalData.d.ts +1 -1
  57. package/esm/foundation/service/event-bus/ability/globalData.js +89 -0
  58. package/esm/foundation/service/event-bus/ability/request.d.ts +10 -0
  59. package/esm/foundation/service/event-bus/ability/request.js +151 -0
  60. package/esm/foundation/service/{api-bus → event-bus}/ability/security.js +19 -29
  61. package/esm/foundation/service/{api-bus → event-bus}/ability/tracker.js +1 -1
  62. package/esm/foundation/service/{api-bus → event-bus}/busManager.js +1 -1
  63. package/esm/foundation/service/event-center.d.ts +5 -4
  64. package/esm/foundation/service/event-center.js +39 -8
  65. package/esm/foundation/service/global-data/index.js +5 -4
  66. package/esm/foundation/service/index.js +1 -1
  67. package/esm/foundation/service/requester/requester.js +11 -14
  68. package/esm/foundation/service/security/index.d.ts +7 -9
  69. package/esm/foundation/service/security/index.js +44 -113
  70. package/esm/foundation/utils/redirect_utils.js +8 -24
  71. package/esm/foundation/utils/web_app_url_utils.d.ts +2 -11
  72. package/esm/foundation/utils/web_app_url_utils.js +2 -17
  73. package/esm/index.d.ts +30 -1
  74. package/esm/index.js +147 -7
  75. package/esm/plugin/applepay/component.d.ts +50 -0
  76. package/esm/plugin/applepay/component.js +339 -0
  77. package/esm/plugin/applepay/index.d.ts +17 -0
  78. package/esm/plugin/applepay/index.js +117 -0
  79. package/esm/plugin/applepay/interface.d.ts +161 -0
  80. package/esm/plugin/applepay/interface.js +69 -0
  81. package/esm/plugin/applepay/service.d.ts +54 -0
  82. package/esm/plugin/applepay/service.js +289 -0
  83. package/esm/plugin/component/cashierApp.d.ts +36 -0
  84. package/esm/plugin/component/cashierApp.js +245 -0
  85. package/esm/{component → plugin/component}/channel.d.ts +2 -1
  86. package/esm/{component → plugin/component}/channel.js +37 -1
  87. package/esm/{component → plugin/component}/component.inline.style.d.ts +2 -2
  88. package/esm/{component → plugin/component}/component.inline.style.js +7 -6
  89. package/esm/{component → plugin/component}/component.popup.style.d.ts +1 -1
  90. package/esm/{component → plugin/component}/component.popup.style.js +4 -4
  91. package/esm/plugin/component/index.d.ts +126 -0
  92. package/esm/plugin/component/index.js +1862 -0
  93. package/esm/{component → plugin/component}/popupWindow.style.js +2 -2
  94. package/esm/plugin/const.d.ts +2 -0
  95. package/esm/plugin/const.js +33 -0
  96. package/esm/plugin/drop-in/index.d.ts +71 -0
  97. package/esm/plugin/drop-in/index.js +324 -0
  98. package/esm/plugin/payment-element/utils.d.ts +2 -0
  99. package/esm/plugin/payment-element/utils.js +7 -0
  100. package/esm/plugin/paypal/index.d.ts +20 -0
  101. package/esm/plugin/paypal/index.js +390 -0
  102. package/esm/plugin/type.d.ts +34 -0
  103. package/esm/plugin/type.js +1 -0
  104. package/esm/plugin/utils.d.ts +6 -0
  105. package/esm/plugin/utils.js +21 -0
  106. package/esm/service/element.d.ts +4 -0
  107. package/esm/service/element.js +51 -0
  108. package/esm/service/index.d.ts +1 -0
  109. package/esm/service/index.js +2 -0
  110. package/esm/types/index.d.ts +218 -22
  111. package/esm/types/index.js +47 -4
  112. package/esm/util/createIframeNode.d.ts +6 -0
  113. package/esm/util/createIframeNode.js +48 -0
  114. package/esm/util/getBackScheme.d.ts +2 -2
  115. package/esm/util/getBackScheme.js +2 -94
  116. package/esm/util/index.d.ts +11 -1
  117. package/esm/util/index.js +84 -4
  118. package/esm/util/intl-callapp/es/index.js +0 -1
  119. package/esm/util/ua/index.d.ts +2 -0
  120. package/esm/util/ua/index.js +2 -0
  121. package/esm/util/ua/isAndroid.d.ts +4 -0
  122. package/esm/util/ua/isAndroid.js +7 -0
  123. package/esm/util/ua/isIOS.d.ts +4 -0
  124. package/esm/util/ua/isIOS.js +7 -0
  125. package/package.json +2 -1
  126. package/esm/foundation/utils/payment_product_utils.d.ts +0 -13
  127. package/esm/foundation/utils/payment_product_utils.js +0 -38
  128. /package/esm/{foundation/service/api-bus → core/bus}/interface.d.ts +0 -0
  129. /package/esm/{foundation/service/api-bus → core/bus}/interface.js +0 -0
  130. /package/esm/foundation/service/{api-bus → event-bus}/ability/callback.d.ts +0 -0
  131. /package/esm/foundation/service/{api-bus → event-bus}/ability/security.d.ts +0 -0
  132. /package/esm/foundation/service/{api-bus → event-bus}/ability/tracker.d.ts +0 -0
  133. /package/esm/foundation/service/{api-bus → event-bus}/busManager.d.ts +0 -0
  134. /package/esm/foundation/service/{api-bus → event-bus}/index.d.ts +0 -0
  135. /package/esm/foundation/service/{api-bus → event-bus}/index.js +0 -0
  136. /package/esm/{component → plugin/component}/popupWindow.style.d.ts +0 -0
@@ -0,0 +1,263 @@
1
+ export var sdkAction = {
2
+ amountConfirmRequired: false,
3
+ autoDebitWithToken: false,
4
+ errorActions: {},
5
+ extendInfo: {},
6
+ links: {},
7
+ needInstallmentAbility: false,
8
+ needOtherElements: false,
9
+ openPopPaymentRetryAbility: 'Y',
10
+ orderAmount: {
11
+ amount: '288.86',
12
+ currency: 'USD',
13
+ currencyLabel: 'US $',
14
+ formattedAmount: '288.86',
15
+ formattedAmountWithCurrency: 'US $288.86',
16
+ value: '28886'
17
+ },
18
+ orderAmountView: {
19
+ currency: 'USD',
20
+ currencyDivider: ' ',
21
+ currencyLabel: '$',
22
+ currencySymbolPosition: 'L',
23
+ formattedValue: '288.86',
24
+ value: '288.86'
25
+ },
26
+ paymentAmount: {
27
+ amount: '288.86',
28
+ currency: 'USD',
29
+ currencyLabel: 'US $',
30
+ formattedAmount: '288.86',
31
+ formattedAmountWithCurrency: 'US $288.86',
32
+ value: '28886'
33
+ },
34
+ paymentAmountView: {
35
+ currency: 'USD',
36
+ currencyDivider: ' ',
37
+ currencyLabel: '$',
38
+ currencySymbolPosition: 'L',
39
+ formattedValue: '288.86',
40
+ value: '288.86'
41
+ },
42
+ paymentMethods: [{
43
+ antomPage: 'paymentMetaPage',
44
+ category: 'AC_WALLET',
45
+ expressCheckout: false,
46
+ icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/8c2df293-4ff8-4a1c-bd39-457c26937acb.svg',
47
+ iconName: 'Rabbit LINE Pay',
48
+ interActionType: 'SHOW_CODE',
49
+ paymentMethodName: 'Rabbit LINE Pay',
50
+ paymentMethodType: 'RABBIT_LINE_PAY',
51
+ recommend: false,
52
+ webRedirectType: 'PAGE_REFRESH'
53
+ }, {
54
+ antomPage: 'paymentMetaPage',
55
+ category: 'AC_WALLET',
56
+ expressCheckout: false,
57
+ icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/72aa8973-7638-4f3f-b657-7af0ae02e6cf.svg',
58
+ iconName: 'BPI',
59
+ interActionType: 'SHOW_CODE',
60
+ paymentMethodName: 'BPI',
61
+ paymentMethodType: 'BPI',
62
+ recommend: false,
63
+ webRedirectType: 'PAGE_REFRESH'
64
+ }, {
65
+ antomPage: 'paymentMetaPage',
66
+ category: 'AC_WALLET',
67
+ expressCheckout: true,
68
+ icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/5b829130-42d9-46e7-a23d-6774f7352900.svg',
69
+ iconName: 'Alipay',
70
+ interActionType: 'SHOW_CODE',
71
+ paymentMethodName: 'Alipay',
72
+ paymentMethodType: 'ALIPAY_CN',
73
+ recommend: false,
74
+ webRedirectType: 'PAGE_REFRESH'
75
+ }, {
76
+ antomPage: 'paymentMetaPage',
77
+ category: 'AC_WALLET',
78
+ expressCheckout: false,
79
+ icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/ed012d1a-06c4-4606-a493-0d81ead685b6.svg',
80
+ iconName: 'Akulaku PayLater',
81
+ interActionType: 'SHOW_CODE',
82
+ paymentMethodName: 'Akulaku PayLater PH',
83
+ paymentMethodType: 'AKULAKU_PAYLATER_PH',
84
+ recommend: false,
85
+ webRedirectType: 'PAGE_REFRESH'
86
+ }, {
87
+ antomPage: 'paymentMetaPage',
88
+ category: 'AC_WALLET',
89
+ expressCheckout: false,
90
+ icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/ed012d1a-06c4-4606-a493-0d81ead685b6.svg',
91
+ iconName: 'Akulaku PayLater',
92
+ interActionType: 'SHOW_CODE',
93
+ paymentMethodName: 'Akulaku PayLater',
94
+ paymentMethodType: 'AKULAKU_PAYLATER',
95
+ recommend: false,
96
+ webRedirectType: 'PAGE_REFRESH'
97
+ }, {
98
+ antomPage: 'paymentMetaPage',
99
+ category: 'AC_WALLET',
100
+ expressCheckout: false,
101
+ icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/fcf9ba5e-b2b4-4c33-a041-f21bcf1539e4.svg',
102
+ iconName: 'BillEase',
103
+ interActionType: 'SHOW_CODE',
104
+ paymentMethodName: 'BILLEASE',
105
+ paymentMethodType: 'BILLEASE',
106
+ recommend: false,
107
+ webRedirectType: 'PAGE_REFRESH'
108
+ }, {
109
+ antomPage: 'paymentMetaPage',
110
+ category: 'AC_WALLET',
111
+ expressCheckout: false,
112
+ icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/dfcedf07-3135-49b6-9e39-6ab89b5ba5a1.svg',
113
+ iconName: 'Kredivo',
114
+ interActionType: 'SHOW_CODE',
115
+ paymentMethodName: 'KREDIVO',
116
+ paymentMethodType: 'KREDIVO_ID',
117
+ recommend: false,
118
+ webRedirectType: 'PAGE_REFRESH'
119
+ }, {
120
+ antomPage: 'paymentMetaPage',
121
+ category: 'AC_WALLET',
122
+ expressCheckout: false,
123
+ icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/6c7baedf-cb9e-47b1-8c2e-d2477b0d3018.svg',
124
+ iconName: 'Toss Pay',
125
+ interActionType: 'SHOW_CODE',
126
+ paymentMethodName: 'Toss Pay',
127
+ paymentMethodType: 'TOSSPAY',
128
+ recommend: false,
129
+ webRedirectType: 'PAGE_REFRESH'
130
+ }, {
131
+ antomPage: 'paymentMetaPage',
132
+ category: 'AC_WALLET',
133
+ expressCheckout: false,
134
+ icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/89c1063e-c7d3-4b60-82a0-6e4c40426612.svg',
135
+ iconName: 'Kakao Pay',
136
+ interActionType: 'SHOW_CODE',
137
+ paymentMethodName: 'KAKAOPAY',
138
+ paymentMethodType: 'KAKAOPAY',
139
+ recommend: false,
140
+ webRedirectType: 'PAGE_REFRESH'
141
+ }, {
142
+ antomPage: 'paymentMetaPage',
143
+ category: 'AC_WALLET',
144
+ expressCheckout: false,
145
+ icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/46ac203c-21fd-4feb-80c6-fd19faf1a9b7.svg',
146
+ iconName: 'GCash',
147
+ interActionType: 'SHOW_CODE',
148
+ paymentMethodName: 'GCash',
149
+ paymentMethodType: 'GCASH',
150
+ recommend: false,
151
+ webRedirectType: 'PAGE_REFRESH'
152
+ }, {
153
+ antomPage: 'paymentMetaPage',
154
+ category: 'AC_WALLET',
155
+ expressCheckout: false,
156
+ icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/8409ec96-3153-4d31-9bcb-a6b60f6ce11f.svg',
157
+ iconName: 'Boost',
158
+ interActionType: 'SHOW_CODE',
159
+ paymentMethodName: 'Boost',
160
+ paymentMethodType: 'BOOST',
161
+ recommend: false,
162
+ webRedirectType: 'PAGE_REFRESH'
163
+ }, {
164
+ antomPage: 'paymentMetaPage',
165
+ category: 'AC_WALLET',
166
+ expressCheckout: false,
167
+ icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/dd81e7d9-d845-434e-95b8-87b726d44aa4.svg',
168
+ iconName: 'DOKU',
169
+ interActionType: 'SHOW_CODE',
170
+ paymentMethodName: 'DOKU',
171
+ paymentMethodType: 'DOKU',
172
+ recommend: false,
173
+ webRedirectType: 'PAGE_REFRESH'
174
+ }, {
175
+ antomPage: 'paymentMetaPage',
176
+ category: 'AC_WALLET',
177
+ expressCheckout: false,
178
+ icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/2ec693a8-2c42-4efe-8acd-efdeeabd3210.svg',
179
+ iconName: 'K PLUS',
180
+ interActionType: 'SHOW_CODE',
181
+ paymentMethodName: 'KPLUS',
182
+ paymentMethodType: 'KPLUS',
183
+ recommend: false,
184
+ webRedirectType: 'PAGE_REFRESH'
185
+ }, {
186
+ antomPage: 'paymentMetaPage',
187
+ category: 'AC_WALLET',
188
+ expressCheckout: false,
189
+ icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/82288753-bc33-4f4c-9c07-e54c5da5c8f8.svg',
190
+ iconName: "Touch'n Go eWallet",
191
+ interActionType: 'SHOW_CODE',
192
+ paymentMethodName: 'TNG',
193
+ paymentMethodType: 'TNG',
194
+ recommend: false,
195
+ webRedirectType: 'PAGE_REFRESH'
196
+ }, {
197
+ antomPage: 'paymentMetaPage',
198
+ category: 'AC_WALLET',
199
+ expressCheckout: false,
200
+ icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/db94babb-71db-42c4-80be-a65de641631a.svg',
201
+ iconName: 'NAVER Pay',
202
+ interActionType: 'SHOW_CODE',
203
+ paymentMethodName: 'NAVER Pay',
204
+ paymentMethodType: 'NAVERPAY',
205
+ recommend: false,
206
+ webRedirectType: 'PAGE_REFRESH'
207
+ }, {
208
+ antomPage: 'paymentMetaPage',
209
+ category: 'AC_WALLET',
210
+ expressCheckout: false,
211
+ icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/5b1ec246-b49f-4390-b356-3af2af5acf09.svg',
212
+ iconName: 'TrueMoney',
213
+ interActionType: 'SHOW_CODE',
214
+ paymentMethodName: 'TrueMoney Wallet',
215
+ paymentMethodType: 'TRUEMONEY',
216
+ recommend: false,
217
+ webRedirectType: 'PAGE_REFRESH'
218
+ }, {
219
+ antomPage: 'paymentMetaPage',
220
+ category: 'AC_WALLET',
221
+ expressCheckout: false,
222
+ icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/97dbcec8-7bdd-464b-b49a-5d9af6d98c0b.svg',
223
+ iconName: 'AlipayHK',
224
+ interActionType: 'SHOW_CODE',
225
+ paymentMethodName: 'ALIPAY_HK',
226
+ paymentMethodType: 'ALIPAY_HK',
227
+ recommend: false,
228
+ webRedirectType: 'PAGE_REFRESH'
229
+ }, {
230
+ antomPage: 'paymentMetaPage',
231
+ category: 'AC_WALLET',
232
+ expressCheckout: false,
233
+ icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/6148dd94-9d28-43d5-9073-c99bfb8e7ace.svg',
234
+ iconName: 'DANA',
235
+ interActionType: 'SHOW_CODE',
236
+ paymentMethodName: 'DANA',
237
+ paymentMethodType: 'DANA',
238
+ recommend: false,
239
+ webRedirectType: 'PAGE_REFRESH'
240
+ }],
241
+ redirectUrl: 'https://www.baidu.com',
242
+ savedPaymentMethods: [],
243
+ success: true
244
+ };
245
+ export var oneAccount = {
246
+ accountInfo: {
247
+ accountStatus: 'EFFECTIVE',
248
+ email: 'like.xh@antgroup.com'
249
+ },
250
+ actionForm: {
251
+ challengeAutoTriggered: false,
252
+ challengeRetrySupported: true,
253
+ challengeType: 'EMAIL_OTP',
254
+ estimatedDuration: 0,
255
+ resendLeftTimes: 0,
256
+ verifyId: 'q4gtI6ONJab5bnuGyf5f0gm4D2AyXfKh'
257
+ },
258
+ errorActions: {},
259
+ extendInfo: {},
260
+ paymentMethods: [],
261
+ shippings: [],
262
+ success: true
263
+ };
@@ -0,0 +1,47 @@
1
+ import { IElementOptions } from '../../../types';
2
+ import type { AddressMountOptions, AddressMountResult, LinkAuthMountOptions, LinkAuthMountResult, PaymentMountOptions, PaymentMountResult } from './type';
3
+ export declare class ElementComponent {
4
+ private parseData;
5
+ private loading;
6
+ private sessionData;
7
+ private elementContainer;
8
+ private authBase;
9
+ private addressBase;
10
+ private paymentBase;
11
+ private _options;
12
+ private eventService;
13
+ private requestService;
14
+ private sdkActionRes;
15
+ private oneAccountRes;
16
+ private launchSource;
17
+ private isConnect;
18
+ private iframeSrc;
19
+ private mountOptions;
20
+ private iframes;
21
+ private componentsCount;
22
+ private eventCallback;
23
+ constructor(options: IElementOptions);
24
+ private createElement;
25
+ private createIframeSrc;
26
+ private addListener;
27
+ private launchFunc;
28
+ private showIframe;
29
+ private afterInit;
30
+ private sendRenderData;
31
+ private removeListener;
32
+ private registerEventListener;
33
+ private mountAuth;
34
+ private mountAddress;
35
+ private mountPayment;
36
+ mount(renderOptions: AddressMountOptions, sdkSelector: string): AddressMountResult;
37
+ mount(renderOptions: PaymentMountOptions, sdkSelector: string): PaymentMountResult;
38
+ mount(renderOptions: LinkAuthMountOptions, sdkSelector: string): LinkAuthMountResult;
39
+ private removeIframe;
40
+ unmount(): void;
41
+ private onAfterSubmitFunc;
42
+ private onSubmitRiskFunc;
43
+ private onSubmit;
44
+ private onValidateFunc;
45
+ private validatePromiseFuncs;
46
+ submitPayment(): Promise<void>;
47
+ }