@alipay/ams-checkout 0.0.1756796178-dev.1 → 0.0.1756796178-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.
package/esm/constant/index.d.ts
CHANGED
package/esm/constant/index.js
CHANGED
@@ -65,6 +65,10 @@ export var ERRORMESSAGE = {
|
|
65
65
|
LOAD_APP_TIMEOUT: {
|
66
66
|
code: eventCodeEnum.SDK_CREATECOMPONENT_ERROR,
|
67
67
|
message: 'Load resource timeout'
|
68
|
+
},
|
69
|
+
NETWORK_REQUEST_ERROR: {
|
70
|
+
code: eventCodeEnum.SDK_CREATECOMPONENT_ERROR,
|
71
|
+
message: 'Network request error'
|
68
72
|
}
|
69
73
|
},
|
70
74
|
SDK_LAUNCH_PAYMENT_APP_ERROR: {
|
@@ -659,13 +659,32 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
659
659
|
key: 'sdk_action_query_end',
|
660
660
|
value: Date.now()
|
661
661
|
});
|
662
|
-
resolve(res);
|
663
662
|
_this5.AMSSDK.logger.logInfo({
|
664
663
|
title: 'sdk_event_sdkQueryEnd'
|
665
664
|
}, {
|
666
665
|
paymentSessionConfig: JSON.stringify(params.paymentSessionConfig)
|
667
666
|
}).send();
|
667
|
+
// fix: 泡泡玛特CVV场景,actionQuery报错会进入错误兜底页,导致CVV页面占用大幅空间
|
668
|
+
if (ComponentSignEnum.CASHIER_PAYMENT_CARD === _this5._componentSign && !(res !== null && res !== void 0 && res.success)) {
|
669
|
+
var _res$errorActions;
|
670
|
+
// 通用操作:抛CREATECOMPONENT_ERROR错误码给商户,商户升级到新版本需要处理CREATECOMPONENT_ERROR逻辑
|
671
|
+
var createComponentError = {
|
672
|
+
code: ERRORMESSAGE.CREATECOMPONENT_ERROR.code,
|
673
|
+
message: res === null || res === void 0 ? void 0 : res.errorMessage
|
674
|
+
};
|
675
|
+
_this5.dispatchToSDK(EVENT.error.name, createComponentError);
|
676
|
+
if ((res === null || res === void 0 || (_res$errorActions = res.errorActions) === null || _res$errorActions === void 0 ? void 0 : _res$errorActions.showType) === 'NONE') {
|
677
|
+
// 抛错销毁SDK,不展示错误页面
|
678
|
+
reject(createComponentError);
|
679
|
+
return;
|
680
|
+
}
|
681
|
+
}
|
682
|
+
resolve(res);
|
668
683
|
}).catch(function (err) {
|
684
|
+
if (ComponentSignEnum.CASHIER_PAYMENT_CARD === _this5._componentSign) {
|
685
|
+
// 通用操作:抛CREATECOMPONENT_ERROR错误码给商户,商户升级到新版本需要处理CREATECOMPONENT_ERROR逻辑
|
686
|
+
_this5.dispatchToSDK(EVENT.error.name, ERRORMESSAGE.CREATECOMPONENT_ERROR.NETWORK_REQUEST_ERROR);
|
687
|
+
}
|
669
688
|
if ([ComponentSignEnum.CASHIER_PAYMENT_CARD, ComponentSignEnum.VAULTING_CARD, ComponentSignEnum.CASHIER_PAYMENT_APM].includes(_this5._componentSign)) {
|
670
689
|
return resolve({
|
671
690
|
success: false
|
package/esm/types/index.d.ts
CHANGED
@@ -590,6 +590,7 @@ export interface CashierSdkActionQueryResult {
|
|
590
590
|
extendInfo?: {
|
591
591
|
channelOrderId?: string;
|
592
592
|
};
|
593
|
+
errorActions?: Record<string, string>;
|
593
594
|
}
|
594
595
|
export interface CashierSdkActionQuerySessionResult extends IPaymentSessionMetaData {
|
595
596
|
success: boolean;
|