@alipay/ams-checkout 0.0.1744283958-dev.0 → 0.0.1744283958-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.
@@ -1,4 +1,10 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
6
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
7
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2
8
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3
9
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
4
10
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
@@ -11,6 +17,7 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) ===
11
17
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
12
18
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
13
19
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
20
+ import { parseSessionData } from "../../index";
14
21
  import PackageJson from "../../../../../package.json";
15
22
  import { generateIframeSrc as _generateIframeSrc } from "../util";
16
23
  import BaseElementProcessor from "./baseElementProcessor";
@@ -24,572 +31,10 @@ var AuthProcessor = /*#__PURE__*/function (_BaseElementProcessor) {
24
31
  _createClass(AuthProcessor, [{
25
32
  key: "onReady",
26
33
  value: function onReady(extraParam) {
27
- var _this$elementContaine, _this$elementContaine2, _this$elementContaine3;
28
34
  this.eventCenter.dispatchToApp({
29
35
  event: 'renderComponent',
30
36
  data: {
31
- params: {
32
- heightOfVisible: Math.max(window.changingPageHeight, window.innerHeight),
33
- paymentSessionData: (_this$elementContaine = this.elementContainer.getPaymentContext()) === null || _this$elementContaine === void 0 ? void 0 : _this$elementContaine.paymentSessionId,
34
- queryResult: extraParam.queryResult,
35
- originActionQueryResult: {
36
- amountConfirmRequired: false,
37
- autoDebitWithToken: false,
38
- checkoutSettings: '{\n "addressAutoComplete": true,\n "publicDetail": {\n "legalBusinessName": "Lazada Group",\n "businessName": "Lazada"\n },\n "paymentSettings": {\n "displayExpressCheckout": true,\n "allowPromotion": true,\n "collectCustomerEmail": true,\n "collectCustomerPhoneNo": true,\n "collectShippingPhoneNo": true,\n "collectShippingName": true,\n "displayAntomLogo": true,\n "displayLanguage": true,\n "defaultLanguage": "en_US",\n "redirectToMerchant": true,\n "paymentRedirectUrl": "https://www.baidu.com",\n "customFields": [\n {\n "labelType": "DROPDOWN",\n "labelName": "How did you hear about us?",\n "minLength": 0,\n "maxLength": 255,\n "labelCondition": "REQUIRED",\n "options": [\n "Search engine (Google, Bing, etc.)",\n "Social media",\n "Word of Mouth"\n ],\n "picLink": "http://100.88.104.107:8081/download?bucketName=ipay-ipaycrm-attachment&key=20240409009064IMHaa2545f192c99a8481deaecd9b8ea5ad_2tiZTpB3_20240402143510.jpg&expires=2028172654&accessKeyId=FM49eWrrO8EFqUO4&signature=rnLBSUx4M1I1zPWuZLqInjP79u4%3D&signatureType=OBJECT",\n "picTitle": "picTitle",\n "picTip": "picTip"\n }\n ]\n },\n "displaySettings": {\n "iconUrl": "https://cdn.marmot-cloud.com/storage/2022/8/2/bc7cb991-c8e2-4379-945f-aadae2bdf932.svg",\n "logoUrl": "https://cdn.marmot-cloud.com/storage/2022/9/26/dfd471f3-da7d-4ef1-8486-cfa4301045c6.svg",\n "useLogo": true,\n "themeType": "LIGHT",\n "backgroundColor": "#ffffff",\n "accentColor": "#ffffff",\n "font": "POPPINS",\n "shape": "ROUNDED",\n "displayLayout": "LEFT_ORDER_AND_RIGHT_PAYMENT"\n }\n }',
39
- errorActions: {},
40
- extendInfo: {},
41
- goods: [{
42
- goodsName: 'Goods No.1',
43
- goodsQuantity: '1',
44
- goodsTotalAmount: {
45
- amount: '200.00',
46
- currency: 'PEN',
47
- currencyLabel: 'S/.',
48
- formattedAmount: '200.00',
49
- formattedAmountWithCurrency: 'S/. 200.00',
50
- value: '20000'
51
- },
52
- goodsTotalAmountView: {
53
- currency: 'PEN',
54
- currencyDivider: ' ',
55
- currencyLabel: 'S/.',
56
- currencySymbolPosition: 'L',
57
- formattedValue: '200.00',
58
- value: '200.00'
59
- },
60
- goodsUnitAmount: {
61
- amount: '200.00',
62
- currency: 'PEN',
63
- currencyLabel: 'S/.',
64
- formattedAmount: '200.00',
65
- formattedAmountWithCurrency: 'S/. 200.00',
66
- value: '20000'
67
- },
68
- goodsUnitAmountView: {
69
- currency: 'PEN',
70
- currencyDivider: ' ',
71
- currencyLabel: 'S/.',
72
- currencySymbolPosition: 'L',
73
- formattedValue: '200.00',
74
- value: '200.00'
75
- },
76
- referenceGoodsId: 'amsdm_good_tony_c_20230227_095825_922'
77
- }, {
78
- goodsName: 'Goods No.2',
79
- goodsQuantity: '2',
80
- goodsTotalAmount: {
81
- amount: '40000',
82
- currency: 'KRW',
83
- currencyLabel: '₩',
84
- formattedAmount: '40,000',
85
- formattedAmountWithCurrency: '₩ 40,000',
86
- value: '40000'
87
- },
88
- goodsTotalAmountView: {
89
- currency: 'KRW',
90
- currencyDivider: ' ',
91
- currencyLabel: '₩',
92
- currencySymbolPosition: 'L',
93
- formattedValue: '40,000',
94
- value: '40000'
95
- },
96
- goodsUnitAmount: {
97
- amount: '20000',
98
- currency: 'KRW',
99
- currencyLabel: '₩',
100
- formattedAmount: '20,000',
101
- formattedAmountWithCurrency: '₩ 20,000',
102
- value: '20000'
103
- },
104
- goodsUnitAmountView: {
105
- currency: 'KRW',
106
- currencyDivider: ' ',
107
- currencyLabel: '₩',
108
- currencySymbolPosition: 'L',
109
- formattedValue: '20,000',
110
- value: '20000'
111
- },
112
- referenceGoodsId: 'amsdm_good_tony_c_20230227_095825_922'
113
- }],
114
- links: {
115
- policyInfo: '["{\\"title\\":\\"CheckoutPaymentLegal\\",\\"content\\":[{\\"title\\":\\"CheckoutPaymentLegal\\",\\"content\\":\\"<p>hello<a href=\\\\\\"https://www.baidu.com/\\\\\\"target=\\\\\\"_blank\\\\\\">world</a></p><ol><li>123123123</li><li>123123123123</li></ol>\\"}]}"]',
116
- privacyLink: 'https://render.alipay.com/p/c/180021490000000150/index.html?agreementId=GL00100002',
117
- cookieLink: 'https://render.alipay.com/p/c/180021490000000147/index.html?agreementId=GL00100001'
118
- },
119
- needInstallmentAbility: true,
120
- needOtherElements: true,
121
- orderAmount: {
122
- amount: '200.00',
123
- currency: 'BRL',
124
- currencyLabel: 'R$',
125
- formattedAmount: '200,00',
126
- formattedAmountWithCurrency: 'R$ 200,00',
127
- value: '20000'
128
- },
129
- orderAmountView: {
130
- currency: 'BRL',
131
- currencyDivider: ' ',
132
- currencyLabel: 'R$',
133
- currencySymbolPosition: 'L',
134
- formattedValue: '200.00',
135
- value: '200.00'
136
- },
137
- pageStyle: {
138
- checkoutSettings: '{"addressAutoComplete":false}'
139
- },
140
- paymentAmount: {
141
- amount: '200.00',
142
- currency: 'BRL',
143
- currencyLabel: 'R$',
144
- formattedAmount: '200,00',
145
- formattedAmountWithCurrency: 'R$ 100,00',
146
- value: '20000'
147
- },
148
- paymentAmountView: {
149
- currency: 'BRL',
150
- currencyDivider: ' ',
151
- currencyLabel: 'R$',
152
- currencySymbolPosition: 'L',
153
- formattedValue: '300.01',
154
- value: '200.00'
155
- },
156
- paymentMethods: [{
157
- antomPage: 'paymentMetaPage',
158
- category: 'CARD',
159
- expressCheckout: false,
160
- iconName: 'Korea-issued cards',
161
- interActionType: 'REDIRECT',
162
- paymentElements: [{
163
- elementMandatory: true,
164
- elementRegx: '',
165
- elementType: 'GRIDLIST',
166
- extendInfo: '{"bankInfos":"[{\\"bankIdentifierCode\\":\\"SHINHAN\\",\\"bankShortName\\":\\"Shinhan Card\\",\\"logoUrl\\":\\"https://cdn.marmot-cloud.com/storage/2024/3/25/cc7d86e1-52a2-4255-8b31-1bc03b81a7af.svg\\"},{\\"bankIdentifierCode\\":\\"HYUNDAI\\",\\"bankShortName\\":\\"Hyundai Card\\",\\"logoUrl\\":\\"https://cdn.marmot-cloud.com/storage/2024/3/25/63dcffa5-245b-430a-ae33-d62ad75e5711.svg\\"},{\\"bankIdentifierCode\\":\\"SAMSUNG\\",\\"bankShortName\\":\\"Samsung Card\\",\\"logoUrl\\":\\"https://cdn.marmot-cloud.com/storage/2024/3/25/c41055c3-f0a7-4db9-9243-013383df9340.svg\\"},{\\"bankIdentifierCode\\":\\"LOTTE\\",\\"bankShortName\\":\\"Lotte Card\\",\\"logoUrl\\":\\"https://cdn.marmot-cloud.com/storage/2024/3/25/e818f9d8-d75e-4d61-bd40-00b7b1c3b0a3.svg\\"},{\\"bankIdentifierCode\\":\\"KEBHANA\\",\\"bankShortName\\":\\"Hana Card\\",\\"logoUrl\\":\\"https://cdn.marmot-cloud.com/storage/2024/3/25/882f5e88-2796-4afa-8908-885c9a7dc595.svg\\"},{\\"bankIdentifierCode\\":\\"KOOKMIN\\",\\"bankShortName\\":\\"KB Kookmin Card\\",\\"logoUrl\\":\\"https://cdn.marmot-cloud.com/storage/2024/3/25/ce1a7c17-2b7e-4b2f-9a3e-fd5cf01b0b1f.svg\\"},{\\"bankIdentifierCode\\":\\"BC\\",\\"bankShortName\\":\\"BC Card\\",\\"logoUrl\\":\\"https://cdn.marmot-cloud.com/storage/2024/3/25/5e1cb58f-905c-4e0e-90cf-1de3acbc233f.svg\\"},{\\"bankIdentifierCode\\":\\"NONGHYUP\\",\\"bankShortName\\":\\"NH Nonghyup Card\\",\\"logoUrl\\":\\"https://cdn.marmot-cloud.com/storage/2024/3/25/32836da3-9311-412d-b549-144d96bff159.svg\\"},{\\"bankIdentifierCode\\":\\"WOORI\\",\\"bankShortName\\":\\"Woori Card\\",\\"logoUrl\\":\\"https://cdn.marmot-cloud.com/storage/2024/3/25/f0dccb26-e92f-4ae1-9f42-753e2b5a9bb6.svg\\"},{\\"bankIdentifierCode\\":\\"CITI\\",\\"bankShortName\\":\\"Citi Card\\",\\"logoUrl\\":\\"https://cdn.marmot-cloud.com/storage/2024/3/25/d21b6905-ed61-414e-9c38-b0694b41600d.svg\\"},{\\"bankIdentifierCode\\":\\"GWANGJUBANK\\",\\"bankShortName\\":\\"Gwangju Bank\\",\\"logoUrl\\":\\"https://cdn.marmot-cloud.com/storage/2024/3/25/606303b9-a9fe-4f6d-98c5-9776bde85a44.svg\\"},{\\"bankIdentifierCode\\":\\"IBK_BC\\",\\"bankShortName\\":\\"IBK B.C.\\",\\"logoUrl\\":\\"https://cdn.marmot-cloud.com/storage/2024/3/25/0f2fdea0-77de-4e32-98af-db31cc81a1cc.svg\\"},{\\"bankIdentifierCode\\":\\"JEJUBANK\\",\\"bankShortName\\":\\"Jeju Bank\\",\\"logoUrl\\":\\"https://cdn.marmot-cloud.com/storage/2024/3/25/f9e65ee6-32db-465c-8e7f-c0a8d41d2533.svg\\"},{\\"bankIdentifierCode\\":\\"JEONBUKBANK\\",\\"bankShortName\\":\\"Jeonbuk Bank\\",\\"logoUrl\\":\\"https://cdn.marmot-cloud.com/storage/2024/3/25/606303b9-a9fe-4f6d-98c5-9776bde85a44.svg\\"},{\\"bankIdentifierCode\\":\\"KAKAOBANK\\",\\"bankShortName\\":\\"Kakao Bank\\",\\"logoUrl\\":\\"https://cdn.marmot-cloud.com/storage/2024/3/25/04181480-8c1b-4f23-a48c-3961ee8ffaaf.svg\\"},{\\"bankIdentifierCode\\":\\"KBANK\\",\\"bankShortName\\":\\"K Bank\\",\\"logoUrl\\":\\"https://cdn.marmot-cloud.com/storage/2024/3/25/17e5a9e7-be82-4298-bcef-7d53e7003e52.svg\\"},{\\"bankIdentifierCode\\":\\"KDBBANK\\",\\"bankShortName\\":\\"KDB Industrial Bank\\",\\"logoUrl\\":\\"https://cdn.marmot-cloud.com/storage/2024/3/25/7fd82e48-e90b-4e95-9008-ead244757c8d.svg\\"},{\\"bankIdentifierCode\\":\\"POST\\",\\"bankShortName\\":\\"Post office deposit insurance\\",\\"logoUrl\\":\\"https://cdn.marmot-cloud.com/storage/2024/3/25/36f3effa-f895-4349-b723-060337cb3735.svg\\"},{\\"bankIdentifierCode\\":\\"SAEMAUL\\",\\"bankShortName\\":\\"Saemaeul Geumgo\\",\\"logoUrl\\":\\"https://cdn.marmot-cloud.com/storage/2024/3/25/ba1c9708-fa1a-4146-914d-08ed896ec1fa.svg\\"},{\\"bankIdentifierCode\\":\\"SAVINGBANK\\",\\"bankShortName\\":\\"Korea Federation of Savings Banks\\",\\"logoUrl\\":\\" https://cdn.marmot-cloud.com/storage/2024/3/25/fd1fc3a0-2609-4410-9d9b-b693d30d895b.svg\\"},{\\"bankIdentifierCode\\":\\"SHINHYEOP\\",\\"bankShortName\\":\\"Shinhyeop\\",\\"logoUrl\\":\\"https://cdn.marmot-cloud.com/storage/2024/3/25/5d2a734e-7db8-41b3-96ef-57dec4044728.svg\\"},{\\"bankIdentifierCode\\":\\"SUHYEOP\\",\\"bankShortName\\":\\"SH Suhyup Bank\\",\\"logoUrl\\":\\"https://cdn.marmot-cloud.com/storage/2024/3/25/9d5030de-77ed-4383-be19-fc0a31e5f43e.svg\\"},{\\"bankIdentifierCode\\":\\"TOSSBANK\\",\\"bankShortName\\":\\"Toss Bank\\",\\"logoUrl\\":\\"https://cdn.marmot-cloud.com/storage/2024/3/25/55138fc5-7fb2-4985-92a5-0fb5c623a4ee.svg\\"}]"}',
167
- paramIllegalText: 'paymentElement.selectedCardBrand.paramIllegalText',
168
- paymentElementKey: 'selectedCardBrand',
169
- title: 'Please select your card',
170
- validateFunction: ''
171
- }],
172
- paymentMethod: 'CARD',
173
- paymentMethodDetail: {
174
- requireIssuerAuthentication: 'true'
175
- },
176
- paymentMethodName: 'Korea-issued cards',
177
- paymentMethodType: 'CARD',
178
- recommend: false,
179
- webRedirectType: 'PAGE_REFRESH'
180
- }, {
181
- antomPage: 'paymentMetaPage',
182
- category: 'AC_WALLET',
183
- icon: 'https://gw.alipay.com/icon/medium/default/BPI.svg',
184
- iconName: 'STARTaaaaaaaaaaaasssssssssssssssssssssssssssssssssss aEND',
185
- paymentMethodName: 'BPI',
186
- paymentMethodType: 'BPI',
187
- webRedirectType: 'PAGE_REFRESH'
188
- }, {
189
- antomPage: 'paymentMetaPage',
190
- category: 'CARD',
191
- icon: 'https://gw.alipay.com/icon/medium/default/ALIPAY_GENERAL_CARD.svg',
192
- iconName: 'Card',
193
- links: [],
194
- logoList: [{
195
- cardBrand: 'CARTEBANCAIRE',
196
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2022/8/2/7a0284b0-7577-493b-bc96-6809ec2f7f79.svg'
197
- }, {
198
- cardBrand: 'KEBHANA',
199
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2022/12/20/eeea7ad9-9519-4496-b8bf-7ce37b9e4bcd.svg'
200
- }, {
201
- cardBrand: 'BC',
202
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2022/12/20/a0b5af56-4c94-4f77-afb4-ab99a17f3662.svg'
203
- }, {
204
- cardBrand: 'WOORI',
205
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2024/2/21/f938a4e5-c98f-4dd2-9d65-609ccf941b02.svg'
206
- }, {
207
- cardBrand: 'SAEMAUL',
208
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2024/2/23/3b3e34e5-64bd-4383-9581-8746d2ddf4b6.svg'
209
- }, {
210
- cardBrand: 'SUHYEOP',
211
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2024/2/21/d56b2ef3-e621-4f8a-806c-33a8f588098b.svg'
212
- }, {
213
- cardBrand: 'CITI',
214
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2024/2/21/f2012f5c-f70a-4c29-8014-650cc6e99866.svg'
215
- }, {
216
- cardBrand: 'POST',
217
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2024/2/21/1f40d189-9734-48bf-9e78-8a2f0a5ee1ee.svg'
218
- }, {
219
- cardBrand: 'NONGHYUP',
220
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2022/12/20/55669b6f-32ef-4f51-8b4c-bcab176ac1c9.svg'
221
- },
222
- // {
223
- // "cardBrand": "CARTEBANCAIRE",
224
- // "logoUrl": "https://cdn.marmot-cloud.com/storage/2024/2/21/324d43f9-ad33-4175-b502-2afc91c3d03e.svg"
225
- // },
226
- // {
227
- // "cardBrand": "KOOKMIN",
228
- // "logoUrl": "https://cdn.marmot-cloud.com/storage/2022/12/20/70d57e24-1a03-4958-8999-c3e14f2fceb6.svg"
229
- // },
230
- // {
231
- // "cardBrand": "SAMSUNG",
232
- // "logoUrl": "https://cdn.marmot-cloud.com/storage/2022/12/20/0c4725d6-b199-495f-b214-b1a42a5e63b0.svg"
233
- // },
234
- {
235
- cardBrand: 'VISA',
236
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2022/12/20/2f5ad379-619a-462f-989f-6b60bd8e2fc8.svg'
237
- }],
238
- paymentElements: [{
239
- paymentElementKey: 'paymentMethodId',
240
- elementType: 'CARD',
241
- elementMandatory: false,
242
- title: 'Card Information',
243
- defaultValue: '',
244
- extendInfo: '{"needOtherElements":true,"isTempTokenization":"true"}',
245
- subPaymentElementView: [{
246
- defaultText: 'Card Number',
247
- defaultValue: '',
248
- elementMandatory: true,
249
- elementRegx: '^\\d{14,19}$',
250
- elementType: 'DIGIT_18',
251
- extendInfo: '{"completeKey":"cc-number"}',
252
- paramIllegalText: 'Please enter a valid 14-19 digit card number',
253
- paymentElementKey: 'cardNo',
254
- title: 'Please enter Card number',
255
- validateFunction: '^\\d{14,19}$'
256
- }, {
257
- defaultText: 'Exp date(MM/YY)',
258
- defaultValue: '34',
259
- elementMandatory: true,
260
- elementType: 'DIGIT_4',
261
- extendInfo: '{"completeKey":"cc-exp"}',
262
- isPart: 'true',
263
- paramIllegalText: 'Please enter a valid expiry date',
264
- paymentElementKey: 'expiryYear'
265
- }, {
266
- defaultText: 'Exp date(MM/YY)',
267
- defaultValue: '09',
268
- elementMandatory: true,
269
- elementType: 'DIGIT_4',
270
- extendInfo: '{"completeKey":"cc-exp"}',
271
- isPart: 'true',
272
- paramIllegalText: 'Please enter a valid expiry date',
273
- paymentElementKey: 'expiryMonth'
274
- }, {
275
- defaultText: 'CVV',
276
- defaultValue: '',
277
- elementMandatory: true,
278
- elementRegx: '^\\d{3,4}$',
279
- elementType: 'DIGIT_4',
280
- extendInfo: '{"excludeMetaDataCodes":"null"}',
281
- paramIllegalText: 'Please enter a valid 3 or 4 digit CVV number',
282
- paymentElementKey: 'cardCVV'
283
- }, {
284
- defaultText: 'Name on Card',
285
- elementMandatory: true,
286
- elementRegx: '',
287
- elementType: 'TEXT',
288
- paramIllegalText: 'Please enter a Name on Card',
289
- paymentElementKey: 'cardHolderName',
290
- defaultValue: '{"firstName":"kk", "lastName":"kkg"}',
291
- extendInfo: '{"excludeMetaDataCodes":"null","completeKey":"cc-name"}'
292
- }]
293
- }, {
294
- defaultText: '_ _ _. _ _ _. _ _ _-_ _',
295
- defaultValue: '',
296
- elementMandatory: true,
297
- elementRegx: '^\\d{11}$',
298
- elementType: 'DIGIT_11',
299
- extendInfo: '{"customerId":"r35fPjeD0IhNOJrciVqCq10AKiD/uxk8rzaySdJM4tI=","merchantId":"188r35fPjeD0IhNOJrciVqCq10AKiD/uxk8rzaySdJM4tI=","needVerify":"true"}',
300
- paramIllegalText: 'Please enter a valid 11-digit CPF number',
301
- paymentElementKey: 'cpf',
302
- title: 'CPF Code'
303
- }],
304
- paymentMethod: 'CARD',
305
- paymentMethodName: 'Card',
306
- paymentMethodType: 'CARD',
307
- recommend: true,
308
- webRedirectType: 'PAGE_REFRESH'
309
- }, {
310
- antomPage: 'paymentMetaPage',
311
- category: 'VA',
312
- icon: 'https://gw.alipay.com/antom/icon/medium/default/blik.svg',
313
- iconName: 'BLIK',
314
- paymentElements: [{
315
- defaultText: '6 digit code',
316
- elementMandatory: true,
317
- elementRegx: '^\\d{6}$',
318
- elementType: 'DIGIT_6',
319
- paramIllegalText: 'Invalid Blik code format,Please check again',
320
- paymentElementKey: 'blikCode',
321
- title: 'Please fill in your Blik code'
322
- }],
323
- paymentMethod: 'BLIK',
324
- paymentMethodType: 'BLIK',
325
- redirectUrl: 'http://gol.alipay.net:8080/amsdemo/result?paymentRequestId=amsdmpay_wty01345475_20221011_134401_401'
326
- }, {
327
- antomPage: 'paymentMetaPage',
328
- bankInfoList: [{
329
- bankIdentifierCode: 'MYM2U',
330
- bankShortName: 'Maybank',
331
- logoUrl: ''
332
- }, {
333
- bankIdentifierCode: 'MYBISM',
334
- bankShortName: 'Bank Islam',
335
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2023/2/10/881df369-a2ff-4323-8b9a-cae80cff73ee.svg'
336
- }, {
337
- bankIdentifierCode: 'MYRHB',
338
- bankShortName: 'RHB Bank',
339
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2023/2/10/84826379-a593-4fce-b042-c2f77f13bada.svg'
340
- }, {
341
- bankIdentifierCode: 'MYHLB',
342
- bankShortName: 'Hong Leong Bank',
343
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2023/2/10/3b1bc55d-bec0-4623-bb7c-df5e517727d9.svg'
344
- }, {
345
- bankIdentifierCode: 'MYCIMBCLICKS',
346
- bankShortName: 'CIMB Bank',
347
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2023/2/10/8084e131-e11b-4a9c-9156-7e4adc03f67f.svg'
348
- }, {
349
- bankIdentifierCode: 'MYAMB',
350
- bankShortName: 'AmBank',
351
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2023/2/10/5e0970c9-8dc0-4c99-896a-2516168b3c7b.svg'
352
- }, {
353
- bankIdentifierCode: 'MYPBB',
354
- bankShortName: 'Public Bank',
355
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2023/2/10/34dd0e45-827b-45f9-835d-4e1cb04fab00.svg'
356
- }, {
357
- bankIdentifierCode: 'MYABB',
358
- bankShortName: 'Affin Bank',
359
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2023/2/10/9e8a2542-6bba-4b6e-bab3-737b3af227af.svg'
360
- }, {
361
- bankIdentifierCode: 'MYAGB',
362
- bankShortName: 'Agro Bank',
363
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2023/2/10/41edf690-c228-4021-91c8-6e284e9d1b97.svg'
364
- }, {
365
- bankIdentifierCode: 'MYABMB',
366
- bankShortName: 'Alliance Bank',
367
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2023/2/10/860faebf-e449-4065-b244-f55dd584fe95.svg'
368
- }, {
369
- bankIdentifierCode: 'MYBMMB',
370
- bankShortName: 'Bank Muamalat',
371
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2023/2/10/54c681eb-0f82-4910-86fb-d2b391438ef1.svg'
372
- }, {
373
- bankIdentifierCode: 'MYBOC',
374
- bankShortName: 'Bank of China',
375
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2023/2/10/ad0fb34e-1b3f-4568-929e-0ebb7bf5baaa.svg'
376
- }, {
377
- bankIdentifierCode: 'MYBKRM',
378
- bankShortName: 'Bank Rakyat',
379
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2023/2/10/5b9b984a-aca4-46a1-88b5-2701aa275b89.svg'
380
- }, {
381
- bankIdentifierCode: 'MYBSN',
382
- bankShortName: 'Bank Simpanan Nasional',
383
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2023/2/10/14661e9e-b769-4b4b-a062-b7f241317572.svg'
384
- }, {
385
- bankIdentifierCode: 'MYHSBC',
386
- bankShortName: 'HSBC Bank',
387
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2023/2/10/2821603c-bff2-4852-9ca0-ef6f07eef880.svg'
388
- }, {
389
- bankIdentifierCode: 'MYKFH',
390
- bankShortName: 'Kuwait Finance House',
391
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2023/2/10/25464e8d-ded3-4a7f-afa6-624a961bbf07.svg'
392
- }, {
393
- bankIdentifierCode: 'MYOCBC',
394
- bankShortName: 'OCBC Bank',
395
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2023/2/10/ba49e2df-14cc-4566-a250-6698d71a1f0d.svg'
396
- }, {
397
- bankIdentifierCode: 'MYSCB',
398
- bankShortName: 'Standard Chartered Bank',
399
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2023/2/10/af63f42a-6203-4567-be2d-d2c29baadba7.svg'
400
- }, {
401
- bankIdentifierCode: 'MYUOB',
402
- bankShortName: 'UOB Bank',
403
- logoUrl: 'https://cdn.marmot-cloud.com/storage/2023/2/10/5119c254-ed92-4527-9e62-5e92b4f1f439.svg'
404
- }],
405
- category: 'APM',
406
- icon: 'https://cdn.marmot-cloud.com/storage/2023/2/10/b383b457-7a79-4de9-b4dd-053df7bc673d.svg',
407
- iconName: 'FPX',
408
- paymentElements: [{
409
- elementMandatory: true,
410
- elementRegx: '',
411
- elementType: 'CHECKLIST',
412
- extendInfo: '{"excludeMetaDataCodes":"null"}',
413
- paymentElementKey: 'bankIdentifierCode',
414
- title: 'Please select a bank',
415
- validateFunction: '',
416
- paramIllegalText: 'Please select a bank'
417
- }],
418
- paymentMethodName: 'FPX',
419
- paymentMethodType: 'ONLINEBANKING_FPX',
420
- webRedirectType: 'PAGE_REFRESH'
421
- }, {
422
- antomPage: 'paymentMetaPage',
423
- category: 'APM',
424
- expressCheckout: false,
425
- icon: 'https://cdn.marmot-cloud.com/storage/2024/05/15/dca1fa92-0c63-492d-b7c4-bdbd354f04bd.svg',
426
- iconName: 'Pay-easy',
427
- paymentElements: [{
428
- defaultText: 'your phone number',
429
- elementMandatory: true,
430
- elementRegx: '^[0-9]{10,11}$',
431
- elementType: 'DIGIT_11',
432
- paramIllegalText: 'Invalid phone number format,Please check your phone number.',
433
- paymentElementKey: 'payerPhoneNo',
434
- title: 'Please enter your phone number',
435
- extendInfo: '{"maxLength": 11}',
436
- validateFunction: '^[0-9]{10,11}$'
437
- }, {
438
- defaultText: 'Your email address',
439
- elementMandatory: true,
440
- elementRegx: '^(([\\w-+.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([\\w-]+.)+))([a-zA-Z]{2,18}|[0-9]{1,3})(]?))$',
441
- elementType: 'TEXT',
442
- paramIllegalText: 'Invalid email format,Please check your email.',
443
- paymentElementKey: 'payerEmail',
444
- title: 'Email address',
445
- validateFunction: '^(([\\w-+.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([\\w-]+.)+))([a-zA-Z]{2,18}|[0-9]{1,3})(]?))$'
446
- }, {
447
- defaultText: 'Your first name',
448
- elementMandatory: true,
449
- elementRegx: '^\\S{1,32}$',
450
- elementType: 'TEXT',
451
- paramIllegalText: 'Invalid name format,Please keep the name length at 32 bits',
452
- paymentElementKey: 'firstName',
453
- title: 'First Name',
454
- validateFunction: '^\\S{1,32}$'
455
- }, {
456
- defaultText: 'Your last name',
457
- elementMandatory: true,
458
- elementRegx: '^\\S{1,32}$',
459
- elementType: 'TEXT',
460
- paramIllegalText: 'Invalid name format,Please keep the name length at 32 bits',
461
- paymentElementKey: 'lastName',
462
- title: 'Last Name',
463
- validateFunction: '^\\S{1,32}$'
464
- }],
465
- paymentMethodName: 'Pay-easy Online Banking',
466
- paymentMethodType: 'ONLINEBANKING_PAYEASY',
467
- recommend: false,
468
- webRedirectType: 'PAGE_REFRESH'
469
- }, {
470
- antomPage: 'paymentMetaPage',
471
- category: 'AC_WALLET',
472
- icon: 'https://resource.alipayplus.com/storage/ipaymentmngfd5e514400714344/2023/08/14/47ec1c65-ccb3-4fb0-9f1d-93a9a9469ded.svg',
473
- iconName: 'Toss Pay',
474
- interActionType: 'REDIRECT',
475
- paymentMethodName: 'Toss Pay',
476
- paymentMethodType: 'TOSSPAY',
477
- webRedirectType: 'PAGE_REFRESH'
478
- }, {
479
- antomPage: 'paymentMetaPage',
480
- category: 'AC_WALLET',
481
- icon: 'https://gw.alipay.com/icon/medium/default/ALIPAY_HK.svg',
482
- iconName: 'ALIPAY_HK',
483
- interActionType: 'SHOW_CODE',
484
- paymentMethodName: 'ALIPAY_HK',
485
- paymentMethodType: 'ALIPAY_HK',
486
- webRedirectType: 'PAGE_REFRESH'
487
- }, {
488
- antomPage: 'paymentMetaPage',
489
- category: 'AC_WALLET',
490
- icon: 'https://gw.alipay.com/icon/medium/default/DANA.svg',
491
- iconName: 'DANA',
492
- paymentMethodName: 'DANA',
493
- paymentMethodType: 'DANA',
494
- webRedirectType: 'PAGE_REFRESH'
495
- }, {
496
- antomPage: 'paymentMetaPage',
497
- category: 'AC_WALLET',
498
- icon: 'https://gw.alipay.com/icon/medium/default/KAKAOPAY.svg',
499
- iconName: 'KAKAOPAY',
500
- interActionType: 'REDIRECT',
501
- paymentMethodName: 'KAKAOPAY',
502
- paymentMethodType: 'KAKAOPAY',
503
- webRedirectType: 'PAGE_REFRESH'
504
- }, {
505
- antomPage: 'paymentMetaPage',
506
- category: 'AC_WALLET',
507
- icon: 'https://gw.alipay.com/icon/medium/default/GCASH.svg',
508
- iconName: 'GCash',
509
- paymentMethodName: 'GCash',
510
- paymentMethodType: 'GCASH',
511
- webRedirectType: 'PAGE_REFRESH'
512
- }, {
513
- antomPage: 'paymentMetaPage',
514
- category: 'AC_WALLET',
515
- icon: 'https://gw.alipay.com/icon/medium/default/TNG.svg',
516
- iconName: 'TNG',
517
- paymentMethodName: 'TNG',
518
- paymentMethodType: 'TNG',
519
- webRedirectType: 'PAGE_REFRESH'
520
- }, {
521
- antomPage: 'paymentMetaPage',
522
- category: 'AC_WALLET',
523
- icon: 'https://gw.alipay.com/icon/medium/default/TRUEMONEY.svg',
524
- iconName: 'TrueMoney Wallet',
525
- paymentMethodName: 'TrueMoney Wallet',
526
- paymentMethodType: 'TRUEMONEY',
527
- webRedirectType: 'PAGE_REFRESH'
528
- }, {
529
- antomPage: 'paymentMetaPage',
530
- category: 'AC_WALLET',
531
- icon: 'https://resource.alipayplus.com/storage/ipaymentmngfd5e514400714344/2023/08/11/ac8c82fb-597a-4f1d-810f-ab10ab1c6e93.svg',
532
- iconName: 'NAVER Pay',
533
- interActionType: 'REDIRECT',
534
- paymentMethodName: 'NAVER Pay',
535
- paymentMethodType: 'NAVERPAY',
536
- webRedirectType: 'PAGE_REFRESH'
537
- }],
538
- // "savedPaymentMethods": [
539
- // {
540
- // "antomPage": "paymentMetaPage",
541
- // "category": "CARD",
542
- // "expressCheckout": false,
543
- // "icon": "https://cdn.marmot-cloud.com/storage/2022/12/20/0c4725d6-b199-495f-b214-b1a42a5e63b0.svg",
544
- // "iconName": "971002******0513",
545
- // "paymentMethodDetail": {
546
- // "last4": "0513"
547
- // },
548
- // "paymentMethodId": "PYMTa024ff8a3de344ae804240a441db8f96",
549
- // "paymentMethodType": "CARD",
550
- // "recommend": false
551
- // }
552
- // ],
553
- storePolicies: '[\\"{\\\\\\\\\\"title\\\\\\\\\\":\\\\\\\\\\"CheckoutPaymentLegal\\\\\\\\\\",\\\\\\\\\\"content\\\\\\\\\\":[{\\\\\\\\\\"title\\\\\\\\\\":\\\\\\\\\\"CheckoutPaymentLegal\\\\\\\\\\",\\\\\\\\\\"content\\\\\\\\\\":\\\\\\\\\\"<p>hello<ahref=\\\\\\\\\\\\\\\\\\\\\\\\\\"https://www.baidu.com/\\\\\\\\\\\\\\\\\\\\\\\\\\"target=\\\\\\\\\\\\\\\\\\\\\\\\\\"_blank\\\\\\\\\\\\\\\\\\\\\\\\\\">world</a></p><ol><li>123123123</li><li>123123123123</li></ol>\\\\\\\\\\"}]}\\",\\"{\\\\\\\\\\"title\\\\\\\\\\":\\\\\\\\\\"2188120013275594MerchantLegal\\\\\\\\\\",\\\\\\\\\\"content\\\\\\\\\\":[{\\\\\\\\\\"title\\\\\\\\\\":\\\\\\\\\\"2188120013275594MerchantLegal_0\\\\\\\\\\",\\\\\\\\\\"content\\\\\\\\\\":\\\\\\\\\\"<p>hello<ahref=\\\\\\\\\\\\\\\\\\\\\\\\\\"https://www.baidu.com/\\\\\\\\\\\\\\\\\\\\\\\\\\"target=\\\\\\\\\\\\\\\\\\\\\\\\\\"_blank\\\\\\\\\\\\\\\\\\\\\\\\\\">world</a></p><ol><li>MerchantLegal_0</li><li>MerchantLegal_0</li></ol>\\\\\\\\\\"},{\\\\\\\\\\"title\\\\\\\\\\":\\\\\\\\\\"2188120013275594MerchantLegal_1\\\\\\\\\\",\\\\\\\\\\"content\\\\\\\\\\":\\\\\\\\\\"<p>hello<ahref=\\\\\\\\\\\\\\\\\\\\\\\\\\"https://www.baidu.com/\\\\\\\\\\\\\\\\\\\\\\\\\\"target=\\\\\\\\\\\\\\\\\\\\\\\\\\"_blank\\\\\\\\\\\\\\\\\\\\\\\\\\">world</a></p><ol><li>MerchantLegal_1</li><li>MerchantLegal_1</li></ol>\\\\\\\\\\"}]}\\"]',
554
- success: true,
555
- redirectUrl: 'https://www.baidu.com',
556
- supportedLanguages: [{
557
- locale: 'en_US',
558
- preferred: false,
559
- title: 'English'
560
- }, {
561
- locale: 'it_IT',
562
- preferred: false,
563
- title: 'Português'
564
- }, {
565
- locale: 'de_DE',
566
- preferred: false
567
- }, {
568
- locale: 'fr_FR',
569
- preferred: false
570
- }, {
571
- locale: 'nl_NL',
572
- preferred: false
573
- }, {
574
- locale: 'es_ES',
575
- preferred: false
576
- }, {
577
- locale: 'zh_CN',
578
- preferred: true
579
- }, {
580
- country: 'KR',
581
- locale: 'ko_KR',
582
- preferred: false,
583
- title: '한국어'
584
- }]
585
- },
586
- envInfo: {
587
- screenHeight: screen.height,
588
- screenWidth: screen.width
589
- },
590
- appearance: (_this$elementContaine2 = this.elementContainer.getPaymentContext()) === null || _this$elementContaine2 === void 0 ? void 0 : _this$elementContaine2.displayInfo.appearance,
591
- sessionResult: (_this$elementContaine3 = this.elementContainer.getPaymentContext()) === null || _this$elementContaine3 === void 0 ? void 0 : _this$elementContaine3.paymentSessionObj
592
- },
37
+ params: extraParam,
593
38
  target: 'AUTH_ELEMENT'
594
39
  }
595
40
  });
@@ -642,6 +87,7 @@ var AuthProcessor = /*#__PURE__*/function (_BaseElementProcessor) {
642
87
  key: "obtainData",
643
88
  value: function obtainData() {
644
89
  // 实现 obtainData 方法
90
+ this.obtainDataRes = {};
645
91
  return {};
646
92
  }
647
93
  }, {
@@ -652,10 +98,26 @@ var AuthProcessor = /*#__PURE__*/function (_BaseElementProcessor) {
652
98
  }
653
99
  }, {
654
100
  key: "update",
655
- value: function update(data) {
101
+ value: function update(_ref3) {
102
+ var data = _ref3.data,
103
+ paymentSessionData = _ref3.paymentSessionData;
104
+ var _parseSessionData = parseSessionData(paymentSessionData),
105
+ _parseSessionData2 = _slicedToArray(_parseSessionData, 2),
106
+ parseData = _parseSessionData2[0],
107
+ sessionData = _parseSessionData2[1];
656
108
  // 实现 update 方法的具体逻辑
657
- console.log('Updating auth processor with data:', data);
658
- // 具体实现可以根据实际需求来编写
109
+ this.eventCenter.dispatchToApp({
110
+ event: 'updatePayment',
111
+ data: {
112
+ params: {
113
+ paymentSessionData: paymentSessionData,
114
+ sessionResult: parseData,
115
+ sessionData: sessionData,
116
+ originActionQueryResult: data.originActionQuery,
117
+ originOneAccountQueryResult: data.originOneAccountQuery
118
+ }
119
+ }
120
+ });
659
121
  }
660
122
  }]);
661
123
  return AuthProcessor;