pay-sdk-react 1.1.13 → 1.1.14
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/README.md +226 -8
- package/README.zh-CN.md +225 -8
- package/dist/css/index.css +75 -6
- package/dist/css/index.min.css +1 -1
- package/dist/es/Airwallex/style/index.css +2 -2
- package/dist/es/Airwallex/style/index.min.css +1 -1
- package/dist/es/Alipay/style/index.css +2 -2
- package/dist/es/Alipay/style/index.min.css +1 -1
- package/dist/es/MAlipay/style/index.css +2 -2
- package/dist/es/MAlipay/style/index.min.css +1 -1
- package/dist/es/MPix/index.d.ts +2 -0
- package/dist/es/MPix/index.js +2 -0
- package/dist/es/MPix/interface.d.ts +44 -0
- package/dist/es/MPix/interface.js +1 -0
- package/dist/es/MPix/m-pix-button.d.ts +6 -0
- package/dist/es/MPix/m-pix-button.js +159 -0
- package/dist/es/MPix/style/index.css +256 -0
- package/dist/es/MPix/style/index.d.ts +1 -0
- package/dist/es/MPix/style/index.js +1 -0
- package/dist/es/MPix/style/index.min.css +1 -0
- package/dist/es/MWeChat/style/index.css +2 -2
- package/dist/es/MWeChat/style/index.min.css +1 -1
- package/dist/es/PayButton/index.js +12 -0
- package/dist/es/PayButton/interface.d.ts +28 -2
- package/dist/es/Pix/index.d.ts +11 -0
- package/dist/es/Pix/index.js +10 -0
- package/dist/es/Pix/interface.d.ts +80 -0
- package/dist/es/Pix/interface.js +1 -0
- package/dist/es/Pix/pix-button.d.ts +6 -0
- package/dist/es/Pix/pix-button.js +80 -0
- package/dist/es/Pix/pix-modal.d.ts +6 -0
- package/dist/es/Pix/pix-modal.js +57 -0
- package/dist/es/Pix/pix.d.ts +4 -0
- package/dist/es/Pix/pix.js +120 -0
- package/dist/es/Pix/style/index.css +69 -0
- package/dist/es/Pix/style/index.d.ts +1 -0
- package/dist/es/Pix/style/index.js +1 -0
- package/dist/es/Pix/style/index.min.css +1 -0
- package/dist/es/Stripe/style/index.css +2 -2
- package/dist/es/Stripe/style/index.min.css +1 -1
- package/dist/es/Wechat/style/index.css +2 -2
- package/dist/es/Wechat/style/index.min.css +1 -1
- package/dist/es/confirm-modal/style/index.css +2 -2
- package/dist/es/confirm-modal/style/index.min.css +1 -1
- package/dist/es/icons/IconCheck/index.d.ts +4 -0
- package/dist/es/icons/IconCheck/index.js +22 -0
- package/dist/es/icons/IconCopy/index.d.ts +4 -0
- package/dist/es/icons/IconCopy/index.js +27 -0
- package/dist/es/icons/IconPix/index.d.ts +4 -0
- package/dist/es/icons/IconPix/index.js +33 -0
- package/dist/es/icons/index.d.ts +3 -0
- package/dist/es/icons/index.js +4 -1
- package/dist/es/index.d.ts +17 -0
- package/dist/es/index.js +9 -0
- package/dist/es/pay-modal/style/index.css +2 -2
- package/dist/es/pay-modal/style/index.min.css +1 -1
- package/dist/es/shared/enums/index.d.ts +11 -1
- package/dist/es/shared/enums/index.js +10 -0
- package/dist/lib/Airwallex/style/index.css +2 -2
- package/dist/lib/Airwallex/style/index.min.css +1 -1
- package/dist/lib/Alipay/style/index.css +2 -2
- package/dist/lib/Alipay/style/index.min.css +1 -1
- package/dist/lib/MAlipay/style/index.css +2 -2
- package/dist/lib/MAlipay/style/index.min.css +1 -1
- package/dist/lib/MPix/index.js +28 -0
- package/dist/lib/MPix/interface.js +5 -0
- package/dist/lib/MPix/m-pix-button.js +127 -0
- package/dist/lib/MPix/style/index.css +256 -0
- package/dist/lib/MPix/style/index.js +3 -0
- package/dist/lib/MPix/style/index.min.css +1 -0
- package/dist/lib/MWeChat/style/index.css +2 -2
- package/dist/lib/MWeChat/style/index.min.css +1 -1
- package/dist/lib/PayButton/index.js +12 -0
- package/dist/lib/Pix/index.js +43 -0
- package/dist/lib/Pix/interface.js +5 -0
- package/dist/lib/Pix/pix-button.js +68 -0
- package/dist/lib/Pix/pix-modal.js +50 -0
- package/dist/lib/Pix/pix.js +92 -0
- package/dist/lib/Pix/style/index.css +69 -0
- package/dist/lib/Pix/style/index.js +3 -0
- package/dist/lib/Pix/style/index.min.css +1 -0
- package/dist/lib/Stripe/style/index.css +2 -2
- package/dist/lib/Stripe/style/index.min.css +1 -1
- package/dist/lib/Wechat/style/index.css +2 -2
- package/dist/lib/Wechat/style/index.min.css +1 -1
- package/dist/lib/confirm-modal/style/index.css +2 -2
- package/dist/lib/confirm-modal/style/index.min.css +1 -1
- package/dist/lib/icons/IconCheck/index.js +27 -0
- package/dist/lib/icons/IconCopy/index.js +32 -0
- package/dist/lib/icons/IconPix/index.js +38 -0
- package/dist/lib/icons/index.js +25 -1
- package/dist/lib/index.js +29 -0
- package/dist/lib/pay-modal/style/index.css +2 -2
- package/dist/lib/pay-modal/style/index.min.css +1 -1
- package/dist/lib/shared/enums/index.js +10 -0
- package/dist/umd/pay-sdk-react.umd.js +304 -69
- package/dist/umd/pay-sdk-react.umd.js.map +1 -1
- package/package.json +29 -24
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import omit from '../../utils/omit';
|
|
4
|
+
import { getPrefixCls } from '../../utils/getPrefixCls';
|
|
5
|
+
var classPrefix = getPrefixCls('icon');
|
|
6
|
+
var IconPix = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
7
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
8
|
+
ref: ref,
|
|
9
|
+
viewBox: "0 0 24 24",
|
|
10
|
+
width: "1em",
|
|
11
|
+
height: "1em",
|
|
12
|
+
fill: "currentColor",
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
className: "".concat(classPrefix, " ").concat(classPrefix, "-pix")
|
|
15
|
+
}, omit(props, ['className'])), /*#__PURE__*/React.createElement("path", {
|
|
16
|
+
d: "M18.5 4.87a8.5 8.5 0 0 1 0 14.26L13.23 23a1.5 1.5 0 0 1-2.46 0L5.5 19.13A8.5 8.5 0 0 1 5.5 4.87L10.77 1a1.5 1.5 0 0 1 2.46 0l5.27 3.87z",
|
|
17
|
+
fill: "#32BCAD"
|
|
18
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
19
|
+
d: "M13.23 1a1.5 1.5 0 0 0-2.46 0L5.5 4.87a8.5 8.5 0 0 0 0 14.26l5.27 3.87a1.5 1.5 0 0 0 2.46 0l5.27-3.87a8.5 8.5 0 0 0 0-14.26L13.23 1z",
|
|
20
|
+
fill: "none",
|
|
21
|
+
stroke: "#32BCAD",
|
|
22
|
+
strokeWidth: "0.5"
|
|
23
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
24
|
+
d: "M9.5 7.5h5l-5 9h5",
|
|
25
|
+
fill: "none",
|
|
26
|
+
stroke: "#fff",
|
|
27
|
+
strokeWidth: "1.8",
|
|
28
|
+
strokeLinecap: "round",
|
|
29
|
+
strokeLinejoin: "round"
|
|
30
|
+
}));
|
|
31
|
+
});
|
|
32
|
+
IconPix.displayName = 'IconPix';
|
|
33
|
+
export default IconPix;
|
package/dist/es/icons/index.d.ts
CHANGED
|
@@ -7,3 +7,6 @@ export { default as IconStripeText } from './IconStripeText';
|
|
|
7
7
|
export { default as IconAlipay } from './IconAlipay';
|
|
8
8
|
export { default as IconWechatPay } from './IconWechatPay';
|
|
9
9
|
export { default as IconPayssionPay } from './IconPayssionPay';
|
|
10
|
+
export { default as IconPix } from './IconPix';
|
|
11
|
+
export { default as IconCopy } from './IconCopy';
|
|
12
|
+
export { default as IconCheck } from './IconCheck';
|
package/dist/es/icons/index.js
CHANGED
|
@@ -6,4 +6,7 @@ export { default as IconStripe } from './IconStripe';
|
|
|
6
6
|
export { default as IconStripeText } from './IconStripeText';
|
|
7
7
|
export { default as IconAlipay } from './IconAlipay';
|
|
8
8
|
export { default as IconWechatPay } from './IconWechatPay';
|
|
9
|
-
export { default as IconPayssionPay } from './IconPayssionPay';
|
|
9
|
+
export { default as IconPayssionPay } from './IconPayssionPay';
|
|
10
|
+
export { default as IconPix } from './IconPix';
|
|
11
|
+
export { default as IconCopy } from './IconCopy';
|
|
12
|
+
export { default as IconCheck } from './IconCheck';
|
package/dist/es/index.d.ts
CHANGED
|
@@ -98,6 +98,23 @@ declare const Wechat: import("react").NamedExoticComponent<import("./Wechat").We
|
|
|
98
98
|
};
|
|
99
99
|
export { Wechat };
|
|
100
100
|
export { WechatButton, WechatModal };
|
|
101
|
+
export type { PixProps, PixButtonProps, PixButtonRef, CreateOrderPixFn, PixModalProps, PixModalRef, } from './Pix/interface';
|
|
102
|
+
import { PixButton, PixModal } from './Pix';
|
|
103
|
+
declare const Pix: import("react").NamedExoticComponent<import("./Pix").PixProps> & {
|
|
104
|
+
Button: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./Pix").PixButtonProps & {
|
|
105
|
+
children?: import("react").ReactNode;
|
|
106
|
+
} & import("react").RefAttributes<import("./Pix").PixButtonRef>>>;
|
|
107
|
+
Modal: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./Pix").PixModalProps & {
|
|
108
|
+
children?: import("react").ReactNode;
|
|
109
|
+
} & import("react").RefAttributes<import("./Pix").PixModalRef>>>;
|
|
110
|
+
} & {
|
|
111
|
+
Button: typeof PixButton;
|
|
112
|
+
Modal: typeof PixModal;
|
|
113
|
+
};
|
|
114
|
+
export { Pix };
|
|
115
|
+
export { PixButton, PixModal };
|
|
116
|
+
export type { MPixButtonProps, MPixButtonRef, CreateOrderMPixFn, MPixFormData, } from './MPix/interface';
|
|
117
|
+
export { MPixButton } from './MPix';
|
|
101
118
|
export type { PayButtonProps, GenericPayButtonRef, } from './PayButton/interface';
|
|
102
119
|
import PayButton from './PayButton';
|
|
103
120
|
export { PayButton };
|
package/dist/es/index.js
CHANGED
|
@@ -42,6 +42,15 @@ var Wechat = Object.assign({}, WechatDefault, {
|
|
|
42
42
|
});
|
|
43
43
|
export { Wechat };
|
|
44
44
|
export { WechatButton, WechatModal };
|
|
45
|
+
import PixDefault from './Pix';
|
|
46
|
+
import { PixButton, PixModal } from './Pix';
|
|
47
|
+
var Pix = Object.assign({}, PixDefault, {
|
|
48
|
+
Button: PixButton,
|
|
49
|
+
Modal: PixModal
|
|
50
|
+
});
|
|
51
|
+
export { Pix };
|
|
52
|
+
export { PixButton, PixModal };
|
|
53
|
+
export { MPixButton } from './MPix';
|
|
45
54
|
import PayButton from './PayButton';
|
|
46
55
|
export { PayButton };
|
|
47
56
|
export * from './shared';
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
max-width: 80vw;
|
|
29
29
|
box-shadow: 0 4px 24px #0001;
|
|
30
30
|
text-align: center;
|
|
31
|
-
max-height:
|
|
31
|
+
max-height: 80vh;
|
|
32
32
|
display: flex;
|
|
33
33
|
flex-direction: column;
|
|
34
34
|
}
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
z-index: 1;
|
|
69
69
|
text-align: center;
|
|
70
70
|
overflow-y: auto;
|
|
71
|
-
flex: 1;
|
|
71
|
+
flex: 0 1 auto;
|
|
72
72
|
min-height: 0;
|
|
73
73
|
}
|
|
74
74
|
.pay-modal__actions {
|
|
@@ -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:
|
|
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:80vh;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:0 1 auto;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}
|
|
@@ -53,7 +53,17 @@ export declare enum PaymentMethod {
|
|
|
53
53
|
* @zh 空中云汇
|
|
54
54
|
* @en Airwallex
|
|
55
55
|
*/
|
|
56
|
-
Airwallex = "airwallex"
|
|
56
|
+
Airwallex = "airwallex",
|
|
57
|
+
/**
|
|
58
|
+
* @zh PIX(pc)
|
|
59
|
+
* @en PIX(pc)
|
|
60
|
+
*/
|
|
61
|
+
PixPc = "pix-pc",
|
|
62
|
+
/**
|
|
63
|
+
* @zh PIX(H5)
|
|
64
|
+
* @en PIX(H5)
|
|
65
|
+
*/
|
|
66
|
+
PixH5 = "pix-h5"
|
|
57
67
|
}
|
|
58
68
|
/**
|
|
59
69
|
* @zh 支付页面打开模式枚举
|
|
@@ -54,6 +54,16 @@ export var PaymentMethod = /*#__PURE__*/function (PaymentMethod) {
|
|
|
54
54
|
* @en Airwallex
|
|
55
55
|
*/
|
|
56
56
|
PaymentMethod["Airwallex"] = "airwallex";
|
|
57
|
+
/**
|
|
58
|
+
* @zh PIX(pc)
|
|
59
|
+
* @en PIX(pc)
|
|
60
|
+
*/
|
|
61
|
+
PaymentMethod["PixPc"] = "pix-pc";
|
|
62
|
+
/**
|
|
63
|
+
* @zh PIX(H5)
|
|
64
|
+
* @en PIX(H5)
|
|
65
|
+
*/
|
|
66
|
+
PaymentMethod["PixH5"] = "pix-h5";
|
|
57
67
|
return PaymentMethod;
|
|
58
68
|
}({});
|
|
59
69
|
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
max-width: 80vw;
|
|
124
124
|
box-shadow: 0 4px 24px #0001;
|
|
125
125
|
text-align: center;
|
|
126
|
-
max-height:
|
|
126
|
+
max-height: 80vh;
|
|
127
127
|
display: flex;
|
|
128
128
|
flex-direction: column;
|
|
129
129
|
}
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
z-index: 1;
|
|
164
164
|
text-align: center;
|
|
165
165
|
overflow-y: auto;
|
|
166
|
-
flex: 1;
|
|
166
|
+
flex: 0 1 auto;
|
|
167
167
|
min-height: 0;
|
|
168
168
|
}
|
|
169
169
|
.pay-modal__actions {
|
|
@@ -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:
|
|
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:80vh;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:0 1 auto;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}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.pay-alipay-qr-iframe{display:flex;flex-direction:column;align-items:center}.pay-alipay-qr-iframe__iframe{border:none;width:
|
|
1
|
+
.pay-alipay-qr-iframe{display:flex;flex-direction:column;align-items:center}.pay-alipay-qr-iframe__iframe{border:none;width:180px;height:180px;margin-top:10px;margin-bottom:8px}.pay-alipay-qr-iframe__tip{text-align:center;color:#333;font-size:14px;line-height:20px}
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
max-width: 80vw;
|
|
186
186
|
box-shadow: 0 4px 24px #0001;
|
|
187
187
|
text-align: center;
|
|
188
|
-
max-height:
|
|
188
|
+
max-height: 80vh;
|
|
189
189
|
display: flex;
|
|
190
190
|
flex-direction: column;
|
|
191
191
|
}
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
z-index: 1;
|
|
226
226
|
text-align: center;
|
|
227
227
|
overflow-y: auto;
|
|
228
|
-
flex: 1;
|
|
228
|
+
flex: 0 1 auto;
|
|
229
229
|
min-height: 0;
|
|
230
230
|
}
|
|
231
231
|
.pay-modal__actions {
|
|
@@ -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-mask{position:fixed;z-index:1000;left:0;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.pay-mask-content{position:relative;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0 88px}.pay-mask-close{position:absolute;right:12px;top:12px;background:0 0;border:none;font-size:28px;color:#fff;cursor:pointer;z-index:1}.pay-mask-title{display:flex;align-items:center;gap:4px;font-weight:700;font-size:28px;color:#fff;margin-bottom:16px;text-shadow:0 2px 8px #000}.pay-mask-title>.pay-icon-paypal-white{width:36px;height:36px}.pay-mask-desc{color:#fff;text-align:center;margin-bottom:24px;line-height:1.5;white-space:pre-line}.pay-mask-continue{color:#fff;font-weight:700;text-decoration:underline;text-underline-offset:4px;cursor:pointer;text-align:center;font-size:18px}.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:
|
|
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-mask{position:fixed;z-index:1000;left:0;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.pay-mask-content{position:relative;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0 88px}.pay-mask-close{position:absolute;right:12px;top:12px;background:0 0;border:none;font-size:28px;color:#fff;cursor:pointer;z-index:1}.pay-mask-title{display:flex;align-items:center;gap:4px;font-weight:700;font-size:28px;color:#fff;margin-bottom:16px;text-shadow:0 2px 8px #000}.pay-mask-title>.pay-icon-paypal-white{width:36px;height:36px}.pay-mask-desc{color:#fff;text-align:center;margin-bottom:24px;line-height:1.5;white-space:pre-line}.pay-mask-continue{color:#fff;font-weight:700;text-decoration:underline;text-underline-offset:4px;cursor:pointer;text-align:center;font-size:18px}.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:80vh;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:0 1 auto;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}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
MPixButton: true
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "MPixButton", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () {
|
|
12
|
+
return _mPixButton.default;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
var _interface = require("./interface");
|
|
16
|
+
Object.keys(_interface).forEach(function (key) {
|
|
17
|
+
if (key === "default" || key === "__esModule") return;
|
|
18
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
19
|
+
if (key in exports && exports[key] === _interface[key]) return;
|
|
20
|
+
Object.defineProperty(exports, key, {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () {
|
|
23
|
+
return _interface[key];
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
var _mPixButton = _interopRequireDefault(require("./m-pix-button"));
|
|
28
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _classNames = _interopRequireDefault(require("../utils/classNames"));
|
|
9
|
+
var _PayMask = _interopRequireDefault(require("../PayMask"));
|
|
10
|
+
var _confirmModal = _interopRequireDefault(require("../confirm-modal"));
|
|
11
|
+
var _Button = _interopRequireDefault(require("../Button"));
|
|
12
|
+
var _icons = require("../icons");
|
|
13
|
+
var _getPrefixCls = require("../utils/getPrefixCls");
|
|
14
|
+
var _omit = _interopRequireDefault(require("../utils/omit"));
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
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); }
|
|
17
|
+
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); }
|
|
18
|
+
const MPixButton = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
19
|
+
const {
|
|
20
|
+
className,
|
|
21
|
+
children = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_icons.IconPix, null), "PIX"),
|
|
22
|
+
onClick,
|
|
23
|
+
pixCode: propsPixCode,
|
|
24
|
+
createOrder,
|
|
25
|
+
displayType = 'modal',
|
|
26
|
+
modalProps,
|
|
27
|
+
maskProps,
|
|
28
|
+
...others
|
|
29
|
+
} = props;
|
|
30
|
+
const {
|
|
31
|
+
retryButtonProps,
|
|
32
|
+
finishButtonProps,
|
|
33
|
+
onClose,
|
|
34
|
+
...modalPropsOthers
|
|
35
|
+
} = modalProps || {};
|
|
36
|
+
const {
|
|
37
|
+
onClose: onMaskClose,
|
|
38
|
+
...restMaskProps
|
|
39
|
+
} = maskProps || {};
|
|
40
|
+
const mPixButtonRef = (0, _react.useRef)({
|
|
41
|
+
nativeElement: null
|
|
42
|
+
});
|
|
43
|
+
const [showMask, setShowMask] = (0, _react.useState)(false);
|
|
44
|
+
const [showModal, setShowModal] = (0, _react.useState)(false);
|
|
45
|
+
const [pixCode, setPixCode] = (0, _react.useState)();
|
|
46
|
+
(0, _react.useImperativeHandle)(ref, () => mPixButtonRef.current);
|
|
47
|
+
const handleRetry = (0, _react.useCallback)(event => {
|
|
48
|
+
if (displayType === 'modal') {
|
|
49
|
+
var _retryButtonProps$onC;
|
|
50
|
+
retryButtonProps === null || retryButtonProps === void 0 || (_retryButtonProps$onC = retryButtonProps.onClick) === null || _retryButtonProps$onC === void 0 || _retryButtonProps$onC.call(retryButtonProps, event);
|
|
51
|
+
setShowModal(false);
|
|
52
|
+
}
|
|
53
|
+
}, [retryButtonProps, displayType]);
|
|
54
|
+
const handleFinish = (0, _react.useCallback)(event => {
|
|
55
|
+
if (displayType === 'modal') {
|
|
56
|
+
var _finishButtonProps$on;
|
|
57
|
+
finishButtonProps === null || finishButtonProps === void 0 || (_finishButtonProps$on = finishButtonProps.onClick) === null || _finishButtonProps$on === void 0 || _finishButtonProps$on.call(finishButtonProps, event);
|
|
58
|
+
setShowModal(false);
|
|
59
|
+
}
|
|
60
|
+
}, [finishButtonProps, displayType]);
|
|
61
|
+
const handleDisplay = (0, _react.useCallback)(() => {
|
|
62
|
+
if (displayType === 'modal') {
|
|
63
|
+
setShowModal(true);
|
|
64
|
+
} else {
|
|
65
|
+
setShowMask(true);
|
|
66
|
+
}
|
|
67
|
+
}, [displayType]);
|
|
68
|
+
const handleOnCloseModal = (0, _react.useCallback)(() => {
|
|
69
|
+
if (displayType === 'modal') {
|
|
70
|
+
onClose === null || onClose === void 0 || onClose();
|
|
71
|
+
setShowModal(false);
|
|
72
|
+
}
|
|
73
|
+
}, [onClose, displayType]);
|
|
74
|
+
const handlePayCreateOrder = (0, _react.useCallback)(async () => {
|
|
75
|
+
if (createOrder) {
|
|
76
|
+
const {
|
|
77
|
+
pixCode: code
|
|
78
|
+
} = await createOrder();
|
|
79
|
+
if (code) {
|
|
80
|
+
handleDisplay();
|
|
81
|
+
setPixCode(code);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}, [createOrder, handleDisplay]);
|
|
85
|
+
const handleOpen = (0, _react.useCallback)(() => {
|
|
86
|
+
if (propsPixCode) {
|
|
87
|
+
handleDisplay();
|
|
88
|
+
setPixCode(propsPixCode);
|
|
89
|
+
}
|
|
90
|
+
}, [propsPixCode, handleDisplay]);
|
|
91
|
+
const handleClick = (0, _react.useCallback)(e => {
|
|
92
|
+
if (createOrder) {
|
|
93
|
+
handlePayCreateOrder();
|
|
94
|
+
} else {
|
|
95
|
+
handleOpen();
|
|
96
|
+
}
|
|
97
|
+
onClick === null || onClick === void 0 || onClick(e);
|
|
98
|
+
}, [onClick, createOrder, handlePayCreateOrder, handleOpen]);
|
|
99
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Button.default, _extends({
|
|
100
|
+
ref: mPixButtonRef,
|
|
101
|
+
className: (0, _classNames.default)((0, _getPrefixCls.getPrefixCls)('m-pix-btn'), className),
|
|
102
|
+
onClick: handleClick
|
|
103
|
+
}, others), children), displayType === 'mask' && showMask && pixCode && /*#__PURE__*/_react.default.createElement(_PayMask.default, _extends({
|
|
104
|
+
visible: showMask,
|
|
105
|
+
onClose: () => {
|
|
106
|
+
setShowMask(false);
|
|
107
|
+
onMaskClose === null || onMaskClose === void 0 || onMaskClose();
|
|
108
|
+
},
|
|
109
|
+
payUrl: pixCode,
|
|
110
|
+
title: 'PIX'
|
|
111
|
+
}, restMaskProps)), displayType === 'modal' && showModal && pixCode && /*#__PURE__*/_react.default.createElement(_confirmModal.default, _extends({
|
|
112
|
+
visible: showModal,
|
|
113
|
+
onClose: handleOnCloseModal,
|
|
114
|
+
retryButtonProps: {
|
|
115
|
+
onClick: handleRetry,
|
|
116
|
+
...(0, _omit.default)(retryButtonProps || {}, ['onClick'])
|
|
117
|
+
},
|
|
118
|
+
finishButtonProps: {
|
|
119
|
+
onClick: handleFinish,
|
|
120
|
+
...(0, _omit.default)(finishButtonProps || {}, ['onClick'])
|
|
121
|
+
},
|
|
122
|
+
payUrl: pixCode,
|
|
123
|
+
autoOpenWindow: true
|
|
124
|
+
}, modalPropsOthers)));
|
|
125
|
+
});
|
|
126
|
+
MPixButton.displayName = 'MPixButton';
|
|
127
|
+
var _default = exports.default = /*#__PURE__*/(0, _react.memo)(MPixButton);
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
.pay-dot-loading {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
}
|
|
4
|
+
.pay-button {
|
|
5
|
+
display: inline-block;
|
|
6
|
+
padding: 7px 12px;
|
|
7
|
+
font-size: 16px;
|
|
8
|
+
border-radius: 4px;
|
|
9
|
+
border: 1px solid #eee;
|
|
10
|
+
background: #fff;
|
|
11
|
+
color: #333;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
transition: all 0.2s;
|
|
14
|
+
user-select: none;
|
|
15
|
+
position: relative;
|
|
16
|
+
text-align: center;
|
|
17
|
+
}
|
|
18
|
+
.pay-button-content {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
gap: 6px;
|
|
23
|
+
}
|
|
24
|
+
.pay-button-block {
|
|
25
|
+
display: block;
|
|
26
|
+
width: 100%;
|
|
27
|
+
}
|
|
28
|
+
.pay-button-disabled {
|
|
29
|
+
opacity: 0.4;
|
|
30
|
+
cursor: not-allowed;
|
|
31
|
+
}
|
|
32
|
+
.pay-button-loading {
|
|
33
|
+
cursor: wait;
|
|
34
|
+
}
|
|
35
|
+
.pay-button-loading-wrapper {
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
gap: 6px;
|
|
40
|
+
}
|
|
41
|
+
.pay-button-primary {
|
|
42
|
+
background: #1677ff;
|
|
43
|
+
border-color: #1677ff;
|
|
44
|
+
color: #fff;
|
|
45
|
+
}
|
|
46
|
+
.pay-button-primary:hover {
|
|
47
|
+
background: #409eff;
|
|
48
|
+
}
|
|
49
|
+
.pay-button-success {
|
|
50
|
+
background: #00b578;
|
|
51
|
+
border-color: #00b578;
|
|
52
|
+
color: #fff;
|
|
53
|
+
}
|
|
54
|
+
.pay-button-danger {
|
|
55
|
+
background: #ff3141;
|
|
56
|
+
border-color: #ff3141;
|
|
57
|
+
color: #fff;
|
|
58
|
+
}
|
|
59
|
+
.pay-button-warning {
|
|
60
|
+
background: #ff8f1f;
|
|
61
|
+
border-color: #ff8f1f;
|
|
62
|
+
color: #fff;
|
|
63
|
+
}
|
|
64
|
+
.pay-button-default {
|
|
65
|
+
background: #fff;
|
|
66
|
+
border-color: #eee;
|
|
67
|
+
color: #333;
|
|
68
|
+
}
|
|
69
|
+
.pay-button-fill-outline {
|
|
70
|
+
background: transparent;
|
|
71
|
+
color: inherit;
|
|
72
|
+
}
|
|
73
|
+
.pay-button-fill-none {
|
|
74
|
+
background: transparent;
|
|
75
|
+
border: none;
|
|
76
|
+
color: inherit;
|
|
77
|
+
}
|
|
78
|
+
.pay-button-mini {
|
|
79
|
+
font-size: 12px;
|
|
80
|
+
padding: 2px 8px;
|
|
81
|
+
}
|
|
82
|
+
.pay-button-small {
|
|
83
|
+
font-size: 14px;
|
|
84
|
+
padding: 4px 10px;
|
|
85
|
+
}
|
|
86
|
+
.pay-button-large {
|
|
87
|
+
font-size: 18px;
|
|
88
|
+
padding: 10px 18px;
|
|
89
|
+
}
|
|
90
|
+
.pay-button-shape-rounded {
|
|
91
|
+
border-radius: 1000px;
|
|
92
|
+
}
|
|
93
|
+
.pay-button-shape-rectangular {
|
|
94
|
+
border-radius: 0;
|
|
95
|
+
}
|
|
96
|
+
.pay-mask {
|
|
97
|
+
position: fixed;
|
|
98
|
+
z-index: 1000;
|
|
99
|
+
left: 0;
|
|
100
|
+
top: 0;
|
|
101
|
+
right: 0;
|
|
102
|
+
bottom: 0;
|
|
103
|
+
display: flex;
|
|
104
|
+
align-items: center;
|
|
105
|
+
justify-content: center;
|
|
106
|
+
}
|
|
107
|
+
.pay-mask-content {
|
|
108
|
+
position: relative;
|
|
109
|
+
width: 100%;
|
|
110
|
+
height: 100%;
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-direction: column;
|
|
113
|
+
align-items: center;
|
|
114
|
+
justify-content: center;
|
|
115
|
+
padding: 0 88px;
|
|
116
|
+
}
|
|
117
|
+
.pay-mask-close {
|
|
118
|
+
position: absolute;
|
|
119
|
+
right: 12px;
|
|
120
|
+
top: 12px;
|
|
121
|
+
background: none;
|
|
122
|
+
border: none;
|
|
123
|
+
font-size: 28px;
|
|
124
|
+
color: #fff;
|
|
125
|
+
cursor: pointer;
|
|
126
|
+
z-index: 1;
|
|
127
|
+
}
|
|
128
|
+
.pay-mask-title {
|
|
129
|
+
display: flex;
|
|
130
|
+
align-items: center;
|
|
131
|
+
gap: 4px;
|
|
132
|
+
font-weight: 700;
|
|
133
|
+
font-size: 28px;
|
|
134
|
+
color: #fff;
|
|
135
|
+
margin-bottom: 16px;
|
|
136
|
+
text-shadow: 0 2px 8px #000;
|
|
137
|
+
}
|
|
138
|
+
.pay-mask-title > .pay-icon-paypal-white {
|
|
139
|
+
width: 36px;
|
|
140
|
+
height: 36px;
|
|
141
|
+
}
|
|
142
|
+
.pay-mask-desc {
|
|
143
|
+
color: #fff;
|
|
144
|
+
text-align: center;
|
|
145
|
+
margin-bottom: 24px;
|
|
146
|
+
line-height: 1.5;
|
|
147
|
+
white-space: pre-line;
|
|
148
|
+
}
|
|
149
|
+
.pay-mask-continue {
|
|
150
|
+
color: #fff;
|
|
151
|
+
font-weight: 700;
|
|
152
|
+
text-decoration: underline;
|
|
153
|
+
text-underline-offset: 4px;
|
|
154
|
+
cursor: pointer;
|
|
155
|
+
text-align: center;
|
|
156
|
+
font-size: 18px;
|
|
157
|
+
}
|
|
158
|
+
.pay-modal {
|
|
159
|
+
position: fixed;
|
|
160
|
+
z-index: 9999;
|
|
161
|
+
left: 0;
|
|
162
|
+
top: 0;
|
|
163
|
+
right: 0;
|
|
164
|
+
bottom: 0;
|
|
165
|
+
display: flex;
|
|
166
|
+
align-items: center;
|
|
167
|
+
justify-content: center;
|
|
168
|
+
}
|
|
169
|
+
.pay-modal__mask {
|
|
170
|
+
position: absolute;
|
|
171
|
+
left: 0;
|
|
172
|
+
top: 0;
|
|
173
|
+
right: 0;
|
|
174
|
+
bottom: 0;
|
|
175
|
+
background: rgba(0, 0, 0, 0.55);
|
|
176
|
+
z-index: 0;
|
|
177
|
+
}
|
|
178
|
+
.pay-modal__content {
|
|
179
|
+
position: relative;
|
|
180
|
+
z-index: 1;
|
|
181
|
+
background: #fff;
|
|
182
|
+
border-radius: 16px;
|
|
183
|
+
padding: 42px 20px 20px 20px;
|
|
184
|
+
min-width: 280px;
|
|
185
|
+
max-width: 80vw;
|
|
186
|
+
box-shadow: 0 4px 24px #0001;
|
|
187
|
+
text-align: center;
|
|
188
|
+
max-height: 80vh;
|
|
189
|
+
display: flex;
|
|
190
|
+
flex-direction: column;
|
|
191
|
+
}
|
|
192
|
+
.pay-modal__close {
|
|
193
|
+
position: absolute;
|
|
194
|
+
right: 12px;
|
|
195
|
+
top: 12px;
|
|
196
|
+
background: none;
|
|
197
|
+
border: none;
|
|
198
|
+
font-size: 32px;
|
|
199
|
+
font-weight: 500;
|
|
200
|
+
line-height: 32px;
|
|
201
|
+
cursor: pointer;
|
|
202
|
+
text-align: left;
|
|
203
|
+
}
|
|
204
|
+
.pay-modal__icon {
|
|
205
|
+
display: flex;
|
|
206
|
+
justify-content: center;
|
|
207
|
+
margin-bottom: 8px;
|
|
208
|
+
font-size: 40px;
|
|
209
|
+
}
|
|
210
|
+
.pay-modal__title {
|
|
211
|
+
font-size: 20px;
|
|
212
|
+
font-weight: 700;
|
|
213
|
+
color: #222;
|
|
214
|
+
margin-bottom: 12px;
|
|
215
|
+
}
|
|
216
|
+
.pay-modal__desc {
|
|
217
|
+
color: #222;
|
|
218
|
+
font-size: 15px;
|
|
219
|
+
margin-bottom: 24px;
|
|
220
|
+
line-height: 1.7;
|
|
221
|
+
text-align: left;
|
|
222
|
+
}
|
|
223
|
+
.pay-modal__content-wrapper {
|
|
224
|
+
position: relative;
|
|
225
|
+
z-index: 1;
|
|
226
|
+
text-align: center;
|
|
227
|
+
overflow-y: auto;
|
|
228
|
+
flex: 0 1 auto;
|
|
229
|
+
min-height: 0;
|
|
230
|
+
}
|
|
231
|
+
.pay-modal__actions {
|
|
232
|
+
display: flex;
|
|
233
|
+
justify-content: center;
|
|
234
|
+
gap: 16px;
|
|
235
|
+
margin-top: 16px;
|
|
236
|
+
}
|
|
237
|
+
.pay-modal__btn {
|
|
238
|
+
min-width: 96px;
|
|
239
|
+
padding: 8px 0;
|
|
240
|
+
border-radius: 24px;
|
|
241
|
+
border: none;
|
|
242
|
+
font-size: 15px;
|
|
243
|
+
font-weight: 600;
|
|
244
|
+
cursor: pointer;
|
|
245
|
+
transition: background 0.2s;
|
|
246
|
+
}
|
|
247
|
+
.pay-modal__btn--retry {
|
|
248
|
+
background: #fff;
|
|
249
|
+
color: #f25a5a;
|
|
250
|
+
border: 1.5px solid #f25a5a;
|
|
251
|
+
}
|
|
252
|
+
.pay-modal__btn--finish {
|
|
253
|
+
background: #f25a5a;
|
|
254
|
+
color: #fff;
|
|
255
|
+
border: none;
|
|
256
|
+
}
|