pay-sdk-react 1.1.8 → 1.1.9

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.
Files changed (48) hide show
  1. package/dist/css/index.css +2 -0
  2. package/dist/css/index.min.css +1 -1
  3. package/dist/es/Airwallex/index.d.ts +3 -0
  4. package/dist/es/Airwallex/index.js +4 -1
  5. package/dist/es/Airwallex/style/index.css +2 -0
  6. package/dist/es/Airwallex/style/index.min.css +1 -1
  7. package/dist/es/Alipay/index.d.ts +2 -0
  8. package/dist/es/Alipay/index.js +3 -1
  9. package/dist/es/MAlipay/index.d.ts +1 -0
  10. package/dist/es/MAlipay/index.js +2 -1
  11. package/dist/es/MAlipay/style/index.css +2 -0
  12. package/dist/es/MAlipay/style/index.min.css +1 -1
  13. package/dist/es/MWeChat/style/index.css +2 -0
  14. package/dist/es/MWeChat/style/index.min.css +1 -1
  15. package/dist/es/PayButton/index.js +10 -11
  16. package/dist/es/Paypal/paypal-button.js +0 -2
  17. package/dist/es/Stripe/index.d.ts +3 -0
  18. package/dist/es/Stripe/index.js +6 -1
  19. package/dist/es/Stripe/style/index.css +2 -0
  20. package/dist/es/Stripe/style/index.min.css +1 -1
  21. package/dist/es/Wechat/index.d.ts +2 -0
  22. package/dist/es/Wechat/index.js +3 -1
  23. package/dist/es/confirm-modal/style/index.css +2 -0
  24. package/dist/es/confirm-modal/style/index.min.css +1 -1
  25. package/dist/es/pay-modal/style/index.css +2 -0
  26. package/dist/es/pay-modal/style/index.min.css +1 -1
  27. package/dist/lib/Airwallex/index.js +23 -1
  28. package/dist/lib/Airwallex/style/index.css +2 -0
  29. package/dist/lib/Airwallex/style/index.min.css +1 -1
  30. package/dist/lib/Alipay/index.js +16 -1
  31. package/dist/lib/MAlipay/index.js +9 -1
  32. package/dist/lib/MAlipay/style/index.css +2 -0
  33. package/dist/lib/MAlipay/style/index.min.css +1 -1
  34. package/dist/lib/MWeChat/style/index.css +2 -0
  35. package/dist/lib/MWeChat/style/index.min.css +1 -1
  36. package/dist/lib/PayButton/index.js +10 -12
  37. package/dist/lib/Paypal/paypal-button.js +0 -2
  38. package/dist/lib/Stripe/index.js +24 -2
  39. package/dist/lib/Stripe/style/index.css +2 -0
  40. package/dist/lib/Stripe/style/index.min.css +1 -1
  41. package/dist/lib/Wechat/index.js +16 -1
  42. package/dist/lib/confirm-modal/style/index.css +2 -0
  43. package/dist/lib/confirm-modal/style/index.min.css +1 -1
  44. package/dist/lib/pay-modal/style/index.css +2 -0
  45. package/dist/lib/pay-modal/style/index.min.css +1 -1
  46. package/dist/umd/pay-sdk-react.umd.js +5 -7
  47. package/dist/umd/pay-sdk-react.umd.js.map +1 -1
  48. package/package.json +9 -1
@@ -8,13 +8,13 @@ exports.default = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var _shared = require("../shared");
10
10
  var _Paypal = require("../Paypal");
11
- var _Stripe = _interopRequireDefault(require("../Stripe"));
12
- var _Airwallex = _interopRequireDefault(require("../Airwallex"));
11
+ var _Stripe = require("../Stripe");
12
+ var _Airwallex = require("../Airwallex");
13
13
  var _Payssion = require("../Payssion");
14
14
  var _MWeChat = require("../MWeChat");
15
- var _Alipay = _interopRequireDefault(require("../Alipay"));
16
- var _Wechat = _interopRequireDefault(require("../Wechat"));
17
- var _MAlipay = _interopRequireDefault(require("../MAlipay"));
15
+ var _Alipay = require("../Alipay");
16
+ var _Wechat = require("../Wechat");
17
+ var _MAlipay = require("../MAlipay");
18
18
  var _interface = require("./interface");
19
19
  Object.keys(_interface).forEach(function (key) {
20
20
  if (key === "default" || key === "__esModule") return;
@@ -27,11 +27,9 @@ Object.keys(_interface).forEach(function (key) {
27
27
  }
28
28
  });
29
29
  });
30
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
31
30
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
32
31
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
33
32
  const PayButton = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
34
- // 使用类型断言来确保 ref 类型正确
35
33
  const typedRef = ref;
36
34
  if (props.payMethod === _shared.PaymentMethod.PaypalH5 || props.payMethod === _shared.PaymentMethod.PaypalPc) {
37
35
  return /*#__PURE__*/_react.default.createElement(_Paypal.PaypalButton, _extends({
@@ -39,12 +37,12 @@ const PayButton = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
39
37
  }, props));
40
38
  }
41
39
  if (props.payMethod === _shared.PaymentMethod.StripeH5 || props.payMethod === _shared.PaymentMethod.StripePc) {
42
- return /*#__PURE__*/_react.default.createElement(_Stripe.default.Button, _extends({
40
+ return /*#__PURE__*/_react.default.createElement(_Stripe.StripeButton, _extends({
43
41
  ref: typedRef
44
42
  }, props));
45
43
  }
46
44
  if (props.payMethod === _shared.PaymentMethod.Airwallex) {
47
- return /*#__PURE__*/_react.default.createElement(_Airwallex.default.Button, _extends({
45
+ return /*#__PURE__*/_react.default.createElement(_Airwallex.AirwallexButton, _extends({
48
46
  ref: typedRef
49
47
  }, props));
50
48
  }
@@ -59,17 +57,17 @@ const PayButton = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
59
57
  }, props));
60
58
  }
61
59
  if (props.payMethod === _shared.PaymentMethod.AlipayH5) {
62
- return /*#__PURE__*/_react.default.createElement(_MAlipay.default.Button, _extends({
60
+ return /*#__PURE__*/_react.default.createElement(_MAlipay.MAlipayButton, _extends({
63
61
  ref: typedRef
64
62
  }, props));
65
63
  }
66
64
  if (props.payMethod === _shared.PaymentMethod.AlipayPc) {
67
- return /*#__PURE__*/_react.default.createElement(_Alipay.default.Button, _extends({
65
+ return /*#__PURE__*/_react.default.createElement(_Alipay.AlipayButton, _extends({
68
66
  ref: typedRef
69
67
  }, props));
70
68
  }
71
69
  if (props.payMethod === _shared.PaymentMethod.WechatPc) {
72
- return /*#__PURE__*/_react.default.createElement(_Wechat.default.Button, _extends({
70
+ return /*#__PURE__*/_react.default.createElement(_Wechat.WechatButton, _extends({
73
71
  ref: typedRef
74
72
  }, props));
75
73
  }
@@ -32,8 +32,6 @@ const PaypalButton = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
32
32
  const paypalButtonRef = (0, _react.useRef)(null);
33
33
  const [showMask, setShowMask] = (0, _react.useState)(false);
34
34
  const [paypalUrl, setPaypalUrl] = (0, _react.useState)();
35
-
36
- // 监听 isPayment 状态变化,当支付完成时隐藏蒙层
37
35
  (0, _react.useEffect)(() => {
38
36
  if (createOrder && isPayment) {
39
37
  setShowMask(false);
@@ -3,7 +3,29 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- var _exportNames = {};
6
+ var _exportNames = {
7
+ StripePopup: true,
8
+ StripeButton: true,
9
+ StripeModal: true
10
+ };
11
+ Object.defineProperty(exports, "StripeButton", {
12
+ enumerable: true,
13
+ get: function () {
14
+ return _stripeButton.default;
15
+ }
16
+ });
17
+ Object.defineProperty(exports, "StripeModal", {
18
+ enumerable: true,
19
+ get: function () {
20
+ return _stripeModal.default;
21
+ }
22
+ });
23
+ Object.defineProperty(exports, "StripePopup", {
24
+ enumerable: true,
25
+ get: function () {
26
+ return _stripePopup.default;
27
+ }
28
+ });
7
29
  exports.default = void 0;
8
30
  var _stripe = _interopRequireDefault(require("./stripe"));
9
31
  var _stripePopup = _interopRequireDefault(require("./stripe-popup"));
@@ -26,4 +48,4 @@ const StripeComponent = _stripe.default;
26
48
  StripeComponent.Button = _stripeButton.default;
27
49
  StripeComponent.Popup = _stripePopup.default;
28
50
  StripeComponent.Modal = _stripeModal.default;
29
- var _default = exports.default = StripeComponent;
51
+ var _default = exports.default = StripeComponent; // 兼容:同时提供具名导出,便于内部与严格 ESM 环境避免默认导出初始化顺序问题
@@ -140,6 +140,8 @@
140
140
  text-align: left;
141
141
  }
142
142
  .pay-modal__icon {
143
+ display: flex;
144
+ justify-content: center;
143
145
  margin-bottom: 8px;
144
146
  font-size: 40px;
145
147
  }
@@ -1 +1 @@
1
- .pay-dot-loading{display:inline-block}.pay-button{display:inline-block;padding:7px 12px;font-size:16px;border-radius:4px;border:1px solid #eee;background:#fff;color:#333;cursor:pointer;transition:.2s;user-select:none;position:relative;text-align:center}.pay-button-content{display:flex;align-items:center;justify-content:center;gap:6px}.pay-button-block{display:block;width:100%}.pay-button-disabled{opacity:.4;cursor:not-allowed}.pay-button-loading{cursor:wait}.pay-button-loading-wrapper{display:flex;align-items:center;justify-content:center;gap:6px}.pay-button-primary{background:#1677ff;border-color:#1677ff;color:#fff}.pay-button-primary:hover{background:#409eff}.pay-button-success{background:#00b578;border-color:#00b578;color:#fff}.pay-button-danger{background:#ff3141;border-color:#ff3141;color:#fff}.pay-button-warning{background:#ff8f1f;border-color:#ff8f1f;color:#fff}.pay-button-default{background:#fff;border-color:#eee;color:#333}.pay-button-fill-outline{background:0 0;color:inherit}.pay-button-fill-none{background:0 0;border:none;color:inherit}.pay-button-mini{font-size:12px;padding:2px 8px}.pay-button-small{font-size:14px;padding:4px 10px}.pay-button-large{font-size:18px;padding:10px 18px}.pay-button-shape-rounded{border-radius:1000px}.pay-button-shape-rectangular{border-radius:0}.pay-modal{position:fixed;z-index:9999;left:0;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.pay-modal__mask{position:absolute;left:0;top:0;right:0;bottom:0;background:rgba(0,0,0,.55);z-index:0}.pay-modal__content{position:relative;z-index:1;background:#fff;border-radius:16px;padding:42px 20px 20px;min-width:280px;max-width:80vw;box-shadow:0 4px 24px #0001;text-align:center;max-height:60vh;display:flex;flex-direction:column}.pay-modal__close{position:absolute;right:12px;top:12px;background:0 0;border:none;font-size:32px;font-weight:500;line-height:32px;cursor:pointer;text-align:left}.pay-modal__icon{margin-bottom:8px;font-size:40px}.pay-modal__title{font-size:20px;font-weight:700;color:#222;margin-bottom:12px}.pay-modal__desc{color:#222;font-size:15px;margin-bottom:24px;line-height:1.7;text-align:left}.pay-modal__content-wrapper{position:relative;z-index:1;text-align:center;overflow-y:auto;flex:1;min-height:0}.pay-modal__actions{display:flex;justify-content:center;gap:16px;margin-top:16px}.pay-modal__btn{min-width:96px;padding:8px 0;border-radius:24px;border:none;font-size:15px;font-weight:600;cursor:pointer;transition:background .2s}.pay-modal__btn--retry{background:#fff;color:#f25a5a;border:1.5px solid #f25a5a}.pay-modal__btn--finish{background:#f25a5a;color:#fff;border:none}.pay-mask{position:fixed;z-index:1000;left:0;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.pay-icon{display:inline-block;color:inherit;width:16px;vertical-align:-2px;stroke:currentColor}.pay-icon[fill=currentColor]{fill:currentColor;stroke:none}.pay-icon[stroke=currentColor]{stroke:currentColor;fill:none}.pay-icon[fill=currentColor][stroke=currentColor]{fill:currentColor;stroke:currentColor}.pay-icon-paypal-text{width:64px;height:26px;max-width:72px;max-height:32px}.pay-icon-close{width:18px;height:18px}.pay-icon-stripe-text{width:24px;height:24px}.pay-icon-alipay{width:20px;height:20px}.pay-icon-wechat-pay{width:20px;height:20px}.pay-icon-payssion-pay{width:36px;height:20px}.pay-popup{position:fixed;z-index:1001}.pay-popup-body{position:fixed;display:flex;flex-direction:column;background-color:#fff;z-index:1010;box-sizing:border-box}.pay-popup-body.pay-popup-body-position-bottom{width:100%;left:0;bottom:0}.pay-popup-body.pay-popup-body-position-top{width:100%;left:0;top:0}.pay-popup-body.pay-popup-body-position-left{height:100%;width:80vw;left:0;top:0}.pay-popup-body.pay-popup-body-position-right{height:100%;width:80vw;right:0;top:0}.pay-popup-body.pay-popup-body-round.pay-popup-body-position-bottom{border-radius:16px 16px 0 0}.pay-popup-body.pay-popup-body-round.pay-popup-body-position-top{border-radius:0 0 16px 16px}.pay-popup-body.pay-popup-body-round.pay-popup-body-position-left{border-radius:0 16px 16px 0}.pay-popup-body.pay-popup-body-round.pay-popup-body-position-right{border-radius:16px 0 0 16px}.pay-popup-close-icon{position:absolute;z-index:1;cursor:pointer;padding:4px;font-size:18px;line-height:1;color:#999}.pay-popup-body.pay-popup-body-position-bottom .pay-popup-close-icon,.pay-popup-body.pay-popup-body-position-left .pay-popup-close-icon{top:8px;right:8px}.pay-popup-body.pay-popup-body-position-top .pay-popup-close-icon{bottom:8px;right:8px}.pay-popup-body.pay-popup-body-position-right .pay-popup-close-icon{top:8px;left:8px}.pay-popup-content{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch}.pay-popup-body.pay-popup-body-with-close.pay-popup-body-position-bottom .pay-popup-content,.pay-popup-body.pay-popup-body-with-close.pay-popup-body-position-left .pay-popup-content{padding-top:40px}.pay-popup-body.pay-popup-body-with-close.pay-popup-body-position-right .pay-popup-content{padding-top:40px}.pay-popup-body.pay-popup-body-with-close.pay-popup-body-position-top .pay-popup-content{padding-bottom:40px}@media (min-width:576px){.pay-stripe-modal.pay-modal .pay-modal__content{width:72%}}@media (min-width:768px){.pay-stripe-modal.pay-modal .pay-modal__content{width:50%}}@media (min-width:992px){.pay-stripe-modal.pay-modal .pay-modal__content{width:40%}}@media (min-width:1200px){.pay-stripe-modal.pay-modal .pay-modal__content{width:27%}}@media (min-width:1600px){.pay-stripe-modal.pay-modal .pay-modal__content{width:26%}}@media (min-width:2000px){.pay-stripe-modal.pay-modal .pay-modal__content{width:20%}}
1
+ .pay-dot-loading{display:inline-block}.pay-button{display:inline-block;padding:7px 12px;font-size:16px;border-radius:4px;border:1px solid #eee;background:#fff;color:#333;cursor:pointer;transition:.2s;user-select:none;position:relative;text-align:center}.pay-button-content{display:flex;align-items:center;justify-content:center;gap:6px}.pay-button-block{display:block;width:100%}.pay-button-disabled{opacity:.4;cursor:not-allowed}.pay-button-loading{cursor:wait}.pay-button-loading-wrapper{display:flex;align-items:center;justify-content:center;gap:6px}.pay-button-primary{background:#1677ff;border-color:#1677ff;color:#fff}.pay-button-primary:hover{background:#409eff}.pay-button-success{background:#00b578;border-color:#00b578;color:#fff}.pay-button-danger{background:#ff3141;border-color:#ff3141;color:#fff}.pay-button-warning{background:#ff8f1f;border-color:#ff8f1f;color:#fff}.pay-button-default{background:#fff;border-color:#eee;color:#333}.pay-button-fill-outline{background:0 0;color:inherit}.pay-button-fill-none{background:0 0;border:none;color:inherit}.pay-button-mini{font-size:12px;padding:2px 8px}.pay-button-small{font-size:14px;padding:4px 10px}.pay-button-large{font-size:18px;padding:10px 18px}.pay-button-shape-rounded{border-radius:1000px}.pay-button-shape-rectangular{border-radius:0}.pay-modal{position:fixed;z-index:9999;left:0;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.pay-modal__mask{position:absolute;left:0;top:0;right:0;bottom:0;background:rgba(0,0,0,.55);z-index:0}.pay-modal__content{position:relative;z-index:1;background:#fff;border-radius:16px;padding:42px 20px 20px;min-width:280px;max-width:80vw;box-shadow:0 4px 24px #0001;text-align:center;max-height:60vh;display:flex;flex-direction:column}.pay-modal__close{position:absolute;right:12px;top:12px;background:0 0;border:none;font-size:32px;font-weight:500;line-height:32px;cursor:pointer;text-align:left}.pay-modal__icon{display:flex;justify-content:center;margin-bottom:8px;font-size:40px}.pay-modal__title{font-size:20px;font-weight:700;color:#222;margin-bottom:12px}.pay-modal__desc{color:#222;font-size:15px;margin-bottom:24px;line-height:1.7;text-align:left}.pay-modal__content-wrapper{position:relative;z-index:1;text-align:center;overflow-y:auto;flex:1;min-height:0}.pay-modal__actions{display:flex;justify-content:center;gap:16px;margin-top:16px}.pay-modal__btn{min-width:96px;padding:8px 0;border-radius:24px;border:none;font-size:15px;font-weight:600;cursor:pointer;transition:background .2s}.pay-modal__btn--retry{background:#fff;color:#f25a5a;border:1.5px solid #f25a5a}.pay-modal__btn--finish{background:#f25a5a;color:#fff;border:none}.pay-mask{position:fixed;z-index:1000;left:0;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.pay-icon{display:inline-block;color:inherit;width:16px;vertical-align:-2px;stroke:currentColor}.pay-icon[fill=currentColor]{fill:currentColor;stroke:none}.pay-icon[stroke=currentColor]{stroke:currentColor;fill:none}.pay-icon[fill=currentColor][stroke=currentColor]{fill:currentColor;stroke:currentColor}.pay-icon-paypal-text{width:64px;height:26px;max-width:72px;max-height:32px}.pay-icon-close{width:18px;height:18px}.pay-icon-stripe-text{width:24px;height:24px}.pay-icon-alipay{width:20px;height:20px}.pay-icon-wechat-pay{width:20px;height:20px}.pay-icon-payssion-pay{width:36px;height:20px}.pay-popup{position:fixed;z-index:1001}.pay-popup-body{position:fixed;display:flex;flex-direction:column;background-color:#fff;z-index:1010;box-sizing:border-box}.pay-popup-body.pay-popup-body-position-bottom{width:100%;left:0;bottom:0}.pay-popup-body.pay-popup-body-position-top{width:100%;left:0;top:0}.pay-popup-body.pay-popup-body-position-left{height:100%;width:80vw;left:0;top:0}.pay-popup-body.pay-popup-body-position-right{height:100%;width:80vw;right:0;top:0}.pay-popup-body.pay-popup-body-round.pay-popup-body-position-bottom{border-radius:16px 16px 0 0}.pay-popup-body.pay-popup-body-round.pay-popup-body-position-top{border-radius:0 0 16px 16px}.pay-popup-body.pay-popup-body-round.pay-popup-body-position-left{border-radius:0 16px 16px 0}.pay-popup-body.pay-popup-body-round.pay-popup-body-position-right{border-radius:16px 0 0 16px}.pay-popup-close-icon{position:absolute;z-index:1;cursor:pointer;padding:4px;font-size:18px;line-height:1;color:#999}.pay-popup-body.pay-popup-body-position-bottom .pay-popup-close-icon,.pay-popup-body.pay-popup-body-position-left .pay-popup-close-icon{top:8px;right:8px}.pay-popup-body.pay-popup-body-position-top .pay-popup-close-icon{bottom:8px;right:8px}.pay-popup-body.pay-popup-body-position-right .pay-popup-close-icon{top:8px;left:8px}.pay-popup-content{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch}.pay-popup-body.pay-popup-body-with-close.pay-popup-body-position-bottom .pay-popup-content,.pay-popup-body.pay-popup-body-with-close.pay-popup-body-position-left .pay-popup-content{padding-top:40px}.pay-popup-body.pay-popup-body-with-close.pay-popup-body-position-right .pay-popup-content{padding-top:40px}.pay-popup-body.pay-popup-body-with-close.pay-popup-body-position-top .pay-popup-content{padding-bottom:40px}@media (min-width:576px){.pay-stripe-modal.pay-modal .pay-modal__content{width:72%}}@media (min-width:768px){.pay-stripe-modal.pay-modal .pay-modal__content{width:50%}}@media (min-width:992px){.pay-stripe-modal.pay-modal .pay-modal__content{width:40%}}@media (min-width:1200px){.pay-stripe-modal.pay-modal .pay-modal__content{width:27%}}@media (min-width:1600px){.pay-stripe-modal.pay-modal .pay-modal__content{width:26%}}@media (min-width:2000px){.pay-stripe-modal.pay-modal .pay-modal__content{width:20%}}
@@ -3,7 +3,22 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- var _exportNames = {};
6
+ var _exportNames = {
7
+ WechatButton: true,
8
+ WechatModal: true
9
+ };
10
+ Object.defineProperty(exports, "WechatButton", {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _wechatButton.default;
14
+ }
15
+ });
16
+ Object.defineProperty(exports, "WechatModal", {
17
+ enumerable: true,
18
+ get: function () {
19
+ return _wechatModal.default;
20
+ }
21
+ });
7
22
  exports.default = void 0;
8
23
  var _wechat = _interopRequireDefault(require("./wechat"));
9
24
  var _wechatButton = _interopRequireDefault(require("./wechat-button"));
@@ -45,6 +45,8 @@
45
45
  text-align: left;
46
46
  }
47
47
  .pay-modal__icon {
48
+ display: flex;
49
+ justify-content: center;
48
50
  margin-bottom: 8px;
49
51
  font-size: 40px;
50
52
  }
@@ -1 +1 @@
1
- .pay-modal{position:fixed;z-index:9999;left:0;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.pay-modal__mask{position:absolute;left:0;top:0;right:0;bottom:0;background:rgba(0,0,0,.55);z-index:0}.pay-modal__content{position:relative;z-index:1;background:#fff;border-radius:16px;padding:42px 20px 20px;min-width:280px;max-width:80vw;box-shadow:0 4px 24px #0001;text-align:center;max-height:60vh;display:flex;flex-direction:column}.pay-modal__close{position:absolute;right:12px;top:12px;background:0 0;border:none;font-size:32px;font-weight:500;line-height:32px;cursor:pointer;text-align:left}.pay-modal__icon{margin-bottom:8px;font-size:40px}.pay-modal__title{font-size:20px;font-weight:700;color:#222;margin-bottom:12px}.pay-modal__desc{color:#222;font-size:15px;margin-bottom:24px;line-height:1.7;text-align:left}.pay-modal__content-wrapper{position:relative;z-index:1;text-align:center;overflow-y:auto;flex:1;min-height:0}.pay-modal__actions{display:flex;justify-content:center;gap:16px;margin-top:16px}.pay-modal__btn{min-width:96px;padding:8px 0;border-radius:24px;border:none;font-size:15px;font-weight:600;cursor:pointer;transition:background .2s}.pay-modal__btn--retry{background:#fff;color:#f25a5a;border:1.5px solid #f25a5a}.pay-modal__btn--finish{background:#f25a5a;color:#fff;border:none}
1
+ .pay-modal{position:fixed;z-index:9999;left:0;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.pay-modal__mask{position:absolute;left:0;top:0;right:0;bottom:0;background:rgba(0,0,0,.55);z-index:0}.pay-modal__content{position:relative;z-index:1;background:#fff;border-radius:16px;padding:42px 20px 20px;min-width:280px;max-width:80vw;box-shadow:0 4px 24px #0001;text-align:center;max-height:60vh;display:flex;flex-direction:column}.pay-modal__close{position:absolute;right:12px;top:12px;background:0 0;border:none;font-size:32px;font-weight:500;line-height:32px;cursor:pointer;text-align:left}.pay-modal__icon{display:flex;justify-content:center;margin-bottom:8px;font-size:40px}.pay-modal__title{font-size:20px;font-weight:700;color:#222;margin-bottom:12px}.pay-modal__desc{color:#222;font-size:15px;margin-bottom:24px;line-height:1.7;text-align:left}.pay-modal__content-wrapper{position:relative;z-index:1;text-align:center;overflow-y:auto;flex:1;min-height:0}.pay-modal__actions{display:flex;justify-content:center;gap:16px;margin-top:16px}.pay-modal__btn{min-width:96px;padding:8px 0;border-radius:24px;border:none;font-size:15px;font-weight:600;cursor:pointer;transition:background .2s}.pay-modal__btn--retry{background:#fff;color:#f25a5a;border:1.5px solid #f25a5a}.pay-modal__btn--finish{background:#f25a5a;color:#fff;border:none}
@@ -45,6 +45,8 @@
45
45
  text-align: left;
46
46
  }
47
47
  .pay-modal__icon {
48
+ display: flex;
49
+ justify-content: center;
48
50
  margin-bottom: 8px;
49
51
  font-size: 40px;
50
52
  }
@@ -1 +1 @@
1
- .pay-modal{position:fixed;z-index:9999;left:0;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.pay-modal__mask{position:absolute;left:0;top:0;right:0;bottom:0;background:rgba(0,0,0,.55);z-index:0}.pay-modal__content{position:relative;z-index:1;background:#fff;border-radius:16px;padding:42px 20px 20px;min-width:280px;max-width:80vw;box-shadow:0 4px 24px #0001;text-align:center;max-height:60vh;display:flex;flex-direction:column}.pay-modal__close{position:absolute;right:12px;top:12px;background:0 0;border:none;font-size:32px;font-weight:500;line-height:32px;cursor:pointer;text-align:left}.pay-modal__icon{margin-bottom:8px;font-size:40px}.pay-modal__title{font-size:20px;font-weight:700;color:#222;margin-bottom:12px}.pay-modal__desc{color:#222;font-size:15px;margin-bottom:24px;line-height:1.7;text-align:left}.pay-modal__content-wrapper{position:relative;z-index:1;text-align:center;overflow-y:auto;flex:1;min-height:0}.pay-modal__actions{display:flex;justify-content:center;gap:16px;margin-top:16px}.pay-modal__btn{min-width:96px;padding:8px 0;border-radius:24px;border:none;font-size:15px;font-weight:600;cursor:pointer;transition:background .2s}.pay-modal__btn--retry{background:#fff;color:#f25a5a;border:1.5px solid #f25a5a}.pay-modal__btn--finish{background:#f25a5a;color:#fff;border:none}
1
+ .pay-modal{position:fixed;z-index:9999;left:0;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.pay-modal__mask{position:absolute;left:0;top:0;right:0;bottom:0;background:rgba(0,0,0,.55);z-index:0}.pay-modal__content{position:relative;z-index:1;background:#fff;border-radius:16px;padding:42px 20px 20px;min-width:280px;max-width:80vw;box-shadow:0 4px 24px #0001;text-align:center;max-height:60vh;display:flex;flex-direction:column}.pay-modal__close{position:absolute;right:12px;top:12px;background:0 0;border:none;font-size:32px;font-weight:500;line-height:32px;cursor:pointer;text-align:left}.pay-modal__icon{display:flex;justify-content:center;margin-bottom:8px;font-size:40px}.pay-modal__title{font-size:20px;font-weight:700;color:#222;margin-bottom:12px}.pay-modal__desc{color:#222;font-size:15px;margin-bottom:24px;line-height:1.7;text-align:left}.pay-modal__content-wrapper{position:relative;z-index:1;text-align:center;overflow-y:auto;flex:1;min-height:0}.pay-modal__actions{display:flex;justify-content:center;gap:16px;margin-top:16px}.pay-modal__btn{min-width:96px;padding:8px 0;border-radius:24px;border:none;font-size:15px;font-weight:600;cursor:pointer;transition:background .2s}.pay-modal__btn--retry{background:#fff;color:#f25a5a;border:1.5px solid #f25a5a}.pay-modal__btn--finish{background:#f25a5a;color:#fff;border:none}
@@ -5529,7 +5529,6 @@
5529
5529
  const paypalButtonRef = React.useRef(null);
5530
5530
  const [showMask, setShowMask] = React.useState(false);
5531
5531
  const [paypalUrl, setPaypalUrl] = React.useState();
5532
- // 监听 isPayment 状态变化,当支付完成时隐藏蒙层
5533
5532
  React.useEffect(() => {
5534
5533
  if (createOrder && isPayment) {
5535
5534
  setShowMask(false);
@@ -16552,7 +16551,6 @@
16552
16551
  WechatComponent.Modal = WechatModal$1;
16553
16552
 
16554
16553
  const PayButton = React.forwardRef((props, ref) => {
16555
- // 使用类型断言来确保 ref 类型正确
16556
16554
  const typedRef = ref;
16557
16555
  if (props.payMethod === exports.PaymentMethod.PaypalH5 ||
16558
16556
  props.payMethod === exports.PaymentMethod.PaypalPc) {
@@ -16560,10 +16558,10 @@
16560
16558
  }
16561
16559
  if (props.payMethod === exports.PaymentMethod.StripeH5 ||
16562
16560
  props.payMethod === exports.PaymentMethod.StripePc) {
16563
- return (jsxRuntimeExports.jsx(StripeComponent.Button, { ref: typedRef, ...props }));
16561
+ return (jsxRuntimeExports.jsx(StripeButton$1, { ref: typedRef, ...props }));
16564
16562
  }
16565
16563
  if (props.payMethod === exports.PaymentMethod.Airwallex) {
16566
- return (jsxRuntimeExports.jsx(AirwallexComponent.Button, { ref: typedRef, ...props }));
16564
+ return (jsxRuntimeExports.jsx(AirwallexButton$1, { ref: typedRef, ...props }));
16567
16565
  }
16568
16566
  if (props.payMethod === exports.PaymentMethod.Payssion) {
16569
16567
  return (jsxRuntimeExports.jsx(PayssionButton$1, { ref: typedRef, ...props }));
@@ -16572,13 +16570,13 @@
16572
16570
  return (jsxRuntimeExports.jsx(MWechatButton$1, { ref: typedRef, ...props }));
16573
16571
  }
16574
16572
  if (props.payMethod === exports.PaymentMethod.AlipayH5) {
16575
- return (jsxRuntimeExports.jsx(MAlipayComponent.Button, { ref: typedRef, ...props }));
16573
+ return (jsxRuntimeExports.jsx(MAlipayButton$1, { ref: typedRef, ...props }));
16576
16574
  }
16577
16575
  if (props.payMethod === exports.PaymentMethod.AlipayPc) {
16578
- return (jsxRuntimeExports.jsx(AlipayComponent.Button, { ref: typedRef, ...props }));
16576
+ return (jsxRuntimeExports.jsx(AlipayButton$1, { ref: typedRef, ...props }));
16579
16577
  }
16580
16578
  if (props.payMethod === exports.PaymentMethod.WechatPc) {
16581
- return (jsxRuntimeExports.jsx(WechatComponent.Button, { ref: typedRef, ...props }));
16579
+ return (jsxRuntimeExports.jsx(WechatButton$1, { ref: typedRef, ...props }));
16582
16580
  }
16583
16581
  return null;
16584
16582
  });