@alipay/ams-checkout 0.0.1784626568-dev.0 → 0.0.1784626568-dev.1

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,5 +1,5 @@
1
- import { type EventPayload, type IPaymentSessionMetaData } from '../../types';
2
1
  import type { CKPShipping } from '../../core/component/element/type';
2
+ import { type EventPayload, type IPaymentSessionMetaData } from '../../types';
3
3
  import { Logger } from '../../util/logger';
4
4
  export type IChannelBehavior = {
5
5
  usePaymentSessionAsQueryResult: boolean;
@@ -17,7 +17,7 @@ import { getDoubleFaUrlFromSession } from "../../foundation/utils/web_app_url_ut
17
17
  import { getApplePayPaymentSession, submitPayInfo } from "../../service";
18
18
  import { EnvironmentEnum } from "../../types";
19
19
  import { device, isEmpty } from "../../util";
20
- import { executeWithTimeout, BEFORE_CONFIRM_TIMEOUT_MS, MERCHANT_CONFIRM_ABORT_CODE, MERCHANT_CONFIRM_TIMEOUT_CODE } from "../../util/beforeConfirm";
20
+ import { BEFORE_CONFIRM_TIMEOUT_MS, executeWithTimeout, MERCHANT_CONFIRM_ABORT_CODE, MERCHANT_CONFIRM_TIMEOUT_CODE } from "../../util/beforeConfirm";
21
21
  import { APPLE_PAY_RECURRING_VERSION, APPLE_PAY_VERSION } from "../applepay/interface";
22
22
  var APPLEPAYERRORENUM = /*#__PURE__*/function (APPLEPAYERRORENUM) {
23
23
  APPLEPAYERRORENUM["APPLE_PAY_MISSING_DATA"] = "APPLE_PAY_MISSING_DATA";
@@ -92,9 +92,14 @@ export var handleGooglePay = function handleGooglePay(data) {
92
92
  var script = document.createElement('script');
93
93
  script.src = 'https://pay.google.com/gp/p/js/pay.js';
94
94
  script.async = true;
95
- // 使用原生 appendChild 避免微前端沙箱(如 qiankun)将动态 <script> 劫持为 fetch 加载,
96
- // 导致不支持 CORS 的第三方脚本(如 pay.google.com)加载失败
97
- Node.prototype.appendChild.call(document.body, script);
95
+ if (document.body.appendChild !== Node.prototype.appendChild) {
96
+ // 使用原生 appendChild 避免微前端沙箱(如 qiankun)将动态 <script> 劫持为 fetch 加载,
97
+ // 导致不支持 CORS 的第三方脚本(如 pay.google.com)加载失败
98
+ Node.prototype.appendChild.call(document.body, script);
99
+ } else {
100
+ document.body.appendChild(script);
101
+ }
102
+
98
103
  // 执行googlePay sdk
99
104
  script.onload = function () {
100
105
  var paymentsClient = new window.google.payments.api.PaymentsClient({
@@ -296,6 +296,6 @@ export var LogConfig = {
296
296
  version: 'iteration/20231021',
297
297
  mdata: {
298
298
  firstLogTime: Date.now(),
299
- sdkVersion: "0.0.1784626568-dev.0"
299
+ sdkVersion: "0.0.1784626568-dev.1"
300
300
  }
301
301
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alipay/ams-checkout",
3
- "version": "0.0.1784626568-dev.0",
3
+ "version": "0.0.1784626568-dev.1",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "exports": {