@alipay/ams-checkout 0.0.1730107332-dev.16 → 0.0.1730107332-dev.18
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.
@@ -214,7 +214,7 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
|
|
214
214
|
|
215
215
|
// 等请求和 Web启动都Ready之后,发送renderComponent
|
216
216
|
Promise.all([this.initSecuritySDK(), this.processSubmitPay(), webLaunchPromise]).then(function (_ref) {
|
217
|
-
var _this2$paymentContext, _this2$paymentContext2, _this2$paymentContext3, _this2$paymentContext4, _this2$paymentContext5, _this2$paymentContext6
|
217
|
+
var _this2$paymentContext, _this2$paymentContext2, _this2$paymentContext3, _this2$paymentContext4, _this2$paymentContext5, _this2$paymentContext6;
|
218
218
|
var _ref2 = _slicedToArray(_ref, 3),
|
219
219
|
_initSecurityRes = _ref2[0],
|
220
220
|
submitRes = _ref2[1],
|
@@ -224,21 +224,16 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
|
|
224
224
|
event: 'renderComponent',
|
225
225
|
data: {
|
226
226
|
// For ESP 1.0
|
227
|
-
queryResult:
|
228
|
-
|
229
|
-
} : _objectSpread(_objectSpread({
|
230
|
-
success: true,
|
231
|
-
orderAmount: (_this2$paymentContext2 = _this2.paymentContext) === null || _this2$paymentContext2 === void 0 || (_this2$paymentContext2 = _this2$paymentContext2.paymentSessionObj) === null || _this2$paymentContext2 === void 0 ? void 0 : _this2$paymentContext2.paymentView
|
232
|
-
}, (_this2$paymentContext3 = _this2.paymentContext) === null || _this2$paymentContext3 === void 0 ? void 0 : _this2$paymentContext3.paymentSessionObj), (_this2$paymentContext4 = _this2.paymentContext) === null || _this2$paymentContext4 === void 0 ? void 0 : _this2$paymentContext4.paymentSessionObj.action),
|
233
|
-
sessionResult: (_this2$paymentContext5 = _this2.paymentContext) === null || _this2$paymentContext5 === void 0 ? void 0 : _this2$paymentContext5.paymentSessionObj,
|
227
|
+
queryResult: _this2.getQueryResult(),
|
228
|
+
sessionResult: (_this2$paymentContext = _this2.paymentContext) === null || _this2$paymentContext === void 0 ? void 0 : _this2$paymentContext.paymentSessionObj,
|
234
229
|
submitResult: submitRes,
|
235
|
-
paymentSessionData: (_this2$
|
230
|
+
paymentSessionData: (_this2$paymentContext2 = _this2.paymentContext) === null || _this2$paymentContext2 === void 0 ? void 0 : _this2$paymentContext2.paymentSession,
|
236
231
|
heightOfVisible: Math.max(window.changingPageHeight, window.innerHeight),
|
237
232
|
renderDisplayType: _this2.paymentContext.displayInfo.type,
|
238
|
-
appearance: (_this2$
|
239
|
-
notRedirectAfterComplete: ((_this2$
|
233
|
+
appearance: (_this2$paymentContext3 = _this2.paymentContext.displayInfo) === null || _this2$paymentContext3 === void 0 ? void 0 : _this2$paymentContext3.appearance,
|
234
|
+
notRedirectAfterComplete: ((_this2$paymentContext4 = _this2.paymentContext.startBizFlowOptions.submitPayRequestExtra) === null || _this2$paymentContext4 === void 0 ? void 0 : _this2$paymentContext4.notRedirectAfterComplete) === true,
|
240
235
|
isAppWebview: _this2.paymentContext.startBizFlowOptions.isAppWebview,
|
241
|
-
merchantAppointParam: (_this2$
|
236
|
+
merchantAppointParam: (_this2$paymentContext5 = _this2.paymentContext.startBizFlowOptions.submitPayRequestExtra) === null || _this2$paymentContext5 === void 0 ? void 0 : _this2$paymentContext5.merchantAppointParam,
|
242
237
|
allowSubmitPayCallAhead: _this2.allowSubmitPayCallAhead,
|
243
238
|
envInfo: {
|
244
239
|
screenHeight: screen.height,
|
@@ -248,7 +243,7 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
|
|
248
243
|
trackId: logMetaData.requestSeq,
|
249
244
|
platform: logMetaData.platform,
|
250
245
|
firstLogTime: logMetaData.firstLogTime
|
251
|
-
}, ((_this2$
|
246
|
+
}, ((_this2$paymentContext6 = _this2.paymentContext.paymentSessionObj) === null || _this2$paymentContext6 === void 0 ? void 0 : _this2$paymentContext6.paymentSessionConfig) || {}), {}, {
|
252
247
|
renderDisplayType: logMetaData.renderDisplayType,
|
253
248
|
sdkVersion: logMetaData.sdkVersion,
|
254
249
|
merchantId: logMetaData.merchantId,
|
@@ -373,6 +368,22 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
|
|
373
368
|
}
|
374
369
|
return processSubmitPay;
|
375
370
|
}()
|
371
|
+
}, {
|
372
|
+
key: "getQueryResult",
|
373
|
+
value: function getQueryResult() {
|
374
|
+
var _this$paymentContext4, _this$paymentContext5;
|
375
|
+
if (isEmpty((_this$paymentContext4 = this.paymentContext) === null || _this$paymentContext4 === void 0 ? void 0 : _this$paymentContext4.paymentSessionObj)) {
|
376
|
+
return {
|
377
|
+
success: false
|
378
|
+
};
|
379
|
+
}
|
380
|
+
return _objectSpread(_objectSpread({
|
381
|
+
success: true,
|
382
|
+
orderAmount: _objectSpread(_objectSpread({}, this.paymentContext.paymentSessionObj.paymentView), {}, {
|
383
|
+
formattedAmount: (_this$paymentContext5 = this.paymentContext) === null || _this$paymentContext5 === void 0 || (_this$paymentContext5 = _this$paymentContext5.paymentSessionObj.paymentView) === null || _this$paymentContext5 === void 0 ? void 0 : _this$paymentContext5.formattedValue
|
384
|
+
})
|
385
|
+
}, this.paymentContext.paymentSessionObj), this.paymentContext.paymentSessionObj.action);
|
386
|
+
}
|
376
387
|
}, {
|
377
388
|
key: "acquireApdidToken",
|
378
389
|
value: function () {
|