@alipay/ams-checkout 0.0.1730706734-dev.7 → 0.0.1730706734-dev.8
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.
@@ -318,14 +318,14 @@ export var ElementComponent = /*#__PURE__*/function () {
|
|
318
318
|
});
|
319
319
|
});
|
320
320
|
// 发送validate消息
|
321
|
-
_defineProperty(this, "onValidateFunc", function (target) {
|
321
|
+
_defineProperty(this, "onValidateFunc", function (target, params) {
|
322
322
|
return new Promise(function (resolve) {
|
323
323
|
_this4.eventService.emitAndListen({
|
324
324
|
event: ElementPaymentEvent.VALIDATE,
|
325
325
|
data: {
|
326
326
|
target: target,
|
327
327
|
source: ElementPaymentMethod.CONTAINER_ELEMENT,
|
328
|
-
params:
|
328
|
+
params: params
|
329
329
|
}
|
330
330
|
}, function (result) {
|
331
331
|
resolve(result);
|
@@ -378,7 +378,7 @@ export var ElementComponent = /*#__PURE__*/function () {
|
|
378
378
|
break;
|
379
379
|
}
|
380
380
|
_context.next = 20;
|
381
|
-
return _this4.onValidateFunc(ElementPaymentMethod.PAYMENT_ELEMENT);
|
381
|
+
return _this4.onValidateFunc(ElementPaymentMethod.PAYMENT_ELEMENT, params);
|
382
382
|
case 20:
|
383
383
|
_result2 = _context.sent;
|
384
384
|
console.log('element submit validate payment---------', _result2);
|
@@ -1317,8 +1317,36 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1317
1317
|
return;
|
1318
1318
|
}
|
1319
1319
|
|
1320
|
-
//
|
1321
|
-
this.
|
1320
|
+
// log event before sending the callback
|
1321
|
+
this.logEventCallback(data, "sdk_event_event_callback");
|
1322
|
+
try {
|
1323
|
+
// The plug-in communicates with the sdk after processing
|
1324
|
+
this.dispatchToSDK(data.context.event, data.context.data, data.context.eventCallbackId);
|
1325
|
+
// log event after sending the callback
|
1326
|
+
this.logEventCallback(data, "sdk_event_afterEventCallback");
|
1327
|
+
} catch (e) {
|
1328
|
+
console.error(e);
|
1329
|
+
}
|
1330
|
+
}
|
1331
|
+
}, {
|
1332
|
+
key: "logEventCallback",
|
1333
|
+
value: function logEventCallback(data, title) {
|
1334
|
+
if (data.context.event === EVENT.eventCallback.name) {
|
1335
|
+
var _data$context4;
|
1336
|
+
var callbackData = "";
|
1337
|
+
try {
|
1338
|
+
var _data$context3;
|
1339
|
+
callbackData = JSON.stringify((data === null || data === void 0 || (_data$context3 = data.context) === null || _data$context3 === void 0 ? void 0 : _data$context3.data) || "");
|
1340
|
+
} catch (e) {
|
1341
|
+
console.error(e);
|
1342
|
+
}
|
1343
|
+
this.AMSSDK.logger.logInfo({
|
1344
|
+
title: title
|
1345
|
+
}, {
|
1346
|
+
callbackData: callbackData,
|
1347
|
+
callbackId: (data === null || data === void 0 || (_data$context4 = data.context) === null || _data$context4 === void 0 ? void 0 : _data$context4.eventCallbackId) || ""
|
1348
|
+
}).send();
|
1349
|
+
}
|
1322
1350
|
}
|
1323
1351
|
}, {
|
1324
1352
|
key: "dismissLoadingFunc",
|