Version Description
- Added - Afterpay payment integration. Afterpay messaging can be added to the product pages, cart page, and checkout page
- Fixed - Compatibility between new WooCommerce Blocks integration, Elementor, & Divi.
- Updated - Converted P24 to use Payment Intents. Previously the integration used Sources. Stripe's API now requires that P24 use email address.
- Updated - Only load WooCommerce Blocks integration if WooCommerce Blocks is installed as a feature plugin
- Updated - Klarna disable place order button while payment options load. Support request
Download this release
Release Info
Developer | mr.clayton |
Plugin | Payment Plugins for Stripe WooCommerce |
Version | 3.3.1 |
Comparing to | |
See all releases |
Code changes from version 3.3.0 to 3.3.1
- assets/css/admin/admin-rtl.css +192 -131
- assets/css/admin/admin.css +192 -131
- assets/css/stripe-rtl.css +139 -44
- assets/css/stripe.css +139 -44
- assets/css/stripe.min-rtl.css +1 -1
- assets/css/stripe.min.css +1 -1
- assets/img/offsite.svg +1 -0
- assets/js/frontend/afterpay.js +121 -0
- assets/js/frontend/afterpay.min.js +1 -0
- assets/js/frontend/local-payment.js +119 -38
- assets/js/frontend/local-payment.min.js +1 -1
- i18n/languages/woo-stripe-payment.pot +200 -73
- includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php +5 -3
- includes/admin/class-wc-stripe-admin-settings.php +1 -1
- includes/admin/meta-boxes/views/html-product-data.php +78 -78
- includes/class-stripe.php +4 -2
- includes/class-wc-stripe-field-manager.php +9 -4
- includes/class-wc-stripe-redirect-handler.php +1 -1
- includes/gateways/class-wc-payment-gateway-stripe-afterpay.php +350 -0
- includes/gateways/class-wc-payment-gateway-stripe-klarna.php +3 -2
- includes/gateways/class-wc-payment-gateway-stripe-p24.php +3 -1
- packages/blocks/assets/js/components/checkout/payment-method/index.js +2 -2
- packages/blocks/assets/js/payment-methods/credit-card/components/bootstrap/style.scss +8 -0
- packages/blocks/assets/js/payment-methods/credit-card/components/simple/style.scss +8 -0
- packages/blocks/assets/js/payment-methods/credit-card/payment-method.js +14 -3
- packages/blocks/assets/js/payment-methods/googlepay/util.js +5 -0
- packages/blocks/assets/js/payment-methods/local-payment/afterpay.js +92 -0
- packages/blocks/assets/js/payment-methods/local-payment/index.js +2 -1
- packages/blocks/assets/js/payment-methods/local-payment/p24.js +8 -3
- packages/blocks/assets/js/payment-methods/local-payment/styles.scss +42 -1
- packages/blocks/build/commons.js +1 -1
- packages/blocks/build/commons.js.map +1 -1
assets/css/admin/admin-rtl.css
CHANGED
@@ -1,183 +1,229 @@
|
|
1 |
-
.wc-stripe-settings-container{
|
2 |
-
|
3 |
Â
}
|
4 |
-
|
5 |
-
|
Â
|
|
6 |
Â
}
|
Â
|
|
7 |
Â
.wc-stripe-settings-logo {
|
8 |
-
|
9 |
-
}
|
10 |
-
.wc-stripe-settings-logo img{
|
11 |
-
width: 150px;
|
12 |
-
max-width: 150px;
|
13 |
-
margin-right: 0.5em;
|
14 |
Â
}
|
15 |
-
|
16 |
-
|
Â
|
|
Â
|
|
Â
|
|
17 |
Â
}
|
18 |
-
|
19 |
-
|
Â
|
|
20 |
Â
}
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
25 |
Â
}
|
26 |
-
|
27 |
-
|
Â
|
|
28 |
Â
}
|
29 |
-
|
30 |
-
|
31 |
-
|
Â
|
|
32 |
Â
}
|
33 |
-
|
34 |
-
|
35 |
-
|
Â
|
|
36 |
Â
}
|
Â
|
|
37 |
Â
#order_data .order_data_column .transaction-data {
|
38 |
-
|
39 |
Â
}
|
40 |
-
|
41 |
-
|
Â
|
|
42 |
Â
}
|
43 |
-
|
44 |
-
|
45 |
-
|
Â
|
|
46 |
Â
border-radius: 4px;
|
47 |
Â
font-size: 18px;
|
48 |
Â
}
|
49 |
-
|
50 |
-
|
51 |
-
|
Â
|
|
52 |
Â
}
|
53 |
-
|
54 |
-
|
Â
|
|
55 |
Â
}
|
56 |
-
|
57 |
-
|
58 |
-
|
Â
|
|
59 |
Â
}
|
60 |
-
|
61 |
-
|
Â
|
|
62 |
Â
}
|
63 |
-
|
64 |
-
|
Â
|
|
65 |
Â
}
|
66 |
-
|
67 |
-
|
68 |
-
|
Â
|
|
69 |
Â
}
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
Â
|
|
74 |
Â
}
|
75 |
-
|
76 |
-
|
Â
|
|
77 |
Â
}
|
78 |
-
|
79 |
-
|
80 |
-
|
Â
|
|
81 |
Â
}
|
82 |
-
|
83 |
-
|
84 |
-
|
Â
|
|
85 |
Â
}
|
86 |
-
|
87 |
-
|
88 |
-
|
Â
|
|
89 |
Â
}
|
90 |
-
|
91 |
-
|
Â
|
|
92 |
Â
}
|
93 |
-
|
94 |
-
|
95 |
-
|
Â
|
|
96 |
Â
}
|
97 |
-
|
98 |
-
|
Â
|
|
99 |
Â
}
|
100 |
-
|
101 |
-
|
102 |
-
|
Â
|
|
103 |
Â
}
|
104 |
-
|
105 |
-
|
Â
|
|
106 |
Â
}
|
107 |
-
|
108 |
-
|
Â
|
|
109 |
Â
color: #fff;
|
110 |
Â
padding: 1em;
|
111 |
Â
margin-bottom: 1em;
|
112 |
Â
}
|
113 |
-
|
114 |
-
|
115 |
-
|
Â
|
|
116 |
Â
}
|
117 |
-
|
118 |
-
|
Â
|
|
119 |
Â
}
|
120 |
-
|
121 |
-
|
122 |
-
|
Â
|
|
123 |
Â
}
|
Â
|
|
124 |
Â
.profile-php .wc-stripe-payment-methods th,
|
125 |
-
.user-edit-php .wc-stripe-payment-methods th{
|
126 |
-
|
127 |
Â
}
|
Â
|
|
128 |
Â
.profile-php .wc-stripe-payment-methods th,
|
129 |
Â
.profile-php .wc-stripe-payment-methods td,
|
130 |
Â
.user-edit-php .wc-stripe-payment-methods th,
|
131 |
-
.user-edit-php .wc-stripe-payment-methods td{
|
132 |
-
|
133 |
Â
}
|
Â
|
|
134 |
Â
.profile-php .wc-stripe-payment-methods th:nth-child(n+2),
|
135 |
-
.user-edit-php .wc-stripe-payment-methods th:nth-child(n+2){
|
136 |
-
|
137 |
Â
}
|
Â
|
|
138 |
Â
.profile-php .wc-stripe-payment-methods td:nth-child(n+2),
|
139 |
-
.user-edit-php .wc-stripe-payment-methods td:nth-child(n+2){
|
140 |
-
|
141 |
Â
}
|
142 |
-
|
143 |
-
|
Â
|
|
144 |
Â
}
|
145 |
-
|
Â
|
|
146 |
Â
width: 125px !important;
|
147 |
Â
min-width: 125px !important;
|
148 |
Â
}
|
Â
|
|
149 |
Â
[id="woocommerce_stripe_ach_fee[type]"] {
|
150 |
Â
width: 150px !important;
|
151 |
Â
}
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
Â
|
|
156 |
Â
}
|
157 |
-
|
158 |
-
|
159 |
-
|
Â
|
|
160 |
Â
}
|
161 |
-
|
162 |
-
|
Â
|
|
163 |
Â
}
|
164 |
-
|
165 |
-
|
166 |
-
|
Â
|
|
167 |
Â
}
|
168 |
-
|
169 |
-
|
Â
|
|
170 |
Â
}
|
Â
|
|
171 |
Â
.stripe-connect.light-blue {
|
172 |
Â
background: #b5c3d8;
|
173 |
Â
background-image: -webkit-linear-gradient(#b5c3d8, #9cabc2);
|
174 |
Â
background-image: -moz-linear-gradient(#b5c3d8, #9cabc2);
|
175 |
Â
background-image: -ms-linear-gradient(#b5c3d8, #9cabc2);
|
176 |
Â
background-image: linear-gradient(#b5c3d8, #9cabc2);
|
177 |
-
-moz-box-shadow: 0 1px 0 rgba(0,0,0,0.1);
|
178 |
Â
-webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
|
179 |
Â
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
|
180 |
Â
}
|
Â
|
|
181 |
Â
.stripe-connect {
|
182 |
Â
display: inline-block;
|
183 |
Â
margin-bottom: 1px;
|
@@ -193,7 +239,7 @@
|
|
193 |
Â
-moz-border-radius: 4px;
|
194 |
Â
-webkit-border-radius: 4px;
|
195 |
Â
border-radius: 4px;
|
196 |
-
-moz-box-shadow: 0 1px 0 rgba(0,0,0,0.2);
|
197 |
Â
-webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
|
198 |
Â
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
|
199 |
Â
cursor: pointer;
|
@@ -202,6 +248,7 @@
|
|
202 |
Â
-ms-user-select: none;
|
203 |
Â
user-select: none;
|
204 |
Â
}
|
Â
|
|
205 |
Â
.stripe-connect.light-blue span {
|
206 |
Â
color: #556F88;
|
207 |
Â
text-shadow: 0 1px rgba(255, 255, 255, 0.8);
|
@@ -214,6 +261,7 @@
|
|
214 |
Â
-webkit-box-shadow: inset 0 1px 0 #fff;
|
215 |
Â
box-shadow: inset 0 1px 0 #fff;
|
216 |
Â
}
|
Â
|
|
217 |
Â
.stripe-connect span {
|
218 |
Â
display: block;
|
219 |
Â
position: relative;
|
@@ -230,13 +278,14 @@
|
|
230 |
Â
font-weight: bold;
|
231 |
Â
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
232 |
Â
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
|
233 |
-
-moz-box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
|
234 |
Â
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
|
235 |
Â
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
|
236 |
Â
-moz-border-radius: 3px;
|
237 |
Â
-webkit-border-radius: 3px;
|
238 |
Â
border-radius: 3px;
|
239 |
Â
}
|
Â
|
|
240 |
Â
.stripe-connect span:before {
|
241 |
Â
content: '';
|
242 |
Â
display: block;
|
@@ -249,41 +298,53 @@
|
|
249 |
Â
background-repeat: no-repeat;
|
250 |
Â
background-size: 23px 24px;
|
251 |
Â
}
|
Â
|
|
252 |
Â
.stripe-connect.light-blue span:before {
|
253 |
-
|
254 |
Â
}
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
Â
|
|
259 |
Â
height: 30px;
|
260 |
Â
margin-top: -5px;
|
261 |
Â
margin-right: -8px;
|
262 |
Â
}
|
263 |
Â
|
264 |
-
.woocommerce_stripe_panel table{
|
265 |
-
|
266 |
Â
}
|
267 |
-
|
268 |
-
|
Â
|
|
269 |
Â
}
|
270 |
-
|
Â
|
|
271 |
Â
padding-top: 1px;
|
272 |
Â
display: block;
|
273 |
Â
outline: 0;
|
274 |
Â
box-shadow: none;
|
275 |
Â
}
|
276 |
-
|
277 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
278 |
Â
}
|
279 |
-
|
280 |
-
|
281 |
-
|
Â
|
|
282 |
Â
}
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
Â
}
|
287 |
-
|
288 |
-
|
Â
|
|
289 |
Â
}
|
1 |
+
.wc-stripe-settings-container {
|
2 |
+
padding: 0 0.5em;
|
3 |
Â
}
|
4 |
+
|
5 |
+
.wc-stripe-cc-desc {
|
6 |
+
margin: 0;
|
7 |
Â
}
|
8 |
+
|
9 |
Â
.wc-stripe-settings-logo {
|
10 |
+
margin: 1.5em 0 0.5em 1em;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
11 |
Â
}
|
12 |
+
|
13 |
+
.wc-stripe-settings-logo img {
|
14 |
+
width: 150px;
|
15 |
+
max-width: 150px;
|
16 |
+
margin-right: 0.5em;
|
17 |
Â
}
|
18 |
+
|
19 |
+
.wc-stripe-advanced-settings-nav {
|
20 |
+
margin-top: 1em;
|
21 |
Â
}
|
22 |
+
|
23 |
+
.nav-tab-wrapper.woo-nav-tab-wrapper {
|
24 |
+
min-height: 35px;
|
25 |
Â
}
|
26 |
+
|
27 |
+
@media (max-width: 690px) {
|
28 |
+
.nav-tab-wrapper.woo-nav-tab-wrapper {
|
29 |
+
min-height: 70px;
|
30 |
+
}
|
31 |
Â
}
|
32 |
+
|
33 |
+
.wc-stripe-advanced-settings-nav .nav-link:nth-child(n+2) {
|
34 |
+
margin-right: 0.5em;
|
35 |
Â
}
|
36 |
+
|
37 |
+
.wc-stripe-advanced-settings-nav .nav-link-active {
|
38 |
+
color: #555;
|
39 |
+
font-weight: 500;
|
40 |
Â
}
|
41 |
+
|
42 |
+
.stripe_cc .wc-stripe-card-icon {
|
43 |
+
width: 36px;
|
44 |
+
vertical-align: middle;
|
45 |
Â
}
|
46 |
+
|
47 |
Â
#order_data .order_data_column .transaction-data {
|
48 |
+
|
49 |
Â
}
|
50 |
+
|
51 |
+
#order_data .order_data_column .transaction-data h3 {
|
52 |
+
margin-bottom: 5px;
|
53 |
Â
}
|
54 |
+
|
55 |
+
#order_data .order_data_column .transaction-data a {
|
56 |
+
text-decoration: none;
|
57 |
+
border: 2px solid transparent;
|
58 |
Â
border-radius: 4px;
|
59 |
Â
font-size: 18px;
|
60 |
Â
}
|
61 |
+
|
62 |
+
#order_data .order_data_column .transaction-data a:before {
|
63 |
+
font-family: WooCommerce;
|
64 |
+
content: "\e010";
|
65 |
Â
}
|
66 |
+
|
67 |
+
#order_data .order_data_column .transaction-data .do-transaction-view:hover {
|
68 |
+
border: 2px solid #00a0d2;
|
69 |
Â
}
|
70 |
+
|
71 |
+
.wc-transaction-data .data-container {
|
72 |
+
display: flex;
|
73 |
+
flex-wrap: wrap;
|
74 |
Â
}
|
75 |
+
|
76 |
+
.wc-transaction-data h2 {
|
77 |
+
margin: 0 0 1em 0;
|
78 |
Â
}
|
79 |
+
|
80 |
+
.wc-transaction-data .charge-actions {
|
81 |
+
margin-bottom: 0.5em;
|
82 |
Â
}
|
83 |
+
|
84 |
+
.wc-transaction-data .data-container .column-6 {
|
85 |
+
width: 50%;
|
86 |
+
margin-bottom: 0.5em;
|
87 |
Â
}
|
88 |
+
|
89 |
+
.wc-transaction-data .data-container .column-6 label {
|
90 |
+
display: inline-block;
|
91 |
+
font-weight: 600;
|
92 |
+
vertical-align: bottom;
|
93 |
Â
}
|
94 |
+
|
95 |
+
.wc-transaction-data .data-container .metadata {
|
96 |
+
margin-bottom: 0.5em;
|
97 |
Â
}
|
98 |
+
|
99 |
+
#wc-stripe-card-container #card-element {
|
100 |
+
margin: 1em 0;
|
101 |
+
border: 1px solid #e8e8e8;
|
102 |
Â
}
|
103 |
+
|
104 |
+
#wc-stripe-card-container #card-element {
|
105 |
+
background-color: #fff;
|
106 |
+
padding: 12px 6px;
|
107 |
Â
}
|
108 |
+
|
109 |
+
.wc-stripe-save-card label {
|
110 |
+
display: block;
|
111 |
+
margin-bottom: 8px;
|
112 |
Â
}
|
113 |
+
|
114 |
+
#pay-order {
|
115 |
+
min-width: 75px;
|
116 |
Â
}
|
117 |
+
|
118 |
+
#wc-stripe-pay-order-form .modal-wide {
|
119 |
+
width: 100%;
|
120 |
+
margin-bottom: 1.5em;
|
121 |
Â
}
|
122 |
+
|
123 |
+
#wc-stripe-pay-order-form .modal-wide label {
|
124 |
+
font-weight: 500;
|
125 |
Â
}
|
126 |
+
|
127 |
+
#wc-stripe-pay-order-form .modal-wide.option label {
|
128 |
+
display: block;
|
129 |
+
margin-bottom: 0.5em;
|
130 |
Â
}
|
131 |
+
|
132 |
+
#wc-stripe-pay-order-form .token-container {
|
133 |
+
margin: 1em 0em;
|
134 |
Â
}
|
135 |
+
|
136 |
+
#wc-stripe-pay-order-form .woocommerce-error {
|
137 |
+
background: #b22222;
|
138 |
Â
color: #fff;
|
139 |
Â
padding: 1em;
|
140 |
Â
margin-bottom: 1em;
|
141 |
Â
}
|
142 |
+
|
143 |
+
.wc-stripe-docs {
|
144 |
+
padding: 0 6px;
|
145 |
+
margin-top: 1em;
|
146 |
Â
}
|
147 |
+
|
148 |
+
.wc-stripe-advanced-settings-nav.local-gateways {
|
149 |
+
margin-right: 0.5em;
|
150 |
Â
}
|
151 |
+
|
152 |
+
.wc-stripe-webhook {
|
153 |
+
font-weight: 500;
|
154 |
+
margin-bottom: 0.75em;
|
155 |
Â
}
|
156 |
+
|
157 |
Â
.profile-php .wc-stripe-payment-methods th,
|
158 |
+
.user-edit-php .wc-stripe-payment-methods th {
|
159 |
+
padding: 10px 0;
|
160 |
Â
}
|
161 |
+
|
162 |
Â
.profile-php .wc-stripe-payment-methods th,
|
163 |
Â
.profile-php .wc-stripe-payment-methods td,
|
164 |
Â
.user-edit-php .wc-stripe-payment-methods th,
|
165 |
+
.user-edit-php .wc-stripe-payment-methods td {
|
166 |
+
text-align: right;
|
167 |
Â
}
|
168 |
+
|
169 |
Â
.profile-php .wc-stripe-payment-methods th:nth-child(n+2),
|
170 |
+
.user-edit-php .wc-stripe-payment-methods th:nth-child(n+2) {
|
171 |
+
padding: 5px 10px;
|
172 |
Â
}
|
173 |
+
|
174 |
Â
.profile-php .wc-stripe-payment-methods td:nth-child(n+2),
|
175 |
+
.user-edit-php .wc-stripe-payment-methods td:nth-child(n+2) {
|
176 |
+
padding: 5px 10px;
|
177 |
Â
}
|
178 |
+
|
179 |
+
.wc-stripe-user-info {
|
180 |
+
padding: 10px 0;
|
181 |
Â
}
|
182 |
+
|
183 |
+
.woocommerce table.form-table [id="woocommerce_stripe_ach_fee[type]"] + .select2-container {
|
184 |
Â
width: 125px !important;
|
185 |
Â
min-width: 125px !important;
|
186 |
Â
}
|
187 |
+
|
188 |
Â
[id="woocommerce_stripe_ach_fee[type]"] {
|
189 |
Â
width: 150px !important;
|
190 |
Â
}
|
191 |
+
|
192 |
+
.wc-stripe-fee-container {
|
193 |
+
display: flex;
|
194 |
+
flex-direction: row;
|
195 |
+
flex-flow: wrap;
|
196 |
Â
}
|
197 |
+
|
198 |
+
.wc-stripe-fee-col {
|
199 |
+
display: flex;
|
200 |
+
flex-direction: column;
|
201 |
Â
}
|
202 |
+
|
203 |
+
.wc-stripe-fee-col {
|
204 |
+
margin-left: 15px;
|
205 |
Â
}
|
206 |
+
|
207 |
+
.wc-stripe-fee-container input {
|
208 |
+
display: block;
|
209 |
+
margin-top: 1px;
|
210 |
Â
}
|
211 |
+
|
212 |
+
.notice .stripe-connect {
|
213 |
+
margin: 7px 3px;
|
214 |
Â
}
|
215 |
+
|
216 |
Â
.stripe-connect.light-blue {
|
217 |
Â
background: #b5c3d8;
|
218 |
Â
background-image: -webkit-linear-gradient(#b5c3d8, #9cabc2);
|
219 |
Â
background-image: -moz-linear-gradient(#b5c3d8, #9cabc2);
|
220 |
Â
background-image: -ms-linear-gradient(#b5c3d8, #9cabc2);
|
221 |
Â
background-image: linear-gradient(#b5c3d8, #9cabc2);
|
222 |
+
-moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
|
223 |
Â
-webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
|
224 |
Â
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
|
225 |
Â
}
|
226 |
+
|
227 |
Â
.stripe-connect {
|
228 |
Â
display: inline-block;
|
229 |
Â
margin-bottom: 1px;
|
239 |
Â
-moz-border-radius: 4px;
|
240 |
Â
-webkit-border-radius: 4px;
|
241 |
Â
border-radius: 4px;
|
242 |
+
-moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
|
243 |
Â
-webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
|
244 |
Â
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
|
245 |
Â
cursor: pointer;
|
248 |
Â
-ms-user-select: none;
|
249 |
Â
user-select: none;
|
250 |
Â
}
|
251 |
+
|
252 |
Â
.stripe-connect.light-blue span {
|
253 |
Â
color: #556F88;
|
254 |
Â
text-shadow: 0 1px rgba(255, 255, 255, 0.8);
|
261 |
Â
-webkit-box-shadow: inset 0 1px 0 #fff;
|
262 |
Â
box-shadow: inset 0 1px 0 #fff;
|
263 |
Â
}
|
264 |
+
|
265 |
Â
.stripe-connect span {
|
266 |
Â
display: block;
|
267 |
Â
position: relative;
|
278 |
Â
font-weight: bold;
|
279 |
Â
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
280 |
Â
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
|
281 |
+
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
|
282 |
Â
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
|
283 |
Â
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
|
284 |
Â
-moz-border-radius: 3px;
|
285 |
Â
-webkit-border-radius: 3px;
|
286 |
Â
border-radius: 3px;
|
287 |
Â
}
|
288 |
+
|
289 |
Â
.stripe-connect span:before {
|
290 |
Â
content: '';
|
291 |
Â
display: block;
|
298 |
Â
background-repeat: no-repeat;
|
299 |
Â
background-size: 23px 24px;
|
300 |
Â
}
|
301 |
+
|
302 |
Â
.stripe-connect.light-blue span:before {
|
303 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAwCAYAAABuZUjcAAAKRGlDQ1BJQ0MgUHJvZmlsZQAASA2dlndUFNcXx9/MbC+0XZYiZem9twWkLr1IlSYKy+4CS1nWZRewN0QFIoqICFYkKGLAaCgSK6JYCAgW7AEJIkoMRhEVlczGHPX3Oyf5/U7eH3c+8333nnfn3vvOGQAoASECYQ6sAEC2UCKO9PdmxsUnMPG9AAZEgAM2AHC4uaLQKL9ogK5AXzYzF3WS8V8LAuD1LYBaAK5bBIQzmX/p/+9DkSsSSwCAwtEAOx4/l4tyIcpZ+RKRTJ9EmZ6SKWMYI2MxmiDKqjJO+8Tmf/p8Yk8Z87KFPNRHlrOIl82TcRfKG/OkfJSREJSL8gT8fJRvoKyfJc0WoPwGZXo2n5MLAIYi0yV8bjrK1ihTxNGRbJTnAkCgpH3FKV+xhF+A5gkAO0e0RCxIS5cwjbkmTBtnZxYzgJ+fxZdILMI53EyOmMdk52SLOMIlAHz6ZlkUUJLVlokW2dHG2dHRwtYSLf/n9Y+bn73+GWS9/eTxMuLPnkGMni/al9gvWk4tAKwptDZbvmgpOwFoWw+A6t0vmv4+AOQLAWjt++p7GLJ5SZdIRC5WVvn5+ZYCPtdSVtDP6386fPb8e/jqPEvZeZ9rx/Thp3KkWRKmrKjcnKwcqZiZK+Jw+UyL/x7ifx34VVpf5WEeyU/li/lC9KgYdMoEwjS03UKeQCLIETIFwr/r8L8M+yoHGX6aaxRodR8BPckSKPT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zT+S0kU+jImkq2mJE1RFab6fA9nJixWnUvjmTUoS6K84xfQU0i+piya9fRhjrftfR2/L3M8TobToxYFEScnqehu0QW8ufX1eoGXJPNy6Mju3W2pAVgSeO4AHQLV+SR5pIVES+CQ1+QolPeoqlr0RMsFXJTkpXDbbVxVV/eclW+04wjTDod4HGe907aQuiImOV7RfbXVVdWNeqCMCUpu4ORM4Zl6csg2pC4X8GHRsNbdl6BrBs1MpWbh4DuLrhvoEGzZODVJHA7GPOuLJ5iG0ELAchUcn5mh63/n4hlKnwt4bW11uCvW65x+cLXAkgkQDgMpXDtQRkhAydXRKQnJVTqq5liZTv/V0dDJHCyD6rIZT5mU+15Fgk36/X7n/oQ0beGawQTgtMZxT4UP2a1zt4I6n8bxPlLNU+u+GxS6HMwch43lBZzu+tHpXPaIPDRKWi2gPDKi6sDo2sqjBUxx91CbOWdBN6r+hCqfJu+ezfuXEfCdX7lw+k70nvDmGHwr7KSbRrmA9+POa7v5lgwHA2debJn5KSIvxQBnsXxj7qcfwe4a8bmAD4tWnLp6s7uzN2lWw33kdhkeK/lUpat+3Kg9C2ZMPIzuC6A9HmxDbsJeozndwNesXLCf2mO376gnz3TW4Jph2I3Y7cidnr7ynt54MJky/ZZli8jFTZHnE7Ikdmt+9Ua0wjg/bvSwM0+OHXER0ZV2PqULn4EGBjH8LKzgJH+OZnBpHG3kczuNgF7dUD/2DJ6JBlO6wLwP9OtgBt0vr22a3hrHBHQnQkSXlTWgahBlg+WgIMgHIoEpb6cdTvZ7A3QRRFruBDm+FnXRiyhZ3jY+YCXKLwgI0QNTYkKPt1d5YBBmAaJdver48bx/pWQZ/781wx06nq7kgGc0lu8ElOF74OqSBf4P9hj31KSAw4AAAAAASUVORK5CYII=")
|
304 |
Â
}
|
305 |
+
|
306 |
+
.stipe-connect-active {
|
307 |
+
font-size: 30px;
|
308 |
+
color: green;
|
309 |
+
width: 25px;
|
310 |
Â
height: 30px;
|
311 |
Â
margin-top: -5px;
|
312 |
Â
margin-right: -8px;
|
313 |
Â
}
|
314 |
Â
|
315 |
+
.woocommerce_stripe_panel table {
|
316 |
+
width: 100%;
|
317 |
Â
}
|
318 |
+
|
319 |
+
.wc-stripe-product-table th {
|
320 |
+
text-align: right;
|
321 |
Â
}
|
322 |
+
|
323 |
+
.wc-stripe-product-gateway-enabled {
|
324 |
Â
padding-top: 1px;
|
325 |
Â
display: block;
|
326 |
Â
outline: 0;
|
327 |
Â
box-shadow: none;
|
328 |
Â
}
|
329 |
+
|
330 |
+
.wc-stripe-save-product-data.disabled {
|
331 |
+
opactity: 0.6;
|
332 |
+
}
|
333 |
+
|
334 |
+
#stripe_product_data .wc-stripe-save-product-data + span.spinner {
|
335 |
+
float: none;
|
336 |
+
margin: 0 10px 0 0;
|
337 |
Â
}
|
338 |
+
|
339 |
+
#woocommerce-product-data ul.wc-tabs li.stripe_options a:before {
|
340 |
+
font-family: WooCommerce;
|
341 |
+
content: '\e01e';
|
342 |
Â
}
|
343 |
+
|
344 |
+
#_stripe_button_position {
|
345 |
+
max-width: 200px;
|
346 |
Â
}
|
347 |
+
|
348 |
+
tr[data-gateway_id="stripe_afterpay"] td.capture-type {
|
349 |
+
display: none !important;
|
350 |
Â
}
|
assets/css/admin/admin.css
CHANGED
@@ -1,183 +1,229 @@
|
|
1 |
-
.wc-stripe-settings-container{
|
2 |
-
|
3 |
Â
}
|
4 |
-
|
5 |
-
|
Â
|
|
6 |
Â
}
|
Â
|
|
7 |
Â
.wc-stripe-settings-logo {
|
8 |
-
|
9 |
-
}
|
10 |
-
.wc-stripe-settings-logo img{
|
11 |
-
width: 150px;
|
12 |
-
max-width: 150px;
|
13 |
-
margin-left: 0.5em;
|
14 |
Â
}
|
15 |
-
|
16 |
-
|
Â
|
|
Â
|
|
Â
|
|
17 |
Â
}
|
18 |
-
|
19 |
-
|
Â
|
|
20 |
Â
}
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
25 |
Â
}
|
26 |
-
|
27 |
-
|
Â
|
|
28 |
Â
}
|
29 |
-
|
30 |
-
|
31 |
-
|
Â
|
|
32 |
Â
}
|
33 |
-
|
34 |
-
|
35 |
-
|
Â
|
|
36 |
Â
}
|
Â
|
|
37 |
Â
#order_data .order_data_column .transaction-data {
|
38 |
-
|
39 |
Â
}
|
40 |
-
|
41 |
-
|
Â
|
|
42 |
Â
}
|
43 |
-
|
44 |
-
|
45 |
-
|
Â
|
|
46 |
Â
border-radius: 4px;
|
47 |
Â
font-size: 18px;
|
48 |
Â
}
|
49 |
-
|
50 |
-
|
51 |
-
|
Â
|
|
52 |
Â
}
|
53 |
-
|
54 |
-
|
Â
|
|
55 |
Â
}
|
56 |
-
|
57 |
-
|
58 |
-
|
Â
|
|
59 |
Â
}
|
60 |
-
|
61 |
-
|
Â
|
|
62 |
Â
}
|
63 |
-
|
64 |
-
|
Â
|
|
65 |
Â
}
|
66 |
-
|
67 |
-
|
68 |
-
|
Â
|
|
69 |
Â
}
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
Â
|
|
74 |
Â
}
|
75 |
-
|
76 |
-
|
Â
|
|
77 |
Â
}
|
78 |
-
|
79 |
-
|
80 |
-
|
Â
|
|
81 |
Â
}
|
82 |
-
|
83 |
-
|
84 |
-
|
Â
|
|
85 |
Â
}
|
86 |
-
|
87 |
-
|
88 |
-
|
Â
|
|
89 |
Â
}
|
90 |
-
|
91 |
-
|
Â
|
|
92 |
Â
}
|
93 |
-
|
94 |
-
|
95 |
-
|
Â
|
|
96 |
Â
}
|
97 |
-
|
98 |
-
|
Â
|
|
99 |
Â
}
|
100 |
-
|
101 |
-
|
102 |
-
|
Â
|
|
103 |
Â
}
|
104 |
-
|
105 |
-
|
Â
|
|
106 |
Â
}
|
107 |
-
|
108 |
-
|
Â
|
|
109 |
Â
color: #fff;
|
110 |
Â
padding: 1em;
|
111 |
Â
margin-bottom: 1em;
|
112 |
Â
}
|
113 |
-
|
114 |
-
|
115 |
-
|
Â
|
|
116 |
Â
}
|
117 |
-
|
118 |
-
|
Â
|
|
119 |
Â
}
|
120 |
-
|
121 |
-
|
122 |
-
|
Â
|
|
123 |
Â
}
|
Â
|
|
124 |
Â
.profile-php .wc-stripe-payment-methods th,
|
125 |
-
.user-edit-php .wc-stripe-payment-methods th{
|
126 |
-
|
127 |
Â
}
|
Â
|
|
128 |
Â
.profile-php .wc-stripe-payment-methods th,
|
129 |
Â
.profile-php .wc-stripe-payment-methods td,
|
130 |
Â
.user-edit-php .wc-stripe-payment-methods th,
|
131 |
-
.user-edit-php .wc-stripe-payment-methods td{
|
132 |
-
|
133 |
Â
}
|
Â
|
|
134 |
Â
.profile-php .wc-stripe-payment-methods th:nth-child(n+2),
|
135 |
-
.user-edit-php .wc-stripe-payment-methods th:nth-child(n+2){
|
136 |
-
|
137 |
Â
}
|
Â
|
|
138 |
Â
.profile-php .wc-stripe-payment-methods td:nth-child(n+2),
|
139 |
-
.user-edit-php .wc-stripe-payment-methods td:nth-child(n+2){
|
140 |
-
|
141 |
Â
}
|
142 |
-
|
143 |
-
|
Â
|
|
144 |
Â
}
|
145 |
-
|
Â
|
|
146 |
Â
width: 125px !important;
|
147 |
Â
min-width: 125px !important;
|
148 |
Â
}
|
Â
|
|
149 |
Â
[id="woocommerce_stripe_ach_fee[type]"] {
|
150 |
Â
width: 150px !important;
|
151 |
Â
}
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
Â
|
|
156 |
Â
}
|
157 |
-
|
158 |
-
|
159 |
-
|
Â
|
|
160 |
Â
}
|
161 |
-
|
162 |
-
|
Â
|
|
163 |
Â
}
|
164 |
-
|
165 |
-
|
166 |
-
|
Â
|
|
167 |
Â
}
|
168 |
-
|
169 |
-
|
Â
|
|
170 |
Â
}
|
Â
|
|
171 |
Â
.stripe-connect.light-blue {
|
172 |
Â
background: #b5c3d8;
|
173 |
Â
background-image: -webkit-linear-gradient(#b5c3d8, #9cabc2);
|
174 |
Â
background-image: -moz-linear-gradient(#b5c3d8, #9cabc2);
|
175 |
Â
background-image: -ms-linear-gradient(#b5c3d8, #9cabc2);
|
176 |
Â
background-image: linear-gradient(#b5c3d8, #9cabc2);
|
177 |
-
-moz-box-shadow: 0 1px 0 rgba(0,0,0,0.1);
|
178 |
Â
-webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
|
179 |
Â
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
|
180 |
Â
}
|
Â
|
|
181 |
Â
.stripe-connect {
|
182 |
Â
display: inline-block;
|
183 |
Â
margin-bottom: 1px;
|
@@ -193,7 +239,7 @@
|
|
193 |
Â
-moz-border-radius: 4px;
|
194 |
Â
-webkit-border-radius: 4px;
|
195 |
Â
border-radius: 4px;
|
196 |
-
-moz-box-shadow: 0 1px 0 rgba(0,0,0,0.2);
|
197 |
Â
-webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
|
198 |
Â
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
|
199 |
Â
cursor: pointer;
|
@@ -202,6 +248,7 @@
|
|
202 |
Â
-ms-user-select: none;
|
203 |
Â
user-select: none;
|
204 |
Â
}
|
Â
|
|
205 |
Â
.stripe-connect.light-blue span {
|
206 |
Â
color: #556F88;
|
207 |
Â
text-shadow: 0 1px rgba(255, 255, 255, 0.8);
|
@@ -214,6 +261,7 @@
|
|
214 |
Â
-webkit-box-shadow: inset 0 1px 0 #fff;
|
215 |
Â
box-shadow: inset 0 1px 0 #fff;
|
216 |
Â
}
|
Â
|
|
217 |
Â
.stripe-connect span {
|
218 |
Â
display: block;
|
219 |
Â
position: relative;
|
@@ -230,13 +278,14 @@
|
|
230 |
Â
font-weight: bold;
|
231 |
Â
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
232 |
Â
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
|
233 |
-
-moz-box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
|
234 |
Â
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
|
235 |
Â
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
|
236 |
Â
-moz-border-radius: 3px;
|
237 |
Â
-webkit-border-radius: 3px;
|
238 |
Â
border-radius: 3px;
|
239 |
Â
}
|
Â
|
|
240 |
Â
.stripe-connect span:before {
|
241 |
Â
content: '';
|
242 |
Â
display: block;
|
@@ -249,41 +298,53 @@
|
|
249 |
Â
background-repeat: no-repeat;
|
250 |
Â
background-size: 23px 24px;
|
251 |
Â
}
|
Â
|
|
252 |
Â
.stripe-connect.light-blue span:before {
|
253 |
-
|
254 |
Â
}
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
Â
|
|
259 |
Â
height: 30px;
|
260 |
Â
margin-top: -5px;
|
261 |
Â
margin-left: -8px;
|
262 |
Â
}
|
263 |
Â
|
264 |
-
.woocommerce_stripe_panel table{
|
265 |
-
|
266 |
Â
}
|
267 |
-
|
268 |
-
|
Â
|
|
269 |
Â
}
|
270 |
-
|
Â
|
|
271 |
Â
padding-top: 1px;
|
272 |
Â
display: block;
|
273 |
Â
outline: 0;
|
274 |
Â
box-shadow: none;
|
275 |
Â
}
|
276 |
-
|
277 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
278 |
Â
}
|
279 |
-
|
280 |
-
|
281 |
-
|
Â
|
|
282 |
Â
}
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
Â
}
|
287 |
-
|
288 |
-
|
Â
|
|
289 |
Â
}
|
1 |
+
.wc-stripe-settings-container {
|
2 |
+
padding: 0 0.5em;
|
3 |
Â
}
|
4 |
+
|
5 |
+
.wc-stripe-cc-desc {
|
6 |
+
margin: 0;
|
7 |
Â
}
|
8 |
+
|
9 |
Â
.wc-stripe-settings-logo {
|
10 |
+
margin: 1.5em 1em 0.5em 0;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
11 |
Â
}
|
12 |
+
|
13 |
+
.wc-stripe-settings-logo img {
|
14 |
+
width: 150px;
|
15 |
+
max-width: 150px;
|
16 |
+
margin-left: 0.5em;
|
17 |
Â
}
|
18 |
+
|
19 |
+
.wc-stripe-advanced-settings-nav {
|
20 |
+
margin-top: 1em;
|
21 |
Â
}
|
22 |
+
|
23 |
+
.nav-tab-wrapper.woo-nav-tab-wrapper {
|
24 |
+
min-height: 35px;
|
25 |
Â
}
|
26 |
+
|
27 |
+
@media (max-width: 690px) {
|
28 |
+
.nav-tab-wrapper.woo-nav-tab-wrapper {
|
29 |
+
min-height: 70px;
|
30 |
+
}
|
31 |
Â
}
|
32 |
+
|
33 |
+
.wc-stripe-advanced-settings-nav .nav-link:nth-child(n+2) {
|
34 |
+
margin-left: 0.5em;
|
35 |
Â
}
|
36 |
+
|
37 |
+
.wc-stripe-advanced-settings-nav .nav-link-active {
|
38 |
+
color: #555;
|
39 |
+
font-weight: 500;
|
40 |
Â
}
|
41 |
+
|
42 |
+
.stripe_cc .wc-stripe-card-icon {
|
43 |
+
width: 36px;
|
44 |
+
vertical-align: middle;
|
45 |
Â
}
|
46 |
+
|
47 |
Â
#order_data .order_data_column .transaction-data {
|
48 |
+
|
49 |
Â
}
|
50 |
+
|
51 |
+
#order_data .order_data_column .transaction-data h3 {
|
52 |
+
margin-bottom: 5px;
|
53 |
Â
}
|
54 |
+
|
55 |
+
#order_data .order_data_column .transaction-data a {
|
56 |
+
text-decoration: none;
|
57 |
+
border: 2px solid transparent;
|
58 |
Â
border-radius: 4px;
|
59 |
Â
font-size: 18px;
|
60 |
Â
}
|
61 |
+
|
62 |
+
#order_data .order_data_column .transaction-data a:before {
|
63 |
+
font-family: WooCommerce;
|
64 |
+
content: "\e010";
|
65 |
Â
}
|
66 |
+
|
67 |
+
#order_data .order_data_column .transaction-data .do-transaction-view:hover {
|
68 |
+
border: 2px solid #00a0d2;
|
69 |
Â
}
|
70 |
+
|
71 |
+
.wc-transaction-data .data-container {
|
72 |
+
display: flex;
|
73 |
+
flex-wrap: wrap;
|
74 |
Â
}
|
75 |
+
|
76 |
+
.wc-transaction-data h2 {
|
77 |
+
margin: 0 0 1em 0;
|
78 |
Â
}
|
79 |
+
|
80 |
+
.wc-transaction-data .charge-actions {
|
81 |
+
margin-bottom: 0.5em;
|
82 |
Â
}
|
83 |
+
|
84 |
+
.wc-transaction-data .data-container .column-6 {
|
85 |
+
width: 50%;
|
86 |
+
margin-bottom: 0.5em;
|
87 |
Â
}
|
88 |
+
|
89 |
+
.wc-transaction-data .data-container .column-6 label {
|
90 |
+
display: inline-block;
|
91 |
+
font-weight: 600;
|
92 |
+
vertical-align: bottom;
|
93 |
Â
}
|
94 |
+
|
95 |
+
.wc-transaction-data .data-container .metadata {
|
96 |
+
margin-bottom: 0.5em;
|
97 |
Â
}
|
98 |
+
|
99 |
+
#wc-stripe-card-container #card-element {
|
100 |
+
margin: 1em 0;
|
101 |
+
border: 1px solid #e8e8e8;
|
102 |
Â
}
|
103 |
+
|
104 |
+
#wc-stripe-card-container #card-element {
|
105 |
+
background-color: #fff;
|
106 |
+
padding: 12px 6px;
|
107 |
Â
}
|
108 |
+
|
109 |
+
.wc-stripe-save-card label {
|
110 |
+
display: block;
|
111 |
+
margin-bottom: 8px;
|
112 |
Â
}
|
113 |
+
|
114 |
+
#pay-order {
|
115 |
+
min-width: 75px;
|
116 |
Â
}
|
117 |
+
|
118 |
+
#wc-stripe-pay-order-form .modal-wide {
|
119 |
+
width: 100%;
|
120 |
+
margin-bottom: 1.5em;
|
121 |
Â
}
|
122 |
+
|
123 |
+
#wc-stripe-pay-order-form .modal-wide label {
|
124 |
+
font-weight: 500;
|
125 |
Â
}
|
126 |
+
|
127 |
+
#wc-stripe-pay-order-form .modal-wide.option label {
|
128 |
+
display: block;
|
129 |
+
margin-bottom: 0.5em;
|
130 |
Â
}
|
131 |
+
|
132 |
+
#wc-stripe-pay-order-form .token-container {
|
133 |
+
margin: 1em 0em;
|
134 |
Â
}
|
135 |
+
|
136 |
+
#wc-stripe-pay-order-form .woocommerce-error {
|
137 |
+
background: #b22222;
|
138 |
Â
color: #fff;
|
139 |
Â
padding: 1em;
|
140 |
Â
margin-bottom: 1em;
|
141 |
Â
}
|
142 |
+
|
143 |
+
.wc-stripe-docs {
|
144 |
+
padding: 0 6px;
|
145 |
+
margin-top: 1em;
|
146 |
Â
}
|
147 |
+
|
148 |
+
.wc-stripe-advanced-settings-nav.local-gateways {
|
149 |
+
margin-left: 0.5em;
|
150 |
Â
}
|
151 |
+
|
152 |
+
.wc-stripe-webhook {
|
153 |
+
font-weight: 500;
|
154 |
+
margin-bottom: 0.75em;
|
155 |
Â
}
|
156 |
+
|
157 |
Â
.profile-php .wc-stripe-payment-methods th,
|
158 |
+
.user-edit-php .wc-stripe-payment-methods th {
|
159 |
+
padding: 10px 0;
|
160 |
Â
}
|
161 |
+
|
162 |
Â
.profile-php .wc-stripe-payment-methods th,
|
163 |
Â
.profile-php .wc-stripe-payment-methods td,
|
164 |
Â
.user-edit-php .wc-stripe-payment-methods th,
|
165 |
+
.user-edit-php .wc-stripe-payment-methods td {
|
166 |
+
text-align: left;
|
167 |
Â
}
|
168 |
+
|
169 |
Â
.profile-php .wc-stripe-payment-methods th:nth-child(n+2),
|
170 |
+
.user-edit-php .wc-stripe-payment-methods th:nth-child(n+2) {
|
171 |
+
padding: 5px 10px;
|
172 |
Â
}
|
173 |
+
|
174 |
Â
.profile-php .wc-stripe-payment-methods td:nth-child(n+2),
|
175 |
+
.user-edit-php .wc-stripe-payment-methods td:nth-child(n+2) {
|
176 |
+
padding: 5px 10px;
|
177 |
Â
}
|
178 |
+
|
179 |
+
.wc-stripe-user-info {
|
180 |
+
padding: 10px 0;
|
181 |
Â
}
|
182 |
+
|
183 |
+
.woocommerce table.form-table [id="woocommerce_stripe_ach_fee[type]"] + .select2-container {
|
184 |
Â
width: 125px !important;
|
185 |
Â
min-width: 125px !important;
|
186 |
Â
}
|
187 |
+
|
188 |
Â
[id="woocommerce_stripe_ach_fee[type]"] {
|
189 |
Â
width: 150px !important;
|
190 |
Â
}
|
191 |
+
|
192 |
+
.wc-stripe-fee-container {
|
193 |
+
display: flex;
|
194 |
+
flex-direction: row;
|
195 |
+
flex-flow: wrap;
|
196 |
Â
}
|
197 |
+
|
198 |
+
.wc-stripe-fee-col {
|
199 |
+
display: flex;
|
200 |
+
flex-direction: column;
|
201 |
Â
}
|
202 |
+
|
203 |
+
.wc-stripe-fee-col {
|
204 |
+
margin-right: 15px;
|
205 |
Â
}
|
206 |
+
|
207 |
+
.wc-stripe-fee-container input {
|
208 |
+
display: block;
|
209 |
+
margin-top: 1px;
|
210 |
Â
}
|
211 |
+
|
212 |
+
.notice .stripe-connect {
|
213 |
+
margin: 7px 3px;
|
214 |
Â
}
|
215 |
+
|
216 |
Â
.stripe-connect.light-blue {
|
217 |
Â
background: #b5c3d8;
|
218 |
Â
background-image: -webkit-linear-gradient(#b5c3d8, #9cabc2);
|
219 |
Â
background-image: -moz-linear-gradient(#b5c3d8, #9cabc2);
|
220 |
Â
background-image: -ms-linear-gradient(#b5c3d8, #9cabc2);
|
221 |
Â
background-image: linear-gradient(#b5c3d8, #9cabc2);
|
222 |
+
-moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
|
223 |
Â
-webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
|
224 |
Â
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
|
225 |
Â
}
|
226 |
+
|
227 |
Â
.stripe-connect {
|
228 |
Â
display: inline-block;
|
229 |
Â
margin-bottom: 1px;
|
239 |
Â
-moz-border-radius: 4px;
|
240 |
Â
-webkit-border-radius: 4px;
|
241 |
Â
border-radius: 4px;
|
242 |
+
-moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
|
243 |
Â
-webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
|
244 |
Â
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
|
245 |
Â
cursor: pointer;
|
248 |
Â
-ms-user-select: none;
|
249 |
Â
user-select: none;
|
250 |
Â
}
|
251 |
+
|
252 |
Â
.stripe-connect.light-blue span {
|
253 |
Â
color: #556F88;
|
254 |
Â
text-shadow: 0 1px rgba(255, 255, 255, 0.8);
|
261 |
Â
-webkit-box-shadow: inset 0 1px 0 #fff;
|
262 |
Â
box-shadow: inset 0 1px 0 #fff;
|
263 |
Â
}
|
264 |
+
|
265 |
Â
.stripe-connect span {
|
266 |
Â
display: block;
|
267 |
Â
position: relative;
|
278 |
Â
font-weight: bold;
|
279 |
Â
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
280 |
Â
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
|
281 |
+
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
|
282 |
Â
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
|
283 |
Â
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
|
284 |
Â
-moz-border-radius: 3px;
|
285 |
Â
-webkit-border-radius: 3px;
|
286 |
Â
border-radius: 3px;
|
287 |
Â
}
|
288 |
+
|
289 |
Â
.stripe-connect span:before {
|
290 |
Â
content: '';
|
291 |
Â
display: block;
|
298 |
Â
background-repeat: no-repeat;
|
299 |
Â
background-size: 23px 24px;
|
300 |
Â
}
|
301 |
+
|
302 |
Â
.stripe-connect.light-blue span:before {
|
303 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAwCAYAAABuZUjcAAAKRGlDQ1BJQ0MgUHJvZmlsZQAASA2dlndUFNcXx9/MbC+0XZYiZem9twWkLr1IlSYKy+4CS1nWZRewN0QFIoqICFYkKGLAaCgSK6JYCAgW7AEJIkoMRhEVlczGHPX3Oyf5/U7eH3c+8333nnfn3vvOGQAoASECYQ6sAEC2UCKO9PdmxsUnMPG9AAZEgAM2AHC4uaLQKL9ogK5AXzYzF3WS8V8LAuD1LYBaAK5bBIQzmX/p/+9DkSsSSwCAwtEAOx4/l4tyIcp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ZMPIzuC6A9HmxDbsJeozndwNesXLCf2mO376gnz3TW4Jph2I3Y7cidnr7ynt54MJky/ZZli8jFTZHnE7Ikdmt+9Ua0wjg/bvSwM0+OHXER0ZV2PqULn4EGBjH8LKzgJH+OZnBpHG3kczuNgF7dUD/2DJ6JBlO6wLwP9OtgBt0vr22a3hrHBHQnQkSXlTWgahBlg+WgIMgHIoEpb6cdTvZ7A3QRRFruBDm+FnXRiyhZ3jY+YCXKLwgI0QNTYkKPt1d5YBBmAaJdver48bx/pWQZ/781wx06nq7kgGc0lu8ElOF74OqSBf4P9hj31KSAw4AAAAAASUVORK5CYII=")
|
304 |
Â
}
|
305 |
+
|
306 |
+
.stipe-connect-active {
|
307 |
+
font-size: 30px;
|
308 |
+
color: green;
|
309 |
+
width: 25px;
|
310 |
Â
height: 30px;
|
311 |
Â
margin-top: -5px;
|
312 |
Â
margin-left: -8px;
|
313 |
Â
}
|
314 |
Â
|
315 |
+
.woocommerce_stripe_panel table {
|
316 |
+
width: 100%;
|
317 |
Â
}
|
318 |
+
|
319 |
+
.wc-stripe-product-table th {
|
320 |
+
text-align: left;
|
321 |
Â
}
|
322 |
+
|
323 |
+
.wc-stripe-product-gateway-enabled {
|
324 |
Â
padding-top: 1px;
|
325 |
Â
display: block;
|
326 |
Â
outline: 0;
|
327 |
Â
box-shadow: none;
|
328 |
Â
}
|
329 |
+
|
330 |
+
.wc-stripe-save-product-data.disabled {
|
331 |
+
opactity: 0.6;
|
332 |
+
}
|
333 |
+
|
334 |
+
#stripe_product_data .wc-stripe-save-product-data + span.spinner {
|
335 |
+
float: none;
|
336 |
+
margin: 0 0 0 10px;
|
337 |
Â
}
|
338 |
+
|
339 |
+
#woocommerce-product-data ul.wc-tabs li.stripe_options a:before {
|
340 |
+
font-family: WooCommerce;
|
341 |
+
content: '\e01e';
|
342 |
Â
}
|
343 |
+
|
344 |
+
#_stripe_button_position {
|
345 |
+
max-width: 200px;
|
346 |
Â
}
|
347 |
+
|
348 |
+
tr[data-gateway_id="stripe_afterpay"] td.capture-type {
|
349 |
+
display: none !important;
|
350 |
Â
}
|
assets/css/stripe-rtl.css
CHANGED
@@ -119,9 +119,11 @@ label.wc-stripe-label-payment-type:after {
|
|
119 |
Â
content: none !important;
|
120 |
Â
display: none !important;
|
121 |
Â
}
|
122 |
-
|
Â
|
|
123 |
Â
padding-right: 8px;
|
124 |
Â
}
|
Â
|
|
125 |
Â
.wc-stripe-saved-methods-container .select2-container .select2-selection--single .wc-stripe-select2-container,
|
126 |
Â
.select2-results__options li.wc-stripe-select2-container {
|
127 |
Â
display: flex;
|
@@ -210,7 +212,7 @@ label.wc-stripe-label-payment-type:after {
|
|
210 |
Â
margin-bottom: 1em;
|
211 |
Â
}
|
212 |
Â
|
213 |
-
.wc-stripe_cc-new-method-container .wc-stripe-save-source{
|
214 |
Â
display: flex;
|
215 |
Â
align-items: center;
|
216 |
Â
justify-content: flex-start;
|
@@ -273,7 +275,7 @@ li.payment_method_stripe_payment_request {
|
|
273 |
Â
|
274 |
Â
#place_order.wc-stripe-hide,
|
275 |
Â
#payment #place_order.wc-stripe-hide,
|
276 |
-
.woocommerce-checkout-review-order #payment #place_order.wc-stripe-hide{
|
277 |
Â
position: absolute !important;
|
278 |
Â
z-index: -1000 !important;
|
279 |
Â
height: 0 !important;
|
@@ -319,15 +321,16 @@ li.payment_method_stripe_payment_request {
|
|
319 |
Â
.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_] {
|
320 |
Â
margin: 0 0 1em 0;
|
321 |
Â
}
|
Â
|
|
322 |
Â
.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]:last-child,
|
323 |
-
.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_]:last-child{
|
324 |
Â
margin: 0;
|
325 |
Â
}
|
326 |
Â
|
327 |
Â
.wc_stripe_product_payment_methods .gpay-button,
|
328 |
Â
.wc_stripe_cart_payment_methods .gpay-button,
|
329 |
Â
.wc_stripe_product_payment_methods .gpay-card-info-container,
|
330 |
-
.wc_stripe_cart_payment_methods .gpay-card-info-container{
|
331 |
Â
width: 100% !important;
|
332 |
Â
margin: 0;
|
333 |
Â
}
|
@@ -379,7 +382,7 @@ li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_standa
|
|
379 |
Â
max-height: 35px;
|
380 |
Â
}
|
381 |
Â
|
382 |
-
li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_round_outline]{
|
383 |
Â
width: 56px;
|
384 |
Â
max-height: 30px;
|
385 |
Â
}
|
@@ -443,7 +446,7 @@ li.payment_method_stripe_ach label:first-of-type img {
|
|
443 |
Â
max-width: 240px;
|
444 |
Â
}
|
445 |
Â
|
446 |
-
body.single-product div.product form.cart .wc_stripe_product_payment_methods .apple-pay-button{
|
447 |
Â
max-width: 100%;
|
448 |
Â
}
|
449 |
Â
}
|
@@ -503,12 +506,12 @@ li.payment_method_stripe_ach label:first-of-type img {
|
|
503 |
Â
}
|
504 |
Â
|
505 |
Â
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-button,
|
506 |
-
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-card-info-container{
|
507 |
Â
margin: 0;
|
508 |
Â
}
|
509 |
Â
|
510 |
Â
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-button,
|
511 |
-
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-card-info-container{
|
512 |
Â
width: 100%;
|
513 |
Â
}
|
514 |
Â
|
@@ -550,7 +553,8 @@ ul.payment_methods li.payment_method_stripe_klarna img {
|
|
550 |
Â
width: 72px;
|
551 |
Â
max-height: 20px;
|
552 |
Â
}
|
553 |
-
|
Â
|
|
554 |
Â
width: 56px;
|
555 |
Â
height: 32px;
|
556 |
Â
max-height: 32px;
|
@@ -749,7 +753,7 @@ div[id*=wc_stripe_local_payment_stripe_].StripeElement {
|
|
749 |
Â
}
|
750 |
Â
|
751 |
Â
#wc_stripe_local_payment_stripe_klarna,
|
752 |
-
li[class*=payment_method_stripe_] div.wc-stripe-gateway-container.has_tokens{
|
753 |
Â
margin-top: 10px;
|
754 |
Â
}
|
755 |
Â
|
@@ -783,39 +787,43 @@ li.payment_method_stripe_wechat {
|
|
783 |
Â
display: none;
|
784 |
Â
}
|
785 |
Â
|
786 |
-
.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods{
|
787 |
Â
list-style: none;
|
788 |
Â
margin: 0;
|
789 |
Â
padding: 0;
|
790 |
Â
}
|
791 |
-
|
Â
|
|
792 |
Â
margin: 0;
|
793 |
Â
}
|
794 |
Â
|
795 |
Â
.widget_shopping_cart_content a.wc-stripe-gpay-mini-cart,
|
796 |
Â
.widget_shopping_cart_content a.wc-stripe-applepay-mini-cart,
|
797 |
-
.widget_shopping_cart_content a.wc-stripe-payment-request-mini-cart{
|
798 |
Â
background: transparent;
|
799 |
Â
padding: 0;
|
800 |
Â
border: none;
|
801 |
Â
}
|
Â
|
|
802 |
Â
a.wc-stripe-gpay-mini-cart .gpay-button,
|
803 |
Â
a.wc-stripe-gpay-mini-cart .gpay-card-info-container
|
804 |
-
a.wc-stripe-applepay-mini-cart .apple-pay-button{
|
805 |
Â
width: 100%;
|
806 |
Â
margin: 0;
|
807 |
Â
}
|
808 |
-
|
Â
|
|
809 |
Â
padding: 0;
|
810 |
Â
background: transparent;
|
811 |
Â
border: none;
|
812 |
Â
width: 100%;
|
813 |
Â
}
|
814 |
-
|
Â
|
|
815 |
Â
width: 100%;
|
816 |
Â
}
|
817 |
Â
|
818 |
-
.widget_shopping_cart_content .wc-stripe-overlay{
|
819 |
Â
display: none !important;
|
820 |
Â
position: absolute;
|
821 |
Â
background: rgba(255, 255, 255, 0.75);
|
@@ -823,7 +831,8 @@ a.wc-stripe-applepay-mini-cart .apple-pay-button{
|
|
823 |
Â
width: 100%;
|
824 |
Â
z-index: -1;
|
825 |
Â
}
|
826 |
-
|
Â
|
|
827 |
Â
display: block !important;
|
828 |
Â
z-index: 9999;
|
829 |
Â
}
|
@@ -837,6 +846,7 @@ a.wc-stripe-applepay-mini-cart .apple-pay-button{
|
|
837 |
Â
box-sizing: border-box;
|
838 |
Â
transform: scale(.65);
|
839 |
Â
}
|
Â
|
|
840 |
Â
.wc-stripe-klarna-loader div {
|
841 |
Â
box-sizing: border-box;
|
842 |
Â
display: block;
|
@@ -849,15 +859,19 @@ a.wc-stripe-applepay-mini-cart .apple-pay-button{
|
|
849 |
Â
animation: klarna-payments-loader 1.3s cubic-bezier(0.5, 0, 0.5, 1) infinite;
|
850 |
Â
border-color: #000 transparent transparent transparent;
|
851 |
Â
}
|
Â
|
|
852 |
Â
.wc-stripe-klarna-loader div:nth-child(1) {
|
853 |
Â
animation-delay: -0.45s;
|
854 |
Â
}
|
Â
|
|
855 |
Â
.wc-stripe-klarna-loader div:nth-child(2) {
|
856 |
Â
animation-delay: -0.3s;
|
857 |
Â
}
|
Â
|
|
858 |
Â
.wc-stripe-klarna-loader div:nth-child(3) {
|
859 |
Â
animation-delay: -0.15s;
|
860 |
Â
}
|
Â
|
|
861 |
Â
@keyframes klarna-payments-loader {
|
862 |
Â
0% {
|
863 |
Â
transform: rotate(0deg);
|
@@ -877,7 +891,7 @@ li.payment_method_stripe_giropay.wc-stripe-no-desc .payment_box.wc-stripe-no-met
|
|
877 |
Â
li.payment_method_stripe_grabpay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
|
878 |
Â
li.payment_method_stripe_multibanco.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
|
879 |
Â
li.payment_method_stripe_p24.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
|
880 |
-
li.payment_method_stripe_sofort.wc-stripe-no-desc .payment_box.wc-stripe-no-methods{
|
881 |
Â
padding: 0;
|
882 |
Â
margin: 0;
|
883 |
Â
}
|
@@ -1003,9 +1017,11 @@ label.wc-stripe-label-payment-type:after {
|
|
1003 |
Â
content: none !important;
|
1004 |
Â
display: none !important;
|
1005 |
Â
}
|
1006 |
-
|
Â
|
|
1007 |
Â
padding-right: 8px;
|
1008 |
Â
}
|
Â
|
|
1009 |
Â
.wc-stripe-saved-methods-container .select2-container .select2-selection--single .wc-stripe-select2-container,
|
1010 |
Â
.select2-results__options li.wc-stripe-select2-container {
|
1011 |
Â
display: flex;
|
@@ -1094,7 +1110,7 @@ label.wc-stripe-label-payment-type:after {
|
|
1094 |
Â
margin-bottom: 1em;
|
1095 |
Â
}
|
1096 |
Â
|
1097 |
-
.wc-stripe_cc-new-method-container .wc-stripe-save-source{
|
1098 |
Â
display: flex;
|
1099 |
Â
align-items: center;
|
1100 |
Â
justify-content: flex-start;
|
@@ -1157,7 +1173,7 @@ li.payment_method_stripe_payment_request {
|
|
1157 |
Â
|
1158 |
Â
#place_order.wc-stripe-hide,
|
1159 |
Â
#payment #place_order.wc-stripe-hide,
|
1160 |
-
.woocommerce-checkout-review-order #payment #place_order.wc-stripe-hide{
|
1161 |
Â
position: absolute !important;
|
1162 |
Â
z-index: -1000 !important;
|
1163 |
Â
height: 0 !important;
|
@@ -1203,15 +1219,16 @@ li.payment_method_stripe_payment_request {
|
|
1203 |
Â
.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_] {
|
1204 |
Â
margin: 0 0 1em 0;
|
1205 |
Â
}
|
Â
|
|
1206 |
Â
.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]:last-child,
|
1207 |
-
.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_]:last-child{
|
1208 |
Â
margin: 0;
|
1209 |
Â
}
|
1210 |
Â
|
1211 |
Â
.wc_stripe_product_payment_methods .gpay-button,
|
1212 |
Â
.wc_stripe_cart_payment_methods .gpay-button,
|
1213 |
Â
.wc_stripe_product_payment_methods .gpay-card-info-container,
|
1214 |
-
.wc_stripe_cart_payment_methods .gpay-card-info-container{
|
1215 |
Â
width: 100% !important;
|
1216 |
Â
margin: 0;
|
1217 |
Â
}
|
@@ -1263,7 +1280,7 @@ li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_standa
|
|
1263 |
Â
max-height: 35px;
|
1264 |
Â
}
|
1265 |
Â
|
1266 |
-
li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_round_outline]{
|
1267 |
Â
width: 56px;
|
1268 |
Â
max-height: 30px;
|
1269 |
Â
}
|
@@ -1327,7 +1344,7 @@ li.payment_method_stripe_ach label:first-of-type img {
|
|
1327 |
Â
max-width: 240px;
|
1328 |
Â
}
|
1329 |
Â
|
1330 |
-
body.single-product div.product form.cart .wc_stripe_product_payment_methods .apple-pay-button{
|
1331 |
Â
max-width: 100%;
|
1332 |
Â
}
|
1333 |
Â
}
|
@@ -1387,12 +1404,12 @@ li.payment_method_stripe_ach label:first-of-type img {
|
|
1387 |
Â
}
|
1388 |
Â
|
1389 |
Â
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-button,
|
1390 |
-
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-card-info-container{
|
1391 |
Â
margin: 0;
|
1392 |
Â
}
|
1393 |
Â
|
1394 |
Â
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-button,
|
1395 |
-
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-card-info-container{
|
1396 |
Â
width: 100%;
|
1397 |
Â
}
|
1398 |
Â
|
@@ -1434,9 +1451,10 @@ ul.payment_methods li.payment_method_stripe_klarna img {
|
|
1434 |
Â
width: 72px;
|
1435 |
Â
max-height: 20px;
|
1436 |
Â
}
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
Â
|
|
1440 |
Â
max-height: 32px;
|
1441 |
Â
}
|
1442 |
Â
|
@@ -1633,7 +1651,7 @@ div[id*=wc_stripe_local_payment_stripe_].StripeElement {
|
|
1633 |
Â
}
|
1634 |
Â
|
1635 |
Â
#wc_stripe_local_payment_stripe_klarna,
|
1636 |
-
li[class*=payment_method_stripe_] div.wc-stripe-gateway-container.has_tokens{
|
1637 |
Â
margin-top: 10px;
|
1638 |
Â
}
|
1639 |
Â
|
@@ -1667,39 +1685,43 @@ li.payment_method_stripe_wechat {
|
|
1667 |
Â
display: none;
|
1668 |
Â
}
|
1669 |
Â
|
1670 |
-
.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods{
|
1671 |
Â
list-style: none;
|
1672 |
Â
margin: 0;
|
1673 |
Â
padding: 0;
|
1674 |
Â
}
|
1675 |
-
|
Â
|
|
1676 |
Â
margin: 0;
|
1677 |
Â
}
|
1678 |
Â
|
1679 |
Â
.widget_shopping_cart_content a.wc-stripe-gpay-mini-cart,
|
1680 |
Â
.widget_shopping_cart_content a.wc-stripe-applepay-mini-cart,
|
1681 |
-
.widget_shopping_cart_content a.wc-stripe-payment-request-mini-cart{
|
1682 |
Â
background: transparent;
|
1683 |
Â
padding: 0;
|
1684 |
Â
border: none;
|
1685 |
Â
}
|
Â
|
|
1686 |
Â
a.wc-stripe-gpay-mini-cart .gpay-button,
|
1687 |
Â
a.wc-stripe-gpay-mini-cart .gpay-card-info-container
|
1688 |
-
a.wc-stripe-applepay-mini-cart .apple-pay-button{
|
1689 |
Â
width: 100%;
|
1690 |
Â
margin: 0;
|
1691 |
Â
}
|
1692 |
-
|
Â
|
|
1693 |
Â
padding: 0;
|
1694 |
Â
background: transparent;
|
1695 |
Â
border: none;
|
1696 |
Â
width: 100%;
|
1697 |
Â
}
|
1698 |
-
|
Â
|
|
1699 |
Â
width: 100%;
|
1700 |
Â
}
|
1701 |
Â
|
1702 |
-
.widget_shopping_cart_content .wc-stripe-overlay{
|
1703 |
Â
display: none !important;
|
1704 |
Â
position: absolute;
|
1705 |
Â
background: rgba(255, 255, 255, 0.75);
|
@@ -1707,7 +1729,8 @@ a.wc-stripe-applepay-mini-cart .apple-pay-button{
|
|
1707 |
Â
width: 100%;
|
1708 |
Â
z-index: -1;
|
1709 |
Â
}
|
1710 |
-
|
Â
|
|
1711 |
Â
display: block !important;
|
1712 |
Â
z-index: 9999;
|
1713 |
Â
}
|
@@ -1721,6 +1744,7 @@ a.wc-stripe-applepay-mini-cart .apple-pay-button{
|
|
1721 |
Â
box-sizing: border-box;
|
1722 |
Â
transform: scale(.65);
|
1723 |
Â
}
|
Â
|
|
1724 |
Â
.wc-stripe-klarna-loader div {
|
1725 |
Â
box-sizing: border-box;
|
1726 |
Â
display: block;
|
@@ -1733,15 +1757,19 @@ a.wc-stripe-applepay-mini-cart .apple-pay-button{
|
|
1733 |
Â
animation: klarna-payments-loader 1.3s cubic-bezier(0.5, 0, 0.5, 1) infinite;
|
1734 |
Â
border-color: #000 transparent transparent transparent;
|
1735 |
Â
}
|
Â
|
|
1736 |
Â
.wc-stripe-klarna-loader div:nth-child(1) {
|
1737 |
Â
animation-delay: -0.45s;
|
1738 |
Â
}
|
Â
|
|
1739 |
Â
.wc-stripe-klarna-loader div:nth-child(2) {
|
1740 |
Â
animation-delay: -0.3s;
|
1741 |
Â
}
|
Â
|
|
1742 |
Â
.wc-stripe-klarna-loader div:nth-child(3) {
|
1743 |
Â
animation-delay: -0.15s;
|
1744 |
Â
}
|
Â
|
|
1745 |
Â
@keyframes klarna-payments-loader {
|
1746 |
Â
0% {
|
1747 |
Â
transform: rotate(0deg);
|
@@ -1761,16 +1789,83 @@ li.payment_method_stripe_giropay.wc-stripe-no-desc .payment_box.wc-stripe-no-met
|
|
1761 |
Â
li.payment_method_stripe_grabpay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
|
1762 |
Â
li.payment_method_stripe_multibanco.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
|
1763 |
Â
li.payment_method_stripe_p24.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
|
1764 |
-
li.payment_method_stripe_sofort.wc-stripe-no-desc .payment_box.wc-stripe-no-methods{
|
1765 |
Â
padding: 0;
|
1766 |
Â
margin: 0;
|
1767 |
Â
}
|
1768 |
Â
|
1769 |
-
.wc-stripe-shortcode-cart-buttons .wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or{
|
1770 |
Â
display: none;
|
1771 |
Â
}
|
1772 |
Â
|
1773 |
-
li[class*="payment_method_stripe_"] style{
|
1774 |
Â
display: none;
|
1775 |
Â
}
|
1776 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
119 |
Â
content: none !important;
|
120 |
Â
display: none !important;
|
121 |
Â
}
|
122 |
+
|
123 |
+
.wc-stripe-saved-methods-container .select2-container .select2-selection--single .select2-selection__rendered {
|
124 |
Â
padding-right: 8px;
|
125 |
Â
}
|
126 |
+
|
127 |
Â
.wc-stripe-saved-methods-container .select2-container .select2-selection--single .wc-stripe-select2-container,
|
128 |
Â
.select2-results__options li.wc-stripe-select2-container {
|
129 |
Â
display: flex;
|
212 |
Â
margin-bottom: 1em;
|
213 |
Â
}
|
214 |
Â
|
215 |
+
.wc-stripe_cc-new-method-container .wc-stripe-save-source {
|
216 |
Â
display: flex;
|
217 |
Â
align-items: center;
|
218 |
Â
justify-content: flex-start;
|
275 |
Â
|
276 |
Â
#place_order.wc-stripe-hide,
|
277 |
Â
#payment #place_order.wc-stripe-hide,
|
278 |
+
.woocommerce-checkout-review-order #payment #place_order.wc-stripe-hide {
|
279 |
Â
position: absolute !important;
|
280 |
Â
z-index: -1000 !important;
|
281 |
Â
height: 0 !important;
|
321 |
Â
.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_] {
|
322 |
Â
margin: 0 0 1em 0;
|
323 |
Â
}
|
324 |
+
|
325 |
Â
.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]:last-child,
|
326 |
+
.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_]:last-child {
|
327 |
Â
margin: 0;
|
328 |
Â
}
|
329 |
Â
|
330 |
Â
.wc_stripe_product_payment_methods .gpay-button,
|
331 |
Â
.wc_stripe_cart_payment_methods .gpay-button,
|
332 |
Â
.wc_stripe_product_payment_methods .gpay-card-info-container,
|
333 |
+
.wc_stripe_cart_payment_methods .gpay-card-info-container {
|
334 |
Â
width: 100% !important;
|
335 |
Â
margin: 0;
|
336 |
Â
}
|
382 |
Â
max-height: 35px;
|
383 |
Â
}
|
384 |
Â
|
385 |
+
li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_round_outline] {
|
386 |
Â
width: 56px;
|
387 |
Â
max-height: 30px;
|
388 |
Â
}
|
446 |
Â
max-width: 240px;
|
447 |
Â
}
|
448 |
Â
|
449 |
+
body.single-product div.product form.cart .wc_stripe_product_payment_methods .apple-pay-button {
|
450 |
Â
max-width: 100%;
|
451 |
Â
}
|
452 |
Â
}
|
506 |
Â
}
|
507 |
Â
|
508 |
Â
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-button,
|
509 |
+
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-card-info-container {
|
510 |
Â
margin: 0;
|
511 |
Â
}
|
512 |
Â
|
513 |
Â
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-button,
|
514 |
+
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-card-info-container {
|
515 |
Â
width: 100%;
|
516 |
Â
}
|
517 |
Â
|
553 |
Â
width: 72px;
|
554 |
Â
max-height: 20px;
|
555 |
Â
}
|
556 |
+
|
557 |
+
ul.payment_methods li.payment_method_stripe_klarna img[src*="klarna_pink"] {
|
558 |
Â
width: 56px;
|
559 |
Â
height: 32px;
|
560 |
Â
max-height: 32px;
|
753 |
Â
}
|
754 |
Â
|
755 |
Â
#wc_stripe_local_payment_stripe_klarna,
|
756 |
+
li[class*=payment_method_stripe_] div.wc-stripe-gateway-container.has_tokens {
|
757 |
Â
margin-top: 10px;
|
758 |
Â
}
|
759 |
Â
|
787 |
Â
display: none;
|
788 |
Â
}
|
789 |
Â
|
790 |
+
.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods {
|
791 |
Â
list-style: none;
|
792 |
Â
margin: 0;
|
793 |
Â
padding: 0;
|
794 |
Â
}
|
795 |
+
|
796 |
+
.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods li {
|
797 |
Â
margin: 0;
|
798 |
Â
}
|
799 |
Â
|
800 |
Â
.widget_shopping_cart_content a.wc-stripe-gpay-mini-cart,
|
801 |
Â
.widget_shopping_cart_content a.wc-stripe-applepay-mini-cart,
|
802 |
+
.widget_shopping_cart_content a.wc-stripe-payment-request-mini-cart {
|
803 |
Â
background: transparent;
|
804 |
Â
padding: 0;
|
805 |
Â
border: none;
|
806 |
Â
}
|
807 |
+
|
808 |
Â
a.wc-stripe-gpay-mini-cart .gpay-button,
|
809 |
Â
a.wc-stripe-gpay-mini-cart .gpay-card-info-container
|
810 |
+
a.wc-stripe-applepay-mini-cart .apple-pay-button {
|
811 |
Â
width: 100%;
|
812 |
Â
margin: 0;
|
813 |
Â
}
|
814 |
+
|
815 |
+
.wc-stripe-payment-request-mini-cart.StripeElement {
|
816 |
Â
padding: 0;
|
817 |
Â
background: transparent;
|
818 |
Â
border: none;
|
819 |
Â
width: 100%;
|
820 |
Â
}
|
821 |
+
|
822 |
+
.wc-stripe-payment-request-mini-cart.StripeElement .__PrivateStripeElement {
|
823 |
Â
width: 100%;
|
824 |
Â
}
|
825 |
Â
|
826 |
+
.widget_shopping_cart_content .wc-stripe-overlay {
|
827 |
Â
display: none !important;
|
828 |
Â
position: absolute;
|
829 |
Â
background: rgba(255, 255, 255, 0.75);
|
831 |
Â
width: 100%;
|
832 |
Â
z-index: -1;
|
833 |
Â
}
|
834 |
+
|
835 |
+
.widget_shopping_cart_content .wc-stripe-overlay.active {
|
836 |
Â
display: block !important;
|
837 |
Â
z-index: 9999;
|
838 |
Â
}
|
846 |
Â
box-sizing: border-box;
|
847 |
Â
transform: scale(.65);
|
848 |
Â
}
|
849 |
+
|
850 |
Â
.wc-stripe-klarna-loader div {
|
851 |
Â
box-sizing: border-box;
|
852 |
Â
display: block;
|
859 |
Â
animation: klarna-payments-loader 1.3s cubic-bezier(0.5, 0, 0.5, 1) infinite;
|
860 |
Â
border-color: #000 transparent transparent transparent;
|
861 |
Â
}
|
862 |
+
|
863 |
Â
.wc-stripe-klarna-loader div:nth-child(1) {
|
864 |
Â
animation-delay: -0.45s;
|
865 |
Â
}
|
866 |
+
|
867 |
Â
.wc-stripe-klarna-loader div:nth-child(2) {
|
868 |
Â
animation-delay: -0.3s;
|
869 |
Â
}
|
870 |
+
|
871 |
Â
.wc-stripe-klarna-loader div:nth-child(3) {
|
872 |
Â
animation-delay: -0.15s;
|
873 |
Â
}
|
874 |
+
|
875 |
Â
@keyframes klarna-payments-loader {
|
876 |
Â
0% {
|
877 |
Â
transform: rotate(0deg);
|
891 |
Â
li.payment_method_stripe_grabpay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
|
892 |
Â
li.payment_method_stripe_multibanco.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
|
893 |
Â
li.payment_method_stripe_p24.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
|
894 |
+
li.payment_method_stripe_sofort.wc-stripe-no-desc .payment_box.wc-stripe-no-methods {
|
895 |
Â
padding: 0;
|
896 |
Â
margin: 0;
|
897 |
Â
}
|
1017 |
Â
content: none !important;
|
1018 |
Â
display: none !important;
|
1019 |
Â
}
|
1020 |
+
|
1021 |
+
.wc-stripe-saved-methods-container .select2-container .select2-selection--single .select2-selection__rendered {
|
1022 |
Â
padding-right: 8px;
|
1023 |
Â
}
|
1024 |
+
|
1025 |
Â
.wc-stripe-saved-methods-container .select2-container .select2-selection--single .wc-stripe-select2-container,
|
1026 |
Â
.select2-results__options li.wc-stripe-select2-container {
|
1027 |
Â
display: flex;
|
1110 |
Â
margin-bottom: 1em;
|
1111 |
Â
}
|
1112 |
Â
|
1113 |
+
.wc-stripe_cc-new-method-container .wc-stripe-save-source {
|
1114 |
Â
display: flex;
|
1115 |
Â
align-items: center;
|
1116 |
Â
justify-content: flex-start;
|
1173 |
Â
|
1174 |
Â
#place_order.wc-stripe-hide,
|
1175 |
Â
#payment #place_order.wc-stripe-hide,
|
1176 |
+
.woocommerce-checkout-review-order #payment #place_order.wc-stripe-hide {
|
1177 |
Â
position: absolute !important;
|
1178 |
Â
z-index: -1000 !important;
|
1179 |
Â
height: 0 !important;
|
1219 |
Â
.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_] {
|
1220 |
Â
margin: 0 0 1em 0;
|
1221 |
Â
}
|
1222 |
+
|
1223 |
Â
.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]:last-child,
|
1224 |
+
.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_]:last-child {
|
1225 |
Â
margin: 0;
|
1226 |
Â
}
|
1227 |
Â
|
1228 |
Â
.wc_stripe_product_payment_methods .gpay-button,
|
1229 |
Â
.wc_stripe_cart_payment_methods .gpay-button,
|
1230 |
Â
.wc_stripe_product_payment_methods .gpay-card-info-container,
|
1231 |
+
.wc_stripe_cart_payment_methods .gpay-card-info-container {
|
1232 |
Â
width: 100% !important;
|
1233 |
Â
margin: 0;
|
1234 |
Â
}
|
1280 |
Â
max-height: 35px;
|
1281 |
Â
}
|
1282 |
Â
|
1283 |
+
li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_round_outline] {
|
1284 |
Â
width: 56px;
|
1285 |
Â
max-height: 30px;
|
1286 |
Â
}
|
1344 |
Â
max-width: 240px;
|
1345 |
Â
}
|
1346 |
Â
|
1347 |
+
body.single-product div.product form.cart .wc_stripe_product_payment_methods .apple-pay-button {
|
1348 |
Â
max-width: 100%;
|
1349 |
Â
}
|
1350 |
Â
}
|
1404 |
Â
}
|
1405 |
Â
|
1406 |
Â
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-button,
|
1407 |
+
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-card-info-container {
|
1408 |
Â
margin: 0;
|
1409 |
Â
}
|
1410 |
Â
|
1411 |
Â
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-button,
|
1412 |
+
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-card-info-container {
|
1413 |
Â
width: 100%;
|
1414 |
Â
}
|
1415 |
Â
|
1451 |
Â
width: 72px;
|
1452 |
Â
max-height: 20px;
|
1453 |
Â
}
|
1454 |
+
|
1455 |
+
ul.payment_methods li.payment_method_stripe_klarna img[src*="klarna_pink"] {
|
1456 |
+
width: 54px;
|
1457 |
+
height: 30px;
|
1458 |
Â
max-height: 32px;
|
1459 |
Â
}
|
1460 |
Â
|
1651 |
Â
}
|
1652 |
Â
|
1653 |
Â
#wc_stripe_local_payment_stripe_klarna,
|
1654 |
+
li[class*=payment_method_stripe_] div.wc-stripe-gateway-container.has_tokens {
|
1655 |
Â
margin-top: 10px;
|
1656 |
Â
}
|
1657 |
Â
|
1685 |
Â
display: none;
|
1686 |
Â
}
|
1687 |
Â
|
1688 |
+
.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods {
|
1689 |
Â
list-style: none;
|
1690 |
Â
margin: 0;
|
1691 |
Â
padding: 0;
|
1692 |
Â
}
|
1693 |
+
|
1694 |
+
.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods li {
|
1695 |
Â
margin: 0;
|
1696 |
Â
}
|
1697 |
Â
|
1698 |
Â
.widget_shopping_cart_content a.wc-stripe-gpay-mini-cart,
|
1699 |
Â
.widget_shopping_cart_content a.wc-stripe-applepay-mini-cart,
|
1700 |
+
.widget_shopping_cart_content a.wc-stripe-payment-request-mini-cart {
|
1701 |
Â
background: transparent;
|
1702 |
Â
padding: 0;
|
1703 |
Â
border: none;
|
1704 |
Â
}
|
1705 |
+
|
1706 |
Â
a.wc-stripe-gpay-mini-cart .gpay-button,
|
1707 |
Â
a.wc-stripe-gpay-mini-cart .gpay-card-info-container
|
1708 |
+
a.wc-stripe-applepay-mini-cart .apple-pay-button {
|
1709 |
Â
width: 100%;
|
1710 |
Â
margin: 0;
|
1711 |
Â
}
|
1712 |
+
|
1713 |
+
.wc-stripe-payment-request-mini-cart.StripeElement {
|
1714 |
Â
padding: 0;
|
1715 |
Â
background: transparent;
|
1716 |
Â
border: none;
|
1717 |
Â
width: 100%;
|
1718 |
Â
}
|
1719 |
+
|
1720 |
+
.wc-stripe-payment-request-mini-cart.StripeElement .__PrivateStripeElement {
|
1721 |
Â
width: 100%;
|
1722 |
Â
}
|
1723 |
Â
|
1724 |
+
.widget_shopping_cart_content .wc-stripe-overlay {
|
1725 |
Â
display: none !important;
|
1726 |
Â
position: absolute;
|
1727 |
Â
background: rgba(255, 255, 255, 0.75);
|
1729 |
Â
width: 100%;
|
1730 |
Â
z-index: -1;
|
1731 |
Â
}
|
1732 |
+
|
1733 |
+
.widget_shopping_cart_content .wc-stripe-overlay.active {
|
1734 |
Â
display: block !important;
|
1735 |
Â
z-index: 9999;
|
1736 |
Â
}
|
1744 |
Â
box-sizing: border-box;
|
1745 |
Â
transform: scale(.65);
|
1746 |
Â
}
|
1747 |
+
|
1748 |
Â
.wc-stripe-klarna-loader div {
|
1749 |
Â
box-sizing: border-box;
|
1750 |
Â
display: block;
|
1757 |
Â
animation: klarna-payments-loader 1.3s cubic-bezier(0.5, 0, 0.5, 1) infinite;
|
1758 |
Â
border-color: #000 transparent transparent transparent;
|
1759 |
Â
}
|
1760 |
+
|
1761 |
Â
.wc-stripe-klarna-loader div:nth-child(1) {
|
1762 |
Â
animation-delay: -0.45s;
|
1763 |
Â
}
|
1764 |
+
|
1765 |
Â
.wc-stripe-klarna-loader div:nth-child(2) {
|
1766 |
Â
animation-delay: -0.3s;
|
1767 |
Â
}
|
1768 |
+
|
1769 |
Â
.wc-stripe-klarna-loader div:nth-child(3) {
|
1770 |
Â
animation-delay: -0.15s;
|
1771 |
Â
}
|
1772 |
+
|
1773 |
Â
@keyframes klarna-payments-loader {
|
1774 |
Â
0% {
|
1775 |
Â
transform: rotate(0deg);
|
1789 |
Â
li.payment_method_stripe_grabpay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
|
1790 |
Â
li.payment_method_stripe_multibanco.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
|
1791 |
Â
li.payment_method_stripe_p24.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
|
1792 |
+
li.payment_method_stripe_sofort.wc-stripe-no-desc .payment_box.wc-stripe-no-methods {
|
1793 |
Â
padding: 0;
|
1794 |
Â
margin: 0;
|
1795 |
Â
}
|
1796 |
Â
|
1797 |
+
.wc-stripe-shortcode-cart-buttons .wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or {
|
1798 |
Â
display: none;
|
1799 |
Â
}
|
1800 |
Â
|
1801 |
+
li[class*="payment_method_stripe_"] style {
|
1802 |
Â
display: none;
|
1803 |
Â
}
|
1804 |
Â
|
1805 |
+
ul.payment_methods li[class*=payment_method] > input[name=payment_method] + label[for=payment_method_stripe_afterpay] {
|
1806 |
+
display: flex;
|
1807 |
+
align-items: center;
|
1808 |
+
}
|
1809 |
+
|
1810 |
+
.payment_method_stripe_afterpay #wc-stripe-afterpay-msg .__PrivateStripeElement p,
|
1811 |
+
#wc-stripe-afterpay-cart-container #wc-stripe-afterpay-cart-msg .__PrivateStripeElement p,
|
1812 |
+
#wc-stripe-afterpay-product-msg .__PrivateStripeElement p {
|
1813 |
+
margin-bottom: 0 !important;
|
1814 |
+
margin-top: 0 !important;
|
1815 |
+
}
|
1816 |
+
|
1817 |
+
.payment_method_stripe_afterpay #wc-stripe-afterpay-msg .__PrivateStripeElement p .AfterpayMessage-logo,
|
1818 |
+
#wc-stripe-afterpay-cart-msg .__PrivateStripeElement p .AfterpayMessage-logo {
|
1819 |
+
vertical-align: middle;
|
1820 |
+
}
|
1821 |
+
|
1822 |
+
.payment_method_stripe_afterpay #wc_stripe_local_payment_stripe_afterpay.ineligible {
|
1823 |
+
display: none;
|
1824 |
+
}
|
1825 |
+
|
1826 |
+
.payment_method_stripe_afterpay .wc-stripe-afterpay__offsite {
|
1827 |
+
text-align: center;
|
1828 |
+
max-width: 320px;
|
1829 |
+
margin: 0 auto;
|
1830 |
+
padding: 10px 0;
|
1831 |
+
}
|
1832 |
+
|
1833 |
+
.payment_method_stripe_afterpay .wc-stripe-afterpay__offsite img {
|
1834 |
+
display: inline-block;
|
1835 |
+
}
|
1836 |
+
|
1837 |
+
.payment_method_stripe_afterpay .wc-stripe-afterpay__offsite p {
|
1838 |
+
font-size: 14px;
|
1839 |
+
margin-top: 10px;
|
1840 |
+
}
|
1841 |
+
|
1842 |
+
#wc-stripe-afterpay-cart-container #wc-stripe-afterpay-cart-msg {
|
1843 |
+
text-align: right;
|
1844 |
+
}
|
1845 |
+
|
1846 |
+
#wc-stripe-afterpay-cart-container #wc-stripe-afterpay-cart-msg .AfterpayMessage-logoSvg,
|
1847 |
+
.payment_method_stripe_afterpay #wc-stripe-afterpay-msg .AfterpayMessage-logoSvg {
|
1848 |
+
min-width: 64px;
|
1849 |
+
max-width: 90px;
|
1850 |
+
}
|
1851 |
+
|
1852 |
+
#wc-stripe-afterpay-cart-container td {
|
1853 |
+
border: none;
|
1854 |
+
}
|
1855 |
+
|
1856 |
+
#wc-stripe-afterpay-cart-container td::before {
|
1857 |
+
content: '';
|
1858 |
+
}
|
1859 |
+
|
1860 |
+
.AfterpayMessage-logoSvg {
|
1861 |
+
display: inline-block;
|
1862 |
+
}
|
1863 |
+
|
1864 |
+
#wc-stripe-afterpay-product-msg {
|
1865 |
+
font-size: 14px;
|
1866 |
+
}
|
1867 |
+
|
1868 |
+
#wc-stripe-afterpay-product-msg .AfterpayMessage-logoSvg {
|
1869 |
+
max-width: 80px;
|
1870 |
+
min-width: 64px;
|
1871 |
+
}
|
assets/css/stripe.css
CHANGED
@@ -119,9 +119,11 @@ label.wc-stripe-label-payment-type:after {
|
|
119 |
Â
content: none !important;
|
120 |
Â
display: none !important;
|
121 |
Â
}
|
122 |
-
|
Â
|
|
123 |
Â
padding-left: 8px;
|
124 |
Â
}
|
Â
|
|
125 |
Â
.wc-stripe-saved-methods-container .select2-container .select2-selection--single .wc-stripe-select2-container,
|
126 |
Â
.select2-results__options li.wc-stripe-select2-container {
|
127 |
Â
display: flex;
|
@@ -210,7 +212,7 @@ label.wc-stripe-label-payment-type:after {
|
|
210 |
Â
margin-bottom: 1em;
|
211 |
Â
}
|
212 |
Â
|
213 |
-
.wc-stripe_cc-new-method-container .wc-stripe-save-source{
|
214 |
Â
display: flex;
|
215 |
Â
align-items: center;
|
216 |
Â
justify-content: flex-start;
|
@@ -273,7 +275,7 @@ li.payment_method_stripe_payment_request {
|
|
273 |
Â
|
274 |
Â
#place_order.wc-stripe-hide,
|
275 |
Â
#payment #place_order.wc-stripe-hide,
|
276 |
-
.woocommerce-checkout-review-order #payment #place_order.wc-stripe-hide{
|
277 |
Â
position: absolute !important;
|
278 |
Â
z-index: -1000 !important;
|
279 |
Â
height: 0 !important;
|
@@ -319,15 +321,16 @@ li.payment_method_stripe_payment_request {
|
|
319 |
Â
.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_] {
|
320 |
Â
margin: 0 0 1em 0;
|
321 |
Â
}
|
Â
|
|
322 |
Â
.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]:last-child,
|
323 |
-
.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_]:last-child{
|
324 |
Â
margin: 0;
|
325 |
Â
}
|
326 |
Â
|
327 |
Â
.wc_stripe_product_payment_methods .gpay-button,
|
328 |
Â
.wc_stripe_cart_payment_methods .gpay-button,
|
329 |
Â
.wc_stripe_product_payment_methods .gpay-card-info-container,
|
330 |
-
.wc_stripe_cart_payment_methods .gpay-card-info-container{
|
331 |
Â
width: 100% !important;
|
332 |
Â
margin: 0;
|
333 |
Â
}
|
@@ -379,7 +382,7 @@ li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_standa
|
|
379 |
Â
max-height: 35px;
|
380 |
Â
}
|
381 |
Â
|
382 |
-
li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_round_outline]{
|
383 |
Â
width: 56px;
|
384 |
Â
max-height: 30px;
|
385 |
Â
}
|
@@ -443,7 +446,7 @@ li.payment_method_stripe_ach label:first-of-type img {
|
|
443 |
Â
max-width: 240px;
|
444 |
Â
}
|
445 |
Â
|
446 |
-
body.single-product div.product form.cart .wc_stripe_product_payment_methods .apple-pay-button{
|
447 |
Â
max-width: 100%;
|
448 |
Â
}
|
449 |
Â
}
|
@@ -503,12 +506,12 @@ li.payment_method_stripe_ach label:first-of-type img {
|
|
503 |
Â
}
|
504 |
Â
|
505 |
Â
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-button,
|
506 |
-
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-card-info-container{
|
507 |
Â
margin: 0;
|
508 |
Â
}
|
509 |
Â
|
510 |
Â
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-button,
|
511 |
-
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-card-info-container{
|
512 |
Â
width: 100%;
|
513 |
Â
}
|
514 |
Â
|
@@ -550,7 +553,8 @@ ul.payment_methods li.payment_method_stripe_klarna img {
|
|
550 |
Â
width: 72px;
|
551 |
Â
max-height: 20px;
|
552 |
Â
}
|
553 |
-
|
Â
|
|
554 |
Â
width: 56px;
|
555 |
Â
height: 32px;
|
556 |
Â
max-height: 32px;
|
@@ -749,7 +753,7 @@ div[id*=wc_stripe_local_payment_stripe_].StripeElement {
|
|
749 |
Â
}
|
750 |
Â
|
751 |
Â
#wc_stripe_local_payment_stripe_klarna,
|
752 |
-
li[class*=payment_method_stripe_] div.wc-stripe-gateway-container.has_tokens{
|
753 |
Â
margin-top: 10px;
|
754 |
Â
}
|
755 |
Â
|
@@ -783,39 +787,43 @@ li.payment_method_stripe_wechat {
|
|
783 |
Â
display: none;
|
784 |
Â
}
|
785 |
Â
|
786 |
-
.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods{
|
787 |
Â
list-style: none;
|
788 |
Â
margin: 0;
|
789 |
Â
padding: 0;
|
790 |
Â
}
|
791 |
-
|
Â
|
|
792 |
Â
margin: 0;
|
793 |
Â
}
|
794 |
Â
|
795 |
Â
.widget_shopping_cart_content a.wc-stripe-gpay-mini-cart,
|
796 |
Â
.widget_shopping_cart_content a.wc-stripe-applepay-mini-cart,
|
797 |
-
.widget_shopping_cart_content a.wc-stripe-payment-request-mini-cart{
|
798 |
Â
background: transparent;
|
799 |
Â
padding: 0;
|
800 |
Â
border: none;
|
801 |
Â
}
|
Â
|
|
802 |
Â
a.wc-stripe-gpay-mini-cart .gpay-button,
|
803 |
Â
a.wc-stripe-gpay-mini-cart .gpay-card-info-container
|
804 |
-
a.wc-stripe-applepay-mini-cart .apple-pay-button{
|
805 |
Â
width: 100%;
|
806 |
Â
margin: 0;
|
807 |
Â
}
|
808 |
-
|
Â
|
|
809 |
Â
padding: 0;
|
810 |
Â
background: transparent;
|
811 |
Â
border: none;
|
812 |
Â
width: 100%;
|
813 |
Â
}
|
814 |
-
|
Â
|
|
815 |
Â
width: 100%;
|
816 |
Â
}
|
817 |
Â
|
818 |
-
.widget_shopping_cart_content .wc-stripe-overlay{
|
819 |
Â
display: none !important;
|
820 |
Â
position: absolute;
|
821 |
Â
background: rgba(255, 255, 255, 0.75);
|
@@ -823,7 +831,8 @@ a.wc-stripe-applepay-mini-cart .apple-pay-button{
|
|
823 |
Â
width: 100%;
|
824 |
Â
z-index: -1;
|
825 |
Â
}
|
826 |
-
|
Â
|
|
827 |
Â
display: block !important;
|
828 |
Â
z-index: 9999;
|
829 |
Â
}
|
@@ -837,6 +846,7 @@ a.wc-stripe-applepay-mini-cart .apple-pay-button{
|
|
837 |
Â
box-sizing: border-box;
|
838 |
Â
transform: scale(.65);
|
839 |
Â
}
|
Â
|
|
840 |
Â
.wc-stripe-klarna-loader div {
|
841 |
Â
box-sizing: border-box;
|
842 |
Â
display: block;
|
@@ -849,15 +859,19 @@ a.wc-stripe-applepay-mini-cart .apple-pay-button{
|
|
849 |
Â
animation: klarna-payments-loader 1.3s cubic-bezier(0.5, 0, 0.5, 1) infinite;
|
850 |
Â
border-color: #000 transparent transparent transparent;
|
851 |
Â
}
|
Â
|
|
852 |
Â
.wc-stripe-klarna-loader div:nth-child(1) {
|
853 |
Â
animation-delay: -0.45s;
|
854 |
Â
}
|
Â
|
|
855 |
Â
.wc-stripe-klarna-loader div:nth-child(2) {
|
856 |
Â
animation-delay: -0.3s;
|
857 |
Â
}
|
Â
|
|
858 |
Â
.wc-stripe-klarna-loader div:nth-child(3) {
|
859 |
Â
animation-delay: -0.15s;
|
860 |
Â
}
|
Â
|
|
861 |
Â
@keyframes klarna-payments-loader {
|
862 |
Â
0% {
|
863 |
Â
transform: rotate(0deg);
|
@@ -877,7 +891,7 @@ li.payment_method_stripe_giropay.wc-stripe-no-desc .payment_box.wc-stripe-no-met
|
|
877 |
Â
li.payment_method_stripe_grabpay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
|
878 |
Â
li.payment_method_stripe_multibanco.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
|
879 |
Â
li.payment_method_stripe_p24.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
|
880 |
-
li.payment_method_stripe_sofort.wc-stripe-no-desc .payment_box.wc-stripe-no-methods{
|
881 |
Â
padding: 0;
|
882 |
Â
margin: 0;
|
883 |
Â
}
|
@@ -1003,9 +1017,11 @@ label.wc-stripe-label-payment-type:after {
|
|
1003 |
Â
content: none !important;
|
1004 |
Â
display: none !important;
|
1005 |
Â
}
|
1006 |
-
|
Â
|
|
1007 |
Â
padding-left: 8px;
|
1008 |
Â
}
|
Â
|
|
1009 |
Â
.wc-stripe-saved-methods-container .select2-container .select2-selection--single .wc-stripe-select2-container,
|
1010 |
Â
.select2-results__options li.wc-stripe-select2-container {
|
1011 |
Â
display: flex;
|
@@ -1094,7 +1110,7 @@ label.wc-stripe-label-payment-type:after {
|
|
1094 |
Â
margin-bottom: 1em;
|
1095 |
Â
}
|
1096 |
Â
|
1097 |
-
.wc-stripe_cc-new-method-container .wc-stripe-save-source{
|
1098 |
Â
display: flex;
|
1099 |
Â
align-items: center;
|
1100 |
Â
justify-content: flex-start;
|
@@ -1157,7 +1173,7 @@ li.payment_method_stripe_payment_request {
|
|
1157 |
Â
|
1158 |
Â
#place_order.wc-stripe-hide,
|
1159 |
Â
#payment #place_order.wc-stripe-hide,
|
1160 |
-
.woocommerce-checkout-review-order #payment #place_order.wc-stripe-hide{
|
1161 |
Â
position: absolute !important;
|
1162 |
Â
z-index: -1000 !important;
|
1163 |
Â
height: 0 !important;
|
@@ -1203,15 +1219,16 @@ li.payment_method_stripe_payment_request {
|
|
1203 |
Â
.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_] {
|
1204 |
Â
margin: 0 0 1em 0;
|
1205 |
Â
}
|
Â
|
|
1206 |
Â
.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]:last-child,
|
1207 |
-
.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_]:last-child{
|
1208 |
Â
margin: 0;
|
1209 |
Â
}
|
1210 |
Â
|
1211 |
Â
.wc_stripe_product_payment_methods .gpay-button,
|
1212 |
Â
.wc_stripe_cart_payment_methods .gpay-button,
|
1213 |
Â
.wc_stripe_product_payment_methods .gpay-card-info-container,
|
1214 |
-
.wc_stripe_cart_payment_methods .gpay-card-info-container{
|
1215 |
Â
width: 100% !important;
|
1216 |
Â
margin: 0;
|
1217 |
Â
}
|
@@ -1263,7 +1280,7 @@ li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_standa
|
|
1263 |
Â
max-height: 35px;
|
1264 |
Â
}
|
1265 |
Â
|
1266 |
-
li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_round_outline]{
|
1267 |
Â
width: 56px;
|
1268 |
Â
max-height: 30px;
|
1269 |
Â
}
|
@@ -1327,7 +1344,7 @@ li.payment_method_stripe_ach label:first-of-type img {
|
|
1327 |
Â
max-width: 240px;
|
1328 |
Â
}
|
1329 |
Â
|
1330 |
-
body.single-product div.product form.cart .wc_stripe_product_payment_methods .apple-pay-button{
|
1331 |
Â
max-width: 100%;
|
1332 |
Â
}
|
1333 |
Â
}
|
@@ -1387,12 +1404,12 @@ li.payment_method_stripe_ach label:first-of-type img {
|
|
1387 |
Â
}
|
1388 |
Â
|
1389 |
Â
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-button,
|
1390 |
-
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-card-info-container{
|
1391 |
Â
margin: 0;
|
1392 |
Â
}
|
1393 |
Â
|
1394 |
Â
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-button,
|
1395 |
-
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-card-info-container{
|
1396 |
Â
width: 100%;
|
1397 |
Â
}
|
1398 |
Â
|
@@ -1434,9 +1451,10 @@ ul.payment_methods li.payment_method_stripe_klarna img {
|
|
1434 |
Â
width: 72px;
|
1435 |
Â
max-height: 20px;
|
1436 |
Â
}
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
Â
|
|
1440 |
Â
max-height: 32px;
|
1441 |
Â
}
|
1442 |
Â
|
@@ -1633,7 +1651,7 @@ div[id*=wc_stripe_local_payment_stripe_].StripeElement {
|
|
1633 |
Â
}
|
1634 |
Â
|
1635 |
Â
#wc_stripe_local_payment_stripe_klarna,
|
1636 |
-
li[class*=payment_method_stripe_] div.wc-stripe-gateway-container.has_tokens{
|
1637 |
Â
margin-top: 10px;
|
1638 |
Â
}
|
1639 |
Â
|
@@ -1667,39 +1685,43 @@ li.payment_method_stripe_wechat {
|
|
1667 |
Â
display: none;
|
1668 |
Â
}
|
1669 |
Â
|
1670 |
-
.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods{
|
1671 |
Â
list-style: none;
|
1672 |
Â
margin: 0;
|
1673 |
Â
padding: 0;
|
1674 |
Â
}
|
1675 |
-
|
Â
|
|
1676 |
Â
margin: 0;
|
1677 |
Â
}
|
1678 |
Â
|
1679 |
Â
.widget_shopping_cart_content a.wc-stripe-gpay-mini-cart,
|
1680 |
Â
.widget_shopping_cart_content a.wc-stripe-applepay-mini-cart,
|
1681 |
-
.widget_shopping_cart_content a.wc-stripe-payment-request-mini-cart{
|
1682 |
Â
background: transparent;
|
1683 |
Â
padding: 0;
|
1684 |
Â
border: none;
|
1685 |
Â
}
|
Â
|
|
1686 |
Â
a.wc-stripe-gpay-mini-cart .gpay-button,
|
1687 |
Â
a.wc-stripe-gpay-mini-cart .gpay-card-info-container
|
1688 |
-
a.wc-stripe-applepay-mini-cart .apple-pay-button{
|
1689 |
Â
width: 100%;
|
1690 |
Â
margin: 0;
|
1691 |
Â
}
|
1692 |
-
|
Â
|
|
1693 |
Â
padding: 0;
|
1694 |
Â
background: transparent;
|
1695 |
Â
border: none;
|
1696 |
Â
width: 100%;
|
1697 |
Â
}
|
1698 |
-
|
Â
|
|
1699 |
Â
width: 100%;
|
1700 |
Â
}
|
1701 |
Â
|
1702 |
-
.widget_shopping_cart_content .wc-stripe-overlay{
|
1703 |
Â
display: none !important;
|
1704 |
Â
position: absolute;
|
1705 |
Â
background: rgba(255, 255, 255, 0.75);
|
@@ -1707,7 +1729,8 @@ a.wc-stripe-applepay-mini-cart .apple-pay-button{
|
|
1707 |
Â
width: 100%;
|
1708 |
Â
z-index: -1;
|
1709 |
Â
}
|
1710 |
-
|
Â
|
|
1711 |
Â
display: block !important;
|
1712 |
Â
z-index: 9999;
|
1713 |
Â
}
|
@@ -1721,6 +1744,7 @@ a.wc-stripe-applepay-mini-cart .apple-pay-button{
|
|
1721 |
Â
box-sizing: border-box;
|
1722 |
Â
transform: scale(.65);
|
1723 |
Â
}
|
Â
|
|
1724 |
Â
.wc-stripe-klarna-loader div {
|
1725 |
Â
box-sizing: border-box;
|
1726 |
Â
display: block;
|
@@ -1733,15 +1757,19 @@ a.wc-stripe-applepay-mini-cart .apple-pay-button{
|
|
1733 |
Â
animation: klarna-payments-loader 1.3s cubic-bezier(0.5, 0, 0.5, 1) infinite;
|
1734 |
Â
border-color: #000 transparent transparent transparent;
|
1735 |
Â
}
|
Â
|
|
1736 |
Â
.wc-stripe-klarna-loader div:nth-child(1) {
|
1737 |
Â
animation-delay: -0.45s;
|
1738 |
Â
}
|
Â
|
|
1739 |
Â
.wc-stripe-klarna-loader div:nth-child(2) {
|
1740 |
Â
animation-delay: -0.3s;
|
1741 |
Â
}
|
Â
|
|
1742 |
Â
.wc-stripe-klarna-loader div:nth-child(3) {
|
1743 |
Â
animation-delay: -0.15s;
|
1744 |
Â
}
|
Â
|
|
1745 |
Â
@keyframes klarna-payments-loader {
|
1746 |
Â
0% {
|
1747 |
Â
transform: rotate(0deg);
|
@@ -1761,16 +1789,83 @@ li.payment_method_stripe_giropay.wc-stripe-no-desc .payment_box.wc-stripe-no-met
|
|
1761 |
Â
li.payment_method_stripe_grabpay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
|
1762 |
Â
li.payment_method_stripe_multibanco.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
|
1763 |
Â
li.payment_method_stripe_p24.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
|
1764 |
-
li.payment_method_stripe_sofort.wc-stripe-no-desc .payment_box.wc-stripe-no-methods{
|
1765 |
Â
padding: 0;
|
1766 |
Â
margin: 0;
|
1767 |
Â
}
|
1768 |
Â
|
1769 |
-
.wc-stripe-shortcode-cart-buttons .wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or{
|
1770 |
Â
display: none;
|
1771 |
Â
}
|
1772 |
Â
|
1773 |
-
li[class*="payment_method_stripe_"] style{
|
1774 |
Â
display: none;
|
1775 |
Â
}
|
1776 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
119 |
Â
content: none !important;
|
120 |
Â
display: none !important;
|
121 |
Â
}
|
122 |
+
|
123 |
+
.wc-stripe-saved-methods-container .select2-container .select2-selection--single .select2-selection__rendered {
|
124 |
Â
padding-left: 8px;
|
125 |
Â
}
|
126 |
+
|
127 |
Â
.wc-stripe-saved-methods-container .select2-container .select2-selection--single .wc-stripe-select2-container,
|
128 |
Â
.select2-results__options li.wc-stripe-select2-container {
|
129 |
Â
display: flex;
|
212 |
Â
margin-bottom: 1em;
|
213 |
Â
}
|
214 |
Â
|
215 |
+
.wc-stripe_cc-new-method-container .wc-stripe-save-source {
|
216 |
Â
display: flex;
|
217 |
Â
align-items: center;
|
218 |
Â
justify-content: flex-start;
|
275 |
Â
|
276 |
Â
#place_order.wc-stripe-hide,
|
277 |
Â
#payment #place_order.wc-stripe-hide,
|
278 |
+
.woocommerce-checkout-review-order #payment #place_order.wc-stripe-hide {
|
279 |
Â
position: absolute !important;
|
280 |
Â
z-index: -1000 !important;
|
281 |
Â
height: 0 !important;
|
321 |
Â
.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_] {
|
322 |
Â
margin: 0 0 1em 0;
|
323 |
Â
}
|
324 |
+
|
325 |
Â
.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]:last-child,
|
326 |
+
.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_]:last-child {
|
327 |
Â
margin: 0;
|
328 |
Â
}
|
329 |
Â
|
330 |
Â
.wc_stripe_product_payment_methods .gpay-button,
|
331 |
Â
.wc_stripe_cart_payment_methods .gpay-button,
|
332 |
Â
.wc_stripe_product_payment_methods .gpay-card-info-container,
|
333 |
+
.wc_stripe_cart_payment_methods .gpay-card-info-container {
|
334 |
Â
width: 100% !important;
|
335 |
Â
margin: 0;
|
336 |
Â
}
|
382 |
Â
max-height: 35px;
|
383 |
Â
}
|
384 |
Â
|
385 |
+
li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_round_outline] {
|
386 |
Â
width: 56px;
|
387 |
Â
max-height: 30px;
|
388 |
Â
}
|
446 |
Â
max-width: 240px;
|
447 |
Â
}
|
448 |
Â
|
449 |
+
body.single-product div.product form.cart .wc_stripe_product_payment_methods .apple-pay-button {
|
450 |
Â
max-width: 100%;
|
451 |
Â
}
|
452 |
Â
}
|
506 |
Â
}
|
507 |
Â
|
508 |
Â
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-button,
|
509 |
+
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-card-info-container {
|
510 |
Â
margin: 0;
|
511 |
Â
}
|
512 |
Â
|
513 |
Â
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-button,
|
514 |
+
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-card-info-container {
|
515 |
Â
width: 100%;
|
516 |
Â
}
|
517 |
Â
|
553 |
Â
width: 72px;
|
554 |
Â
max-height: 20px;
|
555 |
Â
}
|
556 |
+
|
557 |
+
ul.payment_methods li.payment_method_stripe_klarna img[src*="klarna_pink"] {
|
558 |
Â
width: 56px;
|
559 |
Â
height: 32px;
|
560 |
Â
max-height: 32px;
|
753 |
Â
}
|
754 |
Â
|
755 |
Â
#wc_stripe_local_payment_stripe_klarna,
|
756 |
+
li[class*=payment_method_stripe_] div.wc-stripe-gateway-container.has_tokens {
|
757 |
Â
margin-top: 10px;
|
758 |
Â
}
|
759 |
Â
|
787 |
Â
display: none;
|
788 |
Â
}
|
789 |
Â
|
790 |
+
.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods {
|
791 |
Â
list-style: none;
|
792 |
Â
margin: 0;
|
793 |
Â
padding: 0;
|
794 |
Â
}
|
795 |
+
|
796 |
+
.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods li {
|
797 |
Â
margin: 0;
|
798 |
Â
}
|
799 |
Â
|
800 |
Â
.widget_shopping_cart_content a.wc-stripe-gpay-mini-cart,
|
801 |
Â
.widget_shopping_cart_content a.wc-stripe-applepay-mini-cart,
|
802 |
+
.widget_shopping_cart_content a.wc-stripe-payment-request-mini-cart {
|
803 |
Â
background: transparent;
|
804 |
Â
padding: 0;
|
805 |
Â
border: none;
|
806 |
Â
}
|
807 |
+
|
808 |
Â
a.wc-stripe-gpay-mini-cart .gpay-button,
|
809 |
Â
a.wc-stripe-gpay-mini-cart .gpay-card-info-container
|
810 |
+
a.wc-stripe-applepay-mini-cart .apple-pay-button {
|
811 |
Â
width: 100%;
|
812 |
Â
margin: 0;
|
813 |
Â
}
|
814 |
+
|
815 |
+
.wc-stripe-payment-request-mini-cart.StripeElement {
|
816 |
Â
padding: 0;
|
817 |
Â
background: transparent;
|
818 |
Â
border: none;
|
819 |
Â
width: 100%;
|
820 |
Â
}
|
821 |
+
|
822 |
+
.wc-stripe-payment-request-mini-cart.StripeElement .__PrivateStripeElement {
|
823 |
Â
width: 100%;
|
824 |
Â
}
|
825 |
Â
|
826 |
+
.widget_shopping_cart_content .wc-stripe-overlay {
|
827 |
Â
display: none !important;
|
828 |
Â
position: absolute;
|
829 |
Â
background: rgba(255, 255, 255, 0.75);
|
831 |
Â
width: 100%;
|
832 |
Â
z-index: -1;
|
833 |
Â
}
|
834 |
+
|
835 |
+
.widget_shopping_cart_content .wc-stripe-overlay.active {
|
836 |
Â
display: block !important;
|
837 |
Â
z-index: 9999;
|
838 |
Â
}
|
846 |
Â
box-sizing: border-box;
|
847 |
Â
transform: scale(.65);
|
848 |
Â
}
|
849 |
+
|
850 |
Â
.wc-stripe-klarna-loader div {
|
851 |
Â
box-sizing: border-box;
|
852 |
Â
display: block;
|
859 |
Â
animation: klarna-payments-loader 1.3s cubic-bezier(0.5, 0, 0.5, 1) infinite;
|
860 |
Â
border-color: #000 transparent transparent transparent;
|
861 |
Â
}
|
862 |
+
|
863 |
Â
.wc-stripe-klarna-loader div:nth-child(1) {
|
864 |
Â
animation-delay: -0.45s;
|
865 |
Â
}
|
866 |
+
|
867 |
Â
.wc-stripe-klarna-loader div:nth-child(2) {
|
868 |
Â
animation-delay: -0.3s;
|
869 |
Â
}
|
870 |
+
|
871 |
Â
.wc-stripe-klarna-loader div:nth-child(3) {
|
872 |
Â
animation-delay: -0.15s;
|
873 |
Â
}
|
874 |
+
|
875 |
Â
@keyframes klarna-payments-loader {
|
876 |
Â
0% {
|
877 |
Â
transform: rotate(0deg);
|
891 |
Â
li.payment_method_stripe_grabpay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
|
892 |
Â
li.payment_method_stripe_multibanco.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
|
893 |
Â
li.payment_method_stripe_p24.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
|
894 |
+
li.payment_method_stripe_sofort.wc-stripe-no-desc .payment_box.wc-stripe-no-methods {
|
895 |
Â
padding: 0;
|
896 |
Â
margin: 0;
|
897 |
Â
}
|
1017 |
Â
content: none !important;
|
1018 |
Â
display: none !important;
|
1019 |
Â
}
|
1020 |
+
|
1021 |
+
.wc-stripe-saved-methods-container .select2-container .select2-selection--single .select2-selection__rendered {
|
1022 |
Â
padding-left: 8px;
|
1023 |
Â
}
|
1024 |
+
|
1025 |
Â
.wc-stripe-saved-methods-container .select2-container .select2-selection--single .wc-stripe-select2-container,
|
1026 |
Â
.select2-results__options li.wc-stripe-select2-container {
|
1027 |
Â
display: flex;
|
1110 |
Â
margin-bottom: 1em;
|
1111 |
Â
}
|
1112 |
Â
|
1113 |
+
.wc-stripe_cc-new-method-container .wc-stripe-save-source {
|
1114 |
Â
display: flex;
|
1115 |
Â
align-items: center;
|
1116 |
Â
justify-content: flex-start;
|
1173 |
Â
|
1174 |
Â
#place_order.wc-stripe-hide,
|
1175 |
Â
#payment #place_order.wc-stripe-hide,
|
1176 |
+
.woocommerce-checkout-review-order #payment #place_order.wc-stripe-hide {
|
1177 |
Â
position: absolute !important;
|
1178 |
Â
z-index: -1000 !important;
|
1179 |
Â
height: 0 !important;
|
1219 |
Â
.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_] {
|
1220 |
Â
margin: 0 0 1em 0;
|
1221 |
Â
}
|
1222 |
+
|
1223 |
Â
.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]:last-child,
|
1224 |
+
.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_]:last-child {
|
1225 |
Â
margin: 0;
|
1226 |
Â
}
|
1227 |
Â
|
1228 |
Â
.wc_stripe_product_payment_methods .gpay-button,
|
1229 |
Â
.wc_stripe_cart_payment_methods .gpay-button,
|
1230 |
Â
.wc_stripe_product_payment_methods .gpay-card-info-container,
|
1231 |
+
.wc_stripe_cart_payment_methods .gpay-card-info-container {
|
1232 |
Â
width: 100% !important;
|
1233 |
Â
margin: 0;
|
1234 |
Â
}
|
1280 |
Â
max-height: 35px;
|
1281 |
Â
}
|
1282 |
Â
|
1283 |
+
li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_round_outline] {
|
1284 |
Â
width: 56px;
|
1285 |
Â
max-height: 30px;
|
1286 |
Â
}
|
1344 |
Â
max-width: 240px;
|
1345 |
Â
}
|
1346 |
Â
|
1347 |
+
body.single-product div.product form.cart .wc_stripe_product_payment_methods .apple-pay-button {
|
1348 |
Â
max-width: 100%;
|
1349 |
Â
}
|
1350 |
Â
}
|
1404 |
Â
}
|
1405 |
Â
|
1406 |
Â
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-button,
|
1407 |
+
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-card-info-container {
|
1408 |
Â
margin: 0;
|
1409 |
Â
}
|
1410 |
Â
|
1411 |
Â
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-button,
|
1412 |
+
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-card-info-container {
|
1413 |
Â
width: 100%;
|
1414 |
Â
}
|
1415 |
Â
|
1451 |
Â
width: 72px;
|
1452 |
Â
max-height: 20px;
|
1453 |
Â
}
|
1454 |
+
|
1455 |
+
ul.payment_methods li.payment_method_stripe_klarna img[src*="klarna_pink"] {
|
1456 |
+
width: 54px;
|
1457 |
+
height: 30px;
|
1458 |
Â
max-height: 32px;
|
1459 |
Â
}
|
1460 |
Â
|
1651 |
Â
}
|
1652 |
Â
|
1653 |
Â
#wc_stripe_local_payment_stripe_klarna,
|
1654 |
+
li[class*=payment_method_stripe_] div.wc-stripe-gateway-container.has_tokens {
|
1655 |
Â
margin-top: 10px;
|
1656 |
Â
}
|
1657 |
Â
|
1685 |
Â
display: none;
|
1686 |
Â
}
|
1687 |
Â
|
1688 |
+
.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods {
|
1689 |
Â
list-style: none;
|
1690 |
Â
margin: 0;
|
1691 |
Â
padding: 0;
|
1692 |
Â
}
|
1693 |
+
|
1694 |
+
.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods li {
|
1695 |
Â
margin: 0;
|
1696 |
Â
}
|
1697 |
Â
|
1698 |
Â
.widget_shopping_cart_content a.wc-stripe-gpay-mini-cart,
|
1699 |
Â
.widget_shopping_cart_content a.wc-stripe-applepay-mini-cart,
|
1700 |
+
.widget_shopping_cart_content a.wc-stripe-payment-request-mini-cart {
|
1701 |
Â
background: transparent;
|
1702 |
Â
padding: 0;
|
1703 |
Â
border: none;
|
1704 |
Â
}
|
1705 |
+
|
1706 |
Â
a.wc-stripe-gpay-mini-cart .gpay-button,
|
1707 |
Â
a.wc-stripe-gpay-mini-cart .gpay-card-info-container
|
1708 |
+
a.wc-stripe-applepay-mini-cart .apple-pay-button {
|
1709 |
Â
width: 100%;
|
1710 |
Â
margin: 0;
|
1711 |
Â
}
|
1712 |
+
|
1713 |
+
.wc-stripe-payment-request-mini-cart.StripeElement {
|
1714 |
Â
padding: 0;
|
1715 |
Â
background: transparent;
|
1716 |
Â
border: none;
|
1717 |
Â
width: 100%;
|
1718 |
Â
}
|
1719 |
+
|
1720 |
+
.wc-stripe-payment-request-mini-cart.StripeElement .__PrivateStripeElement {
|
1721 |
Â
width: 100%;
|
1722 |
Â
}
|
1723 |
Â
|
1724 |
+
.widget_shopping_cart_content .wc-stripe-overlay {
|
1725 |
Â
display: none !important;
|
1726 |
Â
position: absolute;
|
1727 |
Â
background: rgba(255, 255, 255, 0.75);
|
1729 |
Â
width: 100%;
|
1730 |
Â
z-index: -1;
|
1731 |
Â
}
|
1732 |
+
|
1733 |
+
.widget_shopping_cart_content .wc-stripe-overlay.active {
|
1734 |
Â
display: block !important;
|
1735 |
Â
z-index: 9999;
|
1736 |
Â
}
|
1744 |
Â
box-sizing: border-box;
|
1745 |
Â
transform: scale(.65);
|
1746 |
Â
}
|
1747 |
+
|
1748 |
Â
.wc-stripe-klarna-loader div {
|
1749 |
Â
box-sizing: border-box;
|
1750 |
Â
display: block;
|
1757 |
Â
animation: klarna-payments-loader 1.3s cubic-bezier(0.5, 0, 0.5, 1) infinite;
|
1758 |
Â
border-color: #000 transparent transparent transparent;
|
1759 |
Â
}
|
1760 |
+
|
1761 |
Â
.wc-stripe-klarna-loader div:nth-child(1) {
|
1762 |
Â
animation-delay: -0.45s;
|
1763 |
Â
}
|
1764 |
+
|
1765 |
Â
.wc-stripe-klarna-loader div:nth-child(2) {
|
1766 |
Â
animation-delay: -0.3s;
|
1767 |
Â
}
|
1768 |
+
|
1769 |
Â
.wc-stripe-klarna-loader div:nth-child(3) {
|
1770 |
Â
animation-delay: -0.15s;
|
1771 |
Â
}
|
1772 |
+
|
1773 |
Â
@keyframes klarna-payments-loader {
|
1774 |
Â
0% {
|
1775 |
Â
transform: rotate(0deg);
|
1789 |
Â
li.payment_method_stripe_grabpay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
|
1790 |
Â
li.payment_method_stripe_multibanco.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
|
1791 |
Â
li.payment_method_stripe_p24.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
|
1792 |
+
li.payment_method_stripe_sofort.wc-stripe-no-desc .payment_box.wc-stripe-no-methods {
|
1793 |
Â
padding: 0;
|
1794 |
Â
margin: 0;
|
1795 |
Â
}
|
1796 |
Â
|
1797 |
+
.wc-stripe-shortcode-cart-buttons .wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or {
|
1798 |
Â
display: none;
|
1799 |
Â
}
|
1800 |
Â
|
1801 |
+
li[class*="payment_method_stripe_"] style {
|
1802 |
Â
display: none;
|
1803 |
Â
}
|
1804 |
Â
|
1805 |
+
ul.payment_methods li[class*=payment_method] > input[name=payment_method] + label[for=payment_method_stripe_afterpay] {
|
1806 |
+
display: flex;
|
1807 |
+
align-items: center;
|
1808 |
+
}
|
1809 |
+
|
1810 |
+
.payment_method_stripe_afterpay #wc-stripe-afterpay-msg .__PrivateStripeElement p,
|
1811 |
+
#wc-stripe-afterpay-cart-container #wc-stripe-afterpay-cart-msg .__PrivateStripeElement p,
|
1812 |
+
#wc-stripe-afterpay-product-msg .__PrivateStripeElement p {
|
1813 |
+
margin-bottom: 0 !important;
|
1814 |
+
margin-top: 0 !important;
|
1815 |
+
}
|
1816 |
+
|
1817 |
+
.payment_method_stripe_afterpay #wc-stripe-afterpay-msg .__PrivateStripeElement p .AfterpayMessage-logo,
|
1818 |
+
#wc-stripe-afterpay-cart-msg .__PrivateStripeElement p .AfterpayMessage-logo {
|
1819 |
+
vertical-align: middle;
|
1820 |
+
}
|
1821 |
+
|
1822 |
+
.payment_method_stripe_afterpay #wc_stripe_local_payment_stripe_afterpay.ineligible {
|
1823 |
+
display: none;
|
1824 |
+
}
|
1825 |
+
|
1826 |
+
.payment_method_stripe_afterpay .wc-stripe-afterpay__offsite {
|
1827 |
+
text-align: center;
|
1828 |
+
max-width: 320px;
|
1829 |
+
margin: 0 auto;
|
1830 |
+
padding: 10px 0;
|
1831 |
+
}
|
1832 |
+
|
1833 |
+
.payment_method_stripe_afterpay .wc-stripe-afterpay__offsite img {
|
1834 |
+
display: inline-block;
|
1835 |
+
}
|
1836 |
+
|
1837 |
+
.payment_method_stripe_afterpay .wc-stripe-afterpay__offsite p {
|
1838 |
+
font-size: 14px;
|
1839 |
+
margin-top: 10px;
|
1840 |
+
}
|
1841 |
+
|
1842 |
+
#wc-stripe-afterpay-cart-container #wc-stripe-afterpay-cart-msg {
|
1843 |
+
text-align: left;
|
1844 |
+
}
|
1845 |
+
|
1846 |
+
#wc-stripe-afterpay-cart-container #wc-stripe-afterpay-cart-msg .AfterpayMessage-logoSvg,
|
1847 |
+
.payment_method_stripe_afterpay #wc-stripe-afterpay-msg .AfterpayMessage-logoSvg {
|
1848 |
+
min-width: 64px;
|
1849 |
+
max-width: 90px;
|
1850 |
+
}
|
1851 |
+
|
1852 |
+
#wc-stripe-afterpay-cart-container td {
|
1853 |
+
border: none;
|
1854 |
+
}
|
1855 |
+
|
1856 |
+
#wc-stripe-afterpay-cart-container td::before {
|
1857 |
+
content: '';
|
1858 |
+
}
|
1859 |
+
|
1860 |
+
.AfterpayMessage-logoSvg {
|
1861 |
+
display: inline-block;
|
1862 |
+
}
|
1863 |
+
|
1864 |
+
#wc-stripe-afterpay-product-msg {
|
1865 |
+
font-size: 14px;
|
1866 |
+
}
|
1867 |
+
|
1868 |
+
#wc-stripe-afterpay-product-msg .AfterpayMessage-logoSvg {
|
1869 |
+
max-width: 80px;
|
1870 |
+
min-width: 64px;
|
1871 |
+
}
|
assets/css/stripe.min-rtl.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wc-stripe-card-icons-container,.wc-stripe-paymentRequest-icons-container{float:left;display:inline-block}ul.payment_methods li[class*=payment_method]{margin:0;padding:0}li[class*=payment_method] input[type=radio]{margin:0 5px 0 10px}li[class*=payment_method] input[type=radio]+label:not(.wc-stripe-label-payment-type){margin:0}.woocommerce-checkout #payment ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n+2),ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n+2){margin:0}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon,li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img{max-width:43px;max-height:26px;width:43px;height:26px;float:none;display:inline}li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img{width:25px;height:25px;max-width:25px;max-height:25px}ul.payment_methods label[for*=payment_method_stripe]:after{clear:left;content:"";display:block}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon:nth-child(2n+2){margin:0 2px}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon.open.visa{padding-top:2px}ul.payment_methods li[class*=payment_method_stripe_] label>img:first-of-type{float:left!important}.wc-stripe_cc-new-method-container{margin-bottom:1em}.wc-stripe_cc-container .StripeElement{box-sizing:border-box;height:40px;padding:10px 12px;border-radius:4px;background-color:#fff;-webkit-transition:box-shadow 150ms ease;transition:box-shadow 150ms ease}input.wc-stripe-klarna-category,input.wc-stripe-payment-type{display:none!important}body .wfacp_main_form.woocommerce .wc-stripe-save-source label.checkbox{padding:0!important}input[type=radio]+label.wc-stripe-label-payment-type,label.wc-stripe-label-klarna-category,label.wc-stripe-label-payment-type{margin-bottom:1em;display:block;padding:0!important;color:#000}.theme-flatsome div.wc-stripe-saved-methods-container{margin:0 0 1em 0}label.wc-stripe-label-klarna-category:before,label.wc-stripe-label-payment-type:before{content:"";display:inline-block;width:11px;height:11px;border:2px solid #fff;box-shadow:0 0 0 2px #000;background:#fff;margin-right:4px;margin-left:.5em;border-radius:100%;-webkit-transform:translateY(2px);-ms-transform:translateY(2px);transform:translateY(2px)}input.wc-stripe-klarna-category:checked+label.wc-stripe-label-klarna-category:before,input.wc-stripe-payment-type:checked+label.wc-stripe-label-payment-type:before{background:#000}label.wc-stripe-label-payment-type:after{content:none!important;display:none!important}.wc-stripe-saved-methods-container .select2-container .select2-selection--single .select2-selection__rendered{padding-right:8px}.select2-results__options li.wc-stripe-select2-container,.wc-stripe-saved-methods-container .select2-container .select2-selection--single .wc-stripe-select2-container{display:flex;align-items:center;height:42px;line-height:42px!important}.select2-container .select2-selection--single .wc-stripe-select2-container:before,.select2-results__options li.wc-stripe-select2-container:before{content:'';background-repeat:no-repeat;background-size:40px 24px;width:40px;height:42px;display:inline-block;margin-left:8px;background-position:center}.select2-container .select2-selection--single .wc-stripe-select2-container.visa:before,.select2-results__options li.wc-stripe-select2-container.visa:before{background-image:url(../img/cards/visa.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,.select2-results__options li.wc-stripe-select2-container.mastercard:before{background-image:url(../img/cards/mastercard.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.americanexpress:before,.select2-results__options li.wc-stripe-select2-container.americanexpress:before{background-image:url(../img/cards/amex.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.amex:before,.select2-results__options li.wc-stripe-select2-container.amex:before{background-image:url(../img/cards/amex.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.discover:before,.select2-results__options li.wc-stripe-select2-container.discover:before{background-image:url(../img/cards/discover.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,.select2-results__options li.wc-stripe-select2-container.mastercard:before{background-image:url(../img/cards/mastercard.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.dinersclub:before,.select2-results__options li.wc-stripe-select2-container.dinersclub:before{background-image:url(../img/cards/diners.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.diners:before,.select2-results__options li.wc-stripe-select2-container.diners:before{background-image:url(../img/cards/diners.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.jcb:before,.select2-results__options li.wc-stripe-select2-container.jcb:before{background-image:url(../img/cards/jcb.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.stripe_sepa:before,.select2-results__options li.wc-stripe-select2-container.stripe_sepa:before{background-image:url(../img/sepa.svg)}.select2-results__options li.wc-stripe-select2-container.wc-stripe-ach:before{display:none}#wc-stripe-card-element{margin-bottom:1em}.wc-stripe_cc-new-method-container .wc-stripe-save-source{display:flex;align-items:center;justify-content:flex-start}.wc-stripe_cc-container .wc-stripe-save-source .save-source-label{display:block;padding:0;margin:0 5px 0 0}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]{opacity:0;position:absolute;width:20px;height:20px}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{position:relative}.wc-stripe_cc-container .save-source-checkbox{height:20px;width:20px;position:relative;background-color:#fff;display:block;border-radius:3px;border:1px solid #bababa}.wc-stripe_cc-container .save-source-checkbox:after{content:"";position:absolute;top:0;right:0}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]:checked+.save-source-checkbox:after{right:6px;top:2px;width:7px;height:12px;border:solid #2196f3;border-width:0 0 3px 3px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}li.payment_method_stripe_applepay,li.payment_method_stripe_googlepay,li.payment_method_stripe_payment_request{display:none}#payment #place_order.wc-stripe-hide,#place_order.wc-stripe-hide,.woocommerce-checkout-review-order #payment #place_order.wc-stripe-hide{position:absolute!important;z-index:-1000!important;height:0!important;padding:0!important;opacity:0!important}.wc-stripe-product-checkout-container{display:none;width:100%}.wc-stripe-product-checkout-container.bottom{margin-top:1em}.wc-stripe-product-checkout-container.top{margin-bottom:1em}.wc-stripe-product-checkout-container.active{display:block}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods,.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods{list-style:none;margin:0;padding:0}.wc-stripe-cart-checkout-container{margin:0;padding:0;clear:both}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods{margin-bottom:1.5em}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_],.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]{margin:0 0 1em 0}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_]:last-child,.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]:last-child{margin:0}.wc_stripe_cart_payment_methods .gpay-button,.wc_stripe_cart_payment_methods .gpay-card-info-container,.wc_stripe_product_payment_methods .gpay-button,.wc_stripe_product_payment_methods .gpay-card-info-container{width:100%!important;margin:0}.wc_stripe_product_payment_methods .disabled{opacity:.45}.stripe_cart_gateway_active .checkout-button,.woocommerce-cart .stripe_cart_gateway_active .wc-proceed-to-checkout .checkout-button{margin-bottom:0}.wc-stripe-cart-or{margin:1em 0;text-align:center}li.wc-stripe-payment-method.or{display:none}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or{display:block;margin:15px 0}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or p{margin:0}li[class*=payment_method_stripe_].active~li.wc-stripe-payment-method.or{display:block;margin:0}li.payment_method_stripe_applepay label:first-of-type img{width:49px;max-height:32px}li.payment_method_stripe_googlepay label:first-of-type img{width:48px;max-height:35px}li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_standard]{width:60px;max-height:35px}li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_round_outline]{width:56px;max-height:30px}li.payment_method_stripe_ach label:first-of-type img{width:32px;height:32px;min-width:32px;min-height:32px}.gpay-button:hover{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:active{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:focus{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}@supports (-webkit-appearance:-apple-pay-button){.apple-pay-button{display:block;-webkit-appearance:-apple-pay-button!important;width:100%;max-width:100%;min-width:200px;height:40px;max-height:40px}.apple-pay-button-black{-apple-pay-button-style:#000}.apple-pay-button-white{-apple-pay-button-style:#fff}.apple-pay-button-white-with-line{-apple-pay-button-style:white-outline}.applepay-top-container .apple-pay-button{max-width:240px}.woocommerce-checkout-payment .apple-pay-button{max-width:240px}body.single-product div.product form.cart .wc_stripe_product_payment_methods .apple-pay-button{max-width:100%}}.wc-stripe-banner-checkout{display:none;padding:20px 15px 0 15px;border:1px solid #d1d1d1;border-width:0 0 1px;position:relative;margin:1em 0}.wc-stripe-banner-checkout.active{display:block}.wc-stripe-banner-checkout span.banner-title{position:absolute;display:flex;align-items:center;top:-13px;left:0;right:0;background:0 0;white-space:nowrap;font-size:16px}.wc-stripe-banner-checkout span.banner-title:after,.wc-stripe-banner-checkout span.banner-title:before{content:' ';height:1px;background:#d1d1d1;display:block;width:50%}.wc-stripe-banner-checkout span.banner-title:before{margin-left:8px}.wc-stripe-banner-checkout span.banner-title:after{margin-right:8px}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways{list-style:none;margin:0;padding:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway{margin:0 0 20px 0;display:none}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-card-info-container{margin:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-card-info-container{width:100%}.wc_stripe_cart_payment_methods .payment_method_stripe_payment_request .StripeElement,.wc_stripe_product_payment_methods .payment_method_stripe_payment_request .StripeElement{padding:0;width:100%}.woocommerce-checkout #wc-stripe-payment-request-container.StripeElement{width:240px;padding:0}.wc-stripe-checkout-banner-gateway #wc-stripe-payment-request-banner.StripeElement{width:100%}ul.payment_methods li.payment_method_stripe_p24 img{max-width:90px;width:90px;max-height:45px}ul.payment_methods li.payment_method_stripe_ideal img{max-width:38px;width:38px;max-height:35px}ul.payment_methods li.payment_method_stripe_fpx img{max-width:75px;width:75px;max-height:25px}ul.payment_methods li.payment_method_stripe_klarna img{max-width:72px;width:72px;max-height:20px}ul.payment_methods li.payment_method_stripe_klarna img[src*=klarna_pink]{width:56px;height:32px;max-height:32px}ul.payment_methods li.payment_method_stripe_giropay img{max-width:65px;width:65px;max-height:28px}ul.payment_methods li.payment_method_stripe_eps img{max-width:70px;width:70px;max-height:46px}ul.payment_methods li.payment_method_stripe_multibanco img{max-width:48px;width:48px;max-height:48px}ul.payment_methods li.payment_method_stripe_sepa img{max-width:67px;width:67px;max-height:18px}ul.payment_methods li.payment_method_stripe_sofort img{max-width:70px;width:70px;max-height:21px}label[for=payment_method_stripe_bancontact] img,ul.payment_methods li.payment_method_stripe_bancontact img{width:60px;height:42px;max-width:60px;max-height:42px}ul.payment_methods li.payment_method_stripe_wechat label img{max-width:82px;width:82px;max-height:23px}ul.payment_methods li.payment_method_stripe_alipay img{max-width:72px;width:72px;height:36px;max-height:36px}ul.payment_methods li.payment_method_stripe_grabpay img{max-width:95px;width:95px;max-height:28px}#wc-stripe-card-element{width:100%}li.banner_payment_method_stripe_payment_request .StripeElement{padding:0}.single-product .blockMsg{border:none!important;background-color:transparent!important}#wc-stripe-card{position:absolute!important;top:50%;left:8px;transform:translatey(-50%);width:23px;height:15px;padding:0;border:none}#wc-stripe-card.active{width:32px;height:20px}input[id=stripe-postal-code]:focus{outline:0;background:0 0;border:none;box-shadow:none}div.postalCode:focus{outline:0;border:none}li[class*=payment_method_stripe] .select2-container .select2-selection--single{height:42px;padding:0 5px}li[class*=payment_method_stripe] .select2-container--default .select2-selection--single .select2-selection__arrow{height:42px;top:1px;left:1px;transform:translateY(0)}.blockUI.blockMsg{font-size:20px;white-space:nowrap}#wc-stripe-payment-request-container.disabled{opacity:.45}.wc-stripe-paymentRequest-icons-container img{float:none}.select2-container .select2-selection--single .wc-stripe-select2-container.wc-stripe-ach:before{display:none}ul.wc_stripe_cart_payment_methods li.wc-stripe-payment-method button,ul.wc_stripe_checkout_banner_gateways li button,ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_] button{margin:0}ul.payment_methods li[class*=payment_method]{margin:0;padding:10px 0}ul.payment_methods li[class*=payment_method] input[name=payment_method]{margin:0 5px 0 10px;float:none}ul.payment_methods li[class*=payment_method]>input[name=payment_method]+label{padding-top:0;padding-left:0;padding-bottom:0}ul.payment_methods{list-style:none}ul.payment_methods li[class*=payment_method_stripe_] .wc-stripe_cc-new-method-container label:before{display:none}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{padding:0!important;margin:0}div[id*=wc_stripe_local_payment_stripe_].StripeElement{border:1px solid #eee;border-radius:4px}.qrcode-message{margin:10px 0 0 0}#wc_stripe_local_payment_stripe_becs,#wc_stripe_local_payment_stripe_sepa{padding:10px 12px;box-shadow:0 1px 3px 0 #e6ebf1}.wc-stripe-local-desc.stripe_becs,.wc-stripe-local-desc.stripe_sepa{margin:10px 0}.wc-stripe-clear{clear:both;height:0;visibility:hidden}.wc-stripe-gateway-desc p{margin:0}#wc_stripe_local_payment_stripe_klarna,li[class*=payment_method_stripe_] div.wc-stripe-gateway-container.has_tokens{margin-top:10px}.wc-stripe-gateway-desc{margin-top:10px}#wc-stripe-card-element.StripeElement--webkit-autofill{background-color:transparent!important}#wc_stripe_local_payment_stripe_klarna .stripe-klarna-categories{list-style:none;margin:0;padding:10px}li.payment_method_stripe_alipay,li.payment_method_stripe_bancontact,li.payment_method_stripe_becs,li.payment_method_stripe_eps,li.payment_method_stripe_fpx,li.payment_method_stripe_giropay,li.payment_method_stripe_ideal,li.payment_method_stripe_klarna,li.payment_method_stripe_multibanco,li.payment_method_stripe_p24,li.payment_method_stripe_sepa,li.payment_method_stripe_sofort,li.payment_method_stripe_wechat{display:none}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods{list-style:none;margin:0;padding:0}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods li{margin:0}.widget_shopping_cart_content a.wc-stripe-applepay-mini-cart,.widget_shopping_cart_content a.wc-stripe-gpay-mini-cart,.widget_shopping_cart_content a.wc-stripe-payment-request-mini-cart{background:0 0;padding:0;border:none}a.wc-stripe-gpay-mini-cart .gpay-button,a.wc-stripe-gpay-mini-cart .gpay-card-info-container a.wc-stripe-applepay-mini-cart .apple-pay-button{width:100%;margin:0}.wc-stripe-payment-request-mini-cart.StripeElement{padding:0;background:0 0;border:none;width:100%}.wc-stripe-payment-request-mini-cart.StripeElement .__PrivateStripeElement{width:100%}.widget_shopping_cart_content .wc-stripe-overlay{display:none!important;position:absolute;background:rgba(255,255,255,.75);height:100%;width:100%;z-index:-1}.widget_shopping_cart_content .wc-stripe-overlay.active{display:block!important;z-index:9999}.wc-stripe-klarna-loader{display:flex;justify-content:center;position:relative;width:100%;height:30px;box-sizing:border-box;transform:scale(.65)}.wc-stripe-klarna-loader div{box-sizing:border-box;display:block;position:absolute;box-sizing:border-box;width:30px;height:30px;border:3px solid #000;border-radius:50%;animation:klarna-payments-loader 1.3s cubic-bezier(.5,0,.5,1) infinite;border-color:#000 transparent transparent transparent}.wc-stripe-klarna-loader div:nth-child(1){animation-delay:-.45s}.wc-stripe-klarna-loader div:nth-child(2){animation-delay:-.3s}.wc-stripe-klarna-loader div:nth-child(3){animation-delay:-.15s}@keyframes klarna-payments-loader{0%{transform:rotate(0)}100%{transform:rotate(-360deg)}}li.payment_method_stripe_alipay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_applepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_bancontact.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_eps.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_giropay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_googlepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_grabpay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_multibanco.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_p24.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_payment_request.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_sofort.wc-stripe-no-desc .payment_box.wc-stripe-no-methods{padding:0;margin:0}.wc-stripe-paymentRequest-icons-container,.wc-stripe-shortcode-cart-buttons .wc-stripe-card-icons-container{float:left;display:inline-block}ul.payment_methods li[class*=payment_method]{margin:0;padding:0}li[class*=payment_method] input[type=radio]{margin:0 5px 0 10px}li[class*=payment_method] input[type=radio]+label:not(.wc-stripe-label-payment-type){margin:0}.woocommerce-checkout #payment ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n+2),ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n+2){margin:0}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon,li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img{max-width:43px;max-height:26px;width:43px;height:26px;float:none;display:inline}li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img{width:25px;height:25px;max-width:25px;max-height:25px}ul.payment_methods label[for*=payment_method_stripe]:after{clear:left;content:"";display:block}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon:nth-child(2n+2){margin:0 2px}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon.open.visa{padding-top:2px}ul.payment_methods li[class*=payment_method_stripe_] label>img:first-of-type{float:left!important}.wc-stripe_cc-new-method-container{margin-bottom:1em}.wc-stripe_cc-container .StripeElement{box-sizing:border-box;height:40px;padding:10px 12px;border-radius:4px;background-color:#fff;-webkit-transition:box-shadow 150ms ease;transition:box-shadow 150ms ease}input.wc-stripe-klarna-category,input.wc-stripe-payment-type{display:none!important}body .wfacp_main_form.woocommerce .wc-stripe-save-source label.checkbox{padding:0!important}input[type=radio]+label.wc-stripe-label-payment-type,label.wc-stripe-label-klarna-category,label.wc-stripe-label-payment-type{margin-bottom:1em;display:block;padding:0!important;color:#000}.theme-flatsome div.wc-stripe-saved-methods-container{margin:0 0 1em 0}label.wc-stripe-label-klarna-category:before,label.wc-stripe-label-payment-type:before{content:"";display:inline-block;width:11px;height:11px;border:2px solid #fff;box-shadow:0 0 0 2px #000;background:#fff;margin-right:4px;margin-left:.5em;border-radius:100%;-webkit-transform:translateY(2px);-ms-transform:translateY(2px);transform:translateY(2px)}input.wc-stripe-klarna-category:checked+label.wc-stripe-label-klarna-category:before,input.wc-stripe-payment-type:checked+label.wc-stripe-label-payment-type:before{background:#000}label.wc-stripe-label-payment-type:after{content:none!important;display:none!important}.wc-stripe-saved-methods-container .select2-container .select2-selection--single .select2-selection__rendered{padding-right:8px}.select2-results__options li.wc-stripe-select2-container,.wc-stripe-saved-methods-container .select2-container .select2-selection--single .wc-stripe-select2-container{display:flex;align-items:center;height:42px;line-height:42px!important}.select2-container .select2-selection--single .wc-stripe-select2-container:before,.select2-results__options li.wc-stripe-select2-container:before{content:'';background-repeat:no-repeat;background-size:40px 24px;width:40px;height:42px;display:inline-block;margin-left:8px;background-position:center}.select2-container .select2-selection--single .wc-stripe-select2-container.visa:before,.select2-results__options li.wc-stripe-select2-container.visa:before{background-image:url(../img/cards/visa.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,.select2-results__options li.wc-stripe-select2-container.mastercard:before{background-image:url(../img/cards/mastercard.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.americanexpress:before,.select2-results__options li.wc-stripe-select2-container.americanexpress:before{background-image:url(../img/cards/amex.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.amex:before,.select2-results__options li.wc-stripe-select2-container.amex:before{background-image:url(../img/cards/amex.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.discover:before,.select2-results__options li.wc-stripe-select2-container.discover:before{background-image:url(../img/cards/discover.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,.select2-results__options li.wc-stripe-select2-container.mastercard:before{background-image:url(../img/cards/mastercard.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.dinersclub:before,.select2-results__options li.wc-stripe-select2-container.dinersclub:before{background-image:url(../img/cards/diners.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.diners:before,.select2-results__options li.wc-stripe-select2-container.diners:before{background-image:url(../img/cards/diners.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.jcb:before,.select2-results__options li.wc-stripe-select2-container.jcb:before{background-image:url(../img/cards/jcb.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.stripe_sepa:before,.select2-results__options li.wc-stripe-select2-container.stripe_sepa:before{background-image:url(../img/sepa.svg)}.select2-results__options li.wc-stripe-select2-container.wc-stripe-ach:before{display:none}#wc-stripe-card-element{margin-bottom:1em}.wc-stripe_cc-new-method-container .wc-stripe-save-source{display:flex;align-items:center;justify-content:flex-start}.wc-stripe_cc-container .wc-stripe-save-source .save-source-label{display:block;padding:0;margin:0 5px 0 0}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]{opacity:0;position:absolute;width:20px;height:20px}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{position:relative}.wc-stripe_cc-container .save-source-checkbox{height:20px;width:20px;position:relative;background-color:#fff;display:block;border-radius:3px;border:1px solid #bababa}.wc-stripe_cc-container .save-source-checkbox:after{content:"";position:absolute;top:0;right:0}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]:checked+.save-source-checkbox:after{right:6px;top:2px;width:7px;height:12px;border:solid #2196f3;border-width:0 0 3px 3px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}li.payment_method_stripe_applepay,li.payment_method_stripe_googlepay,li.payment_method_stripe_payment_request{display:none}#payment #place_order.wc-stripe-hide,#place_order.wc-stripe-hide,.woocommerce-checkout-review-order #payment #place_order.wc-stripe-hide{position:absolute!important;z-index:-1000!important;height:0!important;padding:0!important;opacity:0!important}.wc-stripe-product-checkout-container{display:none;width:100%}.wc-stripe-product-checkout-container.bottom{margin-top:1em}.wc-stripe-product-checkout-container.top{margin-bottom:1em}.wc-stripe-product-checkout-container.active{display:block}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods,.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods{list-style:none;margin:0;padding:0}.wc-stripe-cart-checkout-container{margin:0;padding:0;clear:both}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods{margin-bottom:1.5em}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_],.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]{margin:0 0 1em 0}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_]:last-child,.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]:last-child{margin:0}.wc_stripe_cart_payment_methods .gpay-button,.wc_stripe_cart_payment_methods .gpay-card-info-container,.wc_stripe_product_payment_methods .gpay-button,.wc_stripe_product_payment_methods .gpay-card-info-container{width:100%!important;margin:0}.wc_stripe_product_payment_methods .disabled{opacity:.45}.stripe_cart_gateway_active .checkout-button,.woocommerce-cart .stripe_cart_gateway_active .wc-proceed-to-checkout .checkout-button{margin-bottom:0}.wc-stripe-cart-or{margin:1em 0;text-align:center}li.wc-stripe-payment-method.or{display:none}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or{display:block;margin:15px 0}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or p{margin:0}li[class*=payment_method_stripe_].active~li.wc-stripe-payment-method.or{display:block;margin:0}li.payment_method_stripe_applepay label:first-of-type img{width:49px;max-height:32px}li.payment_method_stripe_googlepay label:first-of-type img{width:48px;max-height:35px}li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_standard]{width:60px;max-height:35px}li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_round_outline]{width:56px;max-height:30px}li.payment_method_stripe_ach label:first-of-type img{width:32px;height:32px;min-width:32px;min-height:32px}.gpay-button:hover{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:active{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:focus{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}@supports (-webkit-appearance:-apple-pay-button){.apple-pay-button{display:block;-webkit-appearance:-apple-pay-button;width:100%;max-width:100%;min-width:200px;height:40px;max-height:40px}.apple-pay-button-black{-apple-pay-button-style:#000}.apple-pay-button-white{-apple-pay-button-style:#fff}.apple-pay-button-white-with-line{-apple-pay-button-style:white-outline}.applepay-top-container .apple-pay-button{max-width:240px}.woocommerce-checkout-payment .apple-pay-button{max-width:240px}body.single-product div.product form.cart .wc_stripe_product_payment_methods .apple-pay-button{max-width:100%}}.wc-stripe-banner-checkout{display:none;padding:20px 15px 0 15px;border:1px solid #d1d1d1;border-width:0 0 1px;position:relative;margin:1em 0}.wc-stripe-banner-checkout.active{display:block}.wc-stripe-banner-checkout span.banner-title{position:absolute;display:flex;align-items:center;top:-13px;left:0;right:0;background:0 0;white-space:nowrap;font-size:16px}.wc-stripe-banner-checkout span.banner-title:after,.wc-stripe-banner-checkout span.banner-title:before{content:' ';height:1px;background:#d1d1d1;display:block;width:50%}.wc-stripe-banner-checkout span.banner-title:before{margin-left:8px}.wc-stripe-banner-checkout span.banner-title:after{margin-right:8px}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways{list-style:none;margin:0;padding:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway{margin:0 0 20px 0;display:none}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-card-info-container{margin:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-card-info-container{width:100%}.wc_stripe_cart_payment_methods .payment_method_stripe_payment_request .StripeElement,.wc_stripe_product_payment_methods .payment_method_stripe_payment_request .StripeElement{padding:0;width:100%}.woocommerce-checkout #wc-stripe-payment-request-container.StripeElement{width:240px;padding:0}.wc-stripe-checkout-banner-gateway #wc-stripe-payment-request-banner.StripeElement{width:100%}ul.payment_methods li.payment_method_stripe_p24 img{max-width:90px;width:90px;max-height:45px}ul.payment_methods li.payment_method_stripe_ideal img{max-width:38px;width:38px;max-height:35px}ul.payment_methods li.payment_method_stripe_fpx img{max-width:75px;width:75px;max-height:25px}ul.payment_methods li.payment_method_stripe_klarna img{max-width:72px;width:72px;max-height:20px}ul.payment_methods li.payment_method_stripe_klarna img[src*=klarna_pink]{width:56px;height:32px;max-height:32px}ul.payment_methods li.payment_method_stripe_giropay img{max-width:65px;width:65px;max-height:28px}ul.payment_methods li.payment_method_stripe_eps img{max-width:70px;width:70px;max-height:46px}ul.payment_methods li.payment_method_stripe_multibanco img{max-width:48px;width:48px;max-height:48px}ul.payment_methods li.payment_method_stripe_sepa img{max-width:67px;width:67px;max-height:18px}ul.payment_methods li.payment_method_stripe_sofort img{max-width:70px;width:70px;max-height:21px}label[for=payment_method_stripe_bancontact] img,ul.payment_methods li.payment_method_stripe_bancontact img{width:60px;height:42px;max-width:60px;max-height:42px}ul.payment_methods li.payment_method_stripe_wechat label img{max-width:82px;width:82px;max-height:23px}ul.payment_methods li.payment_method_stripe_alipay img{max-width:72px;width:72px;height:36px;max-height:36px}ul.payment_methods li.payment_method_stripe_grabpay img{max-width:95px;width:95px;max-height:28px}#wc-stripe-card-element{width:100%}li.banner_payment_method_stripe_payment_request .StripeElement{padding:0}.single-product .blockMsg{border:none!important;background-color:transparent!important}#wc-stripe-card{position:absolute!important;top:50%;left:8px;transform:translatey(-50%);width:23px;height:15px;padding:0;border:none}#wc-stripe-card.active{width:32px;height:20px}input[id=stripe-postal-code]:focus{outline:0;background:0 0;border:none;box-shadow:none}div.postalCode:focus{outline:0;border:none}li[class*=payment_method_stripe] .select2-container .select2-selection--single{height:42px;padding:0 5px}li[class*=payment_method_stripe] .select2-container--default .select2-selection--single .select2-selection__arrow{height:42px;top:1px;left:1px;transform:translateY(0)}.blockUI.blockMsg{font-size:20px;white-space:nowrap}#wc-stripe-payment-request-container.disabled{opacity:.45}.wc-stripe-paymentRequest-icons-container img{float:none}.select2-container .select2-selection--single .wc-stripe-select2-container.wc-stripe-ach:before{display:none}ul.wc_stripe_cart_payment_methods li.wc-stripe-payment-method button,ul.wc_stripe_checkout_banner_gateways li button,ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_] button{margin:0}ul.payment_methods li[class*=payment_method]{margin:0;padding:10px 0}ul.payment_methods li[class*=payment_method] input[name=payment_method]{margin:0 5px 0 10px;float:none}ul.payment_methods li[class*=payment_method]>input[name=payment_method]+label{padding-top:0;padding-left:0;padding-bottom:0}ul.payment_methods{list-style:none}ul.payment_methods li[class*=payment_method_stripe_] .wc-stripe_cc-new-method-container label:before{display:none}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{padding:0!important;margin:0}div[id*=wc_stripe_local_payment_stripe_].StripeElement{border:1px solid #eee;border-radius:4px}.qrcode-message{margin:10px 0 0 0}#wc_stripe_local_payment_stripe_becs,#wc_stripe_local_payment_stripe_sepa{padding:10px 12px;box-shadow:0 1px 3px 0 #e6ebf1}.wc-stripe-local-desc.stripe_becs,.wc-stripe-local-desc.stripe_sepa{margin:10px 0}.wc-stripe-clear{clear:both;height:0;visibility:hidden}.wc-stripe-gateway-desc p{margin:0}#wc_stripe_local_payment_stripe_klarna,li[class*=payment_method_stripe_] div.wc-stripe-gateway-container.has_tokens{margin-top:10px}.wc-stripe-gateway-desc{margin-top:10px}#wc-stripe-card-element.StripeElement--webkit-autofill{background-color:transparent!important}#wc_stripe_local_payment_stripe_klarna .stripe-klarna-categories{list-style:none;margin:0;padding:10px}li.payment_method_stripe_alipay,li.payment_method_stripe_bancontact,li.payment_method_stripe_becs,li.payment_method_stripe_eps,li.payment_method_stripe_fpx,li.payment_method_stripe_giropay,li.payment_method_stripe_ideal,li.payment_method_stripe_klarna,li.payment_method_stripe_multibanco,li.payment_method_stripe_p24,li.payment_method_stripe_sepa,li.payment_method_stripe_sofort,li.payment_method_stripe_wechat{display:none}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods{list-style:none;margin:0;padding:0}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods li{margin:0}.widget_shopping_cart_content a.wc-stripe-applepay-mini-cart,.widget_shopping_cart_content a.wc-stripe-gpay-mini-cart,.widget_shopping_cart_content a.wc-stripe-payment-request-mini-cart{background:0 0;padding:0;border:none}a.wc-stripe-gpay-mini-cart .gpay-button,a.wc-stripe-gpay-mini-cart .gpay-card-info-container a.wc-stripe-applepay-mini-cart .apple-pay-button{width:100%;margin:0}.wc-stripe-payment-request-mini-cart.StripeElement{padding:0;background:0 0;border:none;width:100%}.wc-stripe-payment-request-mini-cart.StripeElement .__PrivateStripeElement{width:100%}.widget_shopping_cart_content .wc-stripe-overlay{display:none!important;position:absolute;background:rgba(255,255,255,.75);height:100%;width:100%;z-index:-1}.widget_shopping_cart_content .wc-stripe-overlay.active{display:block!important;z-index:9999}.wc-stripe-klarna-loader{display:flex;justify-content:center;position:relative;width:100%;height:30px;box-sizing:border-box;transform:scale(.65)}.wc-stripe-klarna-loader div{box-sizing:border-box;display:block;position:absolute;box-sizing:border-box;width:30px;height:30px;border:3px solid #000;border-radius:50%;animation:klarna-payments-loader 1.3s cubic-bezier(.5,0,.5,1) infinite;border-color:#000 transparent transparent transparent}.wc-stripe-klarna-loader div:nth-child(1){animation-delay:-.45s}.wc-stripe-klarna-loader div:nth-child(2){animation-delay:-.3s}.wc-stripe-klarna-loader div:nth-child(3){animation-delay:-.15s}@keyframes klarna-payments-loader{0%{transform:rotate(0)}100%{transform:rotate(-360deg)}}li.payment_method_stripe_alipay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_applepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_bancontact.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_eps.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_giropay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_googlepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_grabpay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_multibanco.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_p24.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_payment_request.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_sofort.wc-stripe-no-desc .payment_box.wc-stripe-no-methods{padding:0;margin:0}.wc-stripe-shortcode-cart-buttons .wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or{display:none}li[class*=payment_method_stripe_] style{display:none}
|
1 |
+
.wc-stripe-card-icons-container,.wc-stripe-paymentRequest-icons-container{float:left;display:inline-block}ul.payment_methods li[class*=payment_method]{margin:0;padding:0}li[class*=payment_method] input[type=radio]{margin:0 5px 0 10px}li[class*=payment_method] input[type=radio]+label:not(.wc-stripe-label-payment-type){margin:0}.woocommerce-checkout #payment ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n+2),ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n+2){margin:0}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon,li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img{max-width:43px;max-height:26px;width:43px;height:26px;float:none;display:inline}li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img{width:25px;height:25px;max-width:25px;max-height:25px}ul.payment_methods label[for*=payment_method_stripe]:after{clear:left;content:"";display:block}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon:nth-child(2n+2){margin:0 2px}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon.open.visa{padding-top:2px}ul.payment_methods li[class*=payment_method_stripe_] label>img:first-of-type{float:left!important}.wc-stripe_cc-new-method-container{margin-bottom:1em}.wc-stripe_cc-container .StripeElement{box-sizing:border-box;height:40px;padding:10px 12px;border-radius:4px;background-color:#fff;-webkit-transition:box-shadow 150ms ease;transition:box-shadow 150ms ease}input.wc-stripe-klarna-category,input.wc-stripe-payment-type{display:none!important}body .wfacp_main_form.woocommerce .wc-stripe-save-source label.checkbox{padding:0!important}input[type=radio]+label.wc-stripe-label-payment-type,label.wc-stripe-label-klarna-category,label.wc-stripe-label-payment-type{margin-bottom:1em;display:block;padding:0!important;color:#000}.theme-flatsome div.wc-stripe-saved-methods-container{margin:0 0 1em 0}label.wc-stripe-label-klarna-category:before,label.wc-stripe-label-payment-type:before{content:"";display:inline-block;width:11px;height:11px;border:2px solid #fff;box-shadow:0 0 0 2px #000;background:#fff;margin-right:4px;margin-left:.5em;border-radius:100%;-webkit-transform:translateY(2px);-ms-transform:translateY(2px);transform:translateY(2px)}input.wc-stripe-klarna-category:checked+label.wc-stripe-label-klarna-category:before,input.wc-stripe-payment-type:checked+label.wc-stripe-label-payment-type:before{background:#000}label.wc-stripe-label-payment-type:after{content:none!important;display:none!important}.wc-stripe-saved-methods-container .select2-container .select2-selection--single .select2-selection__rendered{padding-right:8px}.select2-results__options li.wc-stripe-select2-container,.wc-stripe-saved-methods-container .select2-container .select2-selection--single .wc-stripe-select2-container{display:flex;align-items:center;height:42px;line-height:42px!important}.select2-container .select2-selection--single .wc-stripe-select2-container:before,.select2-results__options li.wc-stripe-select2-container:before{content:'';background-repeat:no-repeat;background-size:40px 24px;width:40px;height:42px;display:inline-block;margin-left:8px;background-position:center}.select2-container .select2-selection--single .wc-stripe-select2-container.visa:before,.select2-results__options li.wc-stripe-select2-container.visa:before{background-image:url(../img/cards/visa.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,.select2-results__options li.wc-stripe-select2-container.mastercard:before{background-image:url(../img/cards/mastercard.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.americanexpress:before,.select2-results__options li.wc-stripe-select2-container.americanexpress:before{background-image:url(../img/cards/amex.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.amex:before,.select2-results__options li.wc-stripe-select2-container.amex:before{background-image:url(../img/cards/amex.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.discover:before,.select2-results__options li.wc-stripe-select2-container.discover:before{background-image:url(../img/cards/discover.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,.select2-results__options li.wc-stripe-select2-container.mastercard:before{background-image:url(../img/cards/mastercard.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.dinersclub:before,.select2-results__options li.wc-stripe-select2-container.dinersclub:before{background-image:url(../img/cards/diners.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.diners:before,.select2-results__options li.wc-stripe-select2-container.diners:before{background-image:url(../img/cards/diners.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.jcb:before,.select2-results__options li.wc-stripe-select2-container.jcb:before{background-image:url(../img/cards/jcb.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.stripe_sepa:before,.select2-results__options li.wc-stripe-select2-container.stripe_sepa:before{background-image:url(../img/sepa.svg)}.select2-results__options li.wc-stripe-select2-container.wc-stripe-ach:before{display:none}#wc-stripe-card-element{margin-bottom:1em}.wc-stripe_cc-new-method-container .wc-stripe-save-source{display:flex;align-items:center;justify-content:flex-start}.wc-stripe_cc-container .wc-stripe-save-source .save-source-label{display:block;padding:0;margin:0 5px 0 0}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]{opacity:0;position:absolute;width:20px;height:20px}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{position:relative}.wc-stripe_cc-container .save-source-checkbox{height:20px;width:20px;position:relative;background-color:#fff;display:block;border-radius:3px;border:1px solid #bababa}.wc-stripe_cc-container .save-source-checkbox:after{content:"";position:absolute;top:0;right:0}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]:checked+.save-source-checkbox:after{right:6px;top:2px;width:7px;height:12px;border:solid #2196f3;border-width:0 0 3px 3px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}li.payment_method_stripe_applepay,li.payment_method_stripe_googlepay,li.payment_method_stripe_payment_request{display:none}#payment #place_order.wc-stripe-hide,#place_order.wc-stripe-hide,.woocommerce-checkout-review-order #payment #place_order.wc-stripe-hide{position:absolute!important;z-index:-1000!important;height:0!important;padding:0!important;opacity:0!important}.wc-stripe-product-checkout-container{display:none;width:100%}.wc-stripe-product-checkout-container.bottom{margin-top:1em}.wc-stripe-product-checkout-container.top{margin-bottom:1em}.wc-stripe-product-checkout-container.active{display:block}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods,.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods{list-style:none;margin:0;padding:0}.wc-stripe-cart-checkout-container{margin:0;padding:0;clear:both}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods{margin-bottom:1.5em}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_],.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]{margin:0 0 1em 0}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_]:last-child,.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]:last-child{margin:0}.wc_stripe_cart_payment_methods .gpay-button,.wc_stripe_cart_payment_methods .gpay-card-info-container,.wc_stripe_product_payment_methods .gpay-button,.wc_stripe_product_payment_methods .gpay-card-info-container{width:100%!important;margin:0}.wc_stripe_product_payment_methods .disabled{opacity:.45}.stripe_cart_gateway_active .checkout-button,.woocommerce-cart .stripe_cart_gateway_active .wc-proceed-to-checkout .checkout-button{margin-bottom:0}.wc-stripe-cart-or{margin:1em 0;text-align:center}li.wc-stripe-payment-method.or{display:none}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or{display:block;margin:15px 0}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or p{margin:0}li[class*=payment_method_stripe_].active~li.wc-stripe-payment-method.or{display:block;margin:0}li.payment_method_stripe_applepay label:first-of-type img{width:49px;max-height:32px}li.payment_method_stripe_googlepay label:first-of-type img{width:48px;max-height:35px}li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_standard]{width:60px;max-height:35px}li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_round_outline]{width:56px;max-height:30px}li.payment_method_stripe_ach label:first-of-type img{width:32px;height:32px;min-width:32px;min-height:32px}.gpay-button:hover{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:active{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:focus{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}@supports (-webkit-appearance:-apple-pay-button){.apple-pay-button{display:block;-webkit-appearance:-apple-pay-button!important;width:100%;max-width:100%;min-width:200px;height:40px;max-height:40px}.apple-pay-button-black{-apple-pay-button-style:#000}.apple-pay-button-white{-apple-pay-button-style:#fff}.apple-pay-button-white-with-line{-apple-pay-button-style:white-outline}.applepay-top-container .apple-pay-button{max-width:240px}.woocommerce-checkout-payment .apple-pay-button{max-width:240px}body.single-product div.product form.cart .wc_stripe_product_payment_methods .apple-pay-button{max-width:100%}}.wc-stripe-banner-checkout{display:none;padding:20px 15px 0 15px;border:1px solid #d1d1d1;border-width:0 0 1px;position:relative;margin:1em 0}.wc-stripe-banner-checkout.active{display:block}.wc-stripe-banner-checkout span.banner-title{position:absolute;display:flex;align-items:center;top:-13px;left:0;right:0;background:0 0;white-space:nowrap;font-size:16px}.wc-stripe-banner-checkout span.banner-title:after,.wc-stripe-banner-checkout span.banner-title:before{content:' ';height:1px;background:#d1d1d1;display:block;width:50%}.wc-stripe-banner-checkout span.banner-title:before{margin-left:8px}.wc-stripe-banner-checkout span.banner-title:after{margin-right:8px}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways{list-style:none;margin:0;padding:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway{margin:0 0 20px 0;display:none}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-card-info-container{margin:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-card-info-container{width:100%}.wc_stripe_cart_payment_methods .payment_method_stripe_payment_request .StripeElement,.wc_stripe_product_payment_methods .payment_method_stripe_payment_request .StripeElement{padding:0;width:100%}.woocommerce-checkout #wc-stripe-payment-request-container.StripeElement{width:240px;padding:0}.wc-stripe-checkout-banner-gateway #wc-stripe-payment-request-banner.StripeElement{width:100%}ul.payment_methods li.payment_method_stripe_p24 img{max-width:90px;width:90px;max-height:45px}ul.payment_methods li.payment_method_stripe_ideal img{max-width:38px;width:38px;max-height:35px}ul.payment_methods li.payment_method_stripe_fpx img{max-width:75px;width:75px;max-height:25px}ul.payment_methods li.payment_method_stripe_klarna img{max-width:72px;width:72px;max-height:20px}ul.payment_methods li.payment_method_stripe_klarna img[src*=klarna_pink]{width:56px;height:32px;max-height:32px}ul.payment_methods li.payment_method_stripe_giropay img{max-width:65px;width:65px;max-height:28px}ul.payment_methods li.payment_method_stripe_eps img{max-width:70px;width:70px;max-height:46px}ul.payment_methods li.payment_method_stripe_multibanco img{max-width:48px;width:48px;max-height:48px}ul.payment_methods li.payment_method_stripe_sepa img{max-width:67px;width:67px;max-height:18px}ul.payment_methods li.payment_method_stripe_sofort img{max-width:70px;width:70px;max-height:21px}label[for=payment_method_stripe_bancontact] img,ul.payment_methods li.payment_method_stripe_bancontact img{width:60px;height:42px;max-width:60px;max-height:42px}ul.payment_methods li.payment_method_stripe_wechat label img{max-width:82px;width:82px;max-height:23px}ul.payment_methods li.payment_method_stripe_alipay img{max-width:72px;width:72px;height:36px;max-height:36px}ul.payment_methods li.payment_method_stripe_grabpay img{max-width:95px;width:95px;max-height:28px}#wc-stripe-card-element{width:100%}li.banner_payment_method_stripe_payment_request .StripeElement{padding:0}.single-product .blockMsg{border:none!important;background-color:transparent!important}#wc-stripe-card{position:absolute!important;top:50%;left:8px;transform:translatey(-50%);width:23px;height:15px;padding:0;border:none}#wc-stripe-card.active{width:32px;height:20px}input[id=stripe-postal-code]:focus{outline:0;background:0 0;border:none;box-shadow:none}div.postalCode:focus{outline:0;border:none}li[class*=payment_method_stripe] .select2-container .select2-selection--single{height:42px;padding:0 5px}li[class*=payment_method_stripe] .select2-container--default .select2-selection--single .select2-selection__arrow{height:42px;top:1px;left:1px;transform:translateY(0)}.blockUI.blockMsg{font-size:20px;white-space:nowrap}#wc-stripe-payment-request-container.disabled{opacity:.45}.wc-stripe-paymentRequest-icons-container img{float:none}.select2-container .select2-selection--single .wc-stripe-select2-container.wc-stripe-ach:before{display:none}ul.wc_stripe_cart_payment_methods li.wc-stripe-payment-method button,ul.wc_stripe_checkout_banner_gateways li button,ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_] button{margin:0}ul.payment_methods li[class*=payment_method]{margin:0;padding:10px 0}ul.payment_methods li[class*=payment_method] input[name=payment_method]{margin:0 5px 0 10px;float:none}ul.payment_methods li[class*=payment_method]>input[name=payment_method]+label{padding-top:0;padding-left:0;padding-bottom:0}ul.payment_methods{list-style:none}ul.payment_methods li[class*=payment_method_stripe_] .wc-stripe_cc-new-method-container label:before{display:none}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{padding:0!important;margin:0}div[id*=wc_stripe_local_payment_stripe_].StripeElement{border:1px solid #eee;border-radius:4px}.qrcode-message{margin:10px 0 0 0}#wc_stripe_local_payment_stripe_becs,#wc_stripe_local_payment_stripe_sepa{padding:10px 12px;box-shadow:0 1px 3px 0 #e6ebf1}.wc-stripe-local-desc.stripe_becs,.wc-stripe-local-desc.stripe_sepa{margin:10px 0}.wc-stripe-clear{clear:both;height:0;visibility:hidden}.wc-stripe-gateway-desc p{margin:0}#wc_stripe_local_payment_stripe_klarna,li[class*=payment_method_stripe_] div.wc-stripe-gateway-container.has_tokens{margin-top:10px}.wc-stripe-gateway-desc{margin-top:10px}#wc-stripe-card-element.StripeElement--webkit-autofill{background-color:transparent!important}#wc_stripe_local_payment_stripe_klarna .stripe-klarna-categories{list-style:none;margin:0;padding:10px}li.payment_method_stripe_alipay,li.payment_method_stripe_bancontact,li.payment_method_stripe_becs,li.payment_method_stripe_eps,li.payment_method_stripe_fpx,li.payment_method_stripe_giropay,li.payment_method_stripe_ideal,li.payment_method_stripe_klarna,li.payment_method_stripe_multibanco,li.payment_method_stripe_p24,li.payment_method_stripe_sepa,li.payment_method_stripe_sofort,li.payment_method_stripe_wechat{display:none}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods{list-style:none;margin:0;padding:0}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods li{margin:0}.widget_shopping_cart_content a.wc-stripe-applepay-mini-cart,.widget_shopping_cart_content a.wc-stripe-gpay-mini-cart,.widget_shopping_cart_content a.wc-stripe-payment-request-mini-cart{background:0 0;padding:0;border:none}a.wc-stripe-gpay-mini-cart .gpay-button,a.wc-stripe-gpay-mini-cart .gpay-card-info-container a.wc-stripe-applepay-mini-cart .apple-pay-button{width:100%;margin:0}.wc-stripe-payment-request-mini-cart.StripeElement{padding:0;background:0 0;border:none;width:100%}.wc-stripe-payment-request-mini-cart.StripeElement .__PrivateStripeElement{width:100%}.widget_shopping_cart_content .wc-stripe-overlay{display:none!important;position:absolute;background:rgba(255,255,255,.75);height:100%;width:100%;z-index:-1}.widget_shopping_cart_content .wc-stripe-overlay.active{display:block!important;z-index:9999}.wc-stripe-klarna-loader{display:flex;justify-content:center;position:relative;width:100%;height:30px;box-sizing:border-box;transform:scale(.65)}.wc-stripe-klarna-loader div{box-sizing:border-box;display:block;position:absolute;box-sizing:border-box;width:30px;height:30px;border:3px solid #000;border-radius:50%;animation:klarna-payments-loader 1.3s cubic-bezier(.5,0,.5,1) infinite;border-color:#000 transparent transparent transparent}.wc-stripe-klarna-loader div:nth-child(1){animation-delay:-.45s}.wc-stripe-klarna-loader div:nth-child(2){animation-delay:-.3s}.wc-stripe-klarna-loader div:nth-child(3){animation-delay:-.15s}@keyframes klarna-payments-loader{0%{transform:rotate(0)}100%{transform:rotate(-360deg)}}li.payment_method_stripe_alipay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_applepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_bancontact.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_eps.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_giropay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_googlepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_grabpay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_multibanco.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_p24.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_payment_request.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_sofort.wc-stripe-no-desc .payment_box.wc-stripe-no-methods{padding:0;margin:0}.wc-stripe-paymentRequest-icons-container,.wc-stripe-shortcode-cart-buttons .wc-stripe-card-icons-container{float:left;display:inline-block}ul.payment_methods li[class*=payment_method]{margin:0;padding:0}li[class*=payment_method] input[type=radio]{margin:0 5px 0 10px}li[class*=payment_method] input[type=radio]+label:not(.wc-stripe-label-payment-type){margin:0}.woocommerce-checkout #payment ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n+2),ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n+2){margin:0}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon,li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img{max-width:43px;max-height:26px;width:43px;height:26px;float:none;display:inline}li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img{width:25px;height:25px;max-width:25px;max-height:25px}ul.payment_methods label[for*=payment_method_stripe]:after{clear:left;content:"";display:block}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon:nth-child(2n+2){margin:0 2px}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon.open.visa{padding-top:2px}ul.payment_methods li[class*=payment_method_stripe_] label>img:first-of-type{float:left!important}.wc-stripe_cc-new-method-container{margin-bottom:1em}.wc-stripe_cc-container .StripeElement{box-sizing:border-box;height:40px;padding:10px 12px;border-radius:4px;background-color:#fff;-webkit-transition:box-shadow 150ms ease;transition:box-shadow 150ms ease}input.wc-stripe-klarna-category,input.wc-stripe-payment-type{display:none!important}body .wfacp_main_form.woocommerce .wc-stripe-save-source label.checkbox{padding:0!important}input[type=radio]+label.wc-stripe-label-payment-type,label.wc-stripe-label-klarna-category,label.wc-stripe-label-payment-type{margin-bottom:1em;display:block;padding:0!important;color:#000}.theme-flatsome div.wc-stripe-saved-methods-container{margin:0 0 1em 0}label.wc-stripe-label-klarna-category:before,label.wc-stripe-label-payment-type:before{content:"";display:inline-block;width:11px;height:11px;border:2px solid #fff;box-shadow:0 0 0 2px #000;background:#fff;margin-right:4px;margin-left:.5em;border-radius:100%;-webkit-transform:translateY(2px);-ms-transform:translateY(2px);transform:translateY(2px)}input.wc-stripe-klarna-category:checked+label.wc-stripe-label-klarna-category:before,input.wc-stripe-payment-type:checked+label.wc-stripe-label-payment-type:before{background:#000}label.wc-stripe-label-payment-type:after{content:none!important;display:none!important}.wc-stripe-saved-methods-container .select2-container .select2-selection--single .select2-selection__rendered{padding-right:8px}.select2-results__options li.wc-stripe-select2-container,.wc-stripe-saved-methods-container .select2-container .select2-selection--single .wc-stripe-select2-container{display:flex;align-items:center;height:42px;line-height:42px!important}.select2-container .select2-selection--single .wc-stripe-select2-container:before,.select2-results__options li.wc-stripe-select2-container:before{content:'';background-repeat:no-repeat;background-size:40px 24px;width:40px;height:42px;display:inline-block;margin-left:8px;background-position:center}.select2-container .select2-selection--single .wc-stripe-select2-container.visa:before,.select2-results__options li.wc-stripe-select2-container.visa:before{background-image:url(../img/cards/visa.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,.select2-results__options li.wc-stripe-select2-container.mastercard:before{background-image:url(../img/cards/mastercard.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.americanexpress:before,.select2-results__options li.wc-stripe-select2-container.americanexpress:before{background-image:url(../img/cards/amex.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.amex:before,.select2-results__options li.wc-stripe-select2-container.amex:before{background-image:url(../img/cards/amex.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.discover:before,.select2-results__options li.wc-stripe-select2-container.discover:before{background-image:url(../img/cards/discover.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,.select2-results__options li.wc-stripe-select2-container.mastercard:before{background-image:url(../img/cards/mastercard.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.dinersclub:before,.select2-results__options li.wc-stripe-select2-container.dinersclub:before{background-image:url(../img/cards/diners.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.diners:before,.select2-results__options li.wc-stripe-select2-container.diners:before{background-image:url(../img/cards/diners.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.jcb:before,.select2-results__options li.wc-stripe-select2-container.jcb:before{background-image:url(../img/cards/jcb.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.stripe_sepa:before,.select2-results__options li.wc-stripe-select2-container.stripe_sepa:before{background-image:url(../img/sepa.svg)}.select2-results__options li.wc-stripe-select2-container.wc-stripe-ach:before{display:none}#wc-stripe-card-element{margin-bottom:1em}.wc-stripe_cc-new-method-container .wc-stripe-save-source{display:flex;align-items:center;justify-content:flex-start}.wc-stripe_cc-container .wc-stripe-save-source .save-source-label{display:block;padding:0;margin:0 5px 0 0}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]{opacity:0;position:absolute;width:20px;height:20px}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{position:relative}.wc-stripe_cc-container .save-source-checkbox{height:20px;width:20px;position:relative;background-color:#fff;display:block;border-radius:3px;border:1px solid #bababa}.wc-stripe_cc-container .save-source-checkbox:after{content:"";position:absolute;top:0;right:0}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]:checked+.save-source-checkbox:after{right:6px;top:2px;width:7px;height:12px;border:solid #2196f3;border-width:0 0 3px 3px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}li.payment_method_stripe_applepay,li.payment_method_stripe_googlepay,li.payment_method_stripe_payment_request{display:none}#payment #place_order.wc-stripe-hide,#place_order.wc-stripe-hide,.woocommerce-checkout-review-order #payment #place_order.wc-stripe-hide{position:absolute!important;z-index:-1000!important;height:0!important;padding:0!important;opacity:0!important}.wc-stripe-product-checkout-container{display:none;width:100%}.wc-stripe-product-checkout-container.bottom{margin-top:1em}.wc-stripe-product-checkout-container.top{margin-bottom:1em}.wc-stripe-product-checkout-container.active{display:block}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods,.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods{list-style:none;margin:0;padding:0}.wc-stripe-cart-checkout-container{margin:0;padding:0;clear:both}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods{margin-bottom:1.5em}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_],.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]{margin:0 0 1em 0}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_]:last-child,.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]:last-child{margin:0}.wc_stripe_cart_payment_methods .gpay-button,.wc_stripe_cart_payment_methods .gpay-card-info-container,.wc_stripe_product_payment_methods .gpay-button,.wc_stripe_product_payment_methods .gpay-card-info-container{width:100%!important;margin:0}.wc_stripe_product_payment_methods .disabled{opacity:.45}.stripe_cart_gateway_active .checkout-button,.woocommerce-cart .stripe_cart_gateway_active .wc-proceed-to-checkout .checkout-button{margin-bottom:0}.wc-stripe-cart-or{margin:1em 0;text-align:center}li.wc-stripe-payment-method.or{display:none}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or{display:block;margin:15px 0}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or p{margin:0}li[class*=payment_method_stripe_].active~li.wc-stripe-payment-method.or{display:block;margin:0}li.payment_method_stripe_applepay label:first-of-type img{width:49px;max-height:32px}li.payment_method_stripe_googlepay label:first-of-type img{width:48px;max-height:35px}li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_standard]{width:60px;max-height:35px}li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_round_outline]{width:56px;max-height:30px}li.payment_method_stripe_ach label:first-of-type img{width:32px;height:32px;min-width:32px;min-height:32px}.gpay-button:hover{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:active{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:focus{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}@supports (-webkit-appearance:-apple-pay-button){.apple-pay-button{display:block;-webkit-appearance:-apple-pay-button;width:100%;max-width:100%;min-width:200px;height:40px;max-height:40px}.apple-pay-button-black{-apple-pay-button-style:#000}.apple-pay-button-white{-apple-pay-button-style:#fff}.apple-pay-button-white-with-line{-apple-pay-button-style:white-outline}.applepay-top-container .apple-pay-button{max-width:240px}.woocommerce-checkout-payment .apple-pay-button{max-width:240px}body.single-product div.product form.cart .wc_stripe_product_payment_methods .apple-pay-button{max-width:100%}}.wc-stripe-banner-checkout{display:none;padding:20px 15px 0 15px;border:1px solid #d1d1d1;border-width:0 0 1px;position:relative;margin:1em 0}.wc-stripe-banner-checkout.active{display:block}.wc-stripe-banner-checkout span.banner-title{position:absolute;display:flex;align-items:center;top:-13px;left:0;right:0;background:0 0;white-space:nowrap;font-size:16px}.wc-stripe-banner-checkout span.banner-title:after,.wc-stripe-banner-checkout span.banner-title:before{content:' ';height:1px;background:#d1d1d1;display:block;width:50%}.wc-stripe-banner-checkout span.banner-title:before{margin-left:8px}.wc-stripe-banner-checkout span.banner-title:after{margin-right:8px}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways{list-style:none;margin:0;padding:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway{margin:0 0 20px 0;display:none}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-card-info-container{margin:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-card-info-container{width:100%}.wc_stripe_cart_payment_methods .payment_method_stripe_payment_request .StripeElement,.wc_stripe_product_payment_methods .payment_method_stripe_payment_request .StripeElement{padding:0;width:100%}.woocommerce-checkout #wc-stripe-payment-request-container.StripeElement{width:240px;padding:0}.wc-stripe-checkout-banner-gateway #wc-stripe-payment-request-banner.StripeElement{width:100%}ul.payment_methods li.payment_method_stripe_p24 img{max-width:90px;width:90px;max-height:45px}ul.payment_methods li.payment_method_stripe_ideal img{max-width:38px;width:38px;max-height:35px}ul.payment_methods li.payment_method_stripe_fpx img{max-width:75px;width:75px;max-height:25px}ul.payment_methods li.payment_method_stripe_klarna img{max-width:72px;width:72px;max-height:20px}ul.payment_methods li.payment_method_stripe_klarna img[src*=klarna_pink]{width:54px;height:30px;max-height:32px}ul.payment_methods li.payment_method_stripe_giropay img{max-width:65px;width:65px;max-height:28px}ul.payment_methods li.payment_method_stripe_eps img{max-width:70px;width:70px;max-height:46px}ul.payment_methods li.payment_method_stripe_multibanco img{max-width:48px;width:48px;max-height:48px}ul.payment_methods li.payment_method_stripe_sepa img{max-width:67px;width:67px;max-height:18px}ul.payment_methods li.payment_method_stripe_sofort img{max-width:70px;width:70px;max-height:21px}label[for=payment_method_stripe_bancontact] img,ul.payment_methods li.payment_method_stripe_bancontact img{width:60px;height:42px;max-width:60px;max-height:42px}ul.payment_methods li.payment_method_stripe_wechat label img{max-width:82px;width:82px;max-height:23px}ul.payment_methods li.payment_method_stripe_alipay img{max-width:72px;width:72px;height:36px;max-height:36px}ul.payment_methods li.payment_method_stripe_grabpay img{max-width:95px;width:95px;max-height:28px}#wc-stripe-card-element{width:100%}li.banner_payment_method_stripe_payment_request .StripeElement{padding:0}.single-product .blockMsg{border:none!important;background-color:transparent!important}#wc-stripe-card{position:absolute!important;top:50%;left:8px;transform:translatey(-50%);width:23px;height:15px;padding:0;border:none}#wc-stripe-card.active{width:32px;height:20px}input[id=stripe-postal-code]:focus{outline:0;background:0 0;border:none;box-shadow:none}div.postalCode:focus{outline:0;border:none}li[class*=payment_method_stripe] .select2-container .select2-selection--single{height:42px;padding:0 5px}li[class*=payment_method_stripe] .select2-container--default .select2-selection--single .select2-selection__arrow{height:42px;top:1px;left:1px;transform:translateY(0)}.blockUI.blockMsg{font-size:20px;white-space:nowrap}#wc-stripe-payment-request-container.disabled{opacity:.45}.wc-stripe-paymentRequest-icons-container img{float:none}.select2-container .select2-selection--single .wc-stripe-select2-container.wc-stripe-ach:before{display:none}ul.wc_stripe_cart_payment_methods li.wc-stripe-payment-method button,ul.wc_stripe_checkout_banner_gateways li button,ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_] button{margin:0}ul.payment_methods li[class*=payment_method]{margin:0;padding:10px 0}ul.payment_methods li[class*=payment_method] input[name=payment_method]{margin:0 5px 0 10px;float:none}ul.payment_methods li[class*=payment_method]>input[name=payment_method]+label{padding-top:0;padding-left:0;padding-bottom:0}ul.payment_methods{list-style:none}ul.payment_methods li[class*=payment_method_stripe_] .wc-stripe_cc-new-method-container label:before{display:none}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{padding:0!important;margin:0}div[id*=wc_stripe_local_payment_stripe_].StripeElement{border:1px solid #eee;border-radius:4px}.qrcode-message{margin:10px 0 0 0}#wc_stripe_local_payment_stripe_becs,#wc_stripe_local_payment_stripe_sepa{padding:10px 12px;box-shadow:0 1px 3px 0 #e6ebf1}.wc-stripe-local-desc.stripe_becs,.wc-stripe-local-desc.stripe_sepa{margin:10px 0}.wc-stripe-clear{clear:both;height:0;visibility:hidden}.wc-stripe-gateway-desc p{margin:0}#wc_stripe_local_payment_stripe_klarna,li[class*=payment_method_stripe_] div.wc-stripe-gateway-container.has_tokens{margin-top:10px}.wc-stripe-gateway-desc{margin-top:10px}#wc-stripe-card-element.StripeElement--webkit-autofill{background-color:transparent!important}#wc_stripe_local_payment_stripe_klarna .stripe-klarna-categories{list-style:none;margin:0;padding:10px}li.payment_method_stripe_alipay,li.payment_method_stripe_bancontact,li.payment_method_stripe_becs,li.payment_method_stripe_eps,li.payment_method_stripe_fpx,li.payment_method_stripe_giropay,li.payment_method_stripe_ideal,li.payment_method_stripe_klarna,li.payment_method_stripe_multibanco,li.payment_method_stripe_p24,li.payment_method_stripe_sepa,li.payment_method_stripe_sofort,li.payment_method_stripe_wechat{display:none}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods{list-style:none;margin:0;padding:0}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods li{margin:0}.widget_shopping_cart_content a.wc-stripe-applepay-mini-cart,.widget_shopping_cart_content a.wc-stripe-gpay-mini-cart,.widget_shopping_cart_content a.wc-stripe-payment-request-mini-cart{background:0 0;padding:0;border:none}a.wc-stripe-gpay-mini-cart .gpay-button,a.wc-stripe-gpay-mini-cart .gpay-card-info-container a.wc-stripe-applepay-mini-cart .apple-pay-button{width:100%;margin:0}.wc-stripe-payment-request-mini-cart.StripeElement{padding:0;background:0 0;border:none;width:100%}.wc-stripe-payment-request-mini-cart.StripeElement .__PrivateStripeElement{width:100%}.widget_shopping_cart_content .wc-stripe-overlay{display:none!important;position:absolute;background:rgba(255,255,255,.75);height:100%;width:100%;z-index:-1}.widget_shopping_cart_content .wc-stripe-overlay.active{display:block!important;z-index:9999}.wc-stripe-klarna-loader{display:flex;justify-content:center;position:relative;width:100%;height:30px;box-sizing:border-box;transform:scale(.65)}.wc-stripe-klarna-loader div{box-sizing:border-box;display:block;position:absolute;box-sizing:border-box;width:30px;height:30px;border:3px solid #000;border-radius:50%;animation:klarna-payments-loader 1.3s cubic-bezier(.5,0,.5,1) infinite;border-color:#000 transparent transparent transparent}.wc-stripe-klarna-loader div:nth-child(1){animation-delay:-.45s}.wc-stripe-klarna-loader div:nth-child(2){animation-delay:-.3s}.wc-stripe-klarna-loader div:nth-child(3){animation-delay:-.15s}@keyframes klarna-payments-loader{0%{transform:rotate(0)}100%{transform:rotate(-360deg)}}li.payment_method_stripe_alipay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_applepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_bancontact.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_eps.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_giropay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_googlepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_grabpay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_multibanco.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_p24.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_payment_request.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_sofort.wc-stripe-no-desc .payment_box.wc-stripe-no-methods{padding:0;margin:0}.wc-stripe-shortcode-cart-buttons .wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or{display:none}li[class*=payment_method_stripe_] style{display:none}ul.payment_methods li[class*=payment_method]>input[name=payment_method]+label[for=payment_method_stripe_afterpay]{display:flex;align-items:center}#wc-stripe-afterpay-cart-container #wc-stripe-afterpay-cart-msg .__PrivateStripeElement p,#wc-stripe-afterpay-product-msg .__PrivateStripeElement p,.payment_method_stripe_afterpay #wc-stripe-afterpay-msg .__PrivateStripeElement p{margin-bottom:0!important;margin-top:0!important}#wc-stripe-afterpay-cart-msg .__PrivateStripeElement p .AfterpayMessage-logo,.payment_method_stripe_afterpay #wc-stripe-afterpay-msg .__PrivateStripeElement p .AfterpayMessage-logo{vertical-align:middle}.payment_method_stripe_afterpay #wc_stripe_local_payment_stripe_afterpay.ineligible{display:none}.payment_method_stripe_afterpay .wc-stripe-afterpay__offsite{text-align:center;max-width:320px;margin:0 auto;padding:10px 0}.payment_method_stripe_afterpay .wc-stripe-afterpay__offsite img{display:inline-block}.payment_method_stripe_afterpay .wc-stripe-afterpay__offsite p{font-size:14px;margin-top:10px}#wc-stripe-afterpay-cart-container #wc-stripe-afterpay-cart-msg{text-align:right}#wc-stripe-afterpay-cart-container #wc-stripe-afterpay-cart-msg .AfterpayMessage-logoSvg,.payment_method_stripe_afterpay #wc-stripe-afterpay-msg .AfterpayMessage-logoSvg{min-width:64px;max-width:90px}#wc-stripe-afterpay-cart-container td{border:none}#wc-stripe-afterpay-cart-container td::before{content:''}.AfterpayMessage-logoSvg{display:inline-block}#wc-stripe-afterpay-product-msg{font-size:14px}#wc-stripe-afterpay-product-msg .AfterpayMessage-logoSvg{max-width:80px;min-width:64px}
|
assets/css/stripe.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wc-stripe-card-icons-container,.wc-stripe-paymentRequest-icons-container{float:right;display:inline-block}ul.payment_methods li[class*=payment_method]{margin:0;padding:0}li[class*=payment_method] input[type=radio]{margin:0 10px 0 5px}li[class*=payment_method] input[type=radio]+label:not(.wc-stripe-label-payment-type){margin:0}.woocommerce-checkout #payment ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n+2),ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n+2){margin:0}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon,li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img{max-width:43px;max-height:26px;width:43px;height:26px;float:none;display:inline}li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img{width:25px;height:25px;max-width:25px;max-height:25px}ul.payment_methods label[for*=payment_method_stripe]:after{clear:right;content:"";display:block}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon:nth-child(2n+2){margin:0 2px}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon.open.visa{padding-top:2px}ul.payment_methods li[class*=payment_method_stripe_] label>img:first-of-type{float:right!important}.wc-stripe_cc-new-method-container{margin-bottom:1em}.wc-stripe_cc-container .StripeElement{box-sizing:border-box;height:40px;padding:10px 12px;border-radius:4px;background-color:#fff;-webkit-transition:box-shadow 150ms ease;transition:box-shadow 150ms ease}input.wc-stripe-klarna-category,input.wc-stripe-payment-type{display:none!important}body .wfacp_main_form.woocommerce .wc-stripe-save-source label.checkbox{padding:0!important}input[type=radio]+label.wc-stripe-label-payment-type,label.wc-stripe-label-klarna-category,label.wc-stripe-label-payment-type{margin-bottom:1em;display:block;padding:0!important;color:#000}.theme-flatsome div.wc-stripe-saved-methods-container{margin:0 0 1em 0}label.wc-stripe-label-klarna-category:before,label.wc-stripe-label-payment-type:before{content:"";display:inline-block;width:11px;height:11px;border:2px solid #fff;box-shadow:0 0 0 2px #000;background:#fff;margin-left:4px;margin-right:.5em;border-radius:100%;-webkit-transform:translateY(2px);-ms-transform:translateY(2px);transform:translateY(2px)}input.wc-stripe-klarna-category:checked+label.wc-stripe-label-klarna-category:before,input.wc-stripe-payment-type:checked+label.wc-stripe-label-payment-type:before{background:#000}label.wc-stripe-label-payment-type:after{content:none!important;display:none!important}.wc-stripe-saved-methods-container .select2-container .select2-selection--single .select2-selection__rendered{padding-left:8px}.select2-results__options li.wc-stripe-select2-container,.wc-stripe-saved-methods-container .select2-container .select2-selection--single .wc-stripe-select2-container{display:flex;align-items:center;height:42px;line-height:42px!important}.select2-container .select2-selection--single .wc-stripe-select2-container:before,.select2-results__options li.wc-stripe-select2-container:before{content:'';background-repeat:no-repeat;background-size:40px 24px;width:40px;height:42px;display:inline-block;margin-right:8px;background-position:center}.select2-container .select2-selection--single .wc-stripe-select2-container.visa:before,.select2-results__options li.wc-stripe-select2-container.visa:before{background-image:url(../img/cards/visa.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,.select2-results__options li.wc-stripe-select2-container.mastercard:before{background-image:url(../img/cards/mastercard.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.americanexpress:before,.select2-results__options li.wc-stripe-select2-container.americanexpress:before{background-image:url(../img/cards/amex.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.amex:before,.select2-results__options li.wc-stripe-select2-container.amex:before{background-image:url(../img/cards/amex.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.discover:before,.select2-results__options li.wc-stripe-select2-container.discover:before{background-image:url(../img/cards/discover.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,.select2-results__options li.wc-stripe-select2-container.mastercard:before{background-image:url(../img/cards/mastercard.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.dinersclub:before,.select2-results__options li.wc-stripe-select2-container.dinersclub:before{background-image:url(../img/cards/diners.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.diners:before,.select2-results__options li.wc-stripe-select2-container.diners:before{background-image:url(../img/cards/diners.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.jcb:before,.select2-results__options li.wc-stripe-select2-container.jcb:before{background-image:url(../img/cards/jcb.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.stripe_sepa:before,.select2-results__options li.wc-stripe-select2-container.stripe_sepa:before{background-image:url(../img/sepa.svg)}.select2-results__options li.wc-stripe-select2-container.wc-stripe-ach:before{display:none}#wc-stripe-card-element{margin-bottom:1em}.wc-stripe_cc-new-method-container .wc-stripe-save-source{display:flex;align-items:center;justify-content:flex-start}.wc-stripe_cc-container .wc-stripe-save-source .save-source-label{display:block;padding:0;margin:0 0 0 5px}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]{opacity:0;position:absolute;width:20px;height:20px}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{position:relative}.wc-stripe_cc-container .save-source-checkbox{height:20px;width:20px;position:relative;background-color:#fff;display:block;border-radius:3px;border:1px solid #bababa}.wc-stripe_cc-container .save-source-checkbox:after{content:"";position:absolute;top:0;left:0}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]:checked+.save-source-checkbox:after{left:6px;top:2px;width:7px;height:12px;border:solid #2196f3;border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}li.payment_method_stripe_applepay,li.payment_method_stripe_googlepay,li.payment_method_stripe_payment_request{display:none}#payment #place_order.wc-stripe-hide,#place_order.wc-stripe-hide,.woocommerce-checkout-review-order #payment #place_order.wc-stripe-hide{position:absolute!important;z-index:-1000!important;height:0!important;padding:0!important;opacity:0!important}.wc-stripe-product-checkout-container{display:none;width:100%}.wc-stripe-product-checkout-container.bottom{margin-top:1em}.wc-stripe-product-checkout-container.top{margin-bottom:1em}.wc-stripe-product-checkout-container.active{display:block}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods,.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods{list-style:none;margin:0;padding:0}.wc-stripe-cart-checkout-container{margin:0;padding:0;clear:both}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods{margin-bottom:1.5em}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_],.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]{margin:0 0 1em 0}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_]:last-child,.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]:last-child{margin:0}.wc_stripe_cart_payment_methods .gpay-button,.wc_stripe_cart_payment_methods .gpay-card-info-container,.wc_stripe_product_payment_methods .gpay-button,.wc_stripe_product_payment_methods .gpay-card-info-container{width:100%!important;margin:0}.wc_stripe_product_payment_methods .disabled{opacity:.45}.stripe_cart_gateway_active .checkout-button,.woocommerce-cart .stripe_cart_gateway_active .wc-proceed-to-checkout .checkout-button{margin-bottom:0}.wc-stripe-cart-or{margin:1em 0;text-align:center}li.wc-stripe-payment-method.or{display:none}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or{display:block;margin:15px 0}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or p{margin:0}li[class*=payment_method_stripe_].active~li.wc-stripe-payment-method.or{display:block;margin:0}li.payment_method_stripe_applepay label:first-of-type img{width:49px;max-height:32px}li.payment_method_stripe_googlepay label:first-of-type img{width:48px;max-height:35px}li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_standard]{width:60px;max-height:35px}li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_round_outline]{width:56px;max-height:30px}li.payment_method_stripe_ach label:first-of-type img{width:32px;height:32px;min-width:32px;min-height:32px}.gpay-button:hover{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:active{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:focus{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}@supports (-webkit-appearance:-apple-pay-button){.apple-pay-button{display:block;-webkit-appearance:-apple-pay-button!important;width:100%;max-width:100%;min-width:200px;height:40px;max-height:40px}.apple-pay-button-black{-apple-pay-button-style:#000}.apple-pay-button-white{-apple-pay-button-style:#fff}.apple-pay-button-white-with-line{-apple-pay-button-style:white-outline}.applepay-top-container .apple-pay-button{max-width:240px}.woocommerce-checkout-payment .apple-pay-button{max-width:240px}body.single-product div.product form.cart .wc_stripe_product_payment_methods .apple-pay-button{max-width:100%}}.wc-stripe-banner-checkout{display:none;padding:20px 15px 0 15px;border:1px solid #d1d1d1;border-width:0 0 1px;position:relative;margin:1em 0}.wc-stripe-banner-checkout.active{display:block}.wc-stripe-banner-checkout span.banner-title{position:absolute;display:flex;align-items:center;top:-13px;right:0;left:0;background:0 0;white-space:nowrap;font-size:16px}.wc-stripe-banner-checkout span.banner-title:after,.wc-stripe-banner-checkout span.banner-title:before{content:' ';height:1px;background:#d1d1d1;display:block;width:50%}.wc-stripe-banner-checkout span.banner-title:before{margin-right:8px}.wc-stripe-banner-checkout span.banner-title:after{margin-left:8px}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways{list-style:none;margin:0;padding:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway{margin:0 0 20px 0;display:none}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-card-info-container{margin:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-card-info-container{width:100%}.wc_stripe_cart_payment_methods .payment_method_stripe_payment_request .StripeElement,.wc_stripe_product_payment_methods .payment_method_stripe_payment_request .StripeElement{padding:0;width:100%}.woocommerce-checkout #wc-stripe-payment-request-container.StripeElement{width:240px;padding:0}.wc-stripe-checkout-banner-gateway #wc-stripe-payment-request-banner.StripeElement{width:100%}ul.payment_methods li.payment_method_stripe_p24 img{max-width:90px;width:90px;max-height:45px}ul.payment_methods li.payment_method_stripe_ideal img{max-width:38px;width:38px;max-height:35px}ul.payment_methods li.payment_method_stripe_fpx img{max-width:75px;width:75px;max-height:25px}ul.payment_methods li.payment_method_stripe_klarna img{max-width:72px;width:72px;max-height:20px}ul.payment_methods li.payment_method_stripe_klarna img[src*=klarna_pink]{width:56px;height:32px;max-height:32px}ul.payment_methods li.payment_method_stripe_giropay img{max-width:65px;width:65px;max-height:28px}ul.payment_methods li.payment_method_stripe_eps img{max-width:70px;width:70px;max-height:46px}ul.payment_methods li.payment_method_stripe_multibanco img{max-width:48px;width:48px;max-height:48px}ul.payment_methods li.payment_method_stripe_sepa img{max-width:67px;width:67px;max-height:18px}ul.payment_methods li.payment_method_stripe_sofort img{max-width:70px;width:70px;max-height:21px}label[for=payment_method_stripe_bancontact] img,ul.payment_methods li.payment_method_stripe_bancontact img{width:60px;height:42px;max-width:60px;max-height:42px}ul.payment_methods li.payment_method_stripe_wechat label img{max-width:82px;width:82px;max-height:23px}ul.payment_methods li.payment_method_stripe_alipay img{max-width:72px;width:72px;height:36px;max-height:36px}ul.payment_methods li.payment_method_stripe_grabpay img{max-width:95px;width:95px;max-height:28px}#wc-stripe-card-element{width:100%}li.banner_payment_method_stripe_payment_request .StripeElement{padding:0}.single-product .blockMsg{border:none!important;background-color:transparent!important}#wc-stripe-card{position:absolute!important;top:50%;right:8px;transform:translatey(-50%);width:23px;height:15px;padding:0;border:none}#wc-stripe-card.active{width:32px;height:20px}input[id=stripe-postal-code]:focus{outline:0;background:0 0;border:none;box-shadow:none}div.postalCode:focus{outline:0;border:none}li[class*=payment_method_stripe] .select2-container .select2-selection--single{height:42px;padding:0 5px}li[class*=payment_method_stripe] .select2-container--default .select2-selection--single .select2-selection__arrow{height:42px;top:1px;right:1px;transform:translateY(0)}.blockUI.blockMsg{font-size:20px;white-space:nowrap}#wc-stripe-payment-request-container.disabled{opacity:.45}.wc-stripe-paymentRequest-icons-container img{float:none}.select2-container .select2-selection--single .wc-stripe-select2-container.wc-stripe-ach:before{display:none}ul.wc_stripe_cart_payment_methods li.wc-stripe-payment-method button,ul.wc_stripe_checkout_banner_gateways li button,ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_] button{margin:0}ul.payment_methods li[class*=payment_method]{margin:0;padding:10px 0}ul.payment_methods li[class*=payment_method] input[name=payment_method]{margin:0 10px 0 5px;float:none}ul.payment_methods li[class*=payment_method]>input[name=payment_method]+label{padding-top:0;padding-right:0;padding-bottom:0}ul.payment_methods{list-style:none}ul.payment_methods li[class*=payment_method_stripe_] .wc-stripe_cc-new-method-container label:before{display:none}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{padding:0!important;margin:0}div[id*=wc_stripe_local_payment_stripe_].StripeElement{border:1px solid #eee;border-radius:4px}.qrcode-message{margin:10px 0 0 0}#wc_stripe_local_payment_stripe_becs,#wc_stripe_local_payment_stripe_sepa{padding:10px 12px;box-shadow:0 1px 3px 0 #e6ebf1}.wc-stripe-local-desc.stripe_becs,.wc-stripe-local-desc.stripe_sepa{margin:10px 0}.wc-stripe-clear{clear:both;height:0;visibility:hidden}.wc-stripe-gateway-desc p{margin:0}#wc_stripe_local_payment_stripe_klarna,li[class*=payment_method_stripe_] div.wc-stripe-gateway-container.has_tokens{margin-top:10px}.wc-stripe-gateway-desc{margin-top:10px}#wc-stripe-card-element.StripeElement--webkit-autofill{background-color:transparent!important}#wc_stripe_local_payment_stripe_klarna .stripe-klarna-categories{list-style:none;margin:0;padding:10px}li.payment_method_stripe_alipay,li.payment_method_stripe_bancontact,li.payment_method_stripe_becs,li.payment_method_stripe_eps,li.payment_method_stripe_fpx,li.payment_method_stripe_giropay,li.payment_method_stripe_ideal,li.payment_method_stripe_klarna,li.payment_method_stripe_multibanco,li.payment_method_stripe_p24,li.payment_method_stripe_sepa,li.payment_method_stripe_sofort,li.payment_method_stripe_wechat{display:none}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods{list-style:none;margin:0;padding:0}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods li{margin:0}.widget_shopping_cart_content a.wc-stripe-applepay-mini-cart,.widget_shopping_cart_content a.wc-stripe-gpay-mini-cart,.widget_shopping_cart_content a.wc-stripe-payment-request-mini-cart{background:0 0;padding:0;border:none}a.wc-stripe-gpay-mini-cart .gpay-button,a.wc-stripe-gpay-mini-cart .gpay-card-info-container a.wc-stripe-applepay-mini-cart .apple-pay-button{width:100%;margin:0}.wc-stripe-payment-request-mini-cart.StripeElement{padding:0;background:0 0;border:none;width:100%}.wc-stripe-payment-request-mini-cart.StripeElement .__PrivateStripeElement{width:100%}.widget_shopping_cart_content .wc-stripe-overlay{display:none!important;position:absolute;background:rgba(255,255,255,.75);height:100%;width:100%;z-index:-1}.widget_shopping_cart_content .wc-stripe-overlay.active{display:block!important;z-index:9999}.wc-stripe-klarna-loader{display:flex;justify-content:center;position:relative;width:100%;height:30px;box-sizing:border-box;transform:scale(.65)}.wc-stripe-klarna-loader div{box-sizing:border-box;display:block;position:absolute;box-sizing:border-box;width:30px;height:30px;border:3px solid #000;border-radius:50%;animation:klarna-payments-loader 1.3s cubic-bezier(.5,0,.5,1) infinite;border-color:#000 transparent transparent transparent}.wc-stripe-klarna-loader div:nth-child(1){animation-delay:-.45s}.wc-stripe-klarna-loader div:nth-child(2){animation-delay:-.3s}.wc-stripe-klarna-loader div:nth-child(3){animation-delay:-.15s}@keyframes klarna-payments-loader{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}li.payment_method_stripe_alipay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_applepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_bancontact.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_eps.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_giropay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_googlepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_grabpay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_multibanco.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_p24.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_payment_request.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_sofort.wc-stripe-no-desc .payment_box.wc-stripe-no-methods{padding:0;margin:0}.wc-stripe-paymentRequest-icons-container,.wc-stripe-shortcode-cart-buttons .wc-stripe-card-icons-container{float:right;display:inline-block}ul.payment_methods li[class*=payment_method]{margin:0;padding:0}li[class*=payment_method] input[type=radio]{margin:0 10px 0 5px}li[class*=payment_method] input[type=radio]+label:not(.wc-stripe-label-payment-type){margin:0}.woocommerce-checkout #payment ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n+2),ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n+2){margin:0}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon,li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img{max-width:43px;max-height:26px;width:43px;height:26px;float:none;display:inline}li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img{width:25px;height:25px;max-width:25px;max-height:25px}ul.payment_methods label[for*=payment_method_stripe]:after{clear:right;content:"";display:block}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon:nth-child(2n+2){margin:0 2px}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon.open.visa{padding-top:2px}ul.payment_methods li[class*=payment_method_stripe_] label>img:first-of-type{float:right!important}.wc-stripe_cc-new-method-container{margin-bottom:1em}.wc-stripe_cc-container .StripeElement{box-sizing:border-box;height:40px;padding:10px 12px;border-radius:4px;background-color:#fff;-webkit-transition:box-shadow 150ms ease;transition:box-shadow 150ms ease}input.wc-stripe-klarna-category,input.wc-stripe-payment-type{display:none!important}body .wfacp_main_form.woocommerce .wc-stripe-save-source label.checkbox{padding:0!important}input[type=radio]+label.wc-stripe-label-payment-type,label.wc-stripe-label-klarna-category,label.wc-stripe-label-payment-type{margin-bottom:1em;display:block;padding:0!important;color:#000}.theme-flatsome div.wc-stripe-saved-methods-container{margin:0 0 1em 0}label.wc-stripe-label-klarna-category:before,label.wc-stripe-label-payment-type:before{content:"";display:inline-block;width:11px;height:11px;border:2px solid #fff;box-shadow:0 0 0 2px #000;background:#fff;margin-left:4px;margin-right:.5em;border-radius:100%;-webkit-transform:translateY(2px);-ms-transform:translateY(2px);transform:translateY(2px)}input.wc-stripe-klarna-category:checked+label.wc-stripe-label-klarna-category:before,input.wc-stripe-payment-type:checked+label.wc-stripe-label-payment-type:before{background:#000}label.wc-stripe-label-payment-type:after{content:none!important;display:none!important}.wc-stripe-saved-methods-container .select2-container .select2-selection--single .select2-selection__rendered{padding-left:8px}.select2-results__options li.wc-stripe-select2-container,.wc-stripe-saved-methods-container .select2-container .select2-selection--single .wc-stripe-select2-container{display:flex;align-items:center;height:42px;line-height:42px!important}.select2-container .select2-selection--single .wc-stripe-select2-container:before,.select2-results__options li.wc-stripe-select2-container:before{content:'';background-repeat:no-repeat;background-size:40px 24px;width:40px;height:42px;display:inline-block;margin-right:8px;background-position:center}.select2-container .select2-selection--single .wc-stripe-select2-container.visa:before,.select2-results__options li.wc-stripe-select2-container.visa:before{background-image:url(../img/cards/visa.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,.select2-results__options li.wc-stripe-select2-container.mastercard:before{background-image:url(../img/cards/mastercard.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.americanexpress:before,.select2-results__options li.wc-stripe-select2-container.americanexpress:before{background-image:url(../img/cards/amex.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.amex:before,.select2-results__options li.wc-stripe-select2-container.amex:before{background-image:url(../img/cards/amex.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.discover:before,.select2-results__options li.wc-stripe-select2-container.discover:before{background-image:url(../img/cards/discover.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,.select2-results__options li.wc-stripe-select2-container.mastercard:before{background-image:url(../img/cards/mastercard.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.dinersclub:before,.select2-results__options li.wc-stripe-select2-container.dinersclub:before{background-image:url(../img/cards/diners.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.diners:before,.select2-results__options li.wc-stripe-select2-container.diners:before{background-image:url(../img/cards/diners.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.jcb:before,.select2-results__options li.wc-stripe-select2-container.jcb:before{background-image:url(../img/cards/jcb.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.stripe_sepa:before,.select2-results__options li.wc-stripe-select2-container.stripe_sepa:before{background-image:url(../img/sepa.svg)}.select2-results__options li.wc-stripe-select2-container.wc-stripe-ach:before{display:none}#wc-stripe-card-element{margin-bottom:1em}.wc-stripe_cc-new-method-container .wc-stripe-save-source{display:flex;align-items:center;justify-content:flex-start}.wc-stripe_cc-container .wc-stripe-save-source .save-source-label{display:block;padding:0;margin:0 0 0 5px}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]{opacity:0;position:absolute;width:20px;height:20px}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{position:relative}.wc-stripe_cc-container .save-source-checkbox{height:20px;width:20px;position:relative;background-color:#fff;display:block;border-radius:3px;border:1px solid #bababa}.wc-stripe_cc-container .save-source-checkbox:after{content:"";position:absolute;top:0;left:0}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]:checked+.save-source-checkbox:after{left:6px;top:2px;width:7px;height:12px;border:solid #2196f3;border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}li.payment_method_stripe_applepay,li.payment_method_stripe_googlepay,li.payment_method_stripe_payment_request{display:none}#payment #place_order.wc-stripe-hide,#place_order.wc-stripe-hide,.woocommerce-checkout-review-order #payment #place_order.wc-stripe-hide{position:absolute!important;z-index:-1000!important;height:0!important;padding:0!important;opacity:0!important}.wc-stripe-product-checkout-container{display:none;width:100%}.wc-stripe-product-checkout-container.bottom{margin-top:1em}.wc-stripe-product-checkout-container.top{margin-bottom:1em}.wc-stripe-product-checkout-container.active{display:block}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods,.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods{list-style:none;margin:0;padding:0}.wc-stripe-cart-checkout-container{margin:0;padding:0;clear:both}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods{margin-bottom:1.5em}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_],.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]{margin:0 0 1em 0}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_]:last-child,.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]:last-child{margin:0}.wc_stripe_cart_payment_methods .gpay-button,.wc_stripe_cart_payment_methods .gpay-card-info-container,.wc_stripe_product_payment_methods .gpay-button,.wc_stripe_product_payment_methods .gpay-card-info-container{width:100%!important;margin:0}.wc_stripe_product_payment_methods .disabled{opacity:.45}.stripe_cart_gateway_active .checkout-button,.woocommerce-cart .stripe_cart_gateway_active .wc-proceed-to-checkout .checkout-button{margin-bottom:0}.wc-stripe-cart-or{margin:1em 0;text-align:center}li.wc-stripe-payment-method.or{display:none}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or{display:block;margin:15px 0}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or p{margin:0}li[class*=payment_method_stripe_].active~li.wc-stripe-payment-method.or{display:block;margin:0}li.payment_method_stripe_applepay label:first-of-type img{width:49px;max-height:32px}li.payment_method_stripe_googlepay label:first-of-type img{width:48px;max-height:35px}li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_standard]{width:60px;max-height:35px}li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_round_outline]{width:56px;max-height:30px}li.payment_method_stripe_ach label:first-of-type img{width:32px;height:32px;min-width:32px;min-height:32px}.gpay-button:hover{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:active{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:focus{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}@supports (-webkit-appearance:-apple-pay-button){.apple-pay-button{display:block;-webkit-appearance:-apple-pay-button;width:100%;max-width:100%;min-width:200px;height:40px;max-height:40px}.apple-pay-button-black{-apple-pay-button-style:#000}.apple-pay-button-white{-apple-pay-button-style:#fff}.apple-pay-button-white-with-line{-apple-pay-button-style:white-outline}.applepay-top-container .apple-pay-button{max-width:240px}.woocommerce-checkout-payment .apple-pay-button{max-width:240px}body.single-product div.product form.cart .wc_stripe_product_payment_methods .apple-pay-button{max-width:100%}}.wc-stripe-banner-checkout{display:none;padding:20px 15px 0 15px;border:1px solid #d1d1d1;border-width:0 0 1px;position:relative;margin:1em 0}.wc-stripe-banner-checkout.active{display:block}.wc-stripe-banner-checkout span.banner-title{position:absolute;display:flex;align-items:center;top:-13px;right:0;left:0;background:0 0;white-space:nowrap;font-size:16px}.wc-stripe-banner-checkout span.banner-title:after,.wc-stripe-banner-checkout span.banner-title:before{content:' ';height:1px;background:#d1d1d1;display:block;width:50%}.wc-stripe-banner-checkout span.banner-title:before{margin-right:8px}.wc-stripe-banner-checkout span.banner-title:after{margin-left:8px}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways{list-style:none;margin:0;padding:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway{margin:0 0 20px 0;display:none}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-card-info-container{margin:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-card-info-container{width:100%}.wc_stripe_cart_payment_methods .payment_method_stripe_payment_request .StripeElement,.wc_stripe_product_payment_methods .payment_method_stripe_payment_request .StripeElement{padding:0;width:100%}.woocommerce-checkout #wc-stripe-payment-request-container.StripeElement{width:240px;padding:0}.wc-stripe-checkout-banner-gateway #wc-stripe-payment-request-banner.StripeElement{width:100%}ul.payment_methods li.payment_method_stripe_p24 img{max-width:90px;width:90px;max-height:45px}ul.payment_methods li.payment_method_stripe_ideal img{max-width:38px;width:38px;max-height:35px}ul.payment_methods li.payment_method_stripe_fpx img{max-width:75px;width:75px;max-height:25px}ul.payment_methods li.payment_method_stripe_klarna img{max-width:72px;width:72px;max-height:20px}ul.payment_methods li.payment_method_stripe_klarna img[src*=klarna_pink]{width:56px;height:32px;max-height:32px}ul.payment_methods li.payment_method_stripe_giropay img{max-width:65px;width:65px;max-height:28px}ul.payment_methods li.payment_method_stripe_eps img{max-width:70px;width:70px;max-height:46px}ul.payment_methods li.payment_method_stripe_multibanco img{max-width:48px;width:48px;max-height:48px}ul.payment_methods li.payment_method_stripe_sepa img{max-width:67px;width:67px;max-height:18px}ul.payment_methods li.payment_method_stripe_sofort img{max-width:70px;width:70px;max-height:21px}label[for=payment_method_stripe_bancontact] img,ul.payment_methods li.payment_method_stripe_bancontact img{width:60px;height:42px;max-width:60px;max-height:42px}ul.payment_methods li.payment_method_stripe_wechat label img{max-width:82px;width:82px;max-height:23px}ul.payment_methods li.payment_method_stripe_alipay img{max-width:72px;width:72px;height:36px;max-height:36px}ul.payment_methods li.payment_method_stripe_grabpay img{max-width:95px;width:95px;max-height:28px}#wc-stripe-card-element{width:100%}li.banner_payment_method_stripe_payment_request .StripeElement{padding:0}.single-product .blockMsg{border:none!important;background-color:transparent!important}#wc-stripe-card{position:absolute!important;top:50%;right:8px;transform:translatey(-50%);width:23px;height:15px;padding:0;border:none}#wc-stripe-card.active{width:32px;height:20px}input[id=stripe-postal-code]:focus{outline:0;background:0 0;border:none;box-shadow:none}div.postalCode:focus{outline:0;border:none}li[class*=payment_method_stripe] .select2-container .select2-selection--single{height:42px;padding:0 5px}li[class*=payment_method_stripe] .select2-container--default .select2-selection--single .select2-selection__arrow{height:42px;top:1px;right:1px;transform:translateY(0)}.blockUI.blockMsg{font-size:20px;white-space:nowrap}#wc-stripe-payment-request-container.disabled{opacity:.45}.wc-stripe-paymentRequest-icons-container img{float:none}.select2-container .select2-selection--single .wc-stripe-select2-container.wc-stripe-ach:before{display:none}ul.wc_stripe_cart_payment_methods li.wc-stripe-payment-method button,ul.wc_stripe_checkout_banner_gateways li button,ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_] button{margin:0}ul.payment_methods li[class*=payment_method]{margin:0;padding:10px 0}ul.payment_methods li[class*=payment_method] input[name=payment_method]{margin:0 10px 0 5px;float:none}ul.payment_methods li[class*=payment_method]>input[name=payment_method]+label{padding-top:0;padding-right:0;padding-bottom:0}ul.payment_methods{list-style:none}ul.payment_methods li[class*=payment_method_stripe_] .wc-stripe_cc-new-method-container label:before{display:none}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{padding:0!important;margin:0}div[id*=wc_stripe_local_payment_stripe_].StripeElement{border:1px solid #eee;border-radius:4px}.qrcode-message{margin:10px 0 0 0}#wc_stripe_local_payment_stripe_becs,#wc_stripe_local_payment_stripe_sepa{padding:10px 12px;box-shadow:0 1px 3px 0 #e6ebf1}.wc-stripe-local-desc.stripe_becs,.wc-stripe-local-desc.stripe_sepa{margin:10px 0}.wc-stripe-clear{clear:both;height:0;visibility:hidden}.wc-stripe-gateway-desc p{margin:0}#wc_stripe_local_payment_stripe_klarna,li[class*=payment_method_stripe_] div.wc-stripe-gateway-container.has_tokens{margin-top:10px}.wc-stripe-gateway-desc{margin-top:10px}#wc-stripe-card-element.StripeElement--webkit-autofill{background-color:transparent!important}#wc_stripe_local_payment_stripe_klarna .stripe-klarna-categories{list-style:none;margin:0;padding:10px}li.payment_method_stripe_alipay,li.payment_method_stripe_bancontact,li.payment_method_stripe_becs,li.payment_method_stripe_eps,li.payment_method_stripe_fpx,li.payment_method_stripe_giropay,li.payment_method_stripe_ideal,li.payment_method_stripe_klarna,li.payment_method_stripe_multibanco,li.payment_method_stripe_p24,li.payment_method_stripe_sepa,li.payment_method_stripe_sofort,li.payment_method_stripe_wechat{display:none}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods{list-style:none;margin:0;padding:0}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods li{margin:0}.widget_shopping_cart_content a.wc-stripe-applepay-mini-cart,.widget_shopping_cart_content a.wc-stripe-gpay-mini-cart,.widget_shopping_cart_content a.wc-stripe-payment-request-mini-cart{background:0 0;padding:0;border:none}a.wc-stripe-gpay-mini-cart .gpay-button,a.wc-stripe-gpay-mini-cart .gpay-card-info-container a.wc-stripe-applepay-mini-cart .apple-pay-button{width:100%;margin:0}.wc-stripe-payment-request-mini-cart.StripeElement{padding:0;background:0 0;border:none;width:100%}.wc-stripe-payment-request-mini-cart.StripeElement .__PrivateStripeElement{width:100%}.widget_shopping_cart_content .wc-stripe-overlay{display:none!important;position:absolute;background:rgba(255,255,255,.75);height:100%;width:100%;z-index:-1}.widget_shopping_cart_content .wc-stripe-overlay.active{display:block!important;z-index:9999}.wc-stripe-klarna-loader{display:flex;justify-content:center;position:relative;width:100%;height:30px;box-sizing:border-box;transform:scale(.65)}.wc-stripe-klarna-loader div{box-sizing:border-box;display:block;position:absolute;box-sizing:border-box;width:30px;height:30px;border:3px solid #000;border-radius:50%;animation:klarna-payments-loader 1.3s cubic-bezier(.5,0,.5,1) infinite;border-color:#000 transparent transparent transparent}.wc-stripe-klarna-loader div:nth-child(1){animation-delay:-.45s}.wc-stripe-klarna-loader div:nth-child(2){animation-delay:-.3s}.wc-stripe-klarna-loader div:nth-child(3){animation-delay:-.15s}@keyframes klarna-payments-loader{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}li.payment_method_stripe_alipay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_applepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_bancontact.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_eps.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_giropay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_googlepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_grabpay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_multibanco.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_p24.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_payment_request.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_sofort.wc-stripe-no-desc .payment_box.wc-stripe-no-methods{padding:0;margin:0}.wc-stripe-shortcode-cart-buttons .wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or{display:none}li[class*=payment_method_stripe_] style{display:none}
|
1 |
+
.wc-stripe-card-icons-container,.wc-stripe-paymentRequest-icons-container{float:right;display:inline-block}ul.payment_methods li[class*=payment_method]{margin:0;padding:0}li[class*=payment_method] input[type=radio]{margin:0 10px 0 5px}li[class*=payment_method] input[type=radio]+label:not(.wc-stripe-label-payment-type){margin:0}.woocommerce-checkout #payment ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n+2),ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n+2){margin:0}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon,li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img{max-width:43px;max-height:26px;width:43px;height:26px;float:none;display:inline}li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img{width:25px;height:25px;max-width:25px;max-height:25px}ul.payment_methods label[for*=payment_method_stripe]:after{clear:right;content:"";display:block}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon:nth-child(2n+2){margin:0 2px}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon.open.visa{padding-top:2px}ul.payment_methods li[class*=payment_method_stripe_] label>img:first-of-type{float:right!important}.wc-stripe_cc-new-method-container{margin-bottom:1em}.wc-stripe_cc-container .StripeElement{box-sizing:border-box;height:40px;padding:10px 12px;border-radius:4px;background-color:#fff;-webkit-transition:box-shadow 150ms ease;transition:box-shadow 150ms ease}input.wc-stripe-klarna-category,input.wc-stripe-payment-type{display:none!important}body .wfacp_main_form.woocommerce .wc-stripe-save-source label.checkbox{padding:0!important}input[type=radio]+label.wc-stripe-label-payment-type,label.wc-stripe-label-klarna-category,label.wc-stripe-label-payment-type{margin-bottom:1em;display:block;padding:0!important;color:#000}.theme-flatsome div.wc-stripe-saved-methods-container{margin:0 0 1em 0}label.wc-stripe-label-klarna-category:before,label.wc-stripe-label-payment-type:before{content:"";display:inline-block;width:11px;height:11px;border:2px solid #fff;box-shadow:0 0 0 2px #000;background:#fff;margin-left:4px;margin-right:.5em;border-radius:100%;-webkit-transform:translateY(2px);-ms-transform:translateY(2px);transform:translateY(2px)}input.wc-stripe-klarna-category:checked+label.wc-stripe-label-klarna-category:before,input.wc-stripe-payment-type:checked+label.wc-stripe-label-payment-type:before{background:#000}label.wc-stripe-label-payment-type:after{content:none!important;display:none!important}.wc-stripe-saved-methods-container .select2-container .select2-selection--single .select2-selection__rendered{padding-left:8px}.select2-results__options li.wc-stripe-select2-container,.wc-stripe-saved-methods-container .select2-container .select2-selection--single .wc-stripe-select2-container{display:flex;align-items:center;height:42px;line-height:42px!important}.select2-container .select2-selection--single .wc-stripe-select2-container:before,.select2-results__options li.wc-stripe-select2-container:before{content:'';background-repeat:no-repeat;background-size:40px 24px;width:40px;height:42px;display:inline-block;margin-right:8px;background-position:center}.select2-container .select2-selection--single .wc-stripe-select2-container.visa:before,.select2-results__options li.wc-stripe-select2-container.visa:before{background-image:url(../img/cards/visa.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,.select2-results__options li.wc-stripe-select2-container.mastercard:before{background-image:url(../img/cards/mastercard.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.americanexpress:before,.select2-results__options li.wc-stripe-select2-container.americanexpress:before{background-image:url(../img/cards/amex.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.amex:before,.select2-results__options li.wc-stripe-select2-container.amex:before{background-image:url(../img/cards/amex.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.discover:before,.select2-results__options li.wc-stripe-select2-container.discover:before{background-image:url(../img/cards/discover.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,.select2-results__options li.wc-stripe-select2-container.mastercard:before{background-image:url(../img/cards/mastercard.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.dinersclub:before,.select2-results__options li.wc-stripe-select2-container.dinersclub:before{background-image:url(../img/cards/diners.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.diners:before,.select2-results__options li.wc-stripe-select2-container.diners:before{background-image:url(../img/cards/diners.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.jcb:before,.select2-results__options li.wc-stripe-select2-container.jcb:before{background-image:url(../img/cards/jcb.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.stripe_sepa:before,.select2-results__options li.wc-stripe-select2-container.stripe_sepa:before{background-image:url(../img/sepa.svg)}.select2-results__options li.wc-stripe-select2-container.wc-stripe-ach:before{display:none}#wc-stripe-card-element{margin-bottom:1em}.wc-stripe_cc-new-method-container .wc-stripe-save-source{display:flex;align-items:center;justify-content:flex-start}.wc-stripe_cc-container .wc-stripe-save-source .save-source-label{display:block;padding:0;margin:0 0 0 5px}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]{opacity:0;position:absolute;width:20px;height:20px}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{position:relative}.wc-stripe_cc-container .save-source-checkbox{height:20px;width:20px;position:relative;background-color:#fff;display:block;border-radius:3px;border:1px solid #bababa}.wc-stripe_cc-container .save-source-checkbox:after{content:"";position:absolute;top:0;left:0}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]:checked+.save-source-checkbox:after{left:6px;top:2px;width:7px;height:12px;border:solid #2196f3;border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}li.payment_method_stripe_applepay,li.payment_method_stripe_googlepay,li.payment_method_stripe_payment_request{display:none}#payment #place_order.wc-stripe-hide,#place_order.wc-stripe-hide,.woocommerce-checkout-review-order #payment #place_order.wc-stripe-hide{position:absolute!important;z-index:-1000!important;height:0!important;padding:0!important;opacity:0!important}.wc-stripe-product-checkout-container{display:none;width:100%}.wc-stripe-product-checkout-container.bottom{margin-top:1em}.wc-stripe-product-checkout-container.top{margin-bottom:1em}.wc-stripe-product-checkout-container.active{display:block}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods,.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods{list-style:none;margin:0;padding:0}.wc-stripe-cart-checkout-container{margin:0;padding:0;clear:both}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods{margin-bottom:1.5em}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_],.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]{margin:0 0 1em 0}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_]:last-child,.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]:last-child{margin:0}.wc_stripe_cart_payment_methods .gpay-button,.wc_stripe_cart_payment_methods .gpay-card-info-container,.wc_stripe_product_payment_methods .gpay-button,.wc_stripe_product_payment_methods .gpay-card-info-container{width:100%!important;margin:0}.wc_stripe_product_payment_methods .disabled{opacity:.45}.stripe_cart_gateway_active .checkout-button,.woocommerce-cart .stripe_cart_gateway_active .wc-proceed-to-checkout .checkout-button{margin-bottom:0}.wc-stripe-cart-or{margin:1em 0;text-align:center}li.wc-stripe-payment-method.or{display:none}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or{display:block;margin:15px 0}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or p{margin:0}li[class*=payment_method_stripe_].active~li.wc-stripe-payment-method.or{display:block;margin:0}li.payment_method_stripe_applepay label:first-of-type img{width:49px;max-height:32px}li.payment_method_stripe_googlepay label:first-of-type img{width:48px;max-height:35px}li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_standard]{width:60px;max-height:35px}li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_round_outline]{width:56px;max-height:30px}li.payment_method_stripe_ach label:first-of-type img{width:32px;height:32px;min-width:32px;min-height:32px}.gpay-button:hover{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:active{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:focus{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}@supports (-webkit-appearance:-apple-pay-button){.apple-pay-button{display:block;-webkit-appearance:-apple-pay-button!important;width:100%;max-width:100%;min-width:200px;height:40px;max-height:40px}.apple-pay-button-black{-apple-pay-button-style:#000}.apple-pay-button-white{-apple-pay-button-style:#fff}.apple-pay-button-white-with-line{-apple-pay-button-style:white-outline}.applepay-top-container .apple-pay-button{max-width:240px}.woocommerce-checkout-payment .apple-pay-button{max-width:240px}body.single-product div.product form.cart .wc_stripe_product_payment_methods .apple-pay-button{max-width:100%}}.wc-stripe-banner-checkout{display:none;padding:20px 15px 0 15px;border:1px solid #d1d1d1;border-width:0 0 1px;position:relative;margin:1em 0}.wc-stripe-banner-checkout.active{display:block}.wc-stripe-banner-checkout span.banner-title{position:absolute;display:flex;align-items:center;top:-13px;right:0;left:0;background:0 0;white-space:nowrap;font-size:16px}.wc-stripe-banner-checkout span.banner-title:after,.wc-stripe-banner-checkout span.banner-title:before{content:' ';height:1px;background:#d1d1d1;display:block;width:50%}.wc-stripe-banner-checkout span.banner-title:before{margin-right:8px}.wc-stripe-banner-checkout span.banner-title:after{margin-left:8px}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways{list-style:none;margin:0;padding:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway{margin:0 0 20px 0;display:none}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-card-info-container{margin:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-card-info-container{width:100%}.wc_stripe_cart_payment_methods .payment_method_stripe_payment_request .StripeElement,.wc_stripe_product_payment_methods .payment_method_stripe_payment_request .StripeElement{padding:0;width:100%}.woocommerce-checkout #wc-stripe-payment-request-container.StripeElement{width:240px;padding:0}.wc-stripe-checkout-banner-gateway #wc-stripe-payment-request-banner.StripeElement{width:100%}ul.payment_methods li.payment_method_stripe_p24 img{max-width:90px;width:90px;max-height:45px}ul.payment_methods li.payment_method_stripe_ideal img{max-width:38px;width:38px;max-height:35px}ul.payment_methods li.payment_method_stripe_fpx img{max-width:75px;width:75px;max-height:25px}ul.payment_methods li.payment_method_stripe_klarna img{max-width:72px;width:72px;max-height:20px}ul.payment_methods li.payment_method_stripe_klarna img[src*=klarna_pink]{width:56px;height:32px;max-height:32px}ul.payment_methods li.payment_method_stripe_giropay img{max-width:65px;width:65px;max-height:28px}ul.payment_methods li.payment_method_stripe_eps img{max-width:70px;width:70px;max-height:46px}ul.payment_methods li.payment_method_stripe_multibanco img{max-width:48px;width:48px;max-height:48px}ul.payment_methods li.payment_method_stripe_sepa img{max-width:67px;width:67px;max-height:18px}ul.payment_methods li.payment_method_stripe_sofort img{max-width:70px;width:70px;max-height:21px}label[for=payment_method_stripe_bancontact] img,ul.payment_methods li.payment_method_stripe_bancontact img{width:60px;height:42px;max-width:60px;max-height:42px}ul.payment_methods li.payment_method_stripe_wechat label img{max-width:82px;width:82px;max-height:23px}ul.payment_methods li.payment_method_stripe_alipay img{max-width:72px;width:72px;height:36px;max-height:36px}ul.payment_methods li.payment_method_stripe_grabpay img{max-width:95px;width:95px;max-height:28px}#wc-stripe-card-element{width:100%}li.banner_payment_method_stripe_payment_request .StripeElement{padding:0}.single-product .blockMsg{border:none!important;background-color:transparent!important}#wc-stripe-card{position:absolute!important;top:50%;right:8px;transform:translatey(-50%);width:23px;height:15px;padding:0;border:none}#wc-stripe-card.active{width:32px;height:20px}input[id=stripe-postal-code]:focus{outline:0;background:0 0;border:none;box-shadow:none}div.postalCode:focus{outline:0;border:none}li[class*=payment_method_stripe] .select2-container .select2-selection--single{height:42px;padding:0 5px}li[class*=payment_method_stripe] .select2-container--default .select2-selection--single .select2-selection__arrow{height:42px;top:1px;right:1px;transform:translateY(0)}.blockUI.blockMsg{font-size:20px;white-space:nowrap}#wc-stripe-payment-request-container.disabled{opacity:.45}.wc-stripe-paymentRequest-icons-container img{float:none}.select2-container .select2-selection--single .wc-stripe-select2-container.wc-stripe-ach:before{display:none}ul.wc_stripe_cart_payment_methods li.wc-stripe-payment-method button,ul.wc_stripe_checkout_banner_gateways li button,ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_] button{margin:0}ul.payment_methods li[class*=payment_method]{margin:0;padding:10px 0}ul.payment_methods li[class*=payment_method] input[name=payment_method]{margin:0 10px 0 5px;float:none}ul.payment_methods li[class*=payment_method]>input[name=payment_method]+label{padding-top:0;padding-right:0;padding-bottom:0}ul.payment_methods{list-style:none}ul.payment_methods li[class*=payment_method_stripe_] .wc-stripe_cc-new-method-container label:before{display:none}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{padding:0!important;margin:0}div[id*=wc_stripe_local_payment_stripe_].StripeElement{border:1px solid #eee;border-radius:4px}.qrcode-message{margin:10px 0 0 0}#wc_stripe_local_payment_stripe_becs,#wc_stripe_local_payment_stripe_sepa{padding:10px 12px;box-shadow:0 1px 3px 0 #e6ebf1}.wc-stripe-local-desc.stripe_becs,.wc-stripe-local-desc.stripe_sepa{margin:10px 0}.wc-stripe-clear{clear:both;height:0;visibility:hidden}.wc-stripe-gateway-desc p{margin:0}#wc_stripe_local_payment_stripe_klarna,li[class*=payment_method_stripe_] div.wc-stripe-gateway-container.has_tokens{margin-top:10px}.wc-stripe-gateway-desc{margin-top:10px}#wc-stripe-card-element.StripeElement--webkit-autofill{background-color:transparent!important}#wc_stripe_local_payment_stripe_klarna .stripe-klarna-categories{list-style:none;margin:0;padding:10px}li.payment_method_stripe_alipay,li.payment_method_stripe_bancontact,li.payment_method_stripe_becs,li.payment_method_stripe_eps,li.payment_method_stripe_fpx,li.payment_method_stripe_giropay,li.payment_method_stripe_ideal,li.payment_method_stripe_klarna,li.payment_method_stripe_multibanco,li.payment_method_stripe_p24,li.payment_method_stripe_sepa,li.payment_method_stripe_sofort,li.payment_method_stripe_wechat{display:none}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods{list-style:none;margin:0;padding:0}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods li{margin:0}.widget_shopping_cart_content a.wc-stripe-applepay-mini-cart,.widget_shopping_cart_content a.wc-stripe-gpay-mini-cart,.widget_shopping_cart_content a.wc-stripe-payment-request-mini-cart{background:0 0;padding:0;border:none}a.wc-stripe-gpay-mini-cart .gpay-button,a.wc-stripe-gpay-mini-cart .gpay-card-info-container a.wc-stripe-applepay-mini-cart .apple-pay-button{width:100%;margin:0}.wc-stripe-payment-request-mini-cart.StripeElement{padding:0;background:0 0;border:none;width:100%}.wc-stripe-payment-request-mini-cart.StripeElement .__PrivateStripeElement{width:100%}.widget_shopping_cart_content .wc-stripe-overlay{display:none!important;position:absolute;background:rgba(255,255,255,.75);height:100%;width:100%;z-index:-1}.widget_shopping_cart_content .wc-stripe-overlay.active{display:block!important;z-index:9999}.wc-stripe-klarna-loader{display:flex;justify-content:center;position:relative;width:100%;height:30px;box-sizing:border-box;transform:scale(.65)}.wc-stripe-klarna-loader div{box-sizing:border-box;display:block;position:absolute;box-sizing:border-box;width:30px;height:30px;border:3px solid #000;border-radius:50%;animation:klarna-payments-loader 1.3s cubic-bezier(.5,0,.5,1) infinite;border-color:#000 transparent transparent transparent}.wc-stripe-klarna-loader div:nth-child(1){animation-delay:-.45s}.wc-stripe-klarna-loader div:nth-child(2){animation-delay:-.3s}.wc-stripe-klarna-loader div:nth-child(3){animation-delay:-.15s}@keyframes klarna-payments-loader{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}li.payment_method_stripe_alipay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_applepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_bancontact.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_eps.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_giropay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_googlepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_grabpay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_multibanco.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_p24.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_payment_request.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_sofort.wc-stripe-no-desc .payment_box.wc-stripe-no-methods{padding:0;margin:0}.wc-stripe-paymentRequest-icons-container,.wc-stripe-shortcode-cart-buttons .wc-stripe-card-icons-container{float:right;display:inline-block}ul.payment_methods li[class*=payment_method]{margin:0;padding:0}li[class*=payment_method] input[type=radio]{margin:0 10px 0 5px}li[class*=payment_method] input[type=radio]+label:not(.wc-stripe-label-payment-type){margin:0}.woocommerce-checkout #payment ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n+2),ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n+2){margin:0}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon,li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img{max-width:43px;max-height:26px;width:43px;height:26px;float:none;display:inline}li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img{width:25px;height:25px;max-width:25px;max-height:25px}ul.payment_methods label[for*=payment_method_stripe]:after{clear:right;content:"";display:block}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon:nth-child(2n+2){margin:0 2px}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon.open.visa{padding-top:2px}ul.payment_methods li[class*=payment_method_stripe_] label>img:first-of-type{float:right!important}.wc-stripe_cc-new-method-container{margin-bottom:1em}.wc-stripe_cc-container .StripeElement{box-sizing:border-box;height:40px;padding:10px 12px;border-radius:4px;background-color:#fff;-webkit-transition:box-shadow 150ms ease;transition:box-shadow 150ms ease}input.wc-stripe-klarna-category,input.wc-stripe-payment-type{display:none!important}body .wfacp_main_form.woocommerce .wc-stripe-save-source label.checkbox{padding:0!important}input[type=radio]+label.wc-stripe-label-payment-type,label.wc-stripe-label-klarna-category,label.wc-stripe-label-payment-type{margin-bottom:1em;display:block;padding:0!important;color:#000}.theme-flatsome div.wc-stripe-saved-methods-container{margin:0 0 1em 0}label.wc-stripe-label-klarna-category:before,label.wc-stripe-label-payment-type:before{content:"";display:inline-block;width:11px;height:11px;border:2px solid #fff;box-shadow:0 0 0 2px #000;background:#fff;margin-left:4px;margin-right:.5em;border-radius:100%;-webkit-transform:translateY(2px);-ms-transform:translateY(2px);transform:translateY(2px)}input.wc-stripe-klarna-category:checked+label.wc-stripe-label-klarna-category:before,input.wc-stripe-payment-type:checked+label.wc-stripe-label-payment-type:before{background:#000}label.wc-stripe-label-payment-type:after{content:none!important;display:none!important}.wc-stripe-saved-methods-container .select2-container .select2-selection--single .select2-selection__rendered{padding-left:8px}.select2-results__options li.wc-stripe-select2-container,.wc-stripe-saved-methods-container .select2-container .select2-selection--single .wc-stripe-select2-container{display:flex;align-items:center;height:42px;line-height:42px!important}.select2-container .select2-selection--single .wc-stripe-select2-container:before,.select2-results__options li.wc-stripe-select2-container:before{content:'';background-repeat:no-repeat;background-size:40px 24px;width:40px;height:42px;display:inline-block;margin-right:8px;background-position:center}.select2-container .select2-selection--single .wc-stripe-select2-container.visa:before,.select2-results__options li.wc-stripe-select2-container.visa:before{background-image:url(../img/cards/visa.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,.select2-results__options li.wc-stripe-select2-container.mastercard:before{background-image:url(../img/cards/mastercard.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.americanexpress:before,.select2-results__options li.wc-stripe-select2-container.americanexpress:before{background-image:url(../img/cards/amex.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.amex:before,.select2-results__options li.wc-stripe-select2-container.amex:before{background-image:url(../img/cards/amex.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.discover:before,.select2-results__options li.wc-stripe-select2-container.discover:before{background-image:url(../img/cards/discover.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,.select2-results__options li.wc-stripe-select2-container.mastercard:before{background-image:url(../img/cards/mastercard.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.dinersclub:before,.select2-results__options li.wc-stripe-select2-container.dinersclub:before{background-image:url(../img/cards/diners.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.diners:before,.select2-results__options li.wc-stripe-select2-container.diners:before{background-image:url(../img/cards/diners.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.jcb:before,.select2-results__options li.wc-stripe-select2-container.jcb:before{background-image:url(../img/cards/jcb.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.stripe_sepa:before,.select2-results__options li.wc-stripe-select2-container.stripe_sepa:before{background-image:url(../img/sepa.svg)}.select2-results__options li.wc-stripe-select2-container.wc-stripe-ach:before{display:none}#wc-stripe-card-element{margin-bottom:1em}.wc-stripe_cc-new-method-container .wc-stripe-save-source{display:flex;align-items:center;justify-content:flex-start}.wc-stripe_cc-container .wc-stripe-save-source .save-source-label{display:block;padding:0;margin:0 0 0 5px}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]{opacity:0;position:absolute;width:20px;height:20px}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{position:relative}.wc-stripe_cc-container .save-source-checkbox{height:20px;width:20px;position:relative;background-color:#fff;display:block;border-radius:3px;border:1px solid #bababa}.wc-stripe_cc-container .save-source-checkbox:after{content:"";position:absolute;top:0;left:0}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]:checked+.save-source-checkbox:after{left:6px;top:2px;width:7px;height:12px;border:solid #2196f3;border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}li.payment_method_stripe_applepay,li.payment_method_stripe_googlepay,li.payment_method_stripe_payment_request{display:none}#payment #place_order.wc-stripe-hide,#place_order.wc-stripe-hide,.woocommerce-checkout-review-order #payment #place_order.wc-stripe-hide{position:absolute!important;z-index:-1000!important;height:0!important;padding:0!important;opacity:0!important}.wc-stripe-product-checkout-container{display:none;width:100%}.wc-stripe-product-checkout-container.bottom{margin-top:1em}.wc-stripe-product-checkout-container.top{margin-bottom:1em}.wc-stripe-product-checkout-container.active{display:block}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods,.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods{list-style:none;margin:0;padding:0}.wc-stripe-cart-checkout-container{margin:0;padding:0;clear:both}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods{margin-bottom:1.5em}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_],.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]{margin:0 0 1em 0}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_]:last-child,.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]:last-child{margin:0}.wc_stripe_cart_payment_methods .gpay-button,.wc_stripe_cart_payment_methods .gpay-card-info-container,.wc_stripe_product_payment_methods .gpay-button,.wc_stripe_product_payment_methods .gpay-card-info-container{width:100%!important;margin:0}.wc_stripe_product_payment_methods .disabled{opacity:.45}.stripe_cart_gateway_active .checkout-button,.woocommerce-cart .stripe_cart_gateway_active .wc-proceed-to-checkout .checkout-button{margin-bottom:0}.wc-stripe-cart-or{margin:1em 0;text-align:center}li.wc-stripe-payment-method.or{display:none}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or{display:block;margin:15px 0}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or p{margin:0}li[class*=payment_method_stripe_].active~li.wc-stripe-payment-method.or{display:block;margin:0}li.payment_method_stripe_applepay label:first-of-type img{width:49px;max-height:32px}li.payment_method_stripe_googlepay label:first-of-type img{width:48px;max-height:35px}li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_standard]{width:60px;max-height:35px}li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_round_outline]{width:56px;max-height:30px}li.payment_method_stripe_ach label:first-of-type img{width:32px;height:32px;min-width:32px;min-height:32px}.gpay-button:hover{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:active{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:focus{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}@supports (-webkit-appearance:-apple-pay-button){.apple-pay-button{display:block;-webkit-appearance:-apple-pay-button;width:100%;max-width:100%;min-width:200px;height:40px;max-height:40px}.apple-pay-button-black{-apple-pay-button-style:#000}.apple-pay-button-white{-apple-pay-button-style:#fff}.apple-pay-button-white-with-line{-apple-pay-button-style:white-outline}.applepay-top-container .apple-pay-button{max-width:240px}.woocommerce-checkout-payment .apple-pay-button{max-width:240px}body.single-product div.product form.cart .wc_stripe_product_payment_methods .apple-pay-button{max-width:100%}}.wc-stripe-banner-checkout{display:none;padding:20px 15px 0 15px;border:1px solid #d1d1d1;border-width:0 0 1px;position:relative;margin:1em 0}.wc-stripe-banner-checkout.active{display:block}.wc-stripe-banner-checkout span.banner-title{position:absolute;display:flex;align-items:center;top:-13px;right:0;left:0;background:0 0;white-space:nowrap;font-size:16px}.wc-stripe-banner-checkout span.banner-title:after,.wc-stripe-banner-checkout span.banner-title:before{content:' ';height:1px;background:#d1d1d1;display:block;width:50%}.wc-stripe-banner-checkout span.banner-title:before{margin-right:8px}.wc-stripe-banner-checkout span.banner-title:after{margin-left:8px}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways{list-style:none;margin:0;padding:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway{margin:0 0 20px 0;display:none}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-card-info-container{margin:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-card-info-container{width:100%}.wc_stripe_cart_payment_methods .payment_method_stripe_payment_request .StripeElement,.wc_stripe_product_payment_methods .payment_method_stripe_payment_request .StripeElement{padding:0;width:100%}.woocommerce-checkout #wc-stripe-payment-request-container.StripeElement{width:240px;padding:0}.wc-stripe-checkout-banner-gateway #wc-stripe-payment-request-banner.StripeElement{width:100%}ul.payment_methods li.payment_method_stripe_p24 img{max-width:90px;width:90px;max-height:45px}ul.payment_methods li.payment_method_stripe_ideal img{max-width:38px;width:38px;max-height:35px}ul.payment_methods li.payment_method_stripe_fpx img{max-width:75px;width:75px;max-height:25px}ul.payment_methods li.payment_method_stripe_klarna img{max-width:72px;width:72px;max-height:20px}ul.payment_methods li.payment_method_stripe_klarna img[src*=klarna_pink]{width:54px;height:30px;max-height:32px}ul.payment_methods li.payment_method_stripe_giropay img{max-width:65px;width:65px;max-height:28px}ul.payment_methods li.payment_method_stripe_eps img{max-width:70px;width:70px;max-height:46px}ul.payment_methods li.payment_method_stripe_multibanco img{max-width:48px;width:48px;max-height:48px}ul.payment_methods li.payment_method_stripe_sepa img{max-width:67px;width:67px;max-height:18px}ul.payment_methods li.payment_method_stripe_sofort img{max-width:70px;width:70px;max-height:21px}label[for=payment_method_stripe_bancontact] img,ul.payment_methods li.payment_method_stripe_bancontact img{width:60px;height:42px;max-width:60px;max-height:42px}ul.payment_methods li.payment_method_stripe_wechat label img{max-width:82px;width:82px;max-height:23px}ul.payment_methods li.payment_method_stripe_alipay img{max-width:72px;width:72px;height:36px;max-height:36px}ul.payment_methods li.payment_method_stripe_grabpay img{max-width:95px;width:95px;max-height:28px}#wc-stripe-card-element{width:100%}li.banner_payment_method_stripe_payment_request .StripeElement{padding:0}.single-product .blockMsg{border:none!important;background-color:transparent!important}#wc-stripe-card{position:absolute!important;top:50%;right:8px;transform:translatey(-50%);width:23px;height:15px;padding:0;border:none}#wc-stripe-card.active{width:32px;height:20px}input[id=stripe-postal-code]:focus{outline:0;background:0 0;border:none;box-shadow:none}div.postalCode:focus{outline:0;border:none}li[class*=payment_method_stripe] .select2-container .select2-selection--single{height:42px;padding:0 5px}li[class*=payment_method_stripe] .select2-container--default .select2-selection--single .select2-selection__arrow{height:42px;top:1px;right:1px;transform:translateY(0)}.blockUI.blockMsg{font-size:20px;white-space:nowrap}#wc-stripe-payment-request-container.disabled{opacity:.45}.wc-stripe-paymentRequest-icons-container img{float:none}.select2-container .select2-selection--single .wc-stripe-select2-container.wc-stripe-ach:before{display:none}ul.wc_stripe_cart_payment_methods li.wc-stripe-payment-method button,ul.wc_stripe_checkout_banner_gateways li button,ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_] button{margin:0}ul.payment_methods li[class*=payment_method]{margin:0;padding:10px 0}ul.payment_methods li[class*=payment_method] input[name=payment_method]{margin:0 10px 0 5px;float:none}ul.payment_methods li[class*=payment_method]>input[name=payment_method]+label{padding-top:0;padding-right:0;padding-bottom:0}ul.payment_methods{list-style:none}ul.payment_methods li[class*=payment_method_stripe_] .wc-stripe_cc-new-method-container label:before{display:none}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{padding:0!important;margin:0}div[id*=wc_stripe_local_payment_stripe_].StripeElement{border:1px solid #eee;border-radius:4px}.qrcode-message{margin:10px 0 0 0}#wc_stripe_local_payment_stripe_becs,#wc_stripe_local_payment_stripe_sepa{padding:10px 12px;box-shadow:0 1px 3px 0 #e6ebf1}.wc-stripe-local-desc.stripe_becs,.wc-stripe-local-desc.stripe_sepa{margin:10px 0}.wc-stripe-clear{clear:both;height:0;visibility:hidden}.wc-stripe-gateway-desc p{margin:0}#wc_stripe_local_payment_stripe_klarna,li[class*=payment_method_stripe_] div.wc-stripe-gateway-container.has_tokens{margin-top:10px}.wc-stripe-gateway-desc{margin-top:10px}#wc-stripe-card-element.StripeElement--webkit-autofill{background-color:transparent!important}#wc_stripe_local_payment_stripe_klarna .stripe-klarna-categories{list-style:none;margin:0;padding:10px}li.payment_method_stripe_alipay,li.payment_method_stripe_bancontact,li.payment_method_stripe_becs,li.payment_method_stripe_eps,li.payment_method_stripe_fpx,li.payment_method_stripe_giropay,li.payment_method_stripe_ideal,li.payment_method_stripe_klarna,li.payment_method_stripe_multibanco,li.payment_method_stripe_p24,li.payment_method_stripe_sepa,li.payment_method_stripe_sofort,li.payment_method_stripe_wechat{display:none}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods{list-style:none;margin:0;padding:0}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods li{margin:0}.widget_shopping_cart_content a.wc-stripe-applepay-mini-cart,.widget_shopping_cart_content a.wc-stripe-gpay-mini-cart,.widget_shopping_cart_content a.wc-stripe-payment-request-mini-cart{background:0 0;padding:0;border:none}a.wc-stripe-gpay-mini-cart .gpay-button,a.wc-stripe-gpay-mini-cart .gpay-card-info-container a.wc-stripe-applepay-mini-cart .apple-pay-button{width:100%;margin:0}.wc-stripe-payment-request-mini-cart.StripeElement{padding:0;background:0 0;border:none;width:100%}.wc-stripe-payment-request-mini-cart.StripeElement .__PrivateStripeElement{width:100%}.widget_shopping_cart_content .wc-stripe-overlay{display:none!important;position:absolute;background:rgba(255,255,255,.75);height:100%;width:100%;z-index:-1}.widget_shopping_cart_content .wc-stripe-overlay.active{display:block!important;z-index:9999}.wc-stripe-klarna-loader{display:flex;justify-content:center;position:relative;width:100%;height:30px;box-sizing:border-box;transform:scale(.65)}.wc-stripe-klarna-loader div{box-sizing:border-box;display:block;position:absolute;box-sizing:border-box;width:30px;height:30px;border:3px solid #000;border-radius:50%;animation:klarna-payments-loader 1.3s cubic-bezier(.5,0,.5,1) infinite;border-color:#000 transparent transparent transparent}.wc-stripe-klarna-loader div:nth-child(1){animation-delay:-.45s}.wc-stripe-klarna-loader div:nth-child(2){animation-delay:-.3s}.wc-stripe-klarna-loader div:nth-child(3){animation-delay:-.15s}@keyframes klarna-payments-loader{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}li.payment_method_stripe_alipay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_applepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_bancontact.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_eps.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_giropay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_googlepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_grabpay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_multibanco.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_p24.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_payment_request.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_sofort.wc-stripe-no-desc .payment_box.wc-stripe-no-methods{padding:0;margin:0}.wc-stripe-shortcode-cart-buttons .wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or{display:none}li[class*=payment_method_stripe_] style{display:none}ul.payment_methods li[class*=payment_method]>input[name=payment_method]+label[for=payment_method_stripe_afterpay]{display:flex;align-items:center}#wc-stripe-afterpay-cart-container #wc-stripe-afterpay-cart-msg .__PrivateStripeElement p,#wc-stripe-afterpay-product-msg .__PrivateStripeElement p,.payment_method_stripe_afterpay #wc-stripe-afterpay-msg .__PrivateStripeElement p{margin-bottom:0!important;margin-top:0!important}#wc-stripe-afterpay-cart-msg .__PrivateStripeElement p .AfterpayMessage-logo,.payment_method_stripe_afterpay #wc-stripe-afterpay-msg .__PrivateStripeElement p .AfterpayMessage-logo{vertical-align:middle}.payment_method_stripe_afterpay #wc_stripe_local_payment_stripe_afterpay.ineligible{display:none}.payment_method_stripe_afterpay .wc-stripe-afterpay__offsite{text-align:center;max-width:320px;margin:0 auto;padding:10px 0}.payment_method_stripe_afterpay .wc-stripe-afterpay__offsite img{display:inline-block}.payment_method_stripe_afterpay .wc-stripe-afterpay__offsite p{font-size:14px;margin-top:10px}#wc-stripe-afterpay-cart-container #wc-stripe-afterpay-cart-msg{text-align:left}#wc-stripe-afterpay-cart-container #wc-stripe-afterpay-cart-msg .AfterpayMessage-logoSvg,.payment_method_stripe_afterpay #wc-stripe-afterpay-msg .AfterpayMessage-logoSvg{min-width:64px;max-width:90px}#wc-stripe-afterpay-cart-container td{border:none}#wc-stripe-afterpay-cart-container td::before{content:''}.AfterpayMessage-logoSvg{display:inline-block}#wc-stripe-afterpay-product-msg{font-size:14px}#wc-stripe-afterpay-product-msg .AfterpayMessage-logoSvg{max-width:80px;min-width:64px}
|
assets/img/offsite.svg
ADDED
@@ -0,0 +1 @@
|
|
Â
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="102" height="52" viewBox="-270.8 371 102 52" enable-background="new -270.8 371 102 52"><path stroke="#B2B2B2" stroke-width="2" stroke-miterlimit="10" d="M-182 404v16.8c0 .7-.4 1.2-1 1.2h-75.7c-.7 0-1.2-.6-1.2-1.2v-47.6c0-.7.6-1.2 1.2-1.2h75.7c.7 0 1 .6 1 1.2v21.8m-78-14h78m-17 18h27m-3.9-4.6l4.5 4.6-4.5 4.6" fill="none"/><circle fill="#B2B2B2" cx="-255.5" cy="376.5" r="1.5"/><circle fill="#B2B2B2" cx="-250.5" cy="376.5" r="1.5"/><circle fill="#B2B2B2" cx="-245.5" cy="376.5" r="1.5"/></svg>
|
assets/js/frontend/afterpay.js
ADDED
@@ -0,0 +1,121 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
(function ($, wc_stripe) {
|
2 |
+
|
3 |
+
function Utils() {
|
4 |
+
}
|
5 |
+
|
6 |
+
Utils.prototype.add_eligibility = function (selector) {
|
7 |
+
if ($(selector).length) {
|
8 |
+
if (this.needs_shipping()) {
|
9 |
+
$(selector).removeClass('ineligible');
|
10 |
+
} else {
|
11 |
+
$(selector).addClass('ineligible');
|
12 |
+
}
|
13 |
+
}
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Product page integration
|
18 |
+
* @constructor
|
19 |
+
*/
|
20 |
+
function AfterpayProduct(params) {
|
21 |
+
wc_stripe.BaseGateway.call(this, params);
|
22 |
+
wc_stripe.ProductGateway.call(this);
|
23 |
+
$(document.body).on('change', '[name="quantity"]', this.mount_message.bind(this, true));
|
24 |
+
}
|
25 |
+
|
26 |
+
AfterpayProduct.prototype = $.extend({}, wc_stripe.BaseGateway.prototype, wc_stripe.ProductGateway.prototype, Utils.prototype);
|
27 |
+
|
28 |
+
AfterpayProduct.prototype.initialize = function () {
|
29 |
+
if (!this.msgElement) {
|
30 |
+
this.create_element();
|
31 |
+
this.mount_message();
|
32 |
+
this.add_eligibility('#wc-stripe-afterpay-product-msg');
|
33 |
+
}
|
34 |
+
}
|
35 |
+
|
36 |
+
AfterpayProduct.prototype.get_product_price = function () {
|
37 |
+
var qty = $('[name="quantity"]').val();
|
38 |
+
if (!qty) {
|
39 |
+
qty = 0;
|
40 |
+
}
|
41 |
+
return (this.get_product_data().price * Math.pow(10, 2)) * parseInt(qty);
|
42 |
+
}
|
43 |
+
|
44 |
+
AfterpayProduct.prototype.create_element = function () {
|
45 |
+
this.msgElement = this.elements.create('afterpayClearpayMessage', $.extend({}, this.params.msg_options, {
|
46 |
+
amount: this.get_product_price(),
|
47 |
+
currency: this.get_currency()
|
48 |
+
}));
|
49 |
+
}
|
50 |
+
|
51 |
+
AfterpayProduct.prototype.mount_message = function (update) {
|
52 |
+
if (update && this.msgElement) {
|
53 |
+
this.msgElement.update({
|
54 |
+
amount: this.get_product_price(),
|
55 |
+
currency: this.get_currency(),
|
56 |
+
isEligible: this.needs_shipping()
|
57 |
+
})
|
58 |
+
}
|
59 |
+
var $el = $('#wc-stripe-afterpay-product-msg');
|
60 |
+
if (!$el.length) {
|
61 |
+
$('.summary .price').append('<div id="wc-stripe-afterpay-product-msg"></div>');
|
62 |
+
}
|
63 |
+
this.msgElement.mount('#wc-stripe-afterpay-product-msg');
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Cart page integration
|
68 |
+
* @constructor
|
69 |
+
*/
|
70 |
+
function AfterpayCart(params) {
|
71 |
+
wc_stripe.BaseGateway.call(this, params);
|
72 |
+
wc_stripe.CartGateway.call(this);
|
73 |
+
}
|
74 |
+
|
75 |
+
AfterpayCart.prototype = $.extend({}, wc_stripe.BaseGateway.prototype, wc_stripe.CartGateway.prototype, Utils.prototype);
|
76 |
+
|
77 |
+
AfterpayCart.prototype.initialize = function () {
|
78 |
+
if (!this.msgElement && $(this.container).length) {
|
79 |
+
this.create_element();
|
80 |
+
this.mount_message();
|
81 |
+
this.add_eligibility('#wc-stripe-afterpay-cart-container');
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
AfterpayCart.prototype.create_element = function () {
|
86 |
+
this.msgElement = this.elements.create('afterpayClearpayMessage', $.extend({}, this.params.msg_options, {
|
87 |
+
amount: this.get_total_price_cents(),
|
88 |
+
currency: this.get_currency()
|
89 |
+
}));
|
90 |
+
}
|
91 |
+
|
92 |
+
AfterpayCart.prototype.mount_message = function (update) {
|
93 |
+
if (update && this.msgElement) {
|
94 |
+
this.msgElement.update({
|
95 |
+
amount: this.get_total_price_cents(),
|
96 |
+
currency: this.get_currency(),
|
97 |
+
isEligible: this.needs_shipping()
|
98 |
+
})
|
99 |
+
}
|
100 |
+
var $el = $('#wc-stripe-afterpay-cart-container');
|
101 |
+
if (!$el.length) {
|
102 |
+
$('.cart_totals table.shop_table tbody').append('<tr id="wc-stripe-afterpay-cart-container"><td colspan="2"><div id="wc-stripe-afterpay-cart-msg"></div></td></tr>');
|
103 |
+
}
|
104 |
+
this.msgElement.mount('#wc-stripe-afterpay-cart-msg');
|
105 |
+
}
|
106 |
+
|
107 |
+
AfterpayCart.prototype.updated_html = function () {
|
108 |
+
if (!$(this.container).length) {
|
109 |
+
return;
|
110 |
+
}
|
111 |
+
this.mount_message(true);
|
112 |
+
this.add_eligibility('#wc-stripe-afterpay-cart-container');
|
113 |
+
}
|
114 |
+
|
115 |
+
if (typeof wc_stripe_afterpay_product_params !== 'undefined') {
|
116 |
+
new AfterpayProduct(wc_stripe_afterpay_product_params);
|
117 |
+
} else if (typeof wc_stripe_afterpay_cart_params !== 'undefined') {
|
118 |
+
new AfterpayCart(wc_stripe_afterpay_cart_params);
|
119 |
+
}
|
120 |
+
|
121 |
+
})(jQuery, window.wc_stripe);
|
assets/js/frontend/afterpay.min.js
ADDED
@@ -0,0 +1 @@
|
|
Â
|
1 |
+
!function(e,i){function t(){}function a(t){i.BaseGateway.call(this,t),i.ProductGateway.call(this),e(document.body).on("change",'[name="quantity"]',this.mount_message.bind(this,!0))}function s(t){i.BaseGateway.call(this,t),i.CartGateway.call(this)}t.prototype.add_eligibility=function(t){e(t).length&&(this.needs_shipping()?e(t).removeClass("ineligible"):e(t).addClass("ineligible"))},(a.prototype=e.extend({},i.BaseGateway.prototype,i.ProductGateway.prototype,t.prototype)).initialize=function(){this.msgElement||(this.create_element(),this.mount_message(),this.add_eligibility("#wc-stripe-afterpay-product-msg"))},a.prototype.get_product_price=function(){var t=(t=e('[name="quantity"]').val())||0;return this.get_product_data().price*Math.pow(10,2)*parseInt(t)},a.prototype.create_element=function(){this.msgElement=this.elements.create("afterpayClearpayMessage",e.extend({},this.params.msg_options,{amount:this.get_product_price(),currency:this.get_currency()}))},a.prototype.mount_message=function(t){t&&this.msgElement&&this.msgElement.update({amount:this.get_product_price(),currency:this.get_currency(),isEligible:this.needs_shipping()}),e("#wc-stripe-afterpay-product-msg").length||e(".summary .price").append('<div id="wc-stripe-afterpay-product-msg"></div>'),this.msgElement.mount("#wc-stripe-afterpay-product-msg")},(s.prototype=e.extend({},i.BaseGateway.prototype,i.CartGateway.prototype,t.prototype)).initialize=function(){!this.msgElement&&e(this.container).length&&(this.create_element(),this.mount_message(),this.add_eligibility("#wc-stripe-afterpay-cart-container"))},s.prototype.create_element=function(){this.msgElement=this.elements.create("afterpayClearpayMessage",e.extend({},this.params.msg_options,{amount:this.get_total_price_cents(),currency:this.get_currency()}))},s.prototype.mount_message=function(t){t&&this.msgElement&&this.msgElement.update({amount:this.get_total_price_cents(),currency:this.get_currency(),isEligible:this.needs_shipping()}),e("#wc-stripe-afterpay-cart-container").length||e(".cart_totals table.shop_table tbody").append('<tr id="wc-stripe-afterpay-cart-container"><td colspan="2"><div id="wc-stripe-afterpay-cart-msg"></div></td></tr>'),this.msgElement.mount("#wc-stripe-afterpay-cart-msg")},s.prototype.updated_html=function(){e(this.container).length&&(this.mount_message(!0),this.add_eligibility("#wc-stripe-afterpay-cart-container"))},"undefined"!=typeof wc_stripe_afterpay_product_params?new a(wc_stripe_afterpay_product_params):"undefined"!=typeof wc_stripe_afterpay_cart_params&&new s(wc_stripe_afterpay_cart_params)}(jQuery,window.wc_stripe);
|
assets/js/frontend/local-payment.js
CHANGED
@@ -262,6 +262,14 @@
|
|
262 |
Â
window.addEventListener('hashchange', this.hashChange.bind(this));
|
263 |
Â
}
|
264 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
265 |
Â
/******* Sepa *******/
|
266 |
Â
function Sepa(params) {
|
267 |
Â
this.elementType = 'iban';
|
@@ -300,6 +308,20 @@
|
|
300 |
Â
window.addEventListener('hashchange', this.hashChange.bind(this));
|
301 |
Â
}
|
302 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
303 |
Â
Klarna.prototype.category_change = function (e) {
|
304 |
Â
var change_category = function () {
|
305 |
Â
$('[id^="klarna-instance-"]').slideUp();
|
@@ -322,7 +344,9 @@
|
|
322 |
Â
|
323 |
Â
}.bind(this));
|
324 |
Â
this.payment_categories = source.klarna.payment_method_categories.split(",");
|
325 |
-
this.render_ui(true)
|
Â
|
|
Â
|
|
326 |
Â
}
|
327 |
Â
|
328 |
Â
Klarna.prototype.hashchange = function () {
|
@@ -334,37 +358,49 @@
|
|
334 |
Â
}
|
335 |
Â
|
336 |
Â
Klarna.prototype.render_ui = function (trigger_change) {
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
361 |
Â
}
|
362 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
363 |
Â
}
|
364 |
-
|
365 |
-
$('[id^="klarna-category-"]:visible [name="klarna_category"]').first().prop('checked', true).trigger('change');
|
366 |
-
}
|
367 |
-
}
|
368 |
Â
}
|
369 |
Â
|
370 |
Â
Klarna.prototype.place_order = function (e) {
|
@@ -417,6 +453,7 @@
|
|
417 |
Â
clearTimeout(this.createSourceTimer);
|
418 |
Â
this.createSourceTimer = setTimeout(function () {
|
419 |
Â
this.show_loader();
|
Â
|
|
420 |
Â
this.stripe.createSource(this.getSourceArgs()).then(function (response) {
|
421 |
Â
// create payment sections
|
422 |
Â
this.hide_loader();
|
@@ -428,6 +465,7 @@
|
|
428 |
Â
this.filter_payment_method_categories();
|
429 |
Â
this.processConfirmation(this.source);
|
430 |
Â
}.bind(this)).catch(function (err) {
|
Â
|
|
431 |
Â
this.hide_loader();
|
432 |
Â
this.submit_error(err.message);
|
433 |
Â
}.bind(this));
|
@@ -492,12 +530,13 @@
|
|
492 |
Â
Klarna.prototype.update_source = function () {
|
493 |
Â
var args = this.get_source_update_args(this.getSourceArgs());
|
494 |
Â
this.show_loader();
|
Â
|
|
495 |
Â
LocalPayment.prototype.update_source.call(this, args).then(function (source) {
|
496 |
Â
this.source = source;
|
497 |
Â
this.filter_payment_method_categories();
|
498 |
Â
this.hide_loader();
|
499 |
-
this.render_ui();
|
500 |
-
}.bind(this));
|
501 |
Â
}
|
502 |
Â
|
503 |
Â
Klarna.prototype.checkout_error = function () {
|
@@ -605,12 +644,6 @@
|
|
605 |
Â
}
|
606 |
Â
}
|
607 |
Â
|
608 |
-
BECS.prototype.get_confirmation_args = function (obj) {
|
609 |
-
var args = LocalPayment.prototype.get_confirmation_args.apply(this, arguments);
|
610 |
-
args.payment_method.billing_details.email = this.fields.get('billing_email');
|
611 |
-
return args;
|
612 |
-
}
|
613 |
-
|
614 |
Â
Sepa.prototype.getSourceArgs = function () {
|
615 |
Â
var args = $.extend({}, LocalPayment.prototype.getSourceArgs.apply(this, arguments), {
|
616 |
Â
mandate: {
|
@@ -624,8 +657,52 @@
|
|
624 |
Â
return args;
|
625 |
Â
}
|
626 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
627 |
Â
IDEAL.prototype = $.extend({}, LocalPayment.prototype, IDEAL.prototype);
|
628 |
Â
|
Â
|
|
Â
|
|
629 |
Â
Sepa.prototype = $.extend({}, LocalPayment.prototype, Sepa.prototype);
|
630 |
Â
|
631 |
Â
Klarna.prototype = $.extend({}, LocalPayment.prototype, Klarna.prototype);
|
@@ -638,18 +715,22 @@
|
|
638 |
Â
|
639 |
Â
GrabPay.prototype = $.extend({}, LocalPayment.prototype, GrabPay.prototype);
|
640 |
Â
|
Â
|
|
Â
|
|
641 |
Â
/**
|
642 |
Â
* Local payment types that require JS integration
|
643 |
Â
* @type {Object}
|
644 |
Â
*/
|
645 |
Â
var types = {
|
646 |
Â
'ideal': IDEAL,
|
Â
|
|
647 |
Â
'sepa_debit': Sepa,
|
648 |
Â
'klarna': Klarna,
|
649 |
Â
'fpx': FPX,
|
650 |
Â
'wechat': WeChat,
|
651 |
Â
'au_becs_debit': BECS,
|
652 |
-
'grabpay': GrabPay
|
Â
|
|
653 |
Â
}
|
654 |
Â
|
655 |
Â
for (var i in wc_stripe_local_payment_params.gateways) {
|
262 |
Â
window.addEventListener('hashchange', this.hashChange.bind(this));
|
263 |
Â
}
|
264 |
Â
|
265 |
+
/*********** P24 ***********/
|
266 |
+
function P24(params) {
|
267 |
+
this.elementType = 'p24Bank';
|
268 |
+
this.confirmation_method = 'confirmP24Payment';
|
269 |
+
LocalPayment.call(this, params);
|
270 |
+
window.addEventListener('hashchange', this.hashChange.bind(this));
|
271 |
+
}
|
272 |
+
|
273 |
Â
/******* Sepa *******/
|
274 |
Â
function Sepa(params) {
|
275 |
Â
this.elementType = 'iban';
|
308 |
Â
window.addEventListener('hashchange', this.hashChange.bind(this));
|
309 |
Â
}
|
310 |
Â
|
311 |
+
function Afterpay(params) {
|
312 |
+
this.confirmation_method = 'confirmAfterpayClearpayPayment';
|
313 |
+
LocalPayment.call(this, params);
|
314 |
+
window.addEventListener('hashchange', this.hashChange.bind(this));
|
315 |
+
}
|
316 |
+
|
317 |
+
Klarna.prototype.disable_place_order = function () {
|
318 |
+
$('#place_order').prop('disabled', true);
|
319 |
+
}
|
320 |
+
|
321 |
+
Klarna.prototype.enable_place_order = function () {
|
322 |
+
$('#place_order').prop('disabled', false);
|
323 |
+
}
|
324 |
+
|
325 |
Â
Klarna.prototype.category_change = function (e) {
|
326 |
Â
var change_category = function () {
|
327 |
Â
$('[id^="klarna-instance-"]').slideUp();
|
344 |
Â
|
345 |
Â
}.bind(this));
|
346 |
Â
this.payment_categories = source.klarna.payment_method_categories.split(",");
|
347 |
+
this.render_ui(true).then(function () {
|
348 |
+
this.enable_place_order();
|
349 |
+
}.bind(this));
|
350 |
Â
}
|
351 |
Â
|
352 |
Â
Klarna.prototype.hashchange = function () {
|
358 |
Â
}
|
359 |
Â
|
360 |
Â
Klarna.prototype.render_ui = function (trigger_change) {
|
361 |
+
return new Promise(function (resolve) {
|
362 |
+
if (this.payment_categories.length > 0) {
|
363 |
+
$('#place_order').prop('disabled', true);
|
364 |
+
var promises = [];
|
365 |
+
$('#wc_stripe_local_payment_stripe_klarna').show();
|
366 |
+
for (var i = 0; i < this.payment_categories.length; i++) {
|
367 |
+
var container = '#klarna-instance-' + this.payment_categories[i];
|
368 |
+
$(container).empty();
|
369 |
+
if ($('#klarna-category-' + this.payment_categories[i]).length) {
|
370 |
+
if (this.params.translate) {
|
371 |
+
var text = this.source.klarna[this.payment_categories[i] + '_name'];
|
372 |
+
$('label[for="klarna_' + this.payment_categories[i] + '"').text(text);
|
373 |
+
}
|
374 |
+
$('#klarna-category-' + this.payment_categories[i]).show();
|
375 |
+
try {
|
376 |
+
promises.push(new Promise(function (resolve) {
|
377 |
+
window.Klarna.Payments.load({
|
378 |
+
container: container,
|
379 |
+
payment_method_category: this.payment_categories[i],
|
380 |
+
instance_id: 'klarna-instance-' + this.payment_categories[i]
|
381 |
+
}, function (response) {
|
382 |
+
if (!response.show_form) {
|
383 |
+
this.source = null;
|
384 |
+
}
|
385 |
+
resolve();
|
386 |
+
}.bind(this));
|
387 |
+
}.bind(this)));
|
388 |
+
} catch (e) {
|
389 |
+
window.alert(e);
|
390 |
+
resolve();
|
391 |
+
}
|
392 |
Â
}
|
393 |
Â
}
|
394 |
+
Promise.all(promises).then(function () {
|
395 |
+
resolve();
|
396 |
+
});
|
397 |
+
if (trigger_change) {
|
398 |
+
$('[id^="klarna-category-"]:visible [name="klarna_category"]').first().prop('checked', true).trigger('change');
|
399 |
+
}
|
400 |
+
} else {
|
401 |
+
resolve();
|
402 |
Â
}
|
403 |
+
}.bind(this));
|
Â
|
|
Â
|
|
Â
|
|
404 |
Â
}
|
405 |
Â
|
406 |
Â
Klarna.prototype.place_order = function (e) {
|
453 |
Â
clearTimeout(this.createSourceTimer);
|
454 |
Â
this.createSourceTimer = setTimeout(function () {
|
455 |
Â
this.show_loader();
|
456 |
+
this.disable_place_order();
|
457 |
Â
this.stripe.createSource(this.getSourceArgs()).then(function (response) {
|
458 |
Â
// create payment sections
|
459 |
Â
this.hide_loader();
|
465 |
Â
this.filter_payment_method_categories();
|
466 |
Â
this.processConfirmation(this.source);
|
467 |
Â
}.bind(this)).catch(function (err) {
|
468 |
+
this.enable_place_order();
|
469 |
Â
this.hide_loader();
|
470 |
Â
this.submit_error(err.message);
|
471 |
Â
}.bind(this));
|
530 |
Â
Klarna.prototype.update_source = function () {
|
531 |
Â
var args = this.get_source_update_args(this.getSourceArgs());
|
532 |
Â
this.show_loader();
|
533 |
+
this.disable_place_order();
|
534 |
Â
LocalPayment.prototype.update_source.call(this, args).then(function (source) {
|
535 |
Â
this.source = source;
|
536 |
Â
this.filter_payment_method_categories();
|
537 |
Â
this.hide_loader();
|
538 |
+
this.render_ui().then(this.enable_place_order.bind(this));
|
539 |
+
}.bind(this)).catch(this.enable_place_order.bind(this));
|
540 |
Â
}
|
541 |
Â
|
542 |
Â
Klarna.prototype.checkout_error = function () {
|
644 |
Â
}
|
645 |
Â
}
|
646 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
647 |
Â
Sepa.prototype.getSourceArgs = function () {
|
648 |
Â
var args = $.extend({}, LocalPayment.prototype.getSourceArgs.apply(this, arguments), {
|
649 |
Â
mandate: {
|
657 |
Â
return args;
|
658 |
Â
}
|
659 |
Â
|
660 |
+
Afterpay.prototype.add_eligibility = function () {
|
661 |
+
if ($(this.container).length && !this.params.msg_options.isEligible) {
|
662 |
+
$('#wc_stripe_local_payment_stripe_afterpay').addClass('ineligible');
|
663 |
+
}
|
664 |
+
}
|
665 |
+
|
666 |
+
Afterpay.prototype.updated_checkout = function () {
|
667 |
+
this.maybe_hide_gateway();
|
668 |
+
this.add_eligibility();
|
669 |
+
// re-insert the messaging
|
670 |
+
if (this.msgElement && $(this.container).length) {
|
671 |
+
this.mount_message(true);
|
672 |
+
}
|
673 |
+
}
|
674 |
+
|
675 |
+
Afterpay.prototype.initialize = function () {
|
676 |
+
this.add_eligibility();
|
677 |
+
this.initialize_messaging();
|
678 |
+
}
|
679 |
+
|
680 |
+
Afterpay.prototype.initialize_messaging = function () {
|
681 |
+
this.msgElement = this.elements.create('afterpayClearpayMessage', $.extend({}, this.params.msg_options, {
|
682 |
+
amount: this.get_total_price_cents(),
|
683 |
+
currency: this.get_currency()
|
684 |
+
}));
|
685 |
+
this.mount_message();
|
686 |
+
}
|
687 |
+
|
688 |
+
Afterpay.prototype.mount_message = function (update) {
|
689 |
+
if (update) {
|
690 |
+
this.msgElement.update({
|
691 |
+
amount: this.get_total_price_cents(),
|
692 |
+
currency: this.get_currency()
|
693 |
+
});
|
694 |
+
}
|
695 |
+
var $el = $('label[for="payment_method_stripe_afterpay"]').find('#wc-stripe-afterpay-msg');
|
696 |
+
if (!$el.length) {
|
697 |
+
$('label[for="payment_method_stripe_afterpay"]').append('<div id="wc-stripe-afterpay-msg"></div>');
|
698 |
+
}
|
699 |
+
this.msgElement.mount('#wc-stripe-afterpay-msg');
|
700 |
+
}
|
701 |
+
|
702 |
Â
IDEAL.prototype = $.extend({}, LocalPayment.prototype, IDEAL.prototype);
|
703 |
Â
|
704 |
+
P24.prototype = $.extend({}, LocalPayment.prototype, P24.prototype);
|
705 |
+
|
706 |
Â
Sepa.prototype = $.extend({}, LocalPayment.prototype, Sepa.prototype);
|
707 |
Â
|
708 |
Â
Klarna.prototype = $.extend({}, LocalPayment.prototype, Klarna.prototype);
|
715 |
Â
|
716 |
Â
GrabPay.prototype = $.extend({}, LocalPayment.prototype, GrabPay.prototype);
|
717 |
Â
|
718 |
+
Afterpay.prototype = $.extend({}, LocalPayment.prototype, Afterpay.prototype);
|
719 |
+
|
720 |
Â
/**
|
721 |
Â
* Local payment types that require JS integration
|
722 |
Â
* @type {Object}
|
723 |
Â
*/
|
724 |
Â
var types = {
|
725 |
Â
'ideal': IDEAL,
|
726 |
+
'p24': P24,
|
727 |
Â
'sepa_debit': Sepa,
|
728 |
Â
'klarna': Klarna,
|
729 |
Â
'fpx': FPX,
|
730 |
Â
'wechat': WeChat,
|
731 |
Â
'au_becs_debit': BECS,
|
732 |
+
'grabpay': GrabPay,
|
733 |
+
'afterpay_clearpay': Afterpay
|
734 |
Â
}
|
735 |
Â
|
736 |
Â
for (var i in wc_stripe_local_payment_params.gateways) {
|
assets/js/frontend/local-payment.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(o,i){function s(e){i.BaseGateway.call(this,e),i.CheckoutGateway.call(this),o(document.body).on("click","#place_order",this.place_order.bind(this)),this.is_current_page("order_pay")&&o("#order_review").on("submit",this.process_order_pay.bind(this)),this.maybe_hide_gateway()}function e(e){this.elementType="idealBank",this.confirmation_method="confirmIdealPayment",s.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}function t(e){this.elementType="iban",s.call(this,e)}function n(e){s.call(this,e),o(document.body).on("change",".wc-stripe-klarna-category",this.category_change.bind(this)),o("form.checkout").on("change",".form-row:not(.address-field):not(#account_password_field) .input-text, .form-row:not(.address-field) select",this.input_change.bind(this))}function r(e){this.elementType="fpxBank",this.confirmation_method="confirmFpxPayment",s.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}function a(e){s.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}function h(e){this.elementType="auBankAccount",this.confirmation_method="confirmAuBecsDebitPayment",s.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}function c(e){this.confirmation_method="confirmGrabPayPayment",s.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}(s.prototype=o.extend({},i.BaseGateway.prototype,i.CheckoutGateway.prototype)).initialize=function(){this.mount_button()},s.prototype.elementType=null,s.prototype.is_active=function(){return o("#wc_stripe_local_payment_"+this.gateway_id).data("active")},s.prototype.maybe_hide_gateway=function(){this.is_active()?o(this.container).show():o(this.container).hide()},s.prototype.createSource=function(){return new Promise(function(t,e){var i=function(e){e.error?this.submit_error(e.error):(this.payment_token_received=!0,this.set_nonce(e.source.id),this.get_form().submit()),t()}.bind(this);if(null!=this.elementType)if(this.confirmation_method){if(!this.isValidElement())return this.submit_error({code:"empty_element_"+this.params.local_payment_type,message:wc_stripe_messages.empty_element});this.payment_token_received=!0,this.get_form().submit()}else this.stripe.createSource(this.element,this.getSourceArgs()).then(i)["catch"](function(e){this.submit_error(e.message)}.bind(this));else this.payment_token_received=!0,this.get_form().submit()}.bind(this))},s.prototype.place_order=function(e){this.is_gateway_selected()&&(this.payment_token_received||this.is_saved_method_selected()||(e.preventDefault(),this.createSource()))},s.prototype.process_order_pay=function(e){this.is_gateway_selected()&&(e.preventDefault(),(e=this.get_form().serializeArray()).push({name:"_wpnonce",value:this.params.rest_nonce}),e.push({name:"order_id",value:this.params.order_id}),o.ajax({url:this.params.routes.order_pay+window.location.search,method:"POST",dataType:"json",data:o.param(e)}).done(function(e){e.success?window.location.href=e.redirect:this.submit_error(e.message)}.bind(this)).fail(function(e,t,i){this.submit_error(i)}.bind(this)))},s.prototype.show_payment_button=function(){this.show_place_order()},s.prototype.hide_place_order=function(){},s.prototype.show_place_order=function(){i.CheckoutGateway.prototype.show_place_order.apply(this,arguments),this.payment_token_received&&o("#place_order").text(o("#place_order").data("value"))},s.prototype.getSourceArgs=function(){return{type:this.params.local_payment_type,amount:this.get_total_price_cents(),currency:this.get_currency(),owner:{name:this.get_customer_name("billing"),email:this.fields.get("billing_email",null)},redirect:{return_url:this.params.return_url}}},s.prototype.updated_checkout=function(){this.mount_button(),this.maybe_hide_gateway()},s.prototype.mount_button=function(){var e="#wc_stripe_local_payment_"+this.gateway_id;o(e).length&&null!=this.elementType&&(o(e).empty(),this.element||(this.element=this.elements.create(this.elementType,this.params.element_params),this.element.on("change",this.handleElementChange.bind(this))),this.elementEmpty=!0,this.element.mount(e))},s.prototype.handleElementChange=function(e){this.elementEmpty=e.empty},s.prototype.load_external_script=function(e){var t=document.createElement("script");t.type="text/javascript",t.src=e,t.onload=function(){this.script_loaded=!0}.bind(this),document.body.appendChild(t)},s.prototype.hashChange=function(e){!this.is_gateway_selected()||(e=e.newURL.match(/response=(.*)/))&&(history.pushState({},"",window.location.pathname),e=JSON.parse(window.atob(decodeURIComponent(e[1]))),this.processConfirmation(e))},s.prototype.processConfirmation=function(e){this.stripe[this.confirmation_method](e.client_secret,this.get_confirmation_args(e)).then(function(e){if(e.error)return this.submit_error(e.error.message);this.get_form().submit()}.bind(this))},s.prototype.get_confirmation_args=function(e){e={payment_method:{billing_details:this.get_billing_details()},return_url:e.return_url};return this.elementType&&(e.payment_method[this.params.local_payment_type]=this.element),e},s.prototype.isValidElement=function(){return!this.element||!this.elementEmpty},s.prototype.delete_order_source=function(){return new Promise(function(t,e){o.ajax({url:this.params.routes.delete_order_source,method:"DELETE",dataType:"json",beforeSend:this.ajax_before_send.bind(this)}).done(function(e){t(e)}.bind(this)).fail(function(){e()}.bind(this))}.bind(this))},s.prototype.update_source=function(i){return new Promise(function(t,e){this.updateSourceXhr&&this.updateSourceXhr.abort(),this.updateSourceXhr=o.ajax({url:this.params.routes.update_source,method:"POST",dataType:"json",data:{_wpnonce:this.params.rest_nonce,updates:i,source_id:this.source.id,client_secret:this.source.client_secret,payment_method:this.gateway_id}}).done(function(e){t(e.source)}.bind(this)).fail(function(){e()})}.bind(this))},n.prototype.category_change=function(e){var t=function(){o('[id^="klarna-instance-"]').slideUp();var e=o('[name="klarna_category"]:checked').val();o("#klarna-instance-"+e).slideDown()}.bind(this);e.originalEvent?t():(clearTimeout(this.categoryChangeTimer),this.categoryChangeTimer=setTimeout(t,500))},n.prototype.processConfirmation=function(e){window.Klarna.Payments.init({client_token:e.klarna.client_token},function(e){}.bind(this)),this.payment_categories=e.klarna.payment_method_categories.split(","),this.render_ui(!0)},n.prototype.hashchange=function(){this.is_gateway_selected()&&(history.pushState({},"",window.location.pathname),this.get_form().removeClass("processing"),this.get_form().submit())},n.prototype.render_ui=function(e){if((this.show_form_false=0)<this.payment_categories.length){o("#wc_stripe_local_payment_stripe_klarna").show();for(var t=0;t<this.payment_categories.length;t++){var i,s="#klarna-instance-"+this.payment_categories[t];if(o(s).empty(),o("#klarna-category-"+this.payment_categories[t]).length){this.params.translate&&(i=this.source.klarna[this.payment_categories[t]+"_name"],o('label[for="klarna_'+this.payment_categories[t]+'"').text(i)),o("#klarna-category-"+this.payment_categories[t]).show();try{window.Klarna.Payments.load({container:s,payment_method_category:this.payment_categories[t],instance_id:"klarna-instance-"+this.payment_categories[t]},function(e){e.show_form||(this.source=null)}.bind(this))}catch(n){window.alert(n)}}}e&&o('[id^="klarna-category-"]:visible [name="klarna_category"]').first().prop("checked",!0).trigger("change")}},n.prototype.place_order=function(e){this.is_gateway_selected()&&(e.preventDefault(),this.checkout_fields_valid()&&window.Klarna.Payments.authorize({instance_id:"klarna-instance-"+o('[name="klarna_category"]:checked').val()},function(e){e.approved?(this.set_nonce(this.source.id),this.payment_token_received=!0,this.get_form().submit()):e.error?this.submit_error(e.error):this.submit_error(this.params.messages.klarna_error)}.bind(this)))},n.prototype.klarna_fields_valid=function(){if(this.fields.validateFields("billing"))return!this.needs_shipping()||(!!("billing"===this.get_shipping_prefix()||"shipping"===this.get_shipping_prefix()&&this.fields.validateFields("shipping"))||void 0)},n.prototype.initialize=function(){this.is_gateway_selected()&&this.is_active()&&!this.source&&this.klarna_fields_valid()&&this.createSource()},n.prototype.createSource=function(){clearTimeout(this.createSourceTimer),this.createSourceTimer=setTimeout(function(){this.show_loader(),this.stripe.createSource(this.getSourceArgs()).then(function(e){if(this.hide_loader(),e.error)return this.submit_error(e.error.message);this.source=e.source,this.set_nonce(this.source.id),this.filter_payment_method_categories(),this.processConfirmation(this.source)}.bind(this))["catch"](function(e){this.hide_loader(),this.submit_error(e.message)}.bind(this))}.bind(this),100)},n.prototype.getSourceArgs=function(){return o.extend(!0,{},this.get_gateway_data().source_args,function(){var e,t={owner:{name:this.fields.get("billing_first_name")+" "+this.fields.get("billing_last_name"),email:this.fields.get("billing_email"),address:{city:this.fields.get("billing_city"),country:this.fields.get("billing_country"),line1:this.fields.get("billing_address_1"),line2:this.fields.get("billing_address_2"),postal_code:this.fields.get("billing_postcode"),state:this.fields.get("billing_state")}},klarna:{purchase_country:this.fields.get("billing_country"),first_name:this.fields.get("billing_first_name"),last_name:this.fields.get("billing_last_name")}};return this.needs_shipping()&&(e=this.get_shipping_prefix(),t.klarna.shipping_first_name=this.fields.get("first_name",e),t.klarna.shipping_last_name=this.fields.get("last_name",e),t.source_order={shipping:{address:{city:this.fields.get("city",e),country:this.fields.get("country",e),line1:this.fields.get("address_1",e),line2:this.fields.get("address_2",e),postal_code:this.fields.get("postcode",e),state:this.fields.get("state",e)}}}),t}.bind(this)())},n.prototype.updated_checkout=function(){s.prototype.updated_checkout.apply(this,arguments),this.source&&this.is_active()?this.update_source():this.is_gateway_selected()&&this.is_active()&&this.klarna_fields_valid()&&this.createSource()},n.prototype.update_source=function(){var e=this.get_source_update_args(this.getSourceArgs());this.show_loader(),s.prototype.update_source.call(this,e).then(function(e){this.source=e,this.filter_payment_method_categories(),this.hide_loader(),this.render_ui()}.bind(this))},n.prototype.checkout_error=function(){s.prototype.checkout_error.apply(this,arguments),this.is_gateway_selected()&&this.createSource()},n.prototype.show_loader=function(){o(this.container).find(".wc-stripe-klarna-loader").remove(),o(this.container).find('label[for="payment_method_'+this.gateway_id+'" ]').after(this.params.klarna_loader)},n.prototype.hide_loader=function(){o(this.container).find(".wc-stripe-klarna-loader").remove()},n.prototype.filter_payment_method_categories=function(){var e=this.source.klarna.payment_method_categories.split(",");this.source.klarna.payment_method_categories=e.filter(function(e){return-1<this.get_gateway_data().payment_sections.indexOf(e)}.bind(this)).join(",")},n.prototype.get_source_update_args=function(e){return["type","currency","statement_descriptor","redirect","klarna.product","klarna.locale","klarna.custom_payment_methods"].reduce(function(e,t){if(-1<t.indexOf(".")){var i=t.split(".");return delete i.slice(0,i.length-1).reduce(function(e,t){return e[t]},e)[t=i[i.length-1]],e}return delete e[t],e},e)},n.prototype.on_payment_method_selected=function(e,t){t===this.gateway_id&&(this.source||(this.klarna_fields_valid()?this.createSource():this.submit_error(this.params.messages.required_field)),i.CheckoutGateway.prototype.on_payment_method_selected.apply(this,arguments))},n.prototype.input_change=function(){this.is_gateway_selected()&&(this.source?this.update_source():this.klarna_fields_valid()&&this.createSource())},a.prototype.updated_checkout=function(){!this.script_loaded&&o(this.container).length&&this.load_external_script(this.params.qr_script),s.prototype.updated_checkout.apply(this,arguments)},a.prototype.hashChange=function(e){!this.is_gateway_selected()||(e=e.newURL.match(/qrcode=(.*)/))&&(history.pushState({},"",window.location.pathname),this.qrcode=JSON.parse(window.atob(decodeURIComponent(e[1]))),this.get_form().unblock().removeClass("processing").addClass("wechat"),new QRCode("wc_stripe_local_payment_stripe_wechat",{text:this.qrcode.code,width:128,height:128,colorDark:"#424770",colorLight:"#f8fbfd",correctLevel:QRCode.CorrectLevel.H}),o("#wc_stripe_local_payment_stripe_wechat").append('<p class="qrcode-message">'+this.params.qr_message+"</p>"),this.payment_token_received=!0,this.show_place_order())},a.prototype.place_order=function(){this.get_form().is(".wechat")?window.location=this.qrcode.redirect:s.prototype.place_order.apply(this,arguments)},h.prototype.get_confirmation_args=function(e){var t=s.prototype.get_confirmation_args.apply(this,arguments);return t.payment_method.billing_details.email=this.fields.get("billing_email"),t},t.prototype.getSourceArgs=function(){var e=o.extend({},s.prototype.getSourceArgs.apply(this,arguments),{mandate:{notification_method:"email",interval:this.cart_contains_subscription()||this.is_change_payment_method()?"scheduled":"one_time"}});return"scheduled"===e.mandate.interval&&delete e.amount,e},e.prototype=o.extend({},s.prototype,e.prototype),t.prototype=o.extend({},s.prototype,t.prototype),n.prototype=o.extend({},s.prototype,n.prototype),r.prototype=o.extend({},s.prototype,r.prototype),a.prototype=o.extend({},s.prototype,a.prototype),h.prototype=o.extend({},s.prototype,h.prototype),c.prototype=o.extend({},s.prototype,c.prototype);var p,_={ideal:e,sepa_debit:t,klarna:n,fpx:r,wechat:a,au_becs_debit:h,grabpay:c};for(p in wc_stripe_local_payment_params.gateways){var l=wc_stripe_local_payment_params.gateways[p];new(_[l.local_payment_type]||s)(l)}}(jQuery,window.wc_stripe);
|
1 |
+
!function(o,i){function t(e){i.BaseGateway.call(this,e),i.CheckoutGateway.call(this),o(document.body).on("click","#place_order",this.place_order.bind(this)),this.is_current_page("order_pay")&&o("#order_review").on("submit",this.process_order_pay.bind(this)),this.maybe_hide_gateway()}function e(e){this.elementType="idealBank",this.confirmation_method="confirmIdealPayment",t.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}function s(e){this.elementType="p24Bank",this.confirmation_method="confirmP24Payment",t.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}function n(e){this.elementType="iban",t.call(this,e)}function a(e){t.call(this,e),o(document.body).on("change",".wc-stripe-klarna-category",this.category_change.bind(this)),o("form.checkout").on("change",".form-row:not(.address-field):not(#account_password_field) .input-text, .form-row:not(.address-field) select",this.input_change.bind(this))}function r(e){this.elementType="fpxBank",this.confirmation_method="confirmFpxPayment",t.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}function h(e){t.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}function c(e){this.elementType="auBankAccount",this.confirmation_method="confirmAuBecsDebitPayment",t.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}function p(e){this.confirmation_method="confirmGrabPayPayment",t.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}function l(e){this.confirmation_method="confirmAfterpayClearpayPayment",t.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}(t.prototype=o.extend({},i.BaseGateway.prototype,i.CheckoutGateway.prototype)).initialize=function(){this.mount_button()},t.prototype.elementType=null,t.prototype.is_active=function(){return o("#wc_stripe_local_payment_"+this.gateway_id).data("active")},t.prototype.maybe_hide_gateway=function(){this.is_active()?o(this.container).show():o(this.container).hide()},t.prototype.createSource=function(){return new Promise(function(t,e){var i=function(e){e.error?this.submit_error(e.error):(this.payment_token_received=!0,this.set_nonce(e.source.id),this.get_form().submit()),t()}.bind(this);if(null!=this.elementType)if(this.confirmation_method){if(!this.isValidElement())return this.submit_error({code:"empty_element_"+this.params.local_payment_type,message:wc_stripe_messages.empty_element});this.payment_token_received=!0,this.get_form().submit()}else this.stripe.createSource(this.element,this.getSourceArgs()).then(i)["catch"](function(e){this.submit_error(e.message)}.bind(this));else this.payment_token_received=!0,this.get_form().submit()}.bind(this))},t.prototype.place_order=function(e){this.is_gateway_selected()&&(this.payment_token_received||this.is_saved_method_selected()||(e.preventDefault(),this.createSource()))},t.prototype.process_order_pay=function(e){this.is_gateway_selected()&&(e.preventDefault(),(e=this.get_form().serializeArray()).push({name:"_wpnonce",value:this.params.rest_nonce}),e.push({name:"order_id",value:this.params.order_id}),o.ajax({url:this.params.routes.order_pay+window.location.search,method:"POST",dataType:"json",data:o.param(e)}).done(function(e){e.success?window.location.href=e.redirect:this.submit_error(e.message)}.bind(this)).fail(function(e,t,i){this.submit_error(i)}.bind(this)))},t.prototype.show_payment_button=function(){this.show_place_order()},t.prototype.hide_place_order=function(){},t.prototype.show_place_order=function(){i.CheckoutGateway.prototype.show_place_order.apply(this,arguments),this.payment_token_received&&o("#place_order").text(o("#place_order").data("value"))},t.prototype.getSourceArgs=function(){return{type:this.params.local_payment_type,amount:this.get_total_price_cents(),currency:this.get_currency(),owner:{name:this.get_customer_name("billing"),email:this.fields.get("billing_email",null)},redirect:{return_url:this.params.return_url}}},t.prototype.updated_checkout=function(){this.mount_button(),this.maybe_hide_gateway()},t.prototype.mount_button=function(){var e="#wc_stripe_local_payment_"+this.gateway_id;o(e).length&&null!=this.elementType&&(o(e).empty(),this.element||(this.element=this.elements.create(this.elementType,this.params.element_params),this.element.on("change",this.handleElementChange.bind(this))),this.elementEmpty=!0,this.element.mount(e))},t.prototype.handleElementChange=function(e){this.elementEmpty=e.empty},t.prototype.load_external_script=function(e){var t=document.createElement("script");t.type="text/javascript",t.src=e,t.onload=function(){this.script_loaded=!0}.bind(this),document.body.appendChild(t)},t.prototype.hashChange=function(e){!this.is_gateway_selected()||(e=e.newURL.match(/response=(.*)/))&&(history.pushState({},"",window.location.pathname),e=JSON.parse(window.atob(decodeURIComponent(e[1]))),this.processConfirmation(e))},t.prototype.processConfirmation=function(e){this.stripe[this.confirmation_method](e.client_secret,this.get_confirmation_args(e)).then(function(e){if(e.error)return this.submit_error(e.error.message);this.get_form().submit()}.bind(this))},t.prototype.get_confirmation_args=function(e){e={payment_method:{billing_details:this.get_billing_details()},return_url:e.return_url};return this.elementType&&(e.payment_method[this.params.local_payment_type]=this.element),e},t.prototype.isValidElement=function(){return!this.element||!this.elementEmpty},t.prototype.delete_order_source=function(){return new Promise(function(t,e){o.ajax({url:this.params.routes.delete_order_source,method:"DELETE",dataType:"json",beforeSend:this.ajax_before_send.bind(this)}).done(function(e){t(e)}.bind(this)).fail(function(){e()}.bind(this))}.bind(this))},t.prototype.update_source=function(i){return new Promise(function(t,e){this.updateSourceXhr&&this.updateSourceXhr.abort(),this.updateSourceXhr=o.ajax({url:this.params.routes.update_source,method:"POST",dataType:"json",data:{_wpnonce:this.params.rest_nonce,updates:i,source_id:this.source.id,client_secret:this.source.client_secret,payment_method:this.gateway_id}}).done(function(e){t(e.source)}.bind(this)).fail(function(){e()})}.bind(this))},a.prototype.disable_place_order=function(){o("#place_order").prop("disabled",!0)},a.prototype.enable_place_order=function(){o("#place_order").prop("disabled",!1)},a.prototype.category_change=function(e){var t=function(){o('[id^="klarna-instance-"]').slideUp();var e=o('[name="klarna_category"]:checked').val();o("#klarna-instance-"+e).slideDown()}.bind(this);e.originalEvent?t():(clearTimeout(this.categoryChangeTimer),this.categoryChangeTimer=setTimeout(t,500))},a.prototype.processConfirmation=function(e){window.Klarna.Payments.init({client_token:e.klarna.client_token},function(e){}.bind(this)),this.payment_categories=e.klarna.payment_method_categories.split(","),this.render_ui(!0).then(function(){this.enable_place_order()}.bind(this))},a.prototype.hashchange=function(){this.is_gateway_selected()&&(history.pushState({},"",window.location.pathname),this.get_form().removeClass("processing"),this.get_form().submit())},a.prototype.render_ui=function(r){return new Promise(function(e){if(0<this.payment_categories.length){o("#place_order").prop("disabled",!0);var t=[];o("#wc_stripe_local_payment_stripe_klarna").show();for(var i=0;i<this.payment_categories.length;i++){var s,n="#klarna-instance-"+this.payment_categories[i];if(o(n).empty(),o("#klarna-category-"+this.payment_categories[i]).length){this.params.translate&&(s=this.source.klarna[this.payment_categories[i]+"_name"],o('label[for="klarna_'+this.payment_categories[i]+'"').text(s)),o("#klarna-category-"+this.payment_categories[i]).show();try{t.push(new Promise(function(t){window.Klarna.Payments.load({container:n,payment_method_category:this.payment_categories[i],instance_id:"klarna-instance-"+this.payment_categories[i]},function(e){e.show_form||(this.source=null),t()}.bind(this))}.bind(this)))}catch(a){window.alert(a),e()}}}Promise.all(t).then(function(){e()}),r&&o('[id^="klarna-category-"]:visible [name="klarna_category"]').first().prop("checked",!0).trigger("change")}else e()}.bind(this))},a.prototype.place_order=function(e){this.is_gateway_selected()&&(e.preventDefault(),this.checkout_fields_valid()&&window.Klarna.Payments.authorize({instance_id:"klarna-instance-"+o('[name="klarna_category"]:checked').val()},function(e){e.approved?(this.set_nonce(this.source.id),this.payment_token_received=!0,this.get_form().submit()):e.error?this.submit_error(e.error):this.submit_error(this.params.messages.klarna_error)}.bind(this)))},a.prototype.klarna_fields_valid=function(){if(this.fields.validateFields("billing"))return!this.needs_shipping()||(!!("billing"===this.get_shipping_prefix()||"shipping"===this.get_shipping_prefix()&&this.fields.validateFields("shipping"))||void 0)},a.prototype.initialize=function(){this.is_gateway_selected()&&this.is_active()&&!this.source&&this.klarna_fields_valid()&&this.createSource()},a.prototype.createSource=function(){clearTimeout(this.createSourceTimer),this.createSourceTimer=setTimeout(function(){this.show_loader(),this.disable_place_order(),this.stripe.createSource(this.getSourceArgs()).then(function(e){if(this.hide_loader(),e.error)return this.submit_error(e.error.message);this.source=e.source,this.set_nonce(this.source.id),this.filter_payment_method_categories(),this.processConfirmation(this.source)}.bind(this))["catch"](function(e){this.enable_place_order(),this.hide_loader(),this.submit_error(e.message)}.bind(this))}.bind(this),100)},a.prototype.getSourceArgs=function(){return o.extend(!0,{},this.get_gateway_data().source_args,function(){var e,t={owner:{name:this.fields.get("billing_first_name")+" "+this.fields.get("billing_last_name"),email:this.fields.get("billing_email"),address:{city:this.fields.get("billing_city"),country:this.fields.get("billing_country"),line1:this.fields.get("billing_address_1"),line2:this.fields.get("billing_address_2"),postal_code:this.fields.get("billing_postcode"),state:this.fields.get("billing_state")}},klarna:{purchase_country:this.fields.get("billing_country"),first_name:this.fields.get("billing_first_name"),last_name:this.fields.get("billing_last_name")}};return this.needs_shipping()&&(e=this.get_shipping_prefix(),t.klarna.shipping_first_name=this.fields.get("first_name",e),t.klarna.shipping_last_name=this.fields.get("last_name",e),t.source_order={shipping:{address:{city:this.fields.get("city",e),country:this.fields.get("country",e),line1:this.fields.get("address_1",e),line2:this.fields.get("address_2",e),postal_code:this.fields.get("postcode",e),state:this.fields.get("state",e)}}}),t}.bind(this)())},a.prototype.updated_checkout=function(){t.prototype.updated_checkout.apply(this,arguments),this.source&&this.is_active()?this.update_source():this.is_gateway_selected()&&this.is_active()&&this.klarna_fields_valid()&&this.createSource()},a.prototype.update_source=function(){var e=this.get_source_update_args(this.getSourceArgs());this.show_loader(),this.disable_place_order(),t.prototype.update_source.call(this,e).then(function(e){this.source=e,this.filter_payment_method_categories(),this.hide_loader(),this.render_ui().then(this.enable_place_order.bind(this))}.bind(this))["catch"](this.enable_place_order.bind(this))},a.prototype.checkout_error=function(){t.prototype.checkout_error.apply(this,arguments),this.is_gateway_selected()&&this.createSource()},a.prototype.show_loader=function(){o(this.container).find(".wc-stripe-klarna-loader").remove(),o(this.container).find('label[for="payment_method_'+this.gateway_id+'" ]').after(this.params.klarna_loader)},a.prototype.hide_loader=function(){o(this.container).find(".wc-stripe-klarna-loader").remove()},a.prototype.filter_payment_method_categories=function(){var e=this.source.klarna.payment_method_categories.split(",");this.source.klarna.payment_method_categories=e.filter(function(e){return-1<this.get_gateway_data().payment_sections.indexOf(e)}.bind(this)).join(",")},a.prototype.get_source_update_args=function(e){return["type","currency","statement_descriptor","redirect","klarna.product","klarna.locale","klarna.custom_payment_methods"].reduce(function(e,t){if(-1<t.indexOf(".")){var i=t.split(".");return delete i.slice(0,i.length-1).reduce(function(e,t){return e[t]},e)[t=i[i.length-1]],e}return delete e[t],e},e)},a.prototype.on_payment_method_selected=function(e,t){t===this.gateway_id&&(this.source||(this.klarna_fields_valid()?this.createSource():this.submit_error(this.params.messages.required_field)),i.CheckoutGateway.prototype.on_payment_method_selected.apply(this,arguments))},a.prototype.input_change=function(){this.is_gateway_selected()&&(this.source?this.update_source():this.klarna_fields_valid()&&this.createSource())},h.prototype.updated_checkout=function(){!this.script_loaded&&o(this.container).length&&this.load_external_script(this.params.qr_script),t.prototype.updated_checkout.apply(this,arguments)},h.prototype.hashChange=function(e){!this.is_gateway_selected()||(e=e.newURL.match(/qrcode=(.*)/))&&(history.pushState({},"",window.location.pathname),this.qrcode=JSON.parse(window.atob(decodeURIComponent(e[1]))),this.get_form().unblock().removeClass("processing").addClass("wechat"),new QRCode("wc_stripe_local_payment_stripe_wechat",{text:this.qrcode.code,width:128,height:128,colorDark:"#424770",colorLight:"#f8fbfd",correctLevel:QRCode.CorrectLevel.H}),o("#wc_stripe_local_payment_stripe_wechat").append('<p class="qrcode-message">'+this.params.qr_message+"</p>"),this.payment_token_received=!0,this.show_place_order())},h.prototype.place_order=function(){this.get_form().is(".wechat")?window.location=this.qrcode.redirect:t.prototype.place_order.apply(this,arguments)},n.prototype.getSourceArgs=function(){var e=o.extend({},t.prototype.getSourceArgs.apply(this,arguments),{mandate:{notification_method:"email",interval:this.cart_contains_subscription()||this.is_change_payment_method()?"scheduled":"one_time"}});return"scheduled"===e.mandate.interval&&delete e.amount,e},l.prototype.add_eligibility=function(){o(this.container).length&&!this.params.msg_options.isEligible&&o("#wc_stripe_local_payment_stripe_afterpay").addClass("ineligible")},l.prototype.updated_checkout=function(){this.maybe_hide_gateway(),this.add_eligibility(),this.msgElement&&o(this.container).length&&this.mount_message(!0)},l.prototype.initialize=function(){this.add_eligibility(),this.initialize_messaging()},l.prototype.initialize_messaging=function(){this.msgElement=this.elements.create("afterpayClearpayMessage",o.extend({},this.params.msg_options,{amount:this.get_total_price_cents(),currency:this.get_currency()})),this.mount_message()},l.prototype.mount_message=function(e){e&&this.msgElement.update({amount:this.get_total_price_cents(),currency:this.get_currency()}),o('label[for="payment_method_stripe_afterpay"]').find("#wc-stripe-afterpay-msg").length||o('label[for="payment_method_stripe_afterpay"]').append('<div id="wc-stripe-afterpay-msg"></div>'),this.msgElement.mount("#wc-stripe-afterpay-msg")},e.prototype=o.extend({},t.prototype,e.prototype),s.prototype=o.extend({},t.prototype,s.prototype),n.prototype=o.extend({},t.prototype,n.prototype),a.prototype=o.extend({},t.prototype,a.prototype),r.prototype=o.extend({},t.prototype,r.prototype),h.prototype=o.extend({},t.prototype,h.prototype),c.prototype=o.extend({},t.prototype,c.prototype),p.prototype=o.extend({},t.prototype,p.prototype),l.prototype=o.extend({},t.prototype,l.prototype);var d,_={ideal:e,p24:s,sepa_debit:n,klarna:a,fpx:r,wechat:h,au_becs_debit:c,grabpay:p,afterpay_clearpay:l};for(d in wc_stripe_local_payment_params.gateways){var u=wc_stripe_local_payment_params.gateways[d];new(_[u.local_payment_type]||t)(u)}}(jQuery,window.wc_stripe);
|
i18n/languages/woo-stripe-payment.pot
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
Â
# This file is distributed under the same license as the Stripe For WooCommerce plugin.
|
3 |
Â
msgid ""
|
4 |
Â
msgstr ""
|
5 |
-
"Project-Id-Version: Stripe For WooCommerce 3.3.
|
6 |
Â
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woo-stripe-payment\n"
|
7 |
Â
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
Â
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
Â
"MIME-Version: 1.0\n"
|
10 |
Â
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
Â
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"POT-Creation-Date: 2021-05-
|
13 |
Â
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
Â
"X-Generator: WP-CLI 2.4.0\n"
|
15 |
Â
"X-Domain: woo-stripe-payment\n"
|
@@ -23,7 +23,7 @@ msgid "https://docs.paymentplugins.com/wc-stripe/config/"
|
|
23 |
Â
msgstr ""
|
24 |
Â
|
25 |
Â
#. Description of the plugin
|
26 |
-
msgid "Accept
|
27 |
Â
msgstr ""
|
28 |
Â
|
29 |
Â
#. Author of the plugin
|
@@ -103,16 +103,16 @@ msgstr ""
|
|
103 |
Â
msgid "Order %s"
|
104 |
Â
msgstr ""
|
105 |
Â
|
106 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:
|
107 |
Â
msgid "Gateway will appear when store currency is <strong>%s</strong>"
|
108 |
Â
msgstr ""
|
109 |
Â
|
110 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:
|
111 |
Â
msgid " & billing country is not <strong>%s</strong>"
|
112 |
Â
msgstr ""
|
113 |
Â
|
114 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:
|
115 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:
|
116 |
Â
msgid " & billing country is <strong>%s</strong>"
|
117 |
Â
msgstr ""
|
118 |
Â
|
@@ -231,8 +231,8 @@ msgstr ""
|
|
231 |
Â
|
232 |
Â
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1553
|
233 |
Â
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1584
|
234 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
235 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
236 |
Â
#: includes/wc-stripe-functions.php:424
|
237 |
Â
#: includes/wc-stripe-functions.php:489
|
238 |
Â
msgid "Shipping"
|
@@ -240,16 +240,16 @@ msgstr ""
|
|
240 |
Â
|
241 |
Â
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1561
|
242 |
Â
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1587
|
243 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
244 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
245 |
Â
#: includes/wc-stripe-functions.php:441
|
246 |
Â
#: includes/wc-stripe-functions.php:497
|
247 |
Â
msgid "Discount"
|
248 |
Â
msgstr ""
|
249 |
Â
|
250 |
Â
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1564
|
251 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
252 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
253 |
Â
#: includes/wc-stripe-functions.php:449
|
254 |
Â
msgid "Tax"
|
255 |
Â
msgstr ""
|
@@ -357,8 +357,9 @@ msgstr ""
|
|
357 |
Â
#: includes/admin/meta-boxes/views/html-charge-data-subview.php:14
|
358 |
Â
#: includes/admin/meta-boxes/views/html-order-actions.php:48
|
359 |
Â
#: includes/admin/meta-boxes/views/html-order-pay.php:23
|
360 |
-
#: includes/admin/meta-boxes/views/html-product-data.php:
|
361 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-
|
Â
|
|
362 |
Â
#: includes/gateways/settings/applepay-settings.php:52
|
363 |
Â
#: includes/gateways/settings/cc-settings.php:49
|
364 |
Â
#: includes/gateways/settings/googlepay-settings.php:70
|
@@ -485,7 +486,8 @@ msgstr ""
|
|
485 |
Â
|
486 |
Â
#: includes/admin/meta-boxes/views/html-order-pay.php:21
|
487 |
Â
#: includes/admin/meta-boxes/views/html-product-data.php:15
|
488 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-
|
Â
|
|
489 |
Â
#: includes/gateways/settings/applepay-settings.php:48
|
490 |
Â
#: includes/gateways/settings/cc-settings.php:45
|
491 |
Â
#: includes/gateways/settings/googlepay-settings.php:66
|
@@ -494,8 +496,9 @@ msgid "Charge Type"
|
|
494 |
Â
msgstr ""
|
495 |
Â
|
496 |
Â
#: includes/admin/meta-boxes/views/html-order-pay.php:24
|
497 |
-
#: includes/admin/meta-boxes/views/html-product-data.php:
|
498 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-
|
Â
|
|
499 |
Â
#: includes/gateways/settings/applepay-settings.php:53
|
500 |
Â
#: includes/gateways/settings/cc-settings.php:50
|
501 |
Â
#: includes/gateways/settings/googlepay-settings.php:71
|
@@ -872,6 +875,161 @@ msgstr ""
|
|
872 |
Â
msgid "You must set the API mode to live in order to enable the Plaid development environment."
|
873 |
Â
msgstr ""
|
874 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
875 |
Â
#: includes/gateways/class-wc-payment-gateway-stripe-alipay.php:22
|
876 |
Â
#: includes/gateways/class-wc-payment-gateway-stripe-alipay.php:25
|
877 |
Â
msgid "Alipay"
|
@@ -1030,72 +1188,55 @@ msgstr ""
|
|
1030 |
Â
msgid "Klarna gateway that integrates with your Stripe account."
|
1031 |
Â
msgstr ""
|
1032 |
Â
|
1033 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
1034 |
-
#: includes/gateways/settings/applepay-settings.php:56
|
1035 |
-
#: includes/gateways/settings/cc-settings.php:53
|
1036 |
-
#: includes/gateways/settings/payment-request-settings.php:57
|
1037 |
-
msgid "This option determines whether the customer's funds are captured immediately or authorized and can be captured at a later date."
|
1038 |
-
msgstr ""
|
1039 |
-
|
1040 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:88
|
1041 |
-
#: includes/gateways/settings/googlepay-settings.php:106
|
1042 |
-
msgid "Icon"
|
1043 |
-
msgstr ""
|
1044 |
-
|
1045 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:91
|
1046 |
Â
msgid "Black text"
|
1047 |
Â
msgstr ""
|
1048 |
Â
|
1049 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
1050 |
Â
msgid "Pink background black text"
|
1051 |
Â
msgstr ""
|
1052 |
Â
|
1053 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
1054 |
-
#: includes/gateways/settings/googlepay-settings.php:115
|
1055 |
-
msgid "This is the icon style that appears next to the gateway on the checkout page. Google's API team typically requires the With Outline option on the checkout page for branding purposes."
|
1056 |
-
msgstr ""
|
1057 |
-
|
1058 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:99
|
1059 |
Â
msgid "Payment Categories"
|
1060 |
Â
msgstr ""
|
1061 |
Â
|
1062 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
1063 |
Â
msgid "These are the payment categories that will be displayed on the checkout page if they are supported. Note, depending on the customer's billing country, not all enabled options may show."
|
1064 |
Â
msgstr ""
|
1065 |
Â
|
1066 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
1067 |
Â
msgid "Use Stripe translation"
|
1068 |
Â
msgstr ""
|
1069 |
Â
|
1070 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
1071 |
Â
msgid "If enabled, the payment option labels will use the Stripe translated text."
|
1072 |
Â
msgstr ""
|
1073 |
Â
|
1074 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
1075 |
Â
msgid "Fee total"
|
1076 |
Â
msgstr ""
|
1077 |
Â
|
1078 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
1079 |
Â
msgid "Fee"
|
1080 |
Â
msgstr ""
|
1081 |
Â
|
1082 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
1083 |
Â
msgid "Pay Now"
|
1084 |
Â
msgstr ""
|
1085 |
Â
|
1086 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
1087 |
Â
msgid "Pay Later"
|
1088 |
Â
msgstr ""
|
1089 |
Â
|
1090 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
1091 |
Â
msgid "Pay Over Time"
|
1092 |
Â
msgstr ""
|
1093 |
Â
|
1094 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
1095 |
Â
msgid "Click %1$shere%2$s for Klarna test payment methods."
|
1096 |
Â
msgstr ""
|
1097 |
Â
|
1098 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
1099 |
Â
msgid "Your purchase is not approved."
|
1100 |
Â
msgstr ""
|
1101 |
Â
|
@@ -1108,12 +1249,12 @@ msgstr ""
|
|
1108 |
Â
msgid "Multibanco gateway that integrates with your Stripe account."
|
1109 |
Â
msgstr ""
|
1110 |
Â
|
1111 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-p24.php:
|
1112 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-p24.php:
|
1113 |
Â
msgid "Przelewy24"
|
1114 |
Â
msgstr ""
|
1115 |
Â
|
1116 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-p24.php:
|
1117 |
Â
msgid "P24 gateway that integrates with your Stripe account."
|
1118 |
Â
msgstr ""
|
1119 |
Â
|
@@ -1322,24 +1463,6 @@ msgstr ""
|
|
1322 |
Â
msgid "Credit Card Display"
|
1323 |
Â
msgstr ""
|
1324 |
Â
|
1325 |
-
#: includes/gateways/settings/applepay-settings.php:60
|
1326 |
-
#: includes/gateways/settings/googlepay-settings.php:78
|
1327 |
-
#: includes/gateways/settings/payment-request-settings.php:61
|
1328 |
-
msgid "Payment Sections"
|
1329 |
-
msgstr ""
|
1330 |
-
|
1331 |
-
#: includes/gateways/settings/applepay-settings.php:63
|
1332 |
-
#: includes/gateways/settings/googlepay-settings.php:81
|
1333 |
-
#: includes/gateways/settings/payment-request-settings.php:64
|
1334 |
-
msgid "Product Page"
|
1335 |
-
msgstr ""
|
1336 |
-
|
1337 |
-
#: includes/gateways/settings/applepay-settings.php:64
|
1338 |
-
#: includes/gateways/settings/googlepay-settings.php:82
|
1339 |
-
#: includes/gateways/settings/payment-request-settings.php:65
|
1340 |
-
msgid "Cart Page"
|
1341 |
-
msgstr ""
|
1342 |
-
|
1343 |
Â
#: includes/gateways/settings/applepay-settings.php:65
|
1344 |
Â
#: includes/gateways/settings/googlepay-settings.php:83
|
1345 |
Â
#: includes/gateways/settings/payment-request-settings.php:66
|
@@ -1585,6 +1708,10 @@ msgstr ""
|
|
1585 |
Â
msgid "Standard"
|
1586 |
Â
msgstr ""
|
1587 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1588 |
Â
#: includes/gateways/settings/googlepay-settings.php:119
|
1589 |
Â
msgid "Button Options"
|
1590 |
Â
msgstr ""
|
@@ -1597,10 +1724,6 @@ msgstr ""
|
|
1597 |
Â
msgid "Black"
|
1598 |
Â
msgstr ""
|
1599 |
Â
|
1600 |
-
#: includes/gateways/settings/googlepay-settings.php:127
|
1601 |
-
msgid "White"
|
1602 |
-
msgstr ""
|
1603 |
-
|
1604 |
Â
#: includes/gateways/settings/googlepay-settings.php:130
|
1605 |
Â
msgid "The button color of the GPay button."
|
1606 |
Â
msgstr ""
|
@@ -2057,6 +2180,10 @@ msgstr ""
|
|
2057 |
Â
msgid "when required"
|
2058 |
Â
msgstr ""
|
2059 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2060 |
Â
#: templates/checkout/checkout-banner.php:9
|
2061 |
Â
msgid "Express Checkout"
|
2062 |
Â
msgstr ""
|
2 |
Â
# This file is distributed under the same license as the Stripe For WooCommerce plugin.
|
3 |
Â
msgid ""
|
4 |
Â
msgstr ""
|
5 |
+
"Project-Id-Version: Stripe For WooCommerce 3.3.1\n"
|
6 |
Â
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woo-stripe-payment\n"
|
7 |
Â
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
Â
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
Â
"MIME-Version: 1.0\n"
|
10 |
Â
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
Â
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2021-05-10T08:42:31+00:00\n"
|
13 |
Â
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
Â
"X-Generator: WP-CLI 2.4.0\n"
|
15 |
Â
"X-Domain: woo-stripe-payment\n"
|
23 |
Â
msgstr ""
|
24 |
Â
|
25 |
Â
#. Description of the plugin
|
26 |
+
msgid "Accept Credit Cards, Google Pay, Apple Pay, ACH, Klarna and more using Stripe."
|
27 |
Â
msgstr ""
|
28 |
Â
|
29 |
Â
#. Author of the plugin
|
103 |
Â
msgid "Order %s"
|
104 |
Â
msgstr ""
|
105 |
Â
|
106 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:376
|
107 |
Â
msgid "Gateway will appear when store currency is <strong>%s</strong>"
|
108 |
Â
msgstr ""
|
109 |
Â
|
110 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:379
|
111 |
Â
msgid " & billing country is not <strong>%s</strong>"
|
112 |
Â
msgstr ""
|
113 |
Â
|
114 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:381
|
115 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:384
|
116 |
Â
msgid " & billing country is <strong>%s</strong>"
|
117 |
Â
msgstr ""
|
118 |
Â
|
231 |
Â
|
232 |
Â
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1553
|
233 |
Â
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1584
|
234 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:230
|
235 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:291
|
236 |
Â
#: includes/wc-stripe-functions.php:424
|
237 |
Â
#: includes/wc-stripe-functions.php:489
|
238 |
Â
msgid "Shipping"
|
240 |
Â
|
241 |
Â
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1561
|
242 |
Â
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1587
|
243 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:240
|
244 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:301
|
245 |
Â
#: includes/wc-stripe-functions.php:441
|
246 |
Â
#: includes/wc-stripe-functions.php:497
|
247 |
Â
msgid "Discount"
|
248 |
Â
msgstr ""
|
249 |
Â
|
250 |
Â
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1564
|
251 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:258
|
252 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:323
|
253 |
Â
#: includes/wc-stripe-functions.php:449
|
254 |
Â
msgid "Tax"
|
255 |
Â
msgstr ""
|
357 |
Â
#: includes/admin/meta-boxes/views/html-charge-data-subview.php:14
|
358 |
Â
#: includes/admin/meta-boxes/views/html-order-actions.php:48
|
359 |
Â
#: includes/admin/meta-boxes/views/html-order-pay.php:23
|
360 |
+
#: includes/admin/meta-boxes/views/html-product-data.php:46
|
361 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:52
|
362 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:82
|
363 |
Â
#: includes/gateways/settings/applepay-settings.php:52
|
364 |
Â
#: includes/gateways/settings/cc-settings.php:49
|
365 |
Â
#: includes/gateways/settings/googlepay-settings.php:70
|
486 |
Â
|
487 |
Â
#: includes/admin/meta-boxes/views/html-order-pay.php:21
|
488 |
Â
#: includes/admin/meta-boxes/views/html-product-data.php:15
|
489 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:48
|
490 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:78
|
491 |
Â
#: includes/gateways/settings/applepay-settings.php:48
|
492 |
Â
#: includes/gateways/settings/cc-settings.php:45
|
493 |
Â
#: includes/gateways/settings/googlepay-settings.php:66
|
496 |
Â
msgstr ""
|
497 |
Â
|
498 |
Â
#: includes/admin/meta-boxes/views/html-order-pay.php:24
|
499 |
+
#: includes/admin/meta-boxes/views/html-product-data.php:48
|
500 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:53
|
501 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:83
|
502 |
Â
#: includes/gateways/settings/applepay-settings.php:53
|
503 |
Â
#: includes/gateways/settings/cc-settings.php:50
|
504 |
Â
#: includes/gateways/settings/googlepay-settings.php:71
|
875 |
Â
msgid "You must set the API mode to live in order to enable the Plaid development environment."
|
876 |
Â
msgstr ""
|
877 |
Â
|
878 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:25
|
879 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:26
|
880 |
+
msgid "Afterpay"
|
881 |
+
msgstr ""
|
882 |
+
|
883 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:27
|
884 |
+
msgid "Afterpay gateway that integrates with your Stripe account."
|
885 |
+
msgstr ""
|
886 |
+
|
887 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:41
|
888 |
+
msgid "Complete Order"
|
889 |
+
msgstr ""
|
890 |
+
|
891 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:56
|
892 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:86
|
893 |
+
#: includes/gateways/settings/applepay-settings.php:56
|
894 |
+
#: includes/gateways/settings/cc-settings.php:53
|
895 |
+
#: includes/gateways/settings/payment-request-settings.php:57
|
896 |
+
msgid "This option determines whether the customer's funds are captured immediately or authorized and can be captured at a later date."
|
897 |
+
msgstr ""
|
898 |
+
|
899 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:60
|
900 |
+
#: includes/gateways/settings/applepay-settings.php:60
|
901 |
+
#: includes/gateways/settings/googlepay-settings.php:78
|
902 |
+
#: includes/gateways/settings/payment-request-settings.php:61
|
903 |
+
msgid "Payment Sections"
|
904 |
+
msgstr ""
|
905 |
+
|
906 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:63
|
907 |
+
#: includes/gateways/settings/applepay-settings.php:63
|
908 |
+
#: includes/gateways/settings/googlepay-settings.php:81
|
909 |
+
#: includes/gateways/settings/payment-request-settings.php:64
|
910 |
+
msgid "Product Page"
|
911 |
+
msgstr ""
|
912 |
+
|
913 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:64
|
914 |
+
#: includes/gateways/settings/applepay-settings.php:64
|
915 |
+
#: includes/gateways/settings/googlepay-settings.php:82
|
916 |
+
#: includes/gateways/settings/payment-request-settings.php:65
|
917 |
+
msgid "Cart Page"
|
918 |
+
msgstr ""
|
919 |
+
|
920 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:68
|
921 |
+
msgid "These are the additional sections where the Afterpay messaging will be enabled. You can control individual products via the Edit product page."
|
922 |
+
msgstr ""
|
923 |
+
|
924 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:75
|
925 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:134
|
926 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:193
|
927 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:89
|
928 |
+
#: includes/gateways/settings/googlepay-settings.php:106
|
929 |
+
msgid "Icon"
|
930 |
+
msgstr ""
|
931 |
+
|
932 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:79
|
933 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:138
|
934 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:197
|
935 |
+
msgid "Black on mint"
|
936 |
+
msgstr ""
|
937 |
+
|
938 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:80
|
939 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:139
|
940 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:198
|
941 |
+
msgid "Black on white"
|
942 |
+
msgstr ""
|
943 |
+
|
944 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:81
|
945 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:140
|
946 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:199
|
947 |
+
msgid "Mint on black"
|
948 |
+
msgstr ""
|
949 |
+
|
950 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:82
|
951 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:141
|
952 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:200
|
953 |
+
msgid "White on black"
|
954 |
+
msgstr ""
|
955 |
+
|
956 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:85
|
957 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:144
|
958 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:203
|
959 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:97
|
960 |
+
msgid "This is the icon style that appears next to the gateway on the checkout page."
|
961 |
+
msgstr ""
|
962 |
+
|
963 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:88
|
964 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:147
|
965 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:206
|
966 |
+
msgid "Intro text"
|
967 |
+
msgstr ""
|
968 |
+
|
969 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:99
|
970 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:111
|
971 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:158
|
972 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:170
|
973 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:217
|
974 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:229
|
975 |
+
msgid "Modal link style"
|
976 |
+
msgstr ""
|
977 |
+
|
978 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:103
|
979 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:162
|
980 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:221
|
981 |
+
msgid "More info text"
|
982 |
+
msgstr ""
|
983 |
+
|
984 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:104
|
985 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:163
|
986 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:222
|
987 |
+
msgid "Circled info icon"
|
988 |
+
msgstr ""
|
989 |
+
|
990 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:105
|
991 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:164
|
992 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:223
|
993 |
+
msgid "Learn more text"
|
994 |
+
msgstr ""
|
995 |
+
|
996 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:107
|
997 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:166
|
998 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:225
|
999 |
+
msgid "This is the style of the Afterpay info link."
|
1000 |
+
msgstr ""
|
1001 |
+
|
1002 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:115
|
1003 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:174
|
1004 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:233
|
1005 |
+
msgid "Mint"
|
1006 |
+
msgstr ""
|
1007 |
+
|
1008 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:116
|
1009 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:175
|
1010 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:234
|
1011 |
+
#: includes/gateways/settings/googlepay-settings.php:127
|
1012 |
+
msgid "White"
|
1013 |
+
msgstr ""
|
1014 |
+
|
1015 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:118
|
1016 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:177
|
1017 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:236
|
1018 |
+
msgid "This is the theme color for the Afterpay info modal."
|
1019 |
+
msgstr ""
|
1020 |
+
|
1021 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:123
|
1022 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:182
|
1023 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:241
|
1024 |
+
msgid "Show interest free"
|
1025 |
+
msgstr ""
|
1026 |
+
|
1027 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:126
|
1028 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:185
|
1029 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-afterpay.php:244
|
1030 |
+
msgid "If enabled, the Afterpay message will contain the interest free text."
|
1031 |
+
msgstr ""
|
1032 |
+
|
1033 |
Â
#: includes/gateways/class-wc-payment-gateway-stripe-alipay.php:22
|
1034 |
Â
#: includes/gateways/class-wc-payment-gateway-stripe-alipay.php:25
|
1035 |
Â
msgid "Alipay"
|
1188 |
Â
msgid "Klarna gateway that integrates with your Stripe account."
|
1189 |
Â
msgstr ""
|
1190 |
Â
|
1191 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:92
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1192 |
Â
msgid "Black text"
|
1193 |
Â
msgstr ""
|
1194 |
Â
|
1195 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:93
|
1196 |
Â
msgid "Pink background black text"
|
1197 |
Â
msgstr ""
|
1198 |
Â
|
1199 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:100
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1200 |
Â
msgid "Payment Categories"
|
1201 |
Â
msgstr ""
|
1202 |
Â
|
1203 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:106
|
1204 |
Â
msgid "These are the payment categories that will be displayed on the checkout page if they are supported. Note, depending on the customer's billing country, not all enabled options may show."
|
1205 |
Â
msgstr ""
|
1206 |
Â
|
1207 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:112
|
1208 |
Â
msgid "Use Stripe translation"
|
1209 |
Â
msgstr ""
|
1210 |
Â
|
1211 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:116
|
1212 |
Â
msgid "If enabled, the payment option labels will use the Stripe translated text."
|
1213 |
Â
msgstr ""
|
1214 |
Â
|
1215 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:250
|
1216 |
Â
msgid "Fee total"
|
1217 |
Â
msgstr ""
|
1218 |
Â
|
1219 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:315
|
1220 |
Â
msgid "Fee"
|
1221 |
Â
msgstr ""
|
1222 |
Â
|
1223 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:353
|
1224 |
Â
msgid "Pay Now"
|
1225 |
Â
msgstr ""
|
1226 |
Â
|
1227 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:354
|
1228 |
Â
msgid "Pay Later"
|
1229 |
Â
msgstr ""
|
1230 |
Â
|
1231 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:355
|
1232 |
Â
msgid "Pay Over Time"
|
1233 |
Â
msgstr ""
|
1234 |
Â
|
1235 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:368
|
1236 |
Â
msgid "Click %1$shere%2$s for Klarna test payment methods."
|
1237 |
Â
msgstr ""
|
1238 |
Â
|
1239 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:374
|
1240 |
Â
msgid "Your purchase is not approved."
|
1241 |
Â
msgstr ""
|
1242 |
Â
|
1249 |
Â
msgid "Multibanco gateway that integrates with your Stripe account."
|
1250 |
Â
msgstr ""
|
1251 |
Â
|
1252 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-p24.php:25
|
1253 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-p24.php:28
|
1254 |
Â
msgid "Przelewy24"
|
1255 |
Â
msgstr ""
|
1256 |
Â
|
1257 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-p24.php:29
|
1258 |
Â
msgid "P24 gateway that integrates with your Stripe account."
|
1259 |
Â
msgstr ""
|
1260 |
Â
|
1463 |
Â
msgid "Credit Card Display"
|
1464 |
Â
msgstr ""
|
1465 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1466 |
Â
#: includes/gateways/settings/applepay-settings.php:65
|
1467 |
Â
#: includes/gateways/settings/googlepay-settings.php:83
|
1468 |
Â
#: includes/gateways/settings/payment-request-settings.php:66
|
1708 |
Â
msgid "Standard"
|
1709 |
Â
msgstr ""
|
1710 |
Â
|
1711 |
+
#: includes/gateways/settings/googlepay-settings.php:115
|
1712 |
+
msgid "This is the icon style that appears next to the gateway on the checkout page. Google's API team typically requires the With Outline option on the checkout page for branding purposes."
|
1713 |
+
msgstr ""
|
1714 |
+
|
1715 |
Â
#: includes/gateways/settings/googlepay-settings.php:119
|
1716 |
Â
msgid "Button Options"
|
1717 |
Â
msgstr ""
|
1724 |
Â
msgid "Black"
|
1725 |
Â
msgstr ""
|
1726 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1727 |
Â
#: includes/gateways/settings/googlepay-settings.php:130
|
1728 |
Â
msgid "The button color of the GPay button."
|
1729 |
Â
msgstr ""
|
2180 |
Â
msgid "when required"
|
2181 |
Â
msgstr ""
|
2182 |
Â
|
2183 |
+
#: templates/checkout/afterpay.php:11
|
2184 |
+
msgid "After clicking \"%s\", you will be redirected to Afterpay to complete your purchase securely."
|
2185 |
+
msgstr ""
|
2186 |
+
|
2187 |
Â
#: templates/checkout/checkout-banner.php:9
|
2188 |
Â
msgid "Express Checkout"
|
2189 |
Â
msgstr ""
|
includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php
CHANGED
@@ -281,10 +281,10 @@ abstract class WC_Payment_Gateway_Stripe_Local_Payment extends WC_Payment_Gatewa
|
|
281 |
Â
)
|
282 |
Â
);
|
283 |
Â
if ( ( $email = $order->get_billing_email() ) ) {
|
284 |
-
$
|
285 |
Â
}
|
286 |
Â
if ( ( $phone = $order->get_billing_phone() ) ) {
|
287 |
-
$
|
288 |
Â
}
|
289 |
Â
|
290 |
Â
return $owner;
|
@@ -321,10 +321,12 @@ abstract class WC_Payment_Gateway_Stripe_Local_Payment extends WC_Payment_Gatewa
|
|
321 |
Â
$order = wc_get_order( absint( $wp->query_vars['order-pay'] ) );
|
322 |
Â
$currency = $order->get_currency();
|
323 |
Â
$billing_country = $order->get_billing_country();
|
Â
|
|
324 |
Â
} else {
|
325 |
Â
$currency = get_woocommerce_currency();
|
326 |
Â
$customer = WC()->customer;
|
327 |
Â
$billing_country = $customer ? $customer->get_billing_country() : null;
|
Â
|
|
328 |
Â
if ( ! $billing_country ) {
|
329 |
Â
$billing_country = WC()->countries->get_base_country();
|
330 |
Â
}
|
@@ -340,7 +342,7 @@ abstract class WC_Payment_Gateway_Stripe_Local_Payment extends WC_Payment_Gatewa
|
|
340 |
Â
}
|
341 |
Â
}
|
342 |
Â
if ( $_available && method_exists( $this, 'validate_local_payment_available' ) ) {
|
343 |
-
$_available = $this->validate_local_payment_available( $currency, $billing_country );
|
344 |
Â
}
|
345 |
Â
|
346 |
Â
/**
|
281 |
Â
)
|
282 |
Â
);
|
283 |
Â
if ( ( $email = $order->get_billing_email() ) ) {
|
284 |
+
$owner['email'] = $email;
|
285 |
Â
}
|
286 |
Â
if ( ( $phone = $order->get_billing_phone() ) ) {
|
287 |
+
$owner['phone'] = $phone;
|
288 |
Â
}
|
289 |
Â
|
290 |
Â
return $owner;
|
321 |
Â
$order = wc_get_order( absint( $wp->query_vars['order-pay'] ) );
|
322 |
Â
$currency = $order->get_currency();
|
323 |
Â
$billing_country = $order->get_billing_country();
|
324 |
+
$total = $order->get_total();
|
325 |
Â
} else {
|
326 |
Â
$currency = get_woocommerce_currency();
|
327 |
Â
$customer = WC()->customer;
|
328 |
Â
$billing_country = $customer ? $customer->get_billing_country() : null;
|
329 |
+
$total = WC()->cart ? WC()->cart->total : 0;
|
330 |
Â
if ( ! $billing_country ) {
|
331 |
Â
$billing_country = WC()->countries->get_base_country();
|
332 |
Â
}
|
342 |
Â
}
|
343 |
Â
}
|
344 |
Â
if ( $_available && method_exists( $this, 'validate_local_payment_available' ) ) {
|
345 |
+
$_available = $this->validate_local_payment_available( $currency, $billing_country, $total );
|
346 |
Â
}
|
347 |
Â
|
348 |
Â
/**
|
includes/admin/class-wc-stripe-admin-settings.php
CHANGED
@@ -68,7 +68,7 @@ class WC_Stripe_Admin_Settings {
|
|
68 |
Â
}
|
69 |
Â
|
70 |
Â
public static function admin_settings_tabs( $tabs ) {
|
71 |
-
$tabs['
|
72 |
Â
|
73 |
Â
return $tabs;
|
74 |
Â
}
|
68 |
Â
}
|
69 |
Â
|
70 |
Â
public static function admin_settings_tabs( $tabs ) {
|
71 |
+
$tabs['stripe_afterpay'] = __( 'Local Gateways', 'woo-stripe-payment' );
|
72 |
Â
|
73 |
Â
return $tabs;
|
74 |
Â
}
|
includes/admin/meta-boxes/views/html-product-data.php
CHANGED
@@ -1,78 +1,78 @@
|
|
1 |
-
<div id="stripe_product_data"
|
2 |
-
class="panel woocommerce_stripe_panel woocommerce_options_panel hidden">
|
3 |
-
<p>
|
4 |
-
<?php _e( 'In this section you can control which gateways are displayed on the product page.', 'woo-stripe-payment' ); ?>
|
5 |
-
</p>
|
6 |
-
<div class="options_group">
|
7 |
-
<input type="hidden" id="wc_stripe_update_product"
|
8 |
-
name="wc_stripe_update_product"/>
|
9 |
-
<table class="wc-stripe-product-table wc_gateways">
|
10 |
-
<thead>
|
11 |
-
<tr>
|
12 |
-
<th></th>
|
13 |
-
<th><?php _e( 'Method', 'woo-stripe-payment' ); ?></th>
|
14 |
-
<th><?php _e( 'Enabled', 'woo-stripe-payment' ); ?></th>
|
15 |
-
<th><?php _e( 'Charge Type', 'woo-stripe-payment' ); ?>
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
</tr>
|
52 |
-
<?php endforeach; ?>
|
53 |
-
</tbody>
|
54 |
-
</table>
|
55 |
-
<?php
|
56 |
-
woocommerce_wp_select(
|
57 |
-
array(
|
58 |
-
'id' => '_stripe_button_position',
|
59 |
-
'value' => ( ( $position = $product_object->get_meta( '_stripe_button_position' ) ) ? $position : 'bottom' ),
|
60 |
-
'label' => __( 'Button Position', 'woo-stripe-payment' ),
|
61 |
-
'options' => array(
|
62 |
-
'bottom' => __( 'Below add to cart', 'woo-stripe-payment' ),
|
63 |
-
'top' => __( 'Above add to cart', 'woo-stripe-payment' ),
|
64 |
-
),
|
65 |
-
'desc_tip' => true,
|
66 |
-
'description' => __(
|
67 |
-
'The location of the payment buttons in relation to the Add to Cart button.',
|
68 |
-
'woo-stripe-payment'
|
69 |
-
),
|
70 |
-
)
|
71 |
-
);
|
72 |
-
?>
|
73 |
-
</div>
|
74 |
-
<p>
|
75 |
-
<button class="button button-secondary wc-stripe-save-product-data"><?php _e( 'Save', 'woo-stripe-payment' ); ?></button>
|
76 |
-
<span class="spinner"></span>
|
77 |
-
</p>
|
78 |
-
</div>
|
1 |
+
<div id="stripe_product_data"
|
2 |
+
class="panel woocommerce_stripe_panel woocommerce_options_panel hidden">
|
3 |
+
<p>
|
4 |
+
<?php _e( 'In this section you can control which gateways are displayed on the product page.', 'woo-stripe-payment' ); ?>
|
5 |
+
</p>
|
6 |
+
<div class="options_group">
|
7 |
+
<input type="hidden" id="wc_stripe_update_product"
|
8 |
+
name="wc_stripe_update_product"/>
|
9 |
+
<table class="wc-stripe-product-table wc_gateways">
|
10 |
+
<thead>
|
11 |
+
<tr>
|
12 |
+
<th></th>
|
13 |
+
<th><?php _e( 'Method', 'woo-stripe-payment' ); ?></th>
|
14 |
+
<th><?php _e( 'Enabled', 'woo-stripe-payment' ); ?></th>
|
15 |
+
<th><?php _e( 'Charge Type', 'woo-stripe-payment' ); ?>
|
16 |
+
</thead>
|
17 |
+
<tbody class="ui-sortable">
|
18 |
+
<?php foreach ( self::get_payment_gateways() as $gateway ) : ?>
|
19 |
+
<tr data-gateway_id="<?php echo $gateway->id; ?>">
|
20 |
+
<td class="sort">
|
21 |
+
<div class="wc-item-reorder-nav">
|
22 |
+
<button type="button" class="wc-move-up" tabindex="0"
|
23 |
+
aria-hidden="false"
|
24 |
+
aria-label="<?php /* Translators: %s Payment gateway name. */
|
25 |
+
echo esc_attr( sprintf( __( 'Move the "%s" payment method up', 'woocommerce' ), $gateway->get_method_title() ) ); ?>"><?php esc_html_e( 'Move up', 'woocommerce' ); ?></button>
|
26 |
+
<button type="button" class="wc-move-down" tabindex="0"
|
27 |
+
aria-hidden="false"
|
28 |
+
aria-label="<?php /* Translators: %s Payment gateway name. */
|
29 |
+
echo esc_attr( sprintf( __( 'Move the "%s" payment method down', 'woocommerce' ), $gateway->get_method_title() ) ); ?>"><?php esc_html_e( 'Move down', 'woocommerce' ); ?></button>
|
30 |
+
<input type="hidden" name="stripe_gateway_order[]"
|
31 |
+
value="<?php echo esc_attr( $gateway->id ); ?>"/>
|
32 |
+
</div>
|
33 |
+
</td>
|
34 |
+
<td>
|
35 |
+
<?php echo $gateway->get_method_title(); ?>
|
36 |
+
</td>
|
37 |
+
<td>
|
38 |
+
<a class="wc-stripe-product-gateway-enabled" href="#">
|
39 |
+
<span class="woocommerce-input-toggle woocommerce-input-toggle--<?php if ( ! self::get_product_option( $gateway->id )->enabled() ) { ?>disabled<?php } else { ?>enabled<?php } ?>"></span>
|
40 |
+
</a>
|
41 |
+
</td>
|
42 |
+
<td class="capture-type">
|
43 |
+
<select name="stripe_capture_type[]" class="wc-enhanced-select"
|
44 |
+
style="width: 100px">
|
45 |
+
<option value="capture"
|
46 |
+
<?php selected( 'capture', self::get_product_option( $gateway->id )->get_option( 'charge_type' ) ); ?>><?php _e( 'Capture', 'woo-stripe-payment' ); ?></option>
|
47 |
+
<option value="authorize"
|
48 |
+
<?php selected( 'authorize', self::get_product_option( $gateway->id )->get_option( 'charge_type' ) ); ?>><?php _e( 'Authorize', 'woo-stripe-payment' ); ?></option>
|
49 |
+
</select>
|
50 |
+
</td>
|
51 |
+
</tr>
|
52 |
+
<?php endforeach; ?>
|
53 |
+
</tbody>
|
54 |
+
</table>
|
55 |
+
<?php
|
56 |
+
woocommerce_wp_select(
|
57 |
+
array(
|
58 |
+
'id' => '_stripe_button_position',
|
59 |
+
'value' => ( ( $position = $product_object->get_meta( '_stripe_button_position' ) ) ? $position : 'bottom' ),
|
60 |
+
'label' => __( 'Button Position', 'woo-stripe-payment' ),
|
61 |
+
'options' => array(
|
62 |
+
'bottom' => __( 'Below add to cart', 'woo-stripe-payment' ),
|
63 |
+
'top' => __( 'Above add to cart', 'woo-stripe-payment' ),
|
64 |
+
),
|
65 |
+
'desc_tip' => true,
|
66 |
+
'description' => __(
|
67 |
+
'The location of the payment buttons in relation to the Add to Cart button.',
|
68 |
+
'woo-stripe-payment'
|
69 |
+
),
|
70 |
+
)
|
71 |
+
);
|
72 |
+
?>
|
73 |
+
</div>
|
74 |
+
<p>
|
75 |
+
<button class="button button-secondary wc-stripe-save-product-data"><?php _e( 'Save', 'woo-stripe-payment' ); ?></button>
|
76 |
+
<span class="spinner"></span>
|
77 |
+
</p>
|
78 |
+
</div>
|
includes/class-stripe.php
CHANGED
@@ -25,7 +25,7 @@ class WC_Stripe_Manager {
|
|
25 |
Â
*
|
26 |
Â
* @var string
|
27 |
Â
*/
|
28 |
-
public $version = '3.3.
|
29 |
Â
|
30 |
Â
/**
|
31 |
Â
*
|
@@ -203,6 +203,7 @@ class WC_Stripe_Manager {
|
|
203 |
Â
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/gateways/class-wc-payment-gateway-stripe-alipay.php';
|
204 |
Â
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/gateways/class-wc-payment-gateway-stripe-becs.php';
|
205 |
Â
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/gateways/class-wc-payment-gateway-stripe-grabpay.php';
|
Â
|
|
206 |
Â
|
207 |
Â
// tokens
|
208 |
Â
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/abstract/abstract-wc-payment-token-stripe.php';
|
@@ -243,6 +244,7 @@ class WC_Stripe_Manager {
|
|
243 |
Â
'WC_Payment_Gateway_Stripe_ApplePay',
|
244 |
Â
'WC_Payment_Gateway_Stripe_GooglePay',
|
245 |
Â
'WC_Payment_Gateway_Stripe_Payment_Request',
|
Â
|
|
246 |
Â
'WC_Payment_Gateway_Stripe_ACH',
|
247 |
Â
'WC_Payment_Gateway_Stripe_Ideal',
|
248 |
Â
'WC_Payment_Gateway_Stripe_P24',
|
@@ -264,7 +266,7 @@ class WC_Stripe_Manager {
|
|
264 |
Â
$api_class = apply_filters( 'wc_stripe_rest_api_class', 'WC_Stripe_Rest_API' );
|
265 |
Â
$this->rest_api = new $api_class();
|
266 |
Â
|
267 |
-
if ( $this->is_request( 'frontend' ) ) {
|
268 |
Â
$this->scripts = new WC_Stripe_Frontend_Scripts();
|
269 |
Â
}
|
270 |
Â
|
25 |
Â
*
|
26 |
Â
* @var string
|
27 |
Â
*/
|
28 |
+
public $version = '3.3.1';
|
29 |
Â
|
30 |
Â
/**
|
31 |
Â
*
|
203 |
Â
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/gateways/class-wc-payment-gateway-stripe-alipay.php';
|
204 |
Â
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/gateways/class-wc-payment-gateway-stripe-becs.php';
|
205 |
Â
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/gateways/class-wc-payment-gateway-stripe-grabpay.php';
|
206 |
+
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/gateways/class-wc-payment-gateway-stripe-afterpay.php';
|
207 |
Â
|
208 |
Â
// tokens
|
209 |
Â
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/abstract/abstract-wc-payment-token-stripe.php';
|
244 |
Â
'WC_Payment_Gateway_Stripe_ApplePay',
|
245 |
Â
'WC_Payment_Gateway_Stripe_GooglePay',
|
246 |
Â
'WC_Payment_Gateway_Stripe_Payment_Request',
|
247 |
+
'WC_Payment_Gateway_Stripe_Afterpay',
|
248 |
Â
'WC_Payment_Gateway_Stripe_ACH',
|
249 |
Â
'WC_Payment_Gateway_Stripe_Ideal',
|
250 |
Â
'WC_Payment_Gateway_Stripe_P24',
|
266 |
Â
$api_class = apply_filters( 'wc_stripe_rest_api_class', 'WC_Stripe_Rest_API' );
|
267 |
Â
$this->rest_api = new $api_class();
|
268 |
Â
|
269 |
+
if ( $this->is_request( 'frontend' ) && class_exists( 'WC_Stripe_Frontend_Scripts' ) ) {
|
270 |
Â
$this->scripts = new WC_Stripe_Frontend_Scripts();
|
271 |
Â
}
|
272 |
Â
|
includes/class-wc-stripe-field-manager.php
CHANGED
@@ -69,9 +69,11 @@ class WC_Stripe_Field_Manager {
|
|
69 |
Â
|
70 |
Â
public static function output_product_checkout_fields() {
|
71 |
Â
global $product;
|
72 |
-
$gateways
|
73 |
-
$ordering
|
74 |
-
$ordering
|
Â
|
|
Â
|
|
75 |
Â
|
76 |
Â
foreach ( WC()->payment_gateways()->get_available_payment_gateways() as $id => $gateway ) {
|
77 |
Â
/**
|
@@ -79,6 +81,9 @@ class WC_Stripe_Field_Manager {
|
|
79 |
Â
* @var WC_Payment_Gateway_Stripe $gateway
|
80 |
Â
*/
|
81 |
Â
if ( $gateway->supports( 'wc_stripe_product_checkout' ) && ! $product->is_type( 'external' ) ) {
|
Â
|
|
Â
|
|
Â
|
|
82 |
Â
$option = new WC_Stripe_Product_Gateway_Option( $product, $gateway );
|
83 |
Â
if ( $option->enabled() ) {
|
84 |
Â
if ( isset( $ordering[ $gateway->id ] ) ) {
|
@@ -91,7 +96,7 @@ class WC_Stripe_Field_Manager {
|
|
91 |
Â
}
|
92 |
Â
ksort( $gateways );
|
93 |
Â
|
94 |
-
if ( count( apply_filters( 'wc_stripe_product_payment_methods', $gateways ) ) > 0 ) {
|
95 |
Â
wc_stripe_get_template(
|
96 |
Â
'product/payment-methods.php',
|
97 |
Â
array(
|
69 |
Â
|
70 |
Â
public static function output_product_checkout_fields() {
|
71 |
Â
global $product;
|
72 |
+
$gateways = array();
|
73 |
+
$ordering = $product->get_meta( WC_Stripe_Constants::PRODUCT_GATEWAY_ORDER );
|
74 |
+
$ordering = ! $ordering ? array() : $ordering;
|
75 |
+
$is_subscription = wcs_stripe_active() && WC_Subscriptions_Product::is_subscription( $product );
|
76 |
+
$is_preorder = wc_stripe_pre_orders_active() && WC_Pre_Orders_Product::product_is_charged_upon_release( $product );
|
77 |
Â
|
78 |
Â
foreach ( WC()->payment_gateways()->get_available_payment_gateways() as $id => $gateway ) {
|
79 |
Â
/**
|
81 |
Â
* @var WC_Payment_Gateway_Stripe $gateway
|
82 |
Â
*/
|
83 |
Â
if ( $gateway->supports( 'wc_stripe_product_checkout' ) && ! $product->is_type( 'external' ) ) {
|
84 |
+
if ( ( $is_subscription && ! $gateway->supports( 'subscriptions' ) ) || ( $is_preorder && ! $gateway->supports( 'pre-orders' ) ) ) {
|
85 |
+
continue;
|
86 |
+
}
|
87 |
Â
$option = new WC_Stripe_Product_Gateway_Option( $product, $gateway );
|
88 |
Â
if ( $option->enabled() ) {
|
89 |
Â
if ( isset( $ordering[ $gateway->id ] ) ) {
|
96 |
Â
}
|
97 |
Â
ksort( $gateways );
|
98 |
Â
|
99 |
+
if ( count( apply_filters( 'wc_stripe_product_payment_methods', $gateways, $product ) ) > 0 ) {
|
100 |
Â
wc_stripe_get_template(
|
101 |
Â
'product/payment-methods.php',
|
102 |
Â
array(
|
includes/class-wc-stripe-redirect-handler.php
CHANGED
@@ -73,7 +73,7 @@ class WC_Stripe_Redirect_Handler {
|
|
73 |
Â
$redirect = $result['redirect'];
|
74 |
Â
}
|
75 |
Â
}
|
76 |
-
} elseif (
|
77 |
Â
if ( ! $payment_method->has_order_lock( $order ) ) {
|
78 |
Â
$payment_method->set_order_lock( $order );
|
79 |
Â
$result = $payment_method->process_payment( $order_id );
|
73 |
Â
$redirect = $result['redirect'];
|
74 |
Â
}
|
75 |
Â
}
|
76 |
+
} elseif ( in_array( $result->status, array( 'succeeded', 'requires_capture' ) ) ) {
|
77 |
Â
if ( ! $payment_method->has_order_lock( $order ) ) {
|
78 |
Â
$payment_method->set_order_lock( $order );
|
79 |
Â
$result = $payment_method->process_payment( $order_id );
|
includes/gateways/class-wc-payment-gateway-stripe-afterpay.php
ADDED
@@ -0,0 +1,350 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
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|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) || exit();
|
3 |
+
|
4 |
+
if ( ! class_exists( 'WC_Payment_Gateway_Stripe_Local_Payment' ) ) {
|
5 |
+
return;
|
6 |
+
}
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class WC_Payment_Gateway_Stripe_Afterpay
|
10 |
+
*
|
11 |
+
* @since 3.3.1
|
12 |
+
* @package Stripe/Gateways
|
13 |
+
*/
|
14 |
+
class WC_Payment_Gateway_Stripe_Afterpay extends WC_Payment_Gateway_Stripe_Local_Payment {
|
15 |
+
|
16 |
+
use WC_Stripe_Local_Payment_Intent_Trait;
|
17 |
+
|
18 |
+
protected $payment_method_type = 'afterpay_clearpay';
|
19 |
+
|
20 |
+
public function __construct() {
|
21 |
+
$this->local_payment_type = 'afterpay_clearpay';
|
22 |
+
$this->currencies = array( 'AUD', 'CAD', 'NZD', 'GBP', 'USD' );
|
23 |
+
$this->countries = $this->limited_countries = array( 'AU', 'CA', 'NZ', 'GB', 'US' );
|
24 |
+
$this->id = 'stripe_afterpay';
|
25 |
+
$this->tab_title = __( 'Afterpay', 'woo-stripe-payment' );
|
26 |
+
$this->method_title = __( 'Afterpay', 'woo-stripe-payment' );
|
27 |
+
$this->method_description = __( 'Afterpay gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
|
28 |
+
$this->icon = '';
|
29 |
+
parent::__construct();
|
30 |
+
$this->template_name = 'afterpay.php';
|
31 |
+
}
|
32 |
+
|
33 |
+
public function init_supports() {
|
34 |
+
parent::init_supports();
|
35 |
+
$this->supports[] = 'wc_stripe_cart_checkout';
|
36 |
+
$this->supports[] = 'wc_stripe_product_checkout';
|
37 |
+
//$this->supports[] = 'wc_stripe_mini_cart_checkout';
|
38 |
+
}
|
39 |
+
|
40 |
+
public function get_order_button_text( $text ) {
|
41 |
+
return __( 'Complete Order', 'woo-stripe-payment' );
|
42 |
+
}
|
43 |
+
|
44 |
+
public function get_local_payment_settings() {
|
45 |
+
return wp_parse_args( array(
|
46 |
+
'charge_type' => array(
|
47 |
+
'type' => 'select',
|
48 |
+
'title' => __( 'Charge Type', 'woo-stripe-payment' ),
|
49 |
+
'default' => 'capture',
|
50 |
+
'class' => 'wc-enhanced-select',
|
51 |
+
'options' => array(
|
52 |
+
'capture' => __( 'Capture', 'woo-stripe-payment' ),
|
53 |
+
'authorize' => __( 'Authorize', 'woo-stripe-payment' ),
|
54 |
+
),
|
55 |
+
'desc_tip' => true,
|
56 |
+
'description' => __( 'This option determines whether the customer\'s funds are captured immediately or authorized and can be captured at a later date.', 'woo-stripe-payment' ),
|
57 |
+
),
|
58 |
+
'payment_sections' => array(
|
59 |
+
'type' => 'multiselect',
|
60 |
+
'title' => __( 'Payment Sections', 'woo-stripe-payment' ),
|
61 |
+
'class' => 'wc-enhanced-select',
|
62 |
+
'options' => array(
|
63 |
+
'product' => __( 'Product Page', 'woo-stripe-payment' ),
|
64 |
+
'cart' => __( 'Cart Page', 'woo-stripe-payment' ),
|
65 |
+
//'mini_cart' => __( 'Mini Cart', 'woo-stripe-payment' ),
|
66 |
+
),
|
67 |
+
'default' => array( 'product', 'cart' ),
|
68 |
+
'description' => __( 'These are the additional sections where the Afterpay messaging will be enabled. You can control individual products via the Edit product page.', 'woo-stripe-payment' ),
|
69 |
+
),
|
70 |
+
'checkout_styling' => array(
|
71 |
+
'type' => 'title',
|
72 |
+
'title' => __( 'Checkout Page Styling' )
|
73 |
+
),
|
74 |
+
'icon_checkout' => array(
|
75 |
+
'title' => __( 'Icon', 'woo-stripe-payment' ),
|
76 |
+
'type' => 'select',
|
77 |
+
'default' => 'black-on-mint',
|
78 |
+
'options' => array(
|
79 |
+
'black-on-mint' => __( 'Black on mint', 'woo-stripe-payment' ),
|
80 |
+
'black-on-white' => __( 'Black on white', 'woo-stripe-payment' ),
|
81 |
+
'mint-on-black' => __( 'Mint on black', 'woo-stripe-payment' ),
|
82 |
+
'white-on-black' => __( 'White on black', 'woo-stripe-payment' )
|
83 |
+
),
|
84 |
+
'desc_tip' => true,
|
85 |
+
'description' => __( 'This is the icon style that appears next to the gateway on the checkout page.', 'woo-stripe-payment' ),
|
86 |
+
),
|
87 |
+
'intro_text_checkout' => array(
|
88 |
+
'title' => __( 'Intro text', 'woo-stripe-payment' ),
|
89 |
+
'type' => 'select',
|
90 |
+
'default' => 'In',
|
91 |
+
'options' => array(
|
92 |
+
'In' => 'In',
|
93 |
+
'Or' => 'Or',
|
94 |
+
'Pay' => 'Pay',
|
95 |
+
'Pay in' => 'Pay in'
|
96 |
+
)
|
97 |
+
),
|
98 |
+
'modal_link_style_checkout' => array(
|
99 |
+
'title' => __( 'Modal link style', 'woo-stripe-payment' ),
|
100 |
+
'type' => 'select',
|
101 |
+
'default' => 'circled-info-icon',
|
102 |
+
'options' => array(
|
103 |
+
'more-info-text' => __( 'More info text', 'woo-stripe-payment' ),
|
104 |
+
'circled-info-icon' => __( 'Circled info icon', 'woo-stripe-payment' ),
|
105 |
+
'learn-more-text' => __( 'Learn more text', 'woo-stripe-payment' ),
|
106 |
+
),
|
107 |
+
'description' => __( 'This is the style of the Afterpay info link.', 'woo-stripe-payment' ),
|
108 |
+
'desc_tip' => true
|
109 |
+
),
|
110 |
+
'modal_theme_checkout' => array(
|
111 |
+
'title' => __( 'Modal link style', 'woo-stripe-payment' ),
|
112 |
+
'type' => 'select',
|
113 |
+
'default' => 'mint',
|
114 |
+
'options' => array(
|
115 |
+
'mint' => __( 'Mint', 'woo-stripe-payment' ),
|
116 |
+
'white' => __( 'White', 'woo-stripe-payment' )
|
117 |
+
),
|
118 |
+
'description' => __( 'This is the theme color for the Afterpay info modal.', 'woo-stripe-payment' ),
|
119 |
+
'desc_tip' => true
|
120 |
+
),
|
121 |
+
'show_interest_free_checkout' => array(
|
122 |
+
'type' => 'checkbox',
|
123 |
+
'title' => __( 'Show interest free', 'woo-stripe-payment' ),
|
124 |
+
'default' => 'no',
|
125 |
+
'value' => 'yes',
|
126 |
+
'description' => __( 'If enabled, the Afterpay message will contain the interest free text.', 'woo-stripe-payment' ),
|
127 |
+
'desc_tip' => true
|
128 |
+
),
|
129 |
+
'cart_styling' => array(
|
130 |
+
'type' => 'title',
|
131 |
+
'title' => __( 'Cart Page Styling' )
|
132 |
+
),
|
133 |
+
'icon_cart' => array(
|
134 |
+
'title' => __( 'Icon', 'woo-stripe-payment' ),
|
135 |
+
'type' => 'select',
|
136 |
+
'default' => 'black-on-mint',
|
137 |
+
'options' => array(
|
138 |
+
'black-on-mint' => __( 'Black on mint', 'woo-stripe-payment' ),
|
139 |
+
'black-on-white' => __( 'Black on white', 'woo-stripe-payment' ),
|
140 |
+
'mint-on-black' => __( 'Mint on black', 'woo-stripe-payment' ),
|
141 |
+
'white-on-black' => __( 'White on black', 'woo-stripe-payment' )
|
142 |
+
),
|
143 |
+
'desc_tip' => true,
|
144 |
+
'description' => __( 'This is the icon style that appears next to the gateway on the checkout page.', 'woo-stripe-payment' ),
|
145 |
+
),
|
146 |
+
'intro_text_cart' => array(
|
147 |
+
'title' => __( 'Intro text', 'woo-stripe-payment' ),
|
148 |
+
'type' => 'select',
|
149 |
+
'default' => 'Or',
|
150 |
+
'options' => array(
|
151 |
+
'In' => 'In',
|
152 |
+
'Or' => 'Or',
|
153 |
+
'Pay' => 'Pay',
|
154 |
+
'Pay in' => 'Pay in'
|
155 |
+
)
|
156 |
+
),
|
157 |
+
'modal_link_style_cart' => array(
|
158 |
+
'title' => __( 'Modal link style', 'woo-stripe-payment' ),
|
159 |
+
'type' => 'select',
|
160 |
+
'default' => 'circled-info-icon',
|
161 |
+
'options' => array(
|
162 |
+
'more-info-text' => __( 'More info text', 'woo-stripe-payment' ),
|
163 |
+
'circled-info-icon' => __( 'Circled info icon', 'woo-stripe-payment' ),
|
164 |
+
'learn-more-text' => __( 'Learn more text', 'woo-stripe-payment' ),
|
165 |
+
),
|
166 |
+
'description' => __( 'This is the style of the Afterpay info link.', 'woo-stripe-payment' ),
|
167 |
+
'desc_tip' => true
|
168 |
+
),
|
169 |
+
'modal_theme_cart' => array(
|
170 |
+
'title' => __( 'Modal link style', 'woo-stripe-payment' ),
|
171 |
+
'type' => 'select',
|
172 |
+
'default' => 'mint',
|
173 |
+
'options' => array(
|
174 |
+
'mint' => __( 'Mint', 'woo-stripe-payment' ),
|
175 |
+
'white' => __( 'White', 'woo-stripe-payment' )
|
176 |
+
),
|
177 |
+
'description' => __( 'This is the theme color for the Afterpay info modal.', 'woo-stripe-payment' ),
|
178 |
+
'desc_tip' => true
|
179 |
+
),
|
180 |
+
'show_interest_free_cart' => array(
|
181 |
+
'type' => 'checkbox',
|
182 |
+
'title' => __( 'Show interest free', 'woo-stripe-payment' ),
|
183 |
+
'default' => 'no',
|
184 |
+
'value' => 'yes',
|
185 |
+
'description' => __( 'If enabled, the Afterpay message will contain the interest free text.', 'woo-stripe-payment' ),
|
186 |
+
'desc_tip' => true
|
187 |
+
),
|
188 |
+
'product_styling' => array(
|
189 |
+
'type' => 'title',
|
190 |
+
'title' => __( 'Product Page Styling' )
|
191 |
+
),
|
192 |
+
'icon_product' => array(
|
193 |
+
'title' => __( 'Icon', 'woo-stripe-payment' ),
|
194 |
+
'type' => 'select',
|
195 |
+
'default' => 'black-on-mint',
|
196 |
+
'options' => array(
|
197 |
+
'black-on-mint' => __( 'Black on mint', 'woo-stripe-payment' ),
|
198 |
+
'black-on-white' => __( 'Black on white', 'woo-stripe-payment' ),
|
199 |
+
'mint-on-black' => __( 'Mint on black', 'woo-stripe-payment' ),
|
200 |
+
'white-on-black' => __( 'White on black', 'woo-stripe-payment' )
|
201 |
+
),
|
202 |
+
'desc_tip' => true,
|
203 |
+
'description' => __( 'This is the icon style that appears next to the gateway on the checkout page.', 'woo-stripe-payment' ),
|
204 |
+
),
|
205 |
+
'intro_text_product' => array(
|
206 |
+
'title' => __( 'Intro text', 'woo-stripe-payment' ),
|
207 |
+
'type' => 'select',
|
208 |
+
'default' => 'Pay in',
|
209 |
+
'options' => array(
|
210 |
+
'In' => 'In',
|
211 |
+
'Or' => 'Or',
|
212 |
+
'Pay' => 'Pay',
|
213 |
+
'Pay in' => 'Pay in'
|
214 |
+
)
|
215 |
+
),
|
216 |
+
'modal_link_style_product' => array(
|
217 |
+
'title' => __( 'Modal link style', 'woo-stripe-payment' ),
|
218 |
+
'type' => 'select',
|
219 |
+
'default' => 'circled-info-icon',
|
220 |
+
'options' => array(
|
221 |
+
'more-info-text' => __( 'More info text', 'woo-stripe-payment' ),
|
222 |
+
'circled-info-icon' => __( 'Circled info icon', 'woo-stripe-payment' ),
|
223 |
+
'learn-more-text' => __( 'Learn more text', 'woo-stripe-payment' ),
|
224 |
+
),
|
225 |
+
'description' => __( 'This is the style of the Afterpay info link.', 'woo-stripe-payment' ),
|
226 |
+
'desc_tip' => true
|
227 |
+
),
|
228 |
+
'modal_theme_product' => array(
|
229 |
+
'title' => __( 'Modal link style', 'woo-stripe-payment' ),
|
230 |
+
'type' => 'select',
|
231 |
+
'default' => 'mint',
|
232 |
+
'options' => array(
|
233 |
+
'mint' => __( 'Mint', 'woo-stripe-payment' ),
|
234 |
+
'white' => __( 'White', 'woo-stripe-payment' )
|
235 |
+
),
|
236 |
+
'description' => __( 'This is the theme color for the Afterpay info modal.', 'woo-stripe-payment' ),
|
237 |
+
'desc_tip' => true
|
238 |
+
),
|
239 |
+
'show_interest_free_product' => array(
|
240 |
+
'type' => 'checkbox',
|
241 |
+
'title' => __( 'Show interest free', 'woo-stripe-payment' ),
|
242 |
+
'default' => 'no',
|
243 |
+
'value' => 'yes',
|
244 |
+
'description' => __( 'If enabled, the Afterpay message will contain the interest free text.', 'woo-stripe-payment' ),
|
245 |
+
'desc_tip' => true
|
246 |
+
)
|
247 |
+
), parent::get_local_payment_settings() );
|
248 |
+
}
|
249 |
+
|
250 |
+
public function enqueue_product_scripts( $scripts ) {
|
251 |
+
$scripts->enqueue_script( 'afterpay-product', $scripts->assets_url( 'js/frontend/afterpay.js' ), array(
|
252 |
+
$scripts->get_handle( 'wc-stripe' )
|
253 |
+
) );
|
254 |
+
$scripts->localize_script( 'afterpay-product', $this->get_localized_params( 'product' ) );
|
255 |
+
}
|
256 |
+
|
257 |
+
public function enqueue_cart_scripts( $scripts ) {
|
258 |
+
$scripts->enqueue_script( 'afterpay-cart', $scripts->assets_url( 'js/frontend/afterpay.js' ), array(
|
259 |
+
$scripts->get_handle( 'wc-stripe' )
|
260 |
+
) );
|
261 |
+
$scripts->localize_script( 'afterpay-cart', $this->get_localized_params( 'cart' ) );
|
262 |
+
}
|
263 |
+
|
264 |
+
public function product_fields() {
|
265 |
+
$this->enqueue_frontend_scripts( 'product' );
|
266 |
+
$this->output_display_items( 'product' );
|
267 |
+
}
|
268 |
+
|
269 |
+
public function cart_fields() {
|
270 |
+
$this->enqueue_frontend_scripts( 'cart' );
|
271 |
+
$this->output_display_items( 'cart' );
|
272 |
+
}
|
273 |
+
|
274 |
+
public function get_required_parameters() {
|
275 |
+
return apply_filters( 'wc_stripe_afterpay_get_required_parameters', array(
|
276 |
+
'AUD' => array( 'AU', 1, 2000 ),
|
277 |
+
'CAD' => array( 'CA', 1, 2000 ),
|
278 |
+
'NZD' => array( 'NZ', 1, 2000 ),
|
279 |
+
'GBP' => array( 'GB', 1, 800 ),
|
280 |
+
'USD' => array( 'US', 1, 2000 )
|
281 |
+
), $this );
|
282 |
+
}
|
283 |
+
|
284 |
+
/**
|
285 |
+
* @param $currency
|
286 |
+
* @param $billing_country
|
287 |
+
* @param $total
|
288 |
+
*
|
289 |
+
* @return bool
|
290 |
+
*/
|
291 |
+
public function validate_local_payment_available( $currency, $billing_country, $total ) {
|
292 |
+
$_available = false;
|
293 |
+
if ( $billing_country ) {
|
294 |
+
$params = $this->get_required_parameters();
|
295 |
+
|
296 |
+
$_available = isset( $params[ $currency ] );
|
297 |
+
|
298 |
+
// validate the amount is within the limits
|
299 |
+
if ( $_available ) {
|
300 |
+
list( $country, $min_amount, $max_amount ) = $params[ $currency ];
|
301 |
+
$_available = $billing_country == $country && $min_amount <= $total && $total <= $max_amount;
|
302 |
+
}
|
303 |
+
}
|
304 |
+
|
305 |
+
return $_available;
|
306 |
+
}
|
307 |
+
|
308 |
+
public function get_icon() {
|
309 |
+
return '';
|
310 |
+
}
|
311 |
+
|
312 |
+
public function get_localized_params( $context = 'checkout' ) {
|
313 |
+
$params = parent::get_localized_params();
|
314 |
+
$params['msg_options'] = $this->get_afterpay_message_options( $context );
|
315 |
+
|
316 |
+
return $params;
|
317 |
+
}
|
318 |
+
|
319 |
+
public function get_afterpay_message_options( $context = 'checkout' ) {
|
320 |
+
$options = array(
|
321 |
+
'logoType' => 'badge',
|
322 |
+
'badgeTheme' => $this->get_option( "icon_{$context}" ),
|
323 |
+
'lockupTheme' => 'black',
|
324 |
+
'introText' => $this->get_option( "intro_text_{$context}" ),
|
325 |
+
'showInterestFree' => $this->is_active( "show_interest_free_{$context}" ),
|
326 |
+
'modalTheme' => $this->get_option( "modal_theme_{$context}" ),
|
327 |
+
'modalLinkStyle' => $this->get_option( "modal_link_style_{$context}" )
|
328 |
+
);
|
329 |
+
if ( in_array( $context, array( 'cart', 'checkout' ) ) ) {
|
330 |
+
$options['isEligible'] = WC()->cart && WC()->cart->needs_shipping();
|
331 |
+
} elseif ( $context === 'product' ) {
|
332 |
+
global $product;
|
333 |
+
if ( $product ) {
|
334 |
+
$options['isEligible'] = $product->needs_shipping();
|
335 |
+
}
|
336 |
+
}
|
337 |
+
|
338 |
+
return apply_filters( 'wc_stripe_afterpay_message_options', $options, $context, $this );
|
339 |
+
}
|
340 |
+
|
341 |
+
public function get_title() {
|
342 |
+
// override because design guidelines state the title should consist of the
|
343 |
+
// Afterpay pay in 4 text
|
344 |
+
if ( is_checkout() ) {
|
345 |
+
$this->title = '';
|
346 |
+
}
|
347 |
+
|
348 |
+
return parent::get_title();
|
349 |
+
}
|
350 |
+
}
|
includes/gateways/class-wc-payment-gateway-stripe-klarna.php
CHANGED
@@ -44,10 +44,11 @@ class WC_Payment_Gateway_Stripe_Klarna extends WC_Payment_Gateway_Stripe_Local_P
|
|
44 |
Â
/**
|
45 |
Â
* @param string $currency
|
46 |
Â
* @param string $billing_country
|
Â
|
|
47 |
Â
*
|
48 |
Â
* @return bool
|
49 |
Â
*/
|
50 |
-
public function validate_local_payment_available( $currency, $billing_country ) {
|
51 |
Â
if ( $billing_country ) {
|
52 |
Â
$params = $this->get_required_parameters();
|
53 |
Â
|
@@ -93,7 +94,7 @@ class WC_Payment_Gateway_Stripe_Klarna extends WC_Payment_Gateway_Stripe_Local_P
|
|
93 |
Â
),
|
94 |
Â
'default' => 'klarna_pink',
|
95 |
Â
'desc_tip' => true,
|
96 |
-
'description' => __( 'This is the icon style that appears next to the gateway on the checkout page.
|
97 |
Â
),
|
98 |
Â
'payment_categories' => array(
|
99 |
Â
'title' => __( 'Payment Categories', 'woo-stripe-payment' ),
|
44 |
Â
/**
|
45 |
Â
* @param string $currency
|
46 |
Â
* @param string $billing_country
|
47 |
+
* @param float $total
|
48 |
Â
*
|
49 |
Â
* @return bool
|
50 |
Â
*/
|
51 |
+
public function validate_local_payment_available( $currency, $billing_country, $total ) {
|
52 |
Â
if ( $billing_country ) {
|
53 |
Â
$params = $this->get_required_parameters();
|
54 |
Â
|
94 |
Â
),
|
95 |
Â
'default' => 'klarna_pink',
|
96 |
Â
'desc_tip' => true,
|
97 |
+
'description' => __( 'This is the icon style that appears next to the gateway on the checkout page.', 'woo-stripe-payment' ),
|
98 |
Â
),
|
99 |
Â
'payment_categories' => array(
|
100 |
Â
'title' => __( 'Payment Categories', 'woo-stripe-payment' ),
|
includes/gateways/class-wc-payment-gateway-stripe-p24.php
CHANGED
@@ -13,7 +13,9 @@ if ( ! class_exists( 'WC_Payment_Gateway_Stripe_Local_Payment' ) ) {
|
|
13 |
Â
*/
|
14 |
Â
class WC_Payment_Gateway_Stripe_P24 extends WC_Payment_Gateway_Stripe_Local_Payment {
|
15 |
Â
|
16 |
-
use
|
Â
|
|
Â
|
|
17 |
Â
|
18 |
Â
public function __construct() {
|
19 |
Â
$this->local_payment_type = 'p24';
|
13 |
Â
*/
|
14 |
Â
class WC_Payment_Gateway_Stripe_P24 extends WC_Payment_Gateway_Stripe_Local_Payment {
|
15 |
Â
|
16 |
+
use WC_Stripe_Local_Payment_Intent_Trait;
|
17 |
+
|
18 |
+
protected $payment_method_type = 'p24';
|
19 |
Â
|
20 |
Â
public function __construct() {
|
21 |
Â
$this->local_payment_type = 'p24';
|
packages/blocks/assets/js/components/checkout/payment-method/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
import {
|
2 |
Â
|
3 |
Â
export const PaymentMethod = ({getData, content, ...props}) => {
|
4 |
Â
const Content = content;
|
@@ -21,7 +21,7 @@ export const PaymentMethod = ({getData, content, ...props}) => {
|
|
21 |
Â
const Description = ({desc, payment_method}) => {
|
22 |
Â
return (
|
23 |
Â
<div className={`wc-stripe-blocks-payment-method__desc ${payment_method}`}>
|
24 |
-
<
|
25 |
Â
</div>
|
26 |
Â
)
|
27 |
Â
}
|
1 |
+
import {useEffect, useRef} from '@wordpress/element';
|
2 |
Â
|
3 |
Â
export const PaymentMethod = ({getData, content, ...props}) => {
|
4 |
Â
const Content = content;
|
21 |
Â
const Description = ({desc, payment_method}) => {
|
22 |
Â
return (
|
23 |
Â
<div className={`wc-stripe-blocks-payment-method__desc ${payment_method}`}>
|
24 |
+
<p>{desc}</p>
|
25 |
Â
</div>
|
26 |
Â
)
|
27 |
Â
}
|
packages/blocks/assets/js/payment-methods/credit-card/components/bootstrap/style.scss
CHANGED
@@ -209,4 +209,12 @@ $medium-width: 475px;
|
|
209 |
Â
max-width: 100%;
|
210 |
Â
}
|
211 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
212 |
Â
}
|
209 |
Â
max-width: 100%;
|
210 |
Â
}
|
211 |
Â
}
|
212 |
+
}
|
213 |
+
|
214 |
+
.wc-stripe-blocks-payment-method__desc {
|
215 |
+
&.stripe_cc {
|
216 |
+
p {
|
217 |
+
margin-bottom: 1em;
|
218 |
+
}
|
219 |
+
}
|
220 |
Â
}
|
packages/blocks/assets/js/payment-methods/credit-card/components/simple/style.scss
CHANGED
@@ -168,5 +168,13 @@ $min-width: 475px;
|
|
168 |
Â
}
|
169 |
Â
|
170 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
171 |
Â
}
|
172 |
Â
}
|
168 |
Â
}
|
169 |
Â
|
170 |
Â
|
171 |
+
}
|
172 |
+
}
|
173 |
+
|
174 |
+
.wc-stripe-blocks-payment-method__desc {
|
175 |
+
&.stripe_cc {
|
176 |
+
p {
|
177 |
+
margin: 0;
|
178 |
+
}
|
179 |
Â
}
|
180 |
Â
}
|
packages/blocks/assets/js/payment-methods/credit-card/payment-method.js
CHANGED
@@ -1,9 +1,15 @@
|
|
1 |
Â
import {useEffect, useState, useCallback, useMemo} from '@wordpress/element';
|
2 |
Â
import {registerPaymentMethod} from '@woocommerce/blocks-registry';
|
3 |
-
import {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
4 |
Â
import {Elements, CardElement, useStripe, useElements, CardNumberElement} from '@stripe/react-stripe-js';
|
5 |
Â
import {PaymentMethodLabel, PaymentMethod, SavePaymentMethod} from '../../components/checkout';
|
6 |
-
import SavedCardComponent from '
|
7 |
Â
import CustomCardForm from './components/custom-card-form';
|
8 |
Â
import StripeCardForm from "./components/stripe-card-form";
|
9 |
Â
import {
|
@@ -15,6 +21,11 @@ import {
|
|
15 |
Â
|
16 |
Â
const getData = getSettings('stripe_cc_data');
|
17 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
18 |
Â
const CreditCardContent = (props) => {
|
19 |
Â
const [error, setError] = useState(false);
|
20 |
Â
useEffect(() => {
|
@@ -90,7 +101,7 @@ const CreditCardElement = (
|
|
90 |
Â
return (
|
91 |
Â
<div className='wc-stripe-card-container'>
|
92 |
Â
<Tag {...{getData, billing, onChange}}/>
|
93 |
-
{
|
94 |
Â
<SavePaymentMethod label={getData('savePaymentMethodLabel')}
|
95 |
Â
onChange={onSavePaymentMethod}
|
96 |
Â
checked={savePaymentMethod}/>}
|
1 |
Â
import {useEffect, useState, useCallback, useMemo} from '@wordpress/element';
|
2 |
Â
import {registerPaymentMethod} from '@woocommerce/blocks-registry';
|
3 |
+
import {
|
4 |
+
initStripe as loadStripe,
|
5 |
+
getSettings,
|
6 |
+
isUserLoggedIn,
|
7 |
+
cartContainsSubscription,
|
8 |
+
cartContainsPreOrder
|
9 |
+
} from '../util';
|
10 |
Â
import {Elements, CardElement, useStripe, useElements, CardNumberElement} from '@stripe/react-stripe-js';
|
11 |
Â
import {PaymentMethodLabel, PaymentMethod, SavePaymentMethod} from '../../components/checkout';
|
12 |
+
import SavedCardComponent from '../saved-card-component';
|
13 |
Â
import CustomCardForm from './components/custom-card-form';
|
14 |
Â
import StripeCardForm from "./components/stripe-card-form";
|
15 |
Â
import {
|
21 |
Â
|
22 |
Â
const getData = getSettings('stripe_cc_data');
|
23 |
Â
|
24 |
+
const displaySaveCard = (customerId) => {
|
25 |
+
return isUserLoggedIn(customerId) && getData('saveCardEnabled') &&
|
26 |
+
!cartContainsSubscription() && !cartContainsPreOrder()
|
27 |
+
}
|
28 |
+
|
29 |
Â
const CreditCardContent = (props) => {
|
30 |
Â
const [error, setError] = useState(false);
|
31 |
Â
useEffect(() => {
|
101 |
Â
return (
|
102 |
Â
<div className='wc-stripe-card-container'>
|
103 |
Â
<Tag {...{getData, billing, onChange}}/>
|
104 |
+
{displaySaveCard(billing.customerId) &&
|
105 |
Â
<SavePaymentMethod label={getData('savePaymentMethodLabel')}
|
106 |
Â
onChange={onSavePaymentMethod}
|
107 |
Â
checked={savePaymentMethod}/>}
|
packages/blocks/assets/js/payment-methods/googlepay/util.js
CHANGED
@@ -52,6 +52,11 @@ export const getPaymentRequestUpdate = ({billing, shippingData, processingCountr
|
|
52 |
Â
const getDisplayItems = (cartTotalItems, unit = 2) => {
|
53 |
Â
let items = [];
|
54 |
Â
cartTotalItems.forEach(item => {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
55 |
Â
if (0 < item.value) {
|
56 |
Â
items.push({
|
57 |
Â
label: item.label,
|
52 |
Â
const getDisplayItems = (cartTotalItems, unit = 2) => {
|
53 |
Â
let items = [];
|
54 |
Â
cartTotalItems.forEach(item => {
|
55 |
+
/**
|
56 |
+
* @todo when blocks provides the line item type, we can show
|
57 |
+
* shipping when it's a $0. We currently filter because there's no
|
58 |
+
* reason to show things like fees if they're $0 to keep the wallet clean.
|
59 |
+
*/
|
60 |
Â
if (0 < item.value) {
|
61 |
Â
items.push({
|
62 |
Â
label: item.label,
|
packages/blocks/assets/js/payment-methods/local-payment/afterpay.js
ADDED
@@ -0,0 +1,92 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
import {useState, useEffect} from '@wordpress/element';
|
2 |
+
import {registerPaymentMethod} from '@woocommerce/blocks-registry';
|
3 |
+
import {getSettings, initStripe} from "../util";
|
4 |
+
import {LocalPaymentIntentContent} from './local-payment-method';
|
5 |
+
import {PaymentMethod} from "../../components/checkout";
|
6 |
+
import {canMakePayment} from "./local-payment-method";
|
7 |
+
import {AfterpayClearpayMessageElement, Elements} from "@stripe/react-stripe-js";
|
8 |
+
import {sprintf, __} from '@wordpress/i18n';
|
9 |
+
|
10 |
+
const getData = getSettings('stripe_afterpay_data');
|
11 |
+
let variablesHandler;
|
12 |
+
const setVariablesHandler = (handler) => {
|
13 |
+
variablesHandler = handler;
|
14 |
+
}
|
15 |
+
const PaymentMethodLabel = ({getData}) => {
|
16 |
+
const [variables, setVariables] = useState({
|
17 |
+
amount: getData('cartTotal'),
|
18 |
+
currency: getData('currency')
|
19 |
+
});
|
20 |
+
setVariablesHandler(setVariables);
|
21 |
+
return (
|
22 |
+
<Elements stripe={initStripe}>
|
23 |
+
<div className='wc-stripe-blocks-afterpay__label'>
|
24 |
+
<AfterpayClearpayMessageElement options={{
|
25 |
+
...getData('msgOptions'),
|
26 |
+
...{
|
27 |
+
amount: variables.amount,
|
28 |
+
currency: variables.currency,
|
29 |
+
}
|
30 |
+
}}/>
|
31 |
+
</div>
|
32 |
+
</Elements>
|
33 |
+
);
|
34 |
+
}
|
35 |
+
|
36 |
+
const PaymentMethodTest = ({content, billing, shippingData, ...props}) => {
|
37 |
+
const Content = content;
|
38 |
+
const {cartTotal, currency} = billing;
|
39 |
+
const {needsShipping} = shippingData
|
40 |
+
useEffect(() => {
|
41 |
+
setVariablesHandler({
|
42 |
+
amount: cartTotal.value,
|
43 |
+
currency: currency.code,
|
44 |
+
isEligible: needsShipping
|
45 |
+
});
|
46 |
+
}, [
|
47 |
+
cartTotal.value,
|
48 |
+
currency.code,
|
49 |
+
needsShipping
|
50 |
+
]);
|
51 |
+
return (
|
52 |
+
<>
|
53 |
+
{needsShipping &&
|
54 |
+
<div className='wc-stripe-blocks-payment-method-content'>
|
55 |
+
<div className="wc-stripe-blocks-afterpay-offsite__container">
|
56 |
+
<div className="wc-stripe-blocks-afterpay__offsite">
|
57 |
+
<img src={getData('offSiteSrc')}/>
|
58 |
+
<p>{sprintf(__('After clicking "%s", you will be redirected to Afterpay to complete your purchase securely.', 'woo-stripe-payment'), getData('placeOrderButtonLabel'))}</p>
|
59 |
+
</div>
|
60 |
+
</div>
|
61 |
+
<Content {...{...props, billing, shippingData}}/>
|
62 |
+
</div>}
|
63 |
+
</>
|
64 |
+
);
|
65 |
+
}
|
66 |
+
|
67 |
+
if (getData()) {
|
68 |
+
registerPaymentMethod({
|
69 |
+
name: getData('name'),
|
70 |
+
label: <PaymentMethodLabel
|
71 |
+
getData={getData}/>,
|
72 |
+
ariaLabel: 'Ideal',
|
73 |
+
placeOrderButtonLabel: getData('placeOrderButtonLabel'),
|
74 |
+
canMakePayment: canMakePayment(getData, ({settings, billingData, cartTotals}) => {
|
75 |
+
const {country} = billingData;
|
76 |
+
const {currency_code: currency} = cartTotals;
|
77 |
+
const requiredParams = settings('requiredParams');
|
78 |
+
const [countryCode] = requiredParams[currency];
|
79 |
+
return country == countryCode;
|
80 |
+
}),
|
81 |
+
content: <PaymentMethodTest
|
82 |
+
content={LocalPaymentIntentContent}
|
83 |
+
getData={getData}
|
84 |
+
confirmationMethod={'confirmAfterpayClearpayPayment'}/>,
|
85 |
+
edit: <PaymentMethod content={LocalPaymentIntentContent} getData={getData}/>,
|
86 |
+
supports: {
|
87 |
+
showSavedCards: false,
|
88 |
+
showSaveOption: false,
|
89 |
+
features: getData('features')
|
90 |
+
}
|
91 |
+
})
|
92 |
+
}
|
packages/blocks/assets/js/payment-methods/local-payment/index.js
CHANGED
@@ -11,4 +11,5 @@ import './wechat';
|
|
11 |
Â
import './fpx';
|
12 |
Â
import './becs';
|
13 |
Â
import './grabpay';
|
14 |
-
import './alipay'
|
Â
|
11 |
Â
import './fpx';
|
12 |
Â
import './becs';
|
13 |
Â
import './grabpay';
|
14 |
+
import './alipay'
|
15 |
+
import './afterpay';
|
packages/blocks/assets/js/payment-methods/local-payment/p24.js
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
Â
import {registerPaymentMethod} from '@woocommerce/blocks-registry';
|
2 |
Â
import {getSettings} from "../util";
|
3 |
-
import {
|
4 |
Â
import {PaymentMethodLabel, PaymentMethod} from "../../components/checkout";
|
5 |
Â
import {canMakePayment} from "./local-payment-method";
|
Â
|
|
6 |
Â
|
7 |
Â
const getData = getSettings('stripe_p24_data');
|
8 |
Â
|
@@ -16,8 +17,12 @@ if (getData()) {
|
|
16 |
Â
ariaLabel: 'P24',
|
17 |
Â
placeOrderButtonLabel: getData('placeOrderButtonLabel'),
|
18 |
Â
canMakePayment: canMakePayment(getData),
|
19 |
-
content: <PaymentMethod
|
20 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
21 |
Â
supports: {
|
22 |
Â
showSavedCards: false,
|
23 |
Â
showSaveOption: false,
|
1 |
Â
import {registerPaymentMethod} from '@woocommerce/blocks-registry';
|
2 |
Â
import {getSettings} from "../util";
|
3 |
+
import {LocalPaymentIntentContent} from './local-payment-method';
|
4 |
Â
import {PaymentMethodLabel, PaymentMethod} from "../../components/checkout";
|
5 |
Â
import {canMakePayment} from "./local-payment-method";
|
6 |
+
import {P24BankElement} from "@stripe/react-stripe-js";
|
7 |
Â
|
8 |
Â
const getData = getSettings('stripe_p24_data');
|
9 |
Â
|
17 |
Â
ariaLabel: 'P24',
|
18 |
Â
placeOrderButtonLabel: getData('placeOrderButtonLabel'),
|
19 |
Â
canMakePayment: canMakePayment(getData),
|
20 |
+
content: <PaymentMethod
|
21 |
+
content={LocalPaymentIntentContent}
|
22 |
+
getData={getData}
|
23 |
+
confirmationMethod={'confirmP24Payment'}
|
24 |
+
component={P24BankElement}/>,
|
25 |
+
edit: <PaymentMethod content={LocalPaymentIntentContent} getData={getData}/>,
|
26 |
Â
supports: {
|
27 |
Â
showSavedCards: false,
|
28 |
Â
showSaveOption: false,
|
packages/blocks/assets/js/payment-methods/local-payment/styles.scss
CHANGED
@@ -117,4 +117,45 @@
|
|
117 |
Â
.wc-block-components-validation-error {
|
118 |
Â
position: relative;
|
119 |
Â
}
|
120 |
-
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
117 |
Â
.wc-block-components-validation-error {
|
118 |
Â
position: relative;
|
119 |
Â
}
|
120 |
+
}
|
121 |
+
|
122 |
+
.wc-stripe-blocks-afterpay-offsite__container {
|
123 |
+
display: flex;
|
124 |
+
width: 100%;
|
125 |
+
justify-content: center;
|
126 |
+
|
127 |
+
.wc-stripe-blocks-afterpay__offsite {
|
128 |
+
max-width: 320px;
|
129 |
+
display: flex;
|
130 |
+
flex-wrap: wrap;
|
131 |
+
justify-content: center;
|
132 |
+
font-size: 16px;
|
133 |
+
text-align: center;
|
134 |
+
|
135 |
+
img {
|
136 |
+
max-width: 105px;
|
137 |
+
}
|
138 |
+
|
139 |
+
p {
|
140 |
+
margin: 1em 0 0 0;
|
141 |
+
width: 100%;
|
142 |
+
}
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
+
.wc-stripe-blocks-afterpay__label {
|
147 |
+
.AfterpayMessage {
|
148 |
+
margin-top: 0 !important;
|
149 |
+
margin-bottom: 0 !important;
|
150 |
+
}
|
151 |
+
|
152 |
+
.AfterpayMessage-logoSvg {
|
153 |
+
display: inline-block;
|
154 |
+
max-width: 90px;
|
155 |
+
}
|
156 |
+
|
157 |
+
.AfterpayMessage-learnMore {
|
158 |
+
vertical-align: middle;
|
159 |
+
font-size: 16px;
|
160 |
+
}
|
161 |
+
}
|
packages/blocks/build/commons.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
Â
/*! For license information please see commons.js.LICENSE.txt */
|
2 |
-
(self.webpackChunkwc_stripe_name_=self.webpackChunkwc_stripe_name_||[]).push([[351],{7228:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},2858:e=>{e.exports=function(e){if(Array.isArray(e))return e}},3646:(e,t,n)=>{var r=n(7228);e.exports=function(e){if(Array.isArray(e))return r(e)}},1506:e=>{e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},8926:e=>{function t(e,t,n,r,a,o,i){try{var c=e[o](i),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,a)}e.exports=function(e){return function(){var n=this,r=arguments;return new Promise((function(a,o){var i=e.apply(n,r);function c(e){t(i,a,o,c,s,"next",e)}function s(e){t(i,a,o,c,s,"throw",e)}c(void 0)}))}}},4575:e=>{e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},9100:(e,t,n)=>{var r=n(9489),a=n(7067);function o(t,n,i){return a()?e.exports=o=Reflect.construct:e.exports=o=function(e,t,n){var a=[null];a.push.apply(a,t);var o=new(Function.bind.apply(e,a));return n&&r(o,n.prototype),o},o.apply(null,arguments)}e.exports=o},3913:e=>{function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},9713:e=>{e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},7154:e=>{function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}e.exports=t},9754:e=>{function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(n)}e.exports=t},2205:(e,t,n)=>{var r=n(9489);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},5318:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}}},430:e=>{e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}},7067:e=>{e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},6860:e=>{e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},3884:e=>{e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,a=!1,o=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(a)throw o}}return n}}},521:e=>{e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},8206:e=>{e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},6479:(e,t,n)=>{var r=n(7316);e.exports=function(e,t){if(null==e)return{};var n,a,o=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},7316:e=>{e.exports=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}},8585:(e,t,n)=>{var r=n(8),a=n(1506);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?a(e):t}},9489:e=>{function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(n,r)}e.exports=t},3038:(e,t,n)=>{var r=n(2858),a=n(3884),o=n(379),i=n(521);e.exports=function(e,t){return r(e)||a(e,t)||o(e,t)||i()}},319:(e,t,n)=>{var r=n(3646),a=n(6860),o=n(379),i=n(8206);e.exports=function(e){return r(e)||a(e)||o(e)||i()}},8:e=>{function t(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(n)}e.exports=t},379:(e,t,n)=>{var r=n(7228);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},5957:(e,t,n)=>{var r=n(9754),a=n(9489),o=n(430),i=n(9100);function c(t){var n="function"==typeof Map?new Map:void 0;return e.exports=c=function(e){if(null===e||!o(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return i(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),a(t,e)},c(t)}e.exports=c},6664:function(e,t,n){!function(e,t){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,a=!1,o=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(a)throw o}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;function i(){}function c(){}c.resetWarningCache=i;var s,u=(function(e){e.exports=function(){function e(e,t,n,r,a,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:i};return n.PropTypes=n,n}()}(s={exports:{}},s.exports),s.exports),l=function(e){return null!==e&&"object"===n(e)},p="[object Object]",d=function e(t,n){if(!l(t)||!l(n))return t===n;var r=Array.isArray(t);if(r!==Array.isArray(n))return!1;var a=Object.prototype.toString.call(t)===p;if(a!==(Object.prototype.toString.call(n)===p))return!1;if(!a&&!r)return!1;var o=Object.keys(t),i=Object.keys(n);if(o.length!==i.length)return!1;for(var c={},s=0;s<o.length;s+=1)c[o[s]]=!0;for(var u=0;u<i.length;u+=1)c[i[u]]=!0;var d=Object.keys(c);if(d.length!==o.length)return!1;var f=t,m=n;return d.every((function(t){return e(f[t],m[t])}))},f=function(e){var n=t.useRef(e);return t.useEffect((function(){n.current=e}),[e]),n.current},m=function(e){if(null===e||l(t=e)&&"function"==typeof t.elements&&"function"==typeof t.createToken&&"function"==typeof t.createPaymentMethod&&"function"==typeof t.confirmCardPayment)return e;var t;throw new Error("Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.")},y=function(e){if(function(e){return l(e)&&"function"==typeof e.then}(e))return{tag:"async",stripePromise:Promise.resolve(e).then(m)};var t=m(e);return null===t?{tag:"empty"}:{tag:"sync",stripe:t}},g=t.createContext(null);g.displayName="ElementsContext";var v=function(e){var n=e.stripe,r=e.options,o=e.children,i=t.useRef(!1),c=t.useRef(!0),s=t.useMemo((function(){return y(n)}),[n]),u=a(t.useState((function(){return{stripe:null,elements:null}})),2),l=u[0],p=u[1],m=f(n),v=f(r);return null!==m&&(m!==n&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it."),d(r,v)||console.warn("Unsupported prop change on Elements: You cannot change the `options` prop after setting the `stripe` prop.")),i.current||("sync"===s.tag&&(i.current=!0,p({stripe:s.stripe,elements:s.stripe.elements(r)})),"async"===s.tag&&(i.current=!0,s.stripePromise.then((function(e){e&&c.current&&p({stripe:e,elements:e.elements(r)})})))),t.useEffect((function(){return function(){c.current=!1}}),[]),t.useEffect((function(){var e=l.stripe;e&&e._registerWrapper&&e._registerWrapper({name:"react-stripe-js",version:"1.2.2"})}),[l.stripe]),t.createElement(g.Provider,{value:l},o)};v.propTypes={stripe:u.any,options:u.object};var h=function(e){return function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e}(t.useContext(g),e)},b=function(e){return(0,e.children)(h("mounts <ElementsConsumer>"))};b.propTypes={children:u.func.isRequired};var P=function(e){var n=t.useRef(e);return t.useEffect((function(){n.current=e}),[e]),function(){n.current&&n.current.apply(n,arguments)}},E=function(e){return l(e)?(e.paymentRequest,r(e,["paymentRequest"])):{}},O=function(){},S=function(e,n){var r,a="".concat((r=e).charAt(0).toUpperCase()+r.slice(1),"Element"),o=n?function(e){h("mounts <".concat(a,">"));var n=e.id,r=e.className;return t.createElement("div",{id:n,className:r})}:function(n){var r=n.id,o=n.className,i=n.options,c=void 0===i?{}:i,s=n.onBlur,u=void 0===s?O:s,l=n.onFocus,p=void 0===l?O:l,f=n.onReady,m=void 0===f?O:f,y=n.onChange,g=void 0===y?O:y,v=n.onEscape,b=void 0===v?O:v,S=n.onClick,_=void 0===S?O:S,w=h("mounts <".concat(a,">")).elements,C=t.useRef(null),k=t.useRef(null),M=P(m),j=P(u),D=P(p),R=P(_),x=P(g),A=P(b);t.useLayoutEffect((function(){if(null==C.current&&w&&null!=k.current){var t=w.create(e,c);C.current=t,t.mount(k.current),t.on("ready",(function(){return M(t)})),t.on("change",x),t.on("blur",j),t.on("focus",D),t.on("escape",A),t.on("click",R)}}));var I=t.useRef(c);return t.useEffect((function(){I.current&&I.current.paymentRequest!==c.paymentRequest&&console.warn("Unsupported prop change: options.paymentRequest is not a customizable property.");var e=E(c);0===Object.keys(e).length||d(e,E(I.current))||C.current&&(C.current.update(e),I.current=c)}),[c]),t.useLayoutEffect((function(){return function(){C.current&&C.current.destroy()}}),[]),t.createElement("div",{id:r,className:o,ref:k})};return o.propTypes={id:u.string,className:u.string,onChange:u.func,onBlur:u.func,onFocus:u.func,onReady:u.func,onClick:u.func,options:u.object},o.displayName=a,o.__elementType=e,o},_="undefined"==typeof window,w=S("auBankAccount",_),C=S("card",_),k=S("cardNumber",_),M=S("cardExpiry",_),j=S("cardCvc",_),D=S("fpxBank",_),R=S("iban",_),x=S("idealBank",_),A=S("paymentRequestButton",_);e.AuBankAccountElement=w,e.CardCvcElement=j,e.CardElement=C,e.CardExpiryElement=M,e.CardNumberElement=k,e.Elements=v,e.ElementsConsumer=b,e.FpxBankElement=D,e.IbanElement=R,e.IdealBankElement=x,e.PaymentRequestButtonElement=A,e.useElements=function(){return h("calls useElements()").elements},e.useStripe=function(){return h("calls useStripe()").stripe},Object.defineProperty(e,"__esModule",{value:!0})}(t,n(3804))},4465:(e,t,n)=>{"use strict";n.r(t),n.d(t,{loadStripe:()=>l});var r="https://js.stripe.com/v3",a=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,o="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",i=null,c=function(e,t,n){if(null===e)return null;var r=e.apply(void 0,t);return function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"1.12.1",startTime:t})}(r,n),r},s=Promise.resolve().then((function(){return e=null,null!==i?i:i=new Promise((function(t,n){if("undefined"!=typeof window)if(window.Stripe&&e&&console.warn(o),window.Stripe)t(window.Stripe);else try{var i=function(){for(var e=document.querySelectorAll('script[src^="'.concat(r,'"]')),t=0;t<e.length;t++){var n=e[t];if(a.test(n.src))return n}return null}();i&&e?console.warn(o):i||(i=function(e){var t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",n=document.createElement("script");n.src="".concat(r).concat(t);var a=document.head||document.body;if(!a)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return a.appendChild(n),n}(e)),i.addEventListener("load",(function(){window.Stripe?t(window.Stripe):n(new Error("Stripe.js not available"))})),i.addEventListener("error",(function(){n(new Error("Failed to load Stripe.js"))}))}catch(e){return void n(e)}else t(null)}));var e})),u=!1;s.catch((function(e){u||console.warn(e)}));var l=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];u=!0;var r=Date.now();return s.then((function(e){return c(e,t,r)}))}},8149:(e,t,n)=>{var r=n(3027),a=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.SavePaymentMethod=void 0;var o=a(n(4184));n(1127),t.SavePaymentMethod=function(e){var t=e.label,n=e.onChange,a=e.checked;return r.createElement("div",{className:"wc-stripe-save-payment-method"},r.createElement("label",null,r.createElement("input",{type:"checkbox",onChange:function(e){return n(e.target.checked)}}),r.createElement("svg",{className:(0,o.default)("wc-stripe-components-checkbox__mark",{checked:a}),"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20"},r.createElement("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}))),r.createElement("span",null,t))}},3187:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(2029);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var a=n(8149);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var o=n(8744);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var i=n(4901);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}))},2029:(e,t,n)=>{var r=n(3027),a=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.PaymentMethodLabel=void 0;var o=a(n(6479));n(7776),t.PaymentMethodLabel=function(e){var t=e.title,n=e.icons,a=e.paymentMethod,i=(0,o.default)(e,["title","icons","paymentMethod"]).components,c=i.PaymentMethodLabel,s=i.PaymentMethodIcons;return Array.isArray(n)||(n=[n]),r.createElement("span",{className:"wc-stripe-label-container ".concat(a)},r.createElement(c,{text:t}),r.createElement(s,{icons:n,align:"left"}))}},4901:(e,t,n)=>{var r=n(3027),a=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.PaymentMethod=void 0;var o=a(n(9713)),i=a(n(6479)),c=n(3027);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.PaymentMethod=function(e){var t=e.getData,n=e.content,a=(0,i.default)(e,["getData","content"]),o=n,s=t("description"),p=(0,c.useRef)(null);return(0,c.useEffect)((function(){p.current&&0==p.current.childNodes.length&&p.current.classList.add("no-content")})),r.createElement(r.Fragment,null,s&&r.createElement(l,{desc:s,payment_method:t("name")}),r.createElement("div",{ref:p,className:"wc-stripe-blocks-payment-method-content"},r.createElement(o,u(u({},a),{},{getData:t}))))};var l=function(e){var t=e.desc,n=e.payment_method;return r.createElement("div",{className:"wc-stripe-blocks-payment-method__desc ".concat(n)},r.createElement("span",null,t))}},6630:(e,t,n)=>{var r=n(3027),a=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.RadioControlAccordion=void 0;var o=a(n(8744)),i=a(n(4184)),c=function(e){var t=e.option,n=e.checked,a=e.onChange,c=t.label,s=t.value;return r.createElement("div",{className:"wc-stripe-blocks-radio-accordion"},r.createElement(o.default,{checked:n,onChange:a,value:s,label:c}),r.createElement("div",{className:(0,i.default)("wc-stripe-blocks-radio-accordion__content",{"wc-stripe-blocks-radio-accordion__content-visible":n})},t.content))};t.RadioControlAccordion=c;var s=c;t.default=s},8744:(e,t,n)=>{var r=n(3027),a=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.RadioControlOption=void 0;var o=a(n(4184)),i=function(e){var t=e.checked,n=e.onChange,a=e.value,i=e.label;return r.createElement("label",{className:(0,o.default)("wc-stripe-blocks-radio-control__option",{"wc-stripe-blocks-radio-control__option-checked":t})},r.createElement("input",{className:"wc-stripe-blocks-radio-control__input",type:"radio",value:a,checked:t,onChange:function(e){return n(e.target.value)}}),r.createElement("div",{className:"wc-stripe-blocks-radio-control__label"},r.createElement("span",null,i)))};t.RadioControlOption=i;var c=i;t.default=c},7260:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(1293);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var a=n(7150);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var o=n(5201);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}))},1293:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useCreateLinkToken=void 0;var a=r(n(7015)),o=r(n(8926)),i=r(n(3038)),c=n(3027),s=r(n(7606)),u=n(1134);t.useCreateLinkToken=function(e){var t=e.setValidationError,n=(0,c.useState)(!1),r=(0,i.default)(n,2),l=r[0],p=r[1],d=(0,c.useCallback)((0,o.default)(a.default.mark((function e(){var n;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,s.default)({url:(0,u.getRoute)("create/linkToken"),method:"POST",data:{}});case 3:(n=e.sent).token&&((0,u.storeInCache)("linkToken",n.token),p(n.token)),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),t(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])}))),[]);return(0,c.useEffect)((function(){if(!l){var e=(0,u.getFromCache)("linkToken");e?p(e):d()}}),[l,p]),l}},7150:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useInitializePlaid=void 0;var a=n(3027),o=r(n(2810)),i=n(1134);t.useInitializePlaid=function(e){var t=e.getData,n=e.linkToken,r=(0,a.useRef)(null),c=(0,a.useRef)(null),s=(0,a.useCallback)((function(){return new Promise((function(e,t){c.current={resolve:e,reject:t},r.current.open()}))}),[]);return(0,a.useEffect)((function(){n&&(r.current=o.default.create({clientName:t("clientName"),env:t("plaidEnvironment"),product:["auth"],token:n,selectAccount:!0,countryCodes:["US"],onSuccess:function(e,t){c.current.resolve({publicToken:e,metaData:t})},onExit:function(e){c.current.reject(!!e&&(0,i.getErrorMessage)(e.error_message))}}))}),[n]),s}},5201:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useProcessPayment=void 0;var a=r(n(7015)),o=r(n(9713)),i=r(n(8926)),c=n(3027),s=n(1134);t.useProcessPayment=function(e){var t=e.openLinkPopup,n=e.onPaymentProcessing,r=e.responseTypes,u=e.paymentMethod;(0,c.useEffect)((function(){var e=n((0,i.default)(a.default.mark((function e(){var n,i,c,l;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t();case 3:return i=e.sent,c=i.publicToken,l=i.metaData,(0,s.deleteFromCache)("linkToken"),e.abrupt("return",(0,s.ensureSuccessResponse)(r,{meta:{paymentMethodData:(n={},(0,o.default)(n,"".concat(u,"_token_key"),c),(0,o.default)(n,"".concat(u,"_metadata"),JSON.stringify(l)),n)}}));case 9:return e.prev=9,e.t0=e.catch(0),e.abrupt("return",(0,s.ensureErrorResponse)(r,e.t0));case 12:case"end":return e.stop()}}),e,null,[[0,9]])}))));return function(){return e()}}),[n,r,t])}},5605:(e,t,n)=>{n(4836),n(4888)},4888:(e,t,n)=>{var r=n(3027),a=n(5318),o=a(n(3038)),i=a(n(6479)),c=n(3027),s=n(4222),u=n(1134),l=n(3187),p=a(n(1065)),d=n(7260),f=n(3636),m=n(3163),y=(0,u.getSettings)("stripe_ach_data"),g=function(e){var t=e.getData,n=e.eventRegistration,a=e.components,s=e.emitResponse,l=e.onSubmit,p=((0,i.default)(e,["getData","eventRegistration","components","emitResponse","onSubmit"]),s.responseTypes),m=n.onPaymentProcessing,y=n.onCheckoutAfterProcessingWithError,g=a.ValidationInputError,h=(0,c.useState)(!1),b=(0,o.default)(h,2),P=b[0],E=b[1],O=(0,d.useCreateLinkToken)({setValidationError:E});(0,f.useProcessCheckoutError)({responseTypes:p,subscriber:y});var S=(0,d.useInitializePlaid)({getData:t,linkToken:O,onSubmit:l});return(0,d.useProcessPayment)({openLinkPopup:S,onPaymentProcessing:m,responseTypes:p,paymentMethod:t("name")}),r.createElement(r.Fragment,null,u.isTestMode&&r.createElement(v,null),P&&r.createElement(g,{errorMessage:P}))},v=function(){return r.createElement("div",{className:"wc-stripe-blocks-ach__creds"},r.createElement("label",{className:"wc-stripe-blocks-ach__creds-label"},(0,m.__)("Test Credentials","woo-stripe-payment")),r.createElement("div",{className:"wc-stripe-blocks-ach__username"},r.createElement("div",null,r.createElement("strong",null,(0,m.__)("username","woo-stripe-payment")),": user_good"),r.createElement("div",null,r.createElement("strong",null,(0,m.__)("password","woo-stripe-payment")),": pass_good"),r.createElement("div",null,r.createElement("strong",null,(0,m.__)("pin","woo-stripe-payment")),": credential_good")))};(0,s.registerPaymentMethod)({name:y("name"),label:r.createElement(l.PaymentMethodLabel,{title:y("title"),paymentMethod:y("name"),icons:y("icons")}),ariaLabel:"ACH Payment",canMakePayment:function(e){return"USD"===e.cartTotals.currency_code},content:r.createElement(l.PaymentMethod,{getData:y,content:g}),savedTokenComponent:r.createElement(p.default,{getData:y}),edit:r.createElement(g,{getData:y}),placeOrderButtonLabel:y("placeOrderButtonLabel"),supports:{showSavedCards:y("showSavedCards"),showSaveOption:!1,features:y("features")}})},3846:(e,t,n)=>{n(85),n(660)},660:(e,t,n)=>{var r=n(3027),a=n(5318),o=a(n(3038)),i=a(n(6479)),c=n(3027),s=n(4222),u=n(1134),l=n(6664),p=a(n(7082)),d=n(3636),f=(0,u.getSettings)("stripe_applepay_data"),m=function(e){return r.createElement(p.default,null,r.createElement("div",{className:"wc-stripe-apple-pay-container"},r.createElement(l.Elements,{stripe:u.initStripe},r.createElement(y,e))))},y=function(e){var t=e.getData,n=e.onClick,a=e.onClose,s=e.billing,u=e.shippingData,p=e.eventRegistration,f=e.emitResponse,m=e.onSubmit,y=e.activePaymentMethod,g=((0,i.default)(e,["getData","onClick","onClose","billing","shippingData","eventRegistration","emitResponse","onSubmit","activePaymentMethod"]),p.onPaymentProcessing),v=f.responseTypes,h=f.noticeContexts,b=(0,l.useStripe)(),P=(0,d.useStripeError)(),E=(0,o.default)(P,1)[0],O=(0,d.useExportedValues)();(0,d.useExpressBreakpointWidth)({payment_method:t("name"),width:300});var S=(0,d.useProcessPaymentIntent)({getData:t,billing:s,shippingData:u,onPaymentProcessing:g,emitResponse:f,error:E,onSubmit:m,activePaymentMethod:y,exportedValues:O}).setPaymentMethod;(0,d.useAfterProcessingPayment)({getData:t,eventRegistration:p,responseTypes:v,activePaymentMethod:y,messageContext:h.EXPRESS_PAYMENTS});var _=(0,d.usePaymentRequest)({getData:t,onClose:a,stripe:b,billing:s,shippingData:u,eventRegistration:p,setPaymentMethod:S,exportedValues:O,canPay:function(e){return null!=e&&e.applePay}}).paymentRequest,w=(0,c.useCallback)((function(){_&&(n(),_.show())}),[_]);return _?r.createElement("button",{className:"apple-pay-button ".concat(t("buttonStyle")),style:{"-apple-pay-button-type":t("buttonType")},onClick:w}):null},g=function(e){var t=e.getData;return(0,i.default)(e,["getData"]),r.createElement("div",{className:"apple-pay-block-editor"},r.createElement("img",{src:t("editorIcon")}))};(0,s.registerExpressPaymentMethod)({name:f("name"),canMakePayment:function(e){var t=e.cartTotals;if((0,i.default)(e,["cartTotals"]),f("isAdmin"))return!0;var n=t.currency_code,r=t.total_price;return(0,u.canMakePayment)({country:f("countryCode"),currency:n.toLowerCase(),total:{label:f("totalLabel"),amount:parseInt(r)}},(function(e){return null!=e&&e.applePay}))},content:r.createElement(m,{getData:f}),edit:r.createElement(g,{getData:f}),supports:{showSavedCards:f("showSavedCards"),showSaveOption:f("showSaveOption"),features:f("features")}})},7354:(e,t,n)=>{var r=n(3027);n(3110);var a=n(1134),o=n(6664),i=n(3163),c=function(e){var t=e.CardIcon,n=e.options,a=e.onChange;return r.createElement("div",{className:"wc-stripe-bootstrap-form"},r.createElement("div",{className:"row"},r.createElement("div",{className:"col-md-6 mb-3"},r.createElement(o.CardNumberElement,{className:"md-form md-outline stripe-input",options:n.cardNumber,onChange:a(o.CardNumberElement)}),r.createElement("label",{htmlFor:"stripe-card-number"},(0,i.__)("Card Number","woo-stripe-payment")),t),r.createElement("div",{className:"col-md-3 mb-3"},r.createElement(o.CardExpiryElement,{className:"md-form md-outline stripe-input",options:n.cardExpiry,onChange:a(o.CardExpiryElement)}),r.createElement("label",{htmlFor:"stripe-exp"},(0,i.__)("Exp","woo-stripe-payment"))),r.createElement("div",{className:"col-md-3 mb-3"},r.createElement(o.CardCvcElement,{className:"md-form md-outline stripe-input",options:n.cardCvc,onChange:a(o.CardCvcElement)}),r.createElement("label",{htmlFor:"stripe-cvv"},(0,i.__)("CVV","woo-stripe-payment")))))};(0,a.registerCreditCardForm)({id:"bootstrap",breakpoint:475,component:r.createElement(c,null)})},3329:(e,t,n)=>{var r=n(3027),a=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(9713)),i=a(n(3038)),c=n(1134),s=n(3027),u=n(6664),l=n(3163),p=n(3636);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y={focus:"focused",empty:"empty",invalid:"invalid"},g=function(e){var t=e.type,n=e.src;return t?r.createElement("img",{className:"wc-stripe-card ".concat(t),src:n}):null};t.default=function(e){var t=e.getData,n=e.onChange,a=(e.ValidationInputError,(0,s.useState)(window.innerWidth)),o=(0,i.default)(a,2),f=(o[0],o[1],(0,s.useState)("")),v=(0,i.default)(f,2),h=v[0],b=v[1],P=(0,s.useRef)([]),E=(0,s.useState)(null),O=(0,i.default)(E,2),S=O[0],_=O[1],w=(0,u.useElements)(),C=t("customForm"),k=(0,c.getCreditCardForm)(C),M=k.component,j=k.breakpoint,D=void 0===j?475:j,R=t("postalCodeEnabled"),x={};["cardNumber","cardExpiry","cardCvc"].forEach((function(e){x[e]=m(m({classes:y},t("cardOptions")),t("customFieldOptions")[e])}));var A=(0,s.useCallback)((function(e){P.current.includes(e)||P.current.push(e)}),[]);(0,p.useBreakpointWidth)({name:"creditCardForm",width:D,node:S,className:"small-form"});var I=(0,s.useCallback)((function(e){var n,r=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw o}}}}(t("icons"));try{for(r.s();!(n=r.n()).done;){var a=n.value;if(a.id===e)return a.src}}catch(e){r.e(e)}finally{r.f()}return""}),[]);return M?r.createElement("div",{className:"wc-stripe-custom-form ".concat(C),ref:_},(0,s.cloneElement)(M,{postalCodeEnabled:R,options:x,onChange:function(e){return A(e),function(t){if(n(t),"cardNumber"===t.elementType&&("unknown"===t.brand?b(""):b(t.brand)),t.complete){var r=P.current.indexOf(e);if(P.current[r+1]){var a=P.current[r+1];w.getElement(a).focus()}}}},CardIcon:r.createElement(g,{type:h,src:I(h)})})):r.createElement("div",{className:"wc-stripe-custom-form-error"},r.createElement("p",null,(0,l.sprintf)((0,l.__)("%s is not a valid blocks Stripe custom form. Please choose another custom form option in the Credit Card Settings.","woo-stripe-payment"),t("customFormLabels")[C])))}},6835:(e,t,n)=>{var r=n(3027);n(8356);var a=n(1134),o=n(6664),i=n(3163),c=n(3027),s=function(e){var t=e.CardIcon,n=e.options,a=e.onChange;return(0,c.useEffect)((function(){}),[]),r.createElement("div",{className:"wc-stripe-simple-form"},r.createElement("div",{className:"row"},r.createElement("div",{className:"field"},r.createElement("div",{className:"field-item"},r.createElement(o.CardNumberElement,{id:"stripe-card-number",className:"input empty",options:n.cardNumber,onChange:a(o.CardNumberElement)}),r.createElement("label",{htmlFor:"stripe-card-number","data-tid":""},(0,i.__)("Card Number","woo-stripe-payment")),r.createElement("div",{className:"baseline"}),t))),r.createElement("div",{className:"row"},r.createElement("div",{className:"field half-width"},r.createElement("div",{className:"field-item"},r.createElement(o.CardExpiryElement,{id:"stripe-exp",className:"input empty",options:n.cardExpiry,onChange:a(o.CardExpiryElement)}),r.createElement("label",{htmlFor:"stripe-exp","data-tid":""},(0,i.__)("Expiration","woo-stripe-payment")),r.createElement("div",{className:"baseline"}))),r.createElement("div",{className:"field half-width cvc"},r.createElement("div",{className:"field-item"},r.createElement(o.CardCvcElement,{id:"stripe-cvv",className:"input empty",options:n.cardCvc,onChange:a(o.CardCvcElement)}),r.createElement("label",{htmlFor:"stripe-cvv","data-tid":""},(0,i.__)("CVV","woo-stripe-payment")),r.createElement("div",{className:"baseline"})))))};(0,a.registerCreditCardForm)({id:"simple",component:r.createElement(s,null),breakpoint:375})},9775:(e,t,n)=>{var r=n(3027),a=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(9713)),i=n(6664),c=n(1134),s=n(3027);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.default=function(e){var t=e.getData,n=e.billing,a=e.onChange,o=(0,s.useMemo)((function(){var e;return l(l({},{value:{postalCode:null==n||null===(e=n.billingData)||void 0===e?void 0:e.postcode},hidePostalCode:(0,c.isFieldRequired)("postcode"),iconStyle:"default"}),t("cardOptions"))}),[n.billingData]);return r.createElement("div",{className:"wc-stripe-inline-form"},r.createElement(i.CardElement,{options:o,onChange:a}))}},627:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),n(5773);var r=n(7205);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))})),n(7354),n(6835)},7205:(e,t,n)=>{var r=n(3027),a=n(5318),o=a(n(3038)),i=n(3027),c=n(4222),s=n(1134),u=n(6664),l=n(3187),p=a(n(1065)),d=a(n(3329)),f=a(n(9775)),m=n(3636),y=(0,s.getSettings)("stripe_cc_data"),g=function(e){var t=(0,i.useState)(!1),n=(0,o.default)(t,2),a=n[0],c=n[1];if((0,i.useEffect)((function(){s.initStripe.catch((function(e){c(e)}))}),[c]),a)throw new Error(a);return r.createElement(u.Elements,{stripe:s.initStripe},r.createElement(v,e))},v=function(e){var t=e.getData,n=e.billing,a=e.shippingData,c=e.emitResponse,p=e.eventRegistration,y=e.activePaymentMethod,g=(0,m.useStripeError)(),v=(0,o.default)(g,2),h=v[0],b=v[1],P=(0,i.useState)(!1),E=(0,o.default)(P,2),O=E[0],S=E[1],_=p.onPaymentProcessing,w=(0,u.useStripe)(),C=(0,u.useElements)(),k=(0,i.useCallback)((function(){var e=t("customFormActive")?u.CardNumberElement:u.CardElement;return{card:C.getElement(e)}}),[w,C]),M=(0,m.useSetupIntent)({getData:t,cartTotal:n.cartTotal,setError:b}),j=M.setupIntent,D=M.removeSetupIntent;(0,m.useProcessPaymentIntent)({getData:t,billing:n,shippingData:a,emitResponse:c,error:h,onPaymentProcessing:_,savePaymentMethod:O,setupIntent:j,removeSetupIntent:D,getPaymentMethodArgs:k,activePaymentMethod:y}),(0,m.useAfterProcessingPayment)({getData:t,eventRegistration:p,responseTypes:c.responseTypes,activePaymentMethod:y,savePaymentMethod:O});var R=t("customFormActive")?d.default:f.default;return r.createElement("div",{className:"wc-stripe-card-container"},r.createElement(R,{getData:t,billing:n,onChange:function(e){e.error?b(e.error):b(!1)}}),(0,s.isUserLoggedIn)(n.customerId)&&t("saveCardEnabled")&&r.createElement(l.SavePaymentMethod,{label:t("savePaymentMethodLabel"),onChange:function(e){return S(e)},checked:O}))};(0,c.registerPaymentMethod)({name:y("name"),label:r.createElement(l.PaymentMethodLabel,{title:y("title"),paymentMethod:y("name"),icons:y("icons")}),ariaLabel:"Credit Cards",canMakePayment:function(){return s.initStripe},content:r.createElement(l.PaymentMethod,{content:g,getData:y}),savedTokenComponent:r.createElement(p.default,{getData:y}),edit:r.createElement(l.PaymentMethod,{content:g,getData:y}),supports:{showSavedCards:y("showSavedCards"),showSaveOption:!1,features:y("features")}})},7082:(e,t,n)=>{var r=n(3027),a=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(4575)),i=a(n(3913)),c=a(n(2205)),s=a(n(8585)),u=a(n(9754));var l=function(e){(0,c.default)(l,e);var t,n,a=(t=l,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var a=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,s.default)(this,e)});function l(e){var t;return(0,o.default)(this,l),(t=a.call(this,e)).state={hasError:!1,error:null,errorInfo:null},t}return(0,i.default)(l,[{key:"componentDidCatch",value:function(e,t){this.setState({hasError:!0,error:e,errorInfo:t})}},{key:"render",value:function(){return this.state.hasError?r.createElement(r.Fragment,null,this.state.error&&r.createElement("div",{className:"wc-stripe-block-error"},this.state.error.toString()),this.state.errorInfo&&r.createElement("div",{className:"wc-stripe-block-error"},this.state.errorInfo.componentStack)):this.props.children}}]),l}(n(3027).Component);t.default=l},5212:(e,t,n)=>{var r=n(3027),a=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(3038)),i=a(n(6479)),c=n(3027),s=n(5516),u=n(3636),l=(0,n(1134).getSettings)("stripeGeneralData")().publishableKey;t.default=function(e){var t=e.getData,n=e.setErrorMessage,a=e.billing,p=e.shippingData,d=e.canMakePayment,f=e.checkoutStatus,m=e.eventRegistration,y=e.activePaymentMethod,g=e.onClick,v=e.onClose,h=(0,i.default)(e,["getData","setErrorMessage","billing","shippingData","canMakePayment","checkoutStatus","eventRegistration","activePaymentMethod","onClick","onClose"]),b={merchantId:t("merchantId"),merchantName:t("merchantName")},P=(0,u.useStripeError)(),E=(0,o.default)(P,2),O=E[0],S=(E[1],(0,c.useRef)()),_=h.onSubmit,w=h.emitResponse,C=m.onPaymentProcessing,k=(0,u.useExportedValues)(),M="long"===t("buttonStyle").buttonType?390:300,j=(0,u.useProcessPaymentIntent)({getData:t,billing:a,shippingData:p,onPaymentProcessing:C,emitResponse:w,error:O,exportedValues:k,onSubmit:_,checkoutStatus:f,activePaymentMethod:y}).setPaymentMethod,D=(0,s.usePaymentRequest)({getData:t,publishableKey:l,merchantInfo:b,billing:a,shippingData:p}),R=(0,s.usePaymentsClient)({merchantInfo:b,paymentRequest:D,billing:a,shippingData:p,eventRegistration:m,canMakePayment:d,setErrorMessage:n,onSubmit:_,setPaymentMethod:j,exportedValues:k,onClick:g,onClose:v,getData:t}),x=R.button,A=R.removeButton;return(0,u.useExpressBreakpointWidth)({payment_method:t("name"),width:M}),(0,c.useEffect)((function(){x&&(A(S.current),S.current.append(x))}),[x]),r.createElement("div",{className:"wc-stripe-gpay-button-container",ref:S})}},3097:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BASE_PAYMENT_REQUEST=t.BASE_PAYMENT_METHOD=void 0,t.BASE_PAYMENT_METHOD={type:"CARD",parameters:{allowedAuthMethods:["PAN_ONLY"],allowedCardNetworks:["AMEX","DISCOVER","INTERAC","JCB","MASTERCARD","VISA"],assuranceDetailsRequired:!0}},t.BASE_PAYMENT_REQUEST={apiVersion:2,apiVersionMinor:0}},5516:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(1674);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var a=n(1735);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var o=n(9808);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}))},9808:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useErrorMessage=void 0;var a=r(n(3038)),o=n(3027);t.useErrorMessage=function(){var e=(0,o.useState)(!1),t=(0,a.default)(e,2);return{errorMessage:t[0],setErrorMessage:t[1]}}},1735:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.usePaymentRequest=void 0;var a=r(n(319)),o=r(n(9713)),i=n(3027),c=n(3097),s=n(1134),u=n(8664);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.usePaymentRequest=function(e){var t=e.getData,n=e.publishableKey,r=e.merchantInfo,o=e.billing,l=e.shippingData,d=o.billingData,f=l.shippingRates,m=(l.shippingAddress,t()),y=m.processingCountry,g=m.totalPriceLabel;return(0,i.useMemo)((function(){var e=p(p({},{emailRequired:(0,s.isEmpty)(d.email),merchantInfo:r,allowedPaymentMethods:[p(p({},{type:"CARD",tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{gateway:"stripe","stripe:version":"2018-10-31","stripe:publishableKey":n}}}),c.BASE_PAYMENT_METHOD)],shippingAddressRequired:l.needsShipping,transactionInfo:(0,u.getTransactionInfo)({billing:o,processingCountry:y,totalPriceLabel:g}),callbackIntents:["PAYMENT_AUTHORIZATION"]}),c.BASE_PAYMENT_REQUEST);if(e.allowedPaymentMethods[0].parameters.billingAddressRequired=!0,e.allowedPaymentMethods[0].parameters.billingAddressParameters={format:"FULL",phoneNumberRequired:(0,s.isFieldRequired)("phone",d.country)&&(0,s.isEmpty)(d.phone)},e.shippingAddressRequired){e.callbackIntents=[].concat((0,a.default)(e.callbackIntents),["SHIPPING_ADDRESS","SHIPPING_OPTION"]),e.shippingOptionRequired=!0;var t=(0,u.getShippingOptionParameters)(f);t.shippingOptions.length>0&&(e=p(p({},e),{},{shippingOptionParameters:t}))}return e}),[o.cartTotal,o.cartTotalItems,d,l])}},1674:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.usePaymentsClient=void 0;var a=r(n(319)),o=r(n(9713)),i=r(n(7015)),c=r(n(8926)),s=r(n(3038)),u=n(3027),l=r(n(4306)),p=n(1134),d=n(6664),f=n(8664),m=n(3163),y=n(3636);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.usePaymentsClient=function(e){var t=e.merchantInfo,n=e.paymentRequest,r=e.billing,g=e.shippingData,h=e.eventRegistration,b=e.canMakePayment,P=e.setErrorMessage,E=e.setPaymentMethod,O=e.exportedValues,S=e.onClick,_=e.onClose,w=e.getData,C=w().environment,k=(0,u.useState)(),M=(0,s.default)(k,2),j=M[0],D=M[1],R=(0,u.useState)(null),x=(0,s.default)(R,2),A=x[0],I=x[1],T=(0,u.useRef)(r),L=(0,u.useRef)(g),N=(0,d.useStripe)(),B=(0,y.usePaymentEvents)({billing:r,shippingData:g,eventRegistration:h}).addPaymentEvent;(0,u.useEffect)((function(){T.current=r,L.current=g}));var q=(0,u.useCallback)((function(e){var t,n;if(null!=e&&null!==(t=e.paymentMethodData)&&void 0!==t&&null!==(n=t.info)&&void 0!==n&&n.billingAddress){var r,a=e.paymentMethodData.info.billingAddress;(0,p.isAddressValid)(T.current.billingData,["phone","email"])&&(0,p.isEmpty)(null===(r=T.current.billingData)||void 0===r?void 0:r.phone)&&(a={phoneNumber:a.phoneNumber}),O.billingData=(0,f.toCartAddress)(a,{email:e.email})}null!=e&&e.shippingAddress&&(O.shippingAddress=(0,f.toCartAddress)(e.shippingAddress))}),[O,n]),F=(0,u.useCallback)((function(e){for(;e.firstChild;)e.removeChild(e.firstChild)}),[A]),V=(0,u.useCallback)((0,c.default)(i.default.mark((function e(){var t,r,a,o;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return S(),e.prev=1,e.next=4,j.loadPaymentData(n);case 4:return t=e.sent,r=T.current.billingData,q(t),a=JSON.parse(t.paymentMethodData.tokenizationData.token),e.next=10,N.createPaymentMethod({type:"card",card:{token:a.id},billing_details:(0,p.getBillingDetailsFromAddress)(r)});case 10:if(!(o=e.sent).error){e.next=13;break}throw new p.StripeError(o.error);case 13:E(o.paymentMethod.id),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(1),"CANCELED"===(null===e.t0||void 0===e.t0?void 0:e.t0.statusCode)?_():(console.log((0,p.getErrorMessage)(e.t0)),P((0,p.getErrorMessage)(e.t0)));case 19:case"end":return e.stop()}}),e,null,[[1,16]])}))),[N,j,S]),U=(0,u.useCallback)((0,c.default)(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!j||A||!N){e.next=5;break}return e.next=4,b;case 4:I(j.createButton(v({onClick:V},w("buttonStyle"))));case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])}))),[N,A,j]),W=(0,u.useMemo)((function(){var e={environment:C,merchantInfo:t,paymentDataCallbacks:{onPaymentAuthorized:function(){return Promise.resolve({transactionState:"SUCCESS"})}}};return n.shippingAddressRequired&&(e.paymentDataCallbacks.onPaymentDataChanged=function(e){return new Promise((function(t,n){var r,i=L.current,c=e.shippingAddress,s=e.shippingOptionData,u=(0,f.toCartAddress)(c),d=(0,p.getSelectedShippingOption)(s.id),y=(0,l.default)((0,p.getIntermediateAddress)(i.shippingAddress),u),g=(0,l.default)(i.selectedRates,(0,o.default)({},d[1],d[0]));B("onShippingChanged",(function(e,n){var r=n.billing,a=n.shipping;t(e?(0,f.getPaymentRequestUpdate)({billing:r,shippingData:{needsShipping:!0,shippingRates:a.shippingRates},processingCountry:w("processingCountry"),totalPriceLabel:w("totalPriceLabel")}):{error:{reason:"SHIPPING_ADDRESS_UNSERVICEABLE",message:(0,m.__)("Your shipping address is not serviceable.","woo-stripe-payment"),intent:"SHIPPING_ADDRESS"}})}),y&&g),L.current.setShippingAddress(v(v({},L.current.shippingAddress),u)),"shipping_option_unselected"!==s.id&&(r=L.current).setSelectedRates.apply(r,(0,a.default)(d))}))}),e}),[n]);return(0,u.useEffect)((function(){D(new google.payments.api.PaymentsClient(W))}),[W]),(0,u.useEffect)((function(){U()}),[U]),{button:A,removeButton:F}}},5341:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),n(9509);var r=n(9031);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}))},9031:(e,t,n)=>{var r=n(3027),a=n(5318),o=a(n(7154)),i=a(n(6479)),c=a(n(9713)),s=n(4222),u=n(1134),l=n(5516),p=a(n(5212)),d=n(3097),f=a(n(3905)),m=n(6664);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,c.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v,h,b=(0,u.getSettings)("stripe_googlepay_data"),P=(v=new f.default.payments.api.PaymentsClient({environment:b("environment"),merchantInfo:{merchantId:b("merchantId"),merchantName:b("merchantName")}}),h=g(g({},d.BASE_PAYMENT_REQUEST),{},{allowedPaymentMethods:[d.BASE_PAYMENT_METHOD]}),v.isReadyToPay(h).then((function(){return!0})).catch((function(e){return console.log(e),!1}))),E=function(e){var t=e.getData,n=e.components,a=(0,i.default)(e,["getData","components"]),c=n.ValidationInputError,s=(0,l.useErrorMessage)(),d=s.errorMessage,f=s.setErrorMessage;return r.createElement("div",{className:"wc-stripe-gpay-container"},r.createElement(m.Elements,{stripe:u.initStripe},r.createElement(p.default,(0,o.default)({getData:t,canMakePayment:P,setErrorMessage:f},a)),d&&r.createElement(c,{errorMessage:d})))},O=function(e){var t,n=e.getData,a=((0,i.default)(e,["getData"]),n("buttonStyle").buttonType),o=(null===(t=n("editorIcons"))||void 0===t?void 0:t[a])||"long";return r.createElement("div",{className:"gpay-block-editor ".concat(a)},r.createElement("img",{src:o}))};(0,s.registerExpressPaymentMethod)({name:b("name"),canMakePayment:function(){return b("isAdmin")?!(0,u.isCartPage)()||b("cartCheckoutEnabled"):!((0,u.isCartPage)()&&!b("cartCheckoutEnabled"))&&u.initStripe.then((function(e){return e.error?e:P}))},content:r.createElement(E,{getData:b}),edit:r.createElement(O,{getData:b}),supports:{showSavedCards:b("showSavedCards"),showSaveOption:b("showSaveOption"),features:b("features")}})},8664:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.toCartAddress=t.getShippingOptions=t.getShippingOptionParameters=t.getPaymentRequestUpdate=t.getTransactionInfo=void 0;var a=r(n(319)),o=n(1134),i=function(e){var t=e.billing,n=e.processingCountry,r=e.totalPriceLabel,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ESTIMATED",i=t.cartTotal,s=t.cartTotalItems,u=t.currency,l={countryCode:n,currencyCode:u.code,totalPriceStatus:a,totalPrice:(0,o.removeNumberPrecision)(i.value,u.minorUnit).toString(),displayItems:c(s,u.minorUnit),totalPriceLabel:r};return l};t.getTransactionInfo=i,t.getPaymentRequestUpdate=function(e){var t=e.billing,n=e.shippingData,r=e.processingCountry,a=e.totalPriceLabel,o=n.needsShipping,c=n.shippingRates,u={newTransactionInfo:i({billing:t,processingCountry:r,totalPriceLabel:a},"FINAL")};return o&&(u.newShippingOptionParameters=s(c)),u};var c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=[];return e.forEach((function(e){0<e.value&&n.push({label:e.label,type:"LINE_ITEM",price:(0,o.removeNumberPrecision)(e.value,t).toString()})})),n},s=function(e){var t=u(e),n=t.map((function(e){return e.id})).slice(0,1).shift();return e.forEach((function(e,t){e.shipping_rates.forEach((function(e){e.selected&&(n=(0,o.getShippingOptionId)(t,e.rate_id))}))})),{shippingOptions:t,defaultSelectedOptionId:n}};t.getShippingOptionParameters=s;var u=function(e){var t=[];return e.forEach((function(e,n){var r=e.shipping_rates.map((function(e){var t=document.createElement("textarea");t.innerHTML=e.name;var r=(0,o.formatPrice)(e.price,e.currency_code);return{id:(0,o.getShippingOptionId)(n,e.rate_id),label:t.value,description:"".concat(r)}}));t=[].concat((0,a.default)(t),(0,a.default)(r))})),t};t.getShippingOptions=u;var l=(0,o.toCartAddress)({name:function(e,t){return e.first_name=t.split(" ").slice(0,-1).join(" "),e.last_name=t.split(" ").pop(),e},countryCode:"country",address1:"address_1",address2:"address_2",locality:"city",administrativeArea:"state",postalCode:"postcode",email:"email",phoneNumber:"phone"});t.toCartAddress=l},3636:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(4332);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var a=n(1261);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var o=n(6107);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var i=n(2715);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var c=n(2343);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var s=n(1500);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var u=n(6095);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var l=n(5554);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var p=n(3893);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===p[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))}))},1261:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useAfterProcessingPayment=void 0;var a=r(n(7015)),o=r(n(8926)),i=n(3027),c=n(6664),s=n(1134),u=n(3893);t.useAfterProcessingPayment=function(e){var t=e.getData,n=e.eventRegistration,r=e.responseTypes,l=e.activePaymentMethod,p=e.savePaymentMethod,d=void 0!==p&&p,f=e.messageContext,m=void 0===f?null:f,y=(0,c.useStripe)(),g=n.onCheckoutAfterProcessingWithSuccess,v=n.onCheckoutAfterProcessingWithError;(0,u.useProcessCheckoutError)({responseTypes:r,subscriber:v,messageContext:m}),(0,i.useEffect)((function(){var e=g(function(){var e=(0,o.default)(a.default.mark((function e(n){var o;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=n.redirectUrl,t("name")!==l){e.next=5;break}return e.next=4,(0,s.handleCardAction)({redirectUrl:o,responseTypes:r,stripe:y,getData:t,savePaymentMethod:d});case 4:return e.abrupt("return",e.sent);case 5:return e.abrupt("return",null);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());return function(){return e()}}),[y,r,g,l,d])}},5554:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useExpressBreakpointWidth=t.useBreakpointWidth=void 0;var a=r(n(3038)),o=n(3027),i=n(1134),c=function(e){var t=e.name,n=e.width,r=e.node,c=e.className,s=(0,o.useState)(window.innerWidth),u=(0,a.default)(s,2),l=u[0],p=u[1],d=(0,o.useCallback)((function(e){var t=(0,i.getFromCache)(e);return t?parseInt(t):0}),[]),f=(0,o.useCallback)((function(e,t){return(0,i.storeInCache)(e,t)}),[]);(0,o.useEffect)((function(){var e="function"==typeof r?r():r;if(e){var a=d(t);(!a||n>a)&&f(t,n),e.clientWidth<n?e.classList.add(c):e.clientWidth>a&&e.classList.remove(c)}}),[l,r]),(0,o.useEffect)((function(){var e=function(){return p(window.innerWidth)};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}))};t.useBreakpointWidth=c,t.useExpressBreakpointWidth=function(e){var t=e.payment_method,n=e.width,r=(0,o.useCallback)((function(){var e=document.getElementById("express-payment-method-".concat(t));return e?e.parentNode:null}),[]);c({name:"expressMaxWidth",width:n,node:r,className:"wc-stripe-express__sm"})}},2343:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useExportedValues=void 0;var r=n(3027);t.useExportedValues=function(){return(0,r.useRef)({}).current}},6095:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.usePaymentEvents=void 0;var a=r(n(9713)),o=r(n(3038)),i=n(3027),c=n(1134);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.usePaymentEvents=function(e){var t=e.billing,n=e.shippingData,r=e.eventRegistration,s=r.onShippingRateSuccess,l=r.onShippingRateFail,p=r.onShippingRateSelectSuccess,d=(0,i.useRef)(t),f=(0,i.useRef)(n),m=(0,i.useState)(null),y=(0,o.default)(m,2),g=y[0],v=y[1],h=(0,i.useState)({onShippingChanged:!1}),b=(0,o.default)(h,2),P=b[0],E=b[1],O=(0,i.useCallback)((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];n?v((0,a.default)({},e,t)):E(u(u({},P),{},(0,a.default)({},e,t)))}),[P,E]),S=(0,i.useCallback)((function(e){P[e]&&(delete P[e],E(P))}),[P]),_=(0,i.useCallback)((function(){var e=f.current,t=d.current;if(P.onShippingChanged&&!e.isSelectingRate&&!e.shippingRatesLoading){var n=P.onShippingChanged,r=!0;(0,c.hasShippingRates)(e.shippingRates)||(r=!1),n(r,{billing:t,shipping:e}),S("onShippingChanged")}}),[P,S]);return(0,i.useEffect)((function(){d.current=t,f.current=n})),(0,i.useEffect)((function(){g&&g.onShippingChanged&&(g.onShippingChanged(!0,{billing:d.current,shipping:f.current}),v(null))}),[g]),(0,i.useEffect)((function(){var e=s(_),t=p(_),n=l((function(e){e.hasInvalidAddress,e.hasError,P.onShippingChanged&&((0,P.onShippingChanged)(!1),S("onShippingChanged"))}));return function(){e(),n(),t()}}),[P,s,l,p]),{addPaymentEvent:O,removePaymentEvent:S}}},1500:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.usePaymentRequest=void 0;var a=r(n(319)),o=r(n(9713)),i=r(n(3038)),c=n(3027),s=n(6095),u=n(1134),l=r(n(4306));function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=(0,u.toCartAddress)();t.usePaymentRequest=function(e){var t=e.getData,n=e.onClose,r=e.stripe,o=e.billing,p=e.shippingData,m=e.eventRegistration,y=e.setPaymentMethod,g=e.exportedValues,v=e.canPay,h=(0,s.usePaymentEvents)({billing:o,shippingData:p,eventRegistration:m}).addPaymentEvent,b=p.needsShipping,P=p.shippingRates,E=o.billingData,O=o.cartTotalItems,S=o.currency,_=o.cartTotal,w=(0,c.useState)(null),C=(0,i.default)(w,2),k=C[0],M=C[1],j=(0,c.useRef)({}),D=(0,c.useRef)(p),R=(0,c.useRef)(o);(0,c.useEffect)((function(){D.current=p,R.current=o}),[p]),(0,c.useEffect)((function(){if(r){var e={country:t("countryCode"),currency:null==S?void 0:S.code.toLowerCase(),total:{amount:_.value,label:_.label,pending:!0},requestPayerName:!0,requestPayerEmail:(0,u.isFieldRequired)("email",E.country),requestPayerPhone:(0,u.isFieldRequired)("phone",E.country),requestShipping:b,displayItems:(0,u.getDisplayItems)(O,S)};e.requestShipping&&(e.shippingOptions=(0,u.getShippingOptions)(P)),j.current=e;var n=r.paymentRequest(j.current);n.canMakePayment().then((function(e){v(e)?M(n):M(null)}))}}),[r,E,P,b]),(0,c.useEffect)((function(){k&&(j.current.requestShipping&&(k.on("shippingaddresschange",A),k.on("shippingoptionchange",I)),k.on("cancel",n),k.on("paymentmethod",T))}),[k]);var x=(0,c.useCallback)((function(e){return function(t,n){var r=n.billing,a=n.shipping,o=r.cartTotal,i=r.cartTotalItems,c=r.currency,s=a.shippingRates;t?e.updateWith({status:"success",total:{amount:o.value,label:o.label,pending:!1},displayItems:(0,u.getDisplayItems)(i,c),shippingOptions:(0,u.getShippingOptions)(s)}):e.updateWith({status:"invalid_shipping_address"})}}),[]),A=(0,c.useCallback)((function(e){var t=e.shippingAddress,n=D.current,r=f(t);n.setShippingAddress(d(d({},n.shippingAddress),r));var a=(0,l.default)((0,u.getIntermediateAddress)(n.shippingAddress),r);h("onShippingChanged",x(e),a)}),[h]),I=(0,c.useCallback)((function(e){var t=e.shippingOption,n=D.current;n.setSelectedRates.apply(n,(0,a.default)((0,u.getSelectedShippingOption)(t.id))),h("onShippingChanged",x(e))}),[h]),T=(0,c.useCallback)((function(e){var t=e.paymentMethod,n=e.payerName,r=void 0===n?null:n,a=e.payerEmail,o=void 0===a?null:a,i=e.payerPhone,c={payerName:r,payerEmail:o,payerPhone:void 0===i?null:i};null!=t&&t.billing_details.address&&(c=f(t.billing_details.address,c)),g.billingData=c,e.shippingAddress&&(g.shippingAddress=f(e.shippingAddress)),y(t.id),e.complete("success")}),[y]);return{paymentRequest:k}}},3893:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useProcessCheckoutError=void 0;var r=n(3027);t.useProcessCheckoutError=function(e){var t=e.responseTypes,n=e.subscriber,a=e.messageContext,o=void 0===a?null:a;(0,r.useEffect)((function(){var e=n((function(e){var n;return null!=e&&null!==(n=e.processingResponse.paymentDetails)&&void 0!==n&&n.stripeErrorMessage?{type:t.ERROR,message:e.processingResponse.paymentDetails.stripeErrorMessage,messageContext:o}:null}));return function(){return e()}}),[t,n])}},4332:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useProcessPaymentIntent=void 0;var a=r(n(7015)),o=r(n(8926)),i=r(n(9713)),c=r(n(3038)),s=n(3027),u=n(6664),l=n(1134);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.useProcessPaymentIntent=function(e){var t=e.getData,n=e.billing,r=e.shippingData,p=e.onPaymentProcessing,f=e.emitResponse,m=e.error,y=e.onSubmit,g=e.activePaymentMethod,v=e.paymentType,h=void 0===v?"card":v,b=e.setupIntent,P=void 0===b?null:b,E=e.removeSetupIntent,O=void 0===E?null:E,S=e.savePaymentMethod,_=void 0!==S&&S,w=e.exportedValues,C=void 0===w?{}:w,k=e.getPaymentMethodArgs,M=void 0===k?function(){return{}}:k,j=n.billingData,D=r.shippingAddress,R=f.responseTypes,x=(0,s.useState)(null),A=(0,c.default)(x,2),I=A[0],T=A[1],L=(0,u.useStripe)(),N=(0,s.useRef)(M);(0,s.useEffect)((function(){N.current=M}),[M]);var B=(0,s.useCallback)((function(){return d(d({},{type:h,billing_details:(0,l.getBillingDetailsFromAddress)(null!=C&&C.billingData?C.billingData:j)}),N.current())}),[j,h,M]),q=(0,s.useCallback)((function(e,n){var r,a={meta:{paymentMethodData:(r={},(0,i.default)(r,"".concat(t("name"),"_token_key"),e),(0,i.default)(r,"".concat(t("name"),"_save_source_key"),n),r)}};return null!=C&&C.billingData&&(a.meta.billingData=C.billingData),null!=C&&C.shippingAddress&&(a.meta.shippingData={address:C.shippingAddress}),a}),[j,D]);return(0,s.useEffect)((function(){I&&"string"==typeof I&&y()}),[I]),(0,s.useEffect)((function(){var e=p((0,o.default)(a.default.mark((function e(){var n,r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(g===t("name")){e.next=2;break}return e.abrupt("return",null);case 2:if(n=null,r=null,e.prev=3,!m){e.next=6;break}throw new l.StripeError(m);case 6:if(!P){e.next=16;break}return e.next=9,L.confirmCardSetup(P.client_secret,{payment_method:B()});case 9:if(!(n=e.sent).error){e.next=12;break}throw new l.StripeError(n.error);case 12:r=n.setupIntent.payment_method,O(),e.next=26;break;case 16:if(!I){e.next=20;break}r=I,e.next=26;break;case 20:return e.next=22,L.createPaymentMethod(B());case 22:if(!(n=e.sent).error){e.next=25;break}throw new l.StripeError(n.error);case 25:r=n.paymentMethod.id;case 26:return e.abrupt("return",(0,l.ensureSuccessResponse)(R,q(r,_)));case 29:return e.prev=29,e.t0=e.catch(3),console.log(e.t0),T(null),e.abrupt("return",(0,l.ensureErrorResponse)(R,e.t0.error));case 34:case"end":return e.stop()}}),e,null,[[3,29]])}))));return function(){return e()}}),[I,j,p,L,P,g,_]),{setPaymentMethod:T}}},6107:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useSetupIntent=void 0;var a=r(n(7015)),o=r(n(8926)),i=r(n(3038)),c=n(3027),s=r(n(7606)),u=n(1134);t.useSetupIntent=function(e){var t=e.cartTotal,n=e.setError,r=(0,c.useState)((0,u.getFromCache)("setupIntent")),l=(0,i.default)(r,2),p=l[0],d=l[1];(0,c.useEffect)((function(){var e=function(){var e=(0,o.default)(a.default.mark((function e(){var t;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!p){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,(0,s.default)({url:(0,u.getRoute)("create/setup_intent"),method:"POST"});case 4:(t=e.sent).code?n(t.message):((0,u.storeInCache)("setupIntent",t.intent),d(t.intent));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,u.cartContainsPreOrder)()||(0,u.cartContainsSubscription)()&&0==t.value?p||e():d(null)}),[t.value]);var f=(0,c.useCallback)((function(){(0,u.deleteFromCache)("setupIntent")}),[t.value]);return{setupIntent:p,removeSetupIntent:f}}},2715:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useStripeError=void 0;var a=r(n(3038)),o=n(3027);t.useStripeError=function(){var e=(0,o.useState)(!1),t=(0,a.default)(e,2);return[t[0],t[1]]}},39:(e,t,n)=>{var r=n(3027),a=n(4222),o=n(1134),i=n(3539),c=n(2029),s=n(3187),u=(0,o.getSettings)("stripe_alipay_data");u()&&(0,a.registerPaymentMethod)({name:u("name"),label:r.createElement(c.PaymentMethodLabel,{title:u("title"),paymentMethod:u("name"),icons:u("icon")}),ariaLabel:"Alipay",placeOrderButtonLabel:u("placeOrderButtonLabel"),canMakePayment:(0,i.canMakePayment)(u),content:r.createElement(s.PaymentMethod,{content:i.LocalPaymentSourceContent,getData:u}),edit:r.createElement(s.PaymentMethod,{content:i.LocalPaymentSourceContent,getData:u}),supports:{showSavedCards:!1,showSaveOption:!1,features:u("features")}})},8641:(e,t,n)=>{var r=n(3027),a=n(4222),o=n(1134),i=n(3539),c=n(3187),s=(0,o.getSettings)("stripe_bancontact_data");s()&&(0,a.registerPaymentMethod)({name:s("name"),label:r.createElement(c.PaymentMethodLabel,{title:s("title"),paymentMethod:s("name"),icons:s("icon")}),ariaLabel:"Bancontact",placeOrderButtonLabel:s("placeOrderButtonLabel"),canMakePayment:(0,i.canMakePayment)(s),content:r.createElement(c.PaymentMethod,{content:i.LocalPaymentSourceContent,getData:s}),edit:r.createElement(c.PaymentMethod,{content:i.LocalPaymentSourceContent,getData:s}),supports:{showSavedCards:!1,showSaveOption:!1,features:s("features")}})},5176:(e,t,n)=>{var r=n(3027),a=n(4222),o=n(1134),i=n(3539),c=n(3187),s=n(6664),u=(0,o.getSettings)("stripe_becs_data");u()&&(0,a.registerPaymentMethod)({name:u("name"),label:r.createElement(c.PaymentMethodLabel,{title:u("title"),paymentMethod:u("name"),icons:u("icon")}),ariaLabel:"BECS",placeOrderButtonLabel:u("placeOrderButtonLabel"),canMakePayment:(0,i.canMakePayment)(u),content:r.createElement(c.PaymentMethod,{content:i.LocalPaymentIntentContent,getData:u,confirmationMethod:"confirmAuBecsDebitPayment",component:s.AuBankAccountElement}),edit:r.createElement(c.PaymentMethod,{content:i.LocalPaymentIntentContent,getData:u}),supports:{showSavedCards:!1,showSaveOption:!1,features:u("features")}})},4494:(e,t,n)=>{var r=n(3027),a=n(4222),o=n(1134),i=n(3539),c=n(3187),s=(0,o.getSettings)("stripe_eps_data");s()&&(0,a.registerPaymentMethod)({name:s("name"),label:r.createElement(c.PaymentMethodLabel,{title:s("title"),paymentMethod:s("name"),icons:s("icon")}),ariaLabel:"EPS",placeOrderButtonLabel:s("placeOrderButtonLabel"),canMakePayment:(0,i.canMakePayment)(s),content:r.createElement(c.PaymentMethod,{content:i.LocalPaymentSourceContent,getData:s}),edit:r.createElement(c.PaymentMethod,{content:i.LocalPaymentSourceContent,getData:s}),supports:{showSavedCards:!1,showSaveOption:!1,features:s("features")}})},4031:(e,t,n)=>{var r=n(3027),a=n(4222),o=n(1134),i=n(3539),c=n(3187),s=n(6664),u=(0,o.getSettings)("stripe_fpx_data");u()&&(0,a.registerPaymentMethod)({name:u("name"),label:r.createElement(c.PaymentMethodLabel,{title:u("title"),paymentMethod:u("name"),icons:u("icon")}),ariaLabel:"FPX",placeOrderButtonLabel:u("placeOrderButtonLabel"),canMakePayment:(0,i.canMakePayment)(u),content:r.createElement(c.PaymentMethod,{content:i.LocalPaymentIntentContent,getData:u,confirmationMethod:"confirmIdealPayment",component:s.FpxBankElement}),edit:r.createElement(c.PaymentMethod,{content:i.LocalPaymentIntentContent,getData:u}),supports:{showSavedCards:!1,showSaveOption:!1,features:u("features")}})},3817:(e,t,n)=>{var r=n(3027),a=n(4222),o=n(1134),i=n(3539),c=n(3187),s=(0,o.getSettings)("stripe_giropay_data");s()&&(0,a.registerPaymentMethod)({name:s("name"),label:r.createElement(c.PaymentMethodLabel,{title:s("title"),paymentMethod:s("name"),icons:s("icon")}),ariaLabel:"Giropay",placeOrderButtonLabel:s("placeOrderButtonLabel"),canMakePayment:(0,i.canMakePayment)(s),content:r.createElement(c.PaymentMethod,{content:i.LocalPaymentSourceContent,getData:s}),edit:r.createElement(c.PaymentMethod,{content:i.LocalPaymentSourceContent,getData:s}),supports:{showSavedCards:!1,showSaveOption:!1,features:s("features")}})},3140:(e,t,n)=>{var r=n(3027),a=n(4222),o=n(1134),i=n(3539),c=n(3187),s=(0,o.getSettings)("stripe_grabpay_data");s()&&(0,a.registerPaymentMethod)({name:s("name"),label:r.createElement(c.PaymentMethodLabel,{title:s("title"),paymentMethod:s("name"),icons:s("icon")}),ariaLabel:"GrabPay",placeOrderButtonLabel:s("placeOrderButtonLabel"),canMakePayment:(0,i.canMakePayment)(s),content:r.createElement(c.PaymentMethod,{content:i.LocalPaymentIntentContent,getData:s,confirmationMethod:"confirmGrabPayPayment"}),edit:r.createElement(c.PaymentMethod,{content:i.LocalPaymentIntentContent,getData:s}),supports:{showSavedCards:!1,showSaveOption:!1,features:s("features")}})},8522:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(3160);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var a=n(3994);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var o=n(878);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}))},3160:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useAfterProcessLocalPayment=void 0;var a=r(n(7015)),o=r(n(9713)),i=r(n(6479)),c=r(n(8926)),s=n(3027),u=n(6664),l=n(1134);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.useAfterProcessLocalPayment=function(e){var t=e.getData,n=e.billingData,r=e.eventRegistration,o=e.responseTypes,p=e.activePaymentMethod,f=e.confirmationMethod,m=e.getPaymentMethodArgs,y=void 0===m?function(){return{}}:m,g=(0,u.useStripe)(),v=r.onCheckoutAfterProcessingWithSuccess,h=r.onCheckoutAfterProcessingWithError,b=(0,s.useRef)(n),P=(0,s.useRef)(y);(0,s.useEffect)((function(){b.current=n}),[n]),(0,s.useEffect)((function(){P.current=y}),[y]),(0,s.useEffect)((function(){var e=v(function(){var e=(0,c.default)(a.default.mark((function e(n){var r,c,s,u,m,y;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.redirectUrl,t("name")!==p){e.next=17;break}if(e.prev=2,!(c=r.match(/#response=(.+)/))){e.next=11;break}return s=JSON.parse(window.atob(decodeURIComponent(c[1]))),u=s.client_secret,m=s.return_url,(0,i.default)(s,["client_secret","return_url"]),e.next=8,g[f](u,{payment_method:d({billing_details:(0,l.getBillingDetailsFromAddress)(b.current)},P.current()),return_url:m});case 8:if(!(y=e.sent).error){e.next=11;break}throw new l.StripeError(y.error);case 11:e.next=17;break;case 13:return e.prev=13,e.t0=e.catch(2),console.log(e.t0),e.abrupt("return",(0,l.ensureErrorResponse)(o,e.t0.error));case 17:case"end":return e.stop()}}),e,null,[[2,13]])})));return function(t){return e.apply(this,arguments)}}());return function(){return e()}}),[g,v,h])}},878:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useCreateSource=void 0;var a=r(n(7015)),o=r(n(8926)),i=r(n(9713)),c=r(n(3038)),s=n(3027),u=n(1134),l=n(6664),p=n(3163);t.useCreateSource=function(e){var t=e.getData,n=e.billing,r=e.shippingAddress,d=e.onPaymentProcessing,f=e.responseTypes,m=e.getSourceArgs,y=void 0!==m&&m,g=e.element,v=void 0!==g&&g,h=(0,s.useState)(!1),b=(0,c.default)(h,2),P=b[0],E=b[1],O=(0,s.useState)(!1),S=(0,c.default)(O,2),_=S[0],w=S[1],C=(0,s.useRef)({billing:n,shippingAddress:r}),k=(0,l.useStripe)(),M=(0,l.useElements)();(0,s.useEffect)((function(){C.current={billing:n,shippingAddress:r}}));var j=(0,s.useCallback)((function(){var e=C.current.billing,n=e.cartTotal,r=e.currency,a=e.billingData,o=(0,u.getDefaultSourceArgs)({type:t("paymentType"),amount:n.value,billingData:a,currency:r.code,returnUrl:t("returnUrl")});return y&&(o=y(o,{billingData:a})),o}),[]),D=(0,s.useCallback)((function(e){return{meta:{paymentMethodData:(0,i.default)({},"".concat(t("name"),"_token_key"),e)}}}),[]);return(0,s.useEffect)((function(){var e=d((0,o.default)(a.default.mark((function e(){var t;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!P){e.next=2;break}return e.abrupt("return",(0,u.ensureSuccessResponse)(f,D(P.id)));case 2:if(e.prev=2,!v){e.next=11;break}if(_){e.next=6;break}throw(0,p.__)("Please enter your payment info before proceeding.","woo-stripe-payment");case 6:return e.next=8,k.createSource(M.getElement(v),j());case 8:t=e.sent,e.next=14;break;case 11:return e.next=13,k.createSource(j());case 13:t=e.sent;case 14:if(!t.error){e.next=16;break}throw new u.StripeError(t.error);case 16:return E(t.source),e.abrupt("return",(0,u.ensureSuccessResponse)(f,D(t.source.id)));case 20:return e.prev=20,e.t0=e.catch(2),console.log(e.t0),e.abrupt("return",(0,u.ensureErrorResponse)(f,e.t0.error||e.t0));case 24:case"end":return e.stop()}}),e,null,[[2,20]])}))));return function(){return e()}}),[P,d,k,f,v,_,w]),{setIsValid:w}}},3994:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useValidateCheckout=void 0;var a=r(n(3038)),o=n(3027),i=n(1134),c=n(3163);t.useValidateCheckout=function(e){var t=e.subscriber,n=e.responseTypes,r=e.component,s=void 0===r?null:r,u=e.msg,l=void 0===u?(0,c.__)("Please enter your payment info before proceeding.","woo-stripe-payment"):u,p=(0,o.useState)(!1),d=(0,a.default)(p,2),f=d[0],m=d[1];return(0,o.useEffect)((function(){var e=t((function(){return!(s&&!f)||(0,i.ensureErrorResponse)(n,l)}));return function(){return e()}}),[t,f,m,n,s]),{isValid:f,setIsValid:m}}},9474:(e,t,n)=>{var r=n(3027),a=n(4222),o=n(1134),i=n(3539),c=n(3187),s=n(6664),u=(0,o.getSettings)("stripe_ideal_data");u()&&(0,a.registerPaymentMethod)({name:u("name"),label:r.createElement(c.PaymentMethodLabel,{title:u("title"),paymentMethod:u("name"),icons:u("icon")}),ariaLabel:"Ideal",placeOrderButtonLabel:u("placeOrderButtonLabel"),canMakePayment:(0,i.canMakePayment)(u),content:r.createElement(c.PaymentMethod,{content:i.LocalPaymentIntentContent,getData:u,confirmationMethod:"confirmIdealPayment",component:s.IdealBankElement}),edit:r.createElement(c.PaymentMethod,{content:i.LocalPaymentIntentContent,getData:u}),supports:{showSavedCards:!1,showSaveOption:!1,features:u("features")}})},9738:(e,t,n)=>{n(7156),n(9474),n(3868),n(8641),n(3817),n(4494),n(4784),n(1192),n(7894),n(3766),n(4031),n(5176),n(3140),n(39)},6867:(e,t,n)=>{var r=n(3027),a=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.KlarnaPaymentCategories=void 0;var o=n(3027),i=a(n(6630));t.KlarnaPaymentCategories=function(e){var t=e.categories,n=e.onChange,a=e.selected;return r.createElement("div",{className:"wc-stripe-blocks-klarna-container"},r.createElement("ul",null,t.map((function(e){return r.createElement(c,{key:e.type,category:e,onChange:n,selected:a})}))))};var c=function(e){var t=e.category,n=e.selected,a=e.onChange,c=t.type===n;(0,o.useEffect)((function(){Klarna.Payments.load({container:"#klarna-category-".concat(t.type),payment_method_category:t.type})}),[]);var s={label:t.label,value:t.type,content:r.createElement("div",{id:"klarna-category-".concat(t.type)})};return r.createElement("li",{className:"wc-stripe-blocks-klarna__category",key:t.type},r.createElement(i.default,{option:s,checked:c,onChange:a}))}},6028:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(8092);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var a=n(437);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}))},8092:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useCreateSource=void 0;var a=r(n(7015)),o=r(n(8926)),i=r(n(8)),c=r(n(9713)),s=r(n(3038)),u=n(3027),l=n(6664),p=n(3636),d=n(1134),f=r(n(7606));function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,c.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.useCreateSource=function(e){var t=e.getData,n=e.billing,r=e.shippingData,m=(0,l.useStripe)(),g=(0,p.useStripeError)(),v=(0,s.default)(g,2),h=(v[0],v[1]),b=(0,u.useRef)(new AbortController),P=(0,u.useRef)({}),E=(0,u.useRef)({}),O=(0,u.useState)(!1),S=(0,s.default)(O,2),_=S[0],w=S[1],C=(0,u.useState)(!1),k=(0,s.default)(C,2),M=k[0],j=k[1],D=n.billingData,R=n.cartTotal,x=n.cartTotalItems,A=n.currency,I=(0,u.useCallback)((function(e){var t=e.billingData,n=e.shippingData,r=n.needsShipping,a=n.shippingAddress;return!!(0,d.isAddressValid)(t)&&(!r||(0,d.isAddressValid)(a))}),[]),T=(0,u.useCallback)((function(e,t){var n=[];return e.forEach((function(e){n.push({amount:e.value,currency:t,description:e.label,quantity:1})})),n}),[]),L=(0,u.useCallback)((function(e){var n=e.cartTotal,r=e.cartTotalItems,a=e.billingData,o=e.currency,i=e.shippingData,c=a.first_name,s=a.last_name,u=a.country,l=i.needsShipping,p=i.shippingAddress,f=(0,d.getDefaultSourceArgs)({type:t("paymentType"),amount:n.value,billingData:a,currency:o.code,returnUrl:t("returnUrl")});return f=y(y({},f),{source_order:{items:T(r,o.code)},klarna:{locale:t("locale"),product:"payment",purchase_country:u,first_name:c,last_name:s}}),"US"==u&&(f.klarna.custom_payment_methods="payin4,installments"),l&&(f.klarna=y(y({},f.klarna),{shipping_first_name:p.first_name,shipping_last_name:p.last_name}),f.source_order.shipping={address:{city:p.city||"",country:p.country||"",line1:p.address_1||"",line2:p.address_2||"",postal_code:p.postcode||"",state:p.state||""}}),E.current=P.current,P.current=f,f}),[]),N=(0,u.useCallback)((function(e,t){var n=function e(t,n){for(var r={},a=0,o=Object.keys(t);a<o.length;a++){var c=o[a];"object"!==(0,i.default)(t[c])||Array.isArray(t[c])?r[c]=n[c]:r[c]=e(t[c],n[c])}return r}(e,t);return JSON.stringify(e)==JSON.stringify(n)}),[]),B=(0,u.useCallback)(function(){var e=(0,o.default)(a.default.mark((function e(t){var n,r,o,i,s,u,l;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.billingData,r=t.shippingData,o=t.cartTotal,i=t.cartTotalItems,s=t.currency,u=L({cartTotal:o,cartTotalItems:i,billingData:n,currency:s,shippingData:r}),e.prev=2,e.next=5,m.createSource(u);case 5:if(!(l=e.sent).error){e.next=8;break}throw new d.StripeError(l.error);case 8:(0,d.storeInCache)("klarna:source",(0,c.default)({},s.code,{source:l.source,args:P.current})),j(l.source),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(2),console.log(e.t0),h(e.t0.error);case 16:case"end":return e.stop()}}),e,null,[[2,12]])})));return function(t){return e.apply(this,arguments)}}(),[m,j]),q=(0,u.useCallback)(function(){var e=(0,o.default)(a.default.mark((function e(n){var r,o,i;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.source,o=n.updates,i={updates:o,source_id:r.id,client_secret:r.client_secret,payment_method:t("name")},e.prev=2,b.current.abort(),b.current=new AbortController,e.next=7,(0,f.default)({url:(0,d.getRoute)("update/source"),method:"POST",data:i,signal:b.current.signal});case 7:e.sent.source&&((0,d.storeInCache)("klarna:source",{source:r,args:P.current}),j(r)),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(2),console.log("update aborted");case 14:case"end":return e.stop()}}),e,null,[[2,11]])})));return function(t){return e.apply(this,arguments)}}(),[j]);return(0,u.useEffect)((function(){var e;if(!M)if(null!==(e=(0,d.getFromCache)("klarna:source"))&&void 0!==e&&e[A.code]){var t=(0,d.getFromCache)("klarna:source")[A.code],n=t.source,a=t.args;P.current=a,j(n)}else m&&I({billingData:D,shippingData:r})&&(w(!0),B({billingData:D,shippingData:r,cartTotal:R,cartTotalItems:x,currency:A}).then((function(){return w(!1)})))}),[m,null==M?void 0:M.id,B,D,R.value,r,w,x,A.code]),(0,u.useEffect)((function(){if(m&&M){var e=(t=L({billingData:D,cartTotal:R,cartTotalItems:x,currency:A,shippingData:r}),["type","currency","statement_descriptor","redirect","klarna.product","klarna.locale","klarna.custom_payment_methods"].reduce((function(e,t){if(t.indexOf(".")>-1){var n=t.split(".");return delete n.slice(0,n.length-1).reduce((function(e,t){return e[t]}),e)[t=n[n.length-1]],e}return delete e[t],e}),t));N(e,E.current)||q({source:M,updates:e})}var t}),[null==M?void 0:M.id,D,R.value,x,r,A.code]),{source:M,setSource:j,isLoading:_}}},437:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useProcessPayment=void 0;var a=r(n(9713)),o=n(3027),i=n(1134),c=n(3163);t.useProcessPayment=function(e){var t=e.payment_method,n=e.source_id,r=e.paymentCategory,s=e.onPaymentProcessing,u=e.responseTypes;(0,o.useEffect)((function(){var e=s((function(){return new Promise((function(e){Klarna.Payments.authorize({payment_method_category:r},(function(r){r.approved?((0,i.deleteFromCache)("klarna:source"),e((0,i.ensureSuccessResponse)(u,{meta:{paymentMethodData:(0,a.default)({},"".concat(t,"_token_key"),n)}}))):e((0,i.ensureErrorResponse)(u,r.error||(0,c.__)("Your purchase is not approved.","woo-stripe-payment")))}))}))}));return function(){return e()}}),[n,r,s])}},7156:(e,t,n)=>{var r=n(3027),a=n(5318)(n(3038)),o=n(3027),i=n(4222),c=n(3163),s=n(3636),u=n(1134),l=n(3187),p=n(3539),d=n(6664),f=n(6867),m=n(8567),y=n(6028);n(1530);var g=(0,u.getSettings)("stripe_klarna_data"),v=function(e){return r.createElement(d.Elements,{stripe:u.initStripe},r.createElement(h,e))},h=function(e){var t=e.getData,n=e.billing,i=e.shippingData,u=e.emitResponse,l=e.eventRegistration,p=u.responseTypes,d=l.onPaymentProcessing,g=l.onCheckoutAfterProcessingWithError,v=(0,o.useState)(""),h=(0,a.default)(v,2),b=h[0],P=h[1],E=function(e){for(var n=e.klarna.payment_method_categories.split(","),r=[],a=0,o=Object.keys(t("categories"));a<o.length;a++){var i=o[a];n.includes(i)&&r.push({type:i,label:t("categories")[i]})}return r},O=(0,y.useCreateSource)({getData:t,billing:n,shippingData:i}),S=O.source,_=O.isLoading;if((0,y.useProcessPayment)({payment_method:t("name"),source_id:S.id,paymentCategory:b,onPaymentProcessing:d,responseTypes:p}),(0,s.useProcessCheckoutError)({responseTypes:p,subscriber:g}),(0,o.useEffect)((function(){if(!b&&S){var e=E(S);e.length&&P(e.shift().type)}}),[S]),S){Klarna.Payments.init({client_token:S.klarna.client_token});var w=E(S);return r.createElement(f.KlarnaPaymentCategories,{categories:w,selected:!b&&w.length>0?w[0].type:b,onChange:P})}return _?r.createElement(m.KlarnaLoader,null):r.createElement("div",{className:"wc-stripe-blocks-klarna__notice"},(0,c.__)("Please fill out all required fields before paying with Klarna.","woo-stripe-payment"))};g()&&(0,i.registerPaymentMethod)({name:g("name"),label:r.createElement(l.PaymentMethodLabel,{title:g("title"),paymentMethod:g("name"),icons:g("icon")}),ariaLabel:"Klarna",placeOrderButtonLabel:g("placeOrderButtonLabel"),canMakePayment:(0,p.canMakePayment)(g,(function(e){var t=e.settings,n=e.billingData,r=e.cartTotals,a=n.country,o=r.currency_code,i=t("requiredParams");return[o]in i&&i[o].includes(a)})),content:r.createElement(l.PaymentMethod,{getData:g,content:v}),edit:r.createElement(l.PaymentMethod,{getData:g,content:v}),supports:{showSavedCards:!1,showSaveOption:!1,features:g("features")}})},8567:(e,t,n)=>{var r=n(3027);Object.defineProperty(t,"__esModule",{value:!0}),t.KlarnaLoader=void 0,t.KlarnaLoader=function(){return r.createElement("div",{className:"wc-stripe-klarna-loader"},r.createElement("div",null),r.createElement("div",null),r.createElement("div",null))}},3539:(e,t,n)=>{var r=n(3027),a=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.LocalPaymentSourceContent=t.LocalPaymentIntentContent=t.canMakePayment=void 0;var o=a(n(9713)),i=a(n(6479)),c=n(3027),s=n(6664),u=n(1134),l=n(8522),p=n(3636);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.canMakePayment=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n){var r=n.billingData,a=n.cartTotals,o=(0,i.default)(n,["billingData","cartTotals"]),c=a.currency_code,s=r.country,l=e("countries"),p=e("allowedCountries"),d=e("features"),m=!1;if(e("isAdmin"))m=!0;else{if((0,u.cartContainsSubscription)()&&!d.includes("subscriptions"))return!1;if((0,u.cartContainsPreOrder)()&&!d.includes("pre-orders"))return!1;e("currencies").includes(c)&&(m="all_except"===p?!e("exceptCountries").includes(s):"specific"===p?e("specificCountries").includes(s):!(l.length>0)||l.includes(s)),t&&m&&(m=t(f({settings:e,billingData:r,cartTotals:a},o)))}return m}},t.LocalPaymentIntentContent=function(e){return r.createElement(s.Elements,{stripe:u.initStripe},r.createElement(y,e))},t.LocalPaymentSourceContent=function(e){return r.createElement(s.Elements,{stripe:u.initStripe},r.createElement(m,e))};var m=function(e){var t=e.getData,n=e.billing,a=e.shippingData,o=e.emitResponse,i=e.eventRegistration,c=e.getSourceArgs,s=void 0!==c&&c,u=e.element,p=void 0!==u&&u,d=a.shippingAddress,f=i.onPaymentProcessing,m=(i.onCheckoutAfterProcessingWithError,o.responseTypes),y=(o.noticeContexts,(0,l.useCreateSource)({getData:t,billing:n,shippingAddress:d,onPaymentProcessing:f,responseTypes:m,getSourceArgs:s,element:p}).setIsValid);return p?r.createElement(g,{name:t("name"),options:t("elementOptions"),onChange:function(e){y(e.complete)},element:p}):null},y=function(e){var t=e.getData,n=e.billing,a=e.emitResponse,i=e.eventRegistration,u=e.activePaymentMethod,d=e.confirmationMethod,f=void 0===d?null:d,m=e.component,y=void 0===m?null:m,v=(0,s.useElements)(),h=n.billingData,b=i.onPaymentProcessing,P=i.onCheckoutAfterProcessingWithError,E=a.responseTypes,O=a.noticeContexts,S=(0,c.useCallback)((function(){return y?(0,o.default)({},t("paymentType"),v.getElement(y)):{}}),[v]),_=(0,l.useValidateCheckout)({subscriber:b,responseTypes:E,component:y}).setIsValid;return(0,l.useAfterProcessLocalPayment)({getData:t,billingData:h,eventRegistration:i,responseTypes:E,activePaymentMethod:u,confirmationMethod:f,getPaymentMethodArgs:S}),(0,p.useProcessCheckoutError)({responseTypes:E,subscriber:P,messageContext:O.PAYMENT}),y?r.createElement(g,{name:t("name"),options:t("elementOptions"),onChange:function(e){return _(!e.empty)},element:y}):null},g=function(e){var t=e.name,n=e.onChange,a=e.element,o=e.options,i=a;return r.createElement("div",{className:"wc-stripe-local-payment-container ".concat(t," ").concat(i.displayName)},r.createElement(i,{options:o,onChange:n}))}},4784:(e,t,n)=>{var r=n(3027),a=n(4222),o=n(1134),i=n(3539),c=n(3187),s=(0,o.getSettings)("stripe_multibanco_data");s()&&(0,a.registerPaymentMethod)({name:s("name"),label:r.createElement(c.PaymentMethodLabel,{title:s("title"),paymentMethod:s("name"),icons:s("icon")}),ariaLabel:"MultiBanco",placeOrderButtonLabel:s("placeOrderButtonLabel"),canMakePayment:(0,i.canMakePayment)(s),content:r.createElement(c.PaymentMethod,{content:i.LocalPaymentSourceContent,getData:s}),edit:r.createElement(c.PaymentMethod,{content:i.LocalPaymentSourceContent,getData:s}),supports:{showSavedCards:!1,showSaveOption:!1,features:s("features")}})},3868:(e,t,n)=>{var r=n(3027),a=n(4222),o=n(1134),i=n(3539),c=n(3187),s=(0,o.getSettings)("stripe_p24_data");s()&&(0,a.registerPaymentMethod)({name:s("name"),label:r.createElement(c.PaymentMethodLabel,{title:s("title"),paymentMethod:s("name"),icons:s("icon")}),ariaLabel:"P24",placeOrderButtonLabel:s("placeOrderButtonLabel"),canMakePayment:(0,i.canMakePayment)(s),content:r.createElement(c.PaymentMethod,{content:i.LocalPaymentSourceContent,getData:s}),edit:r.createElement(c.PaymentMethod,{content:i.LocalPaymentSourceContent,getData:s}),supports:{showSavedCards:!1,showSaveOption:!1,features:s("features")}})},1192:(e,t,n)=>{var r=n(3027),a=n(5318),o=a(n(9713)),i=a(n(6479)),c=n(4222),s=n(1134),u=n(3539),l=n(3187),p=n(6664);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m,y=(0,s.getSettings)("stripe_sepa_data"),g=(m=l.PaymentMethod,function(e){var t=e.getData,n=(0,i.default)(e,["getData"]);return r.createElement(r.Fragment,null,r.createElement(m,f(f({},n),{},{getData:t})),r.createElement("div",{className:"wc-stripe-blocks-sepa__mandate"},t("mandate")))});y()&&(0,c.registerPaymentMethod)({name:y("name"),label:r.createElement(l.PaymentMethodLabel,{title:y("title"),paymentMethod:y("name"),icons:y("icon")}),ariaLabel:"SEPA",placeOrderButtonLabel:y("placeOrderButtonLabel"),canMakePayment:(0,u.canMakePayment)(y),content:r.createElement(g,{content:u.LocalPaymentSourceContent,getData:y,element:p.IbanElement,getSourceArgs:function(e,t){var n=t.billingData;return e.mandate={notification_method:n.email?"email":"manual",interval:(0,s.cartContainsSubscription)()||(0,s.cartContainsPreOrder)()?"scheduled":"one_time"},"scheduled"===e.mandate.interval&&delete e.amount,e}}),edit:r.createElement(u.LocalPaymentSourceContent,{getData:y}),supports:{showSavedCards:!1,showSaveOption:!1,features:y("features")}})},7894:(e,t,n)=>{var r=n(3027),a=n(5318)(n(9713)),o=n(4222),i=n(1134),c=n(3539),s=n(3187);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=(0,i.getSettings)("stripe_sofort_data");p()&&(0,o.registerPaymentMethod)({name:p("name"),label:r.createElement(s.PaymentMethodLabel,{title:p("title"),paymentMethod:p("name"),icons:p("icon")}),ariaLabel:"Sofort",placeOrderButtonLabel:p("placeOrderButtonLabel"),canMakePayment:(0,c.canMakePayment)(p),content:r.createElement(s.PaymentMethod,{content:c.LocalPaymentSourceContent,getData:p,getSourceArgs:function(e,t){var n=t.billingData;return l(l({},e),{},{sofort:{country:n.country}})}}),edit:r.createElement(s.PaymentMethod,{content:c.LocalPaymentSourceContent,getData:p}),supports:{showSavedCards:!1,showSaveOption:!1,features:p("features")}})},3766:(e,t,n)=>{var r=n(3027),a=n(5318),o=a(n(7015)),i=a(n(8926)),c=a(n(9713)),s=a(n(3038)),u=n(3027),l=n(4222),p=n(1134),d=n(3187),f=n(3539),m=n(6664),y=n(8522),g=n(3163),v=n(3636),h=(0,p.getSettings)("stripe_wechat_data"),b=function(e){return r.createElement(m.Elements,{stripe:p.initStripe},r.createElement(P,e))},P=function(e){var t=e.getData,n=e.billing,a=(e.shippingData,e.emitResponse),o=e.eventRegistration,i=e.components,c=a.responseTypes,s=o.onPaymentProcessing,l=o.onCheckoutAfterProcessingWithSuccess,d=i.ValidationInputError,f=(0,y.useValidateCheckout)({subscriber:o.onPaymentProcessing,responseTypes:a.responseTypes,msg:(0,g.__)("Please scan your QR code to continue with payment.","woo-stripe-payment")}),m=(f.isValid,f.setIsValid),v=O({getData:t,billing:n,responseTypes:c,subscriber:s}),h=v.source,b=v.error,P=v.deleteSourceFromStorage;return(0,u.useEffect)((function(){var e=l((function(){return P(),(0,p.ensureSuccessResponse)(c)}));return function(){return e()}}),[h,l,P]),(0,u.useEffect)((function(){h&&m(!0)}),[h]),h?r.createElement(E,{text:h.wechat.qr_code_url}):b?r.createElement("div",{className:"wechat-validation-error"},r.createElement(d,{errorMessage:(0,p.getErrorMessage)(b)})):(0,p.isAddressValid)(n.billingData)?null:(0,g.__)("Please fill out all the required fields in order to complete the WeChat payment.","woo-stripe-payment")},E=function(e){var t=e.text,n=e.width,a=void 0===n?128:n,o=e.height,i=void 0===o?128:o,c=e.colorDark,s=void 0===c?"#424770":c,l=e.colorLight,d=void 0===l?"#f8fbfd":l,f=e.correctLevel,m=void 0===f?QRCode.CorrectLevel.H:f,y=(0,u.useRef)();return(0,u.useEffect)((function(){new QRCode(y.current,{text:t,width:a,height:i,colorDark:s,colorLight:d,correctLevel:m})}),[y]),r.createElement(r.Fragment,null,r.createElement("div",{id:"wc-stripe-block-qrcode",ref:y}),(0,p.isTestMode)()&&r.createElement("p",null,(0,g.__)("Test mode: Click the Place Order button to proceed.","woo-stripe-payment")),!(0,p.isTestMode)()&&r.createElement("p",null,(0,g.__)("Scan the QR code using your WeChat app. Once scanned click the Place Order button.","woo-stripe-payment")))},O=function(e){var t=e.getData,n=e.billing,r=e.responseTypes,a=e.subscriber,l=(0,m.useStripe)(),d=(0,v.useStripeError)(),f=(0,s.default)(d,2),y=f[0],g=f[1],h=(0,u.useState)((0,p.getFromCache)("wechat:source")),b=(0,s.default)(h,2),P=b[0],E=b[1],O=(0,u.useRef)(null),S=n.cartTotal,_=n.billingData,w=n.currency;(0,u.useEffect)((function(){var e=a((function(){return(0,p.ensureSuccessResponse)(r,{meta:{paymentMethodData:(0,c.default)({},"".concat(t("name"),"_token_key"),P.id)}})}));return function(){return e()}}),[P,a]);var C=(0,u.useCallback)((0,i.default)(o.default.mark((function e(){var n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,y||!(0,p.isAddressValid)(_)){e.next=9;break}return e.next=4,l.createSource((0,p.getDefaultSourceArgs)({type:t("paymentType"),amount:S.value,billingData:_,currency:w.code,returnUrl:t("returnUrl")}));case 4:if(!(n=e.sent).error){e.next=7;break}throw new p.StripeError(n.error);case 7:E(n.source),(0,p.storeInCache)("wechat:source",n.source);case 9:e.next=15;break;case 11:e.prev=11,e.t0=e.catch(0),console.log("error: ",e.t0),g(e.t0.error);case 15:case"end":return e.stop()}}),e,null,[[0,11]])}))),[l,P,S.value,_,w,y]),k=(0,u.useCallback)((function(){(0,p.deleteFromCache)("wechat:source")}),[]);return(0,u.useEffect)((function(){l&&!P&&(clearTimeout(O.current),O.current=setTimeout(C,1e3))}),[l,P]),{source:P,setSource:E,error:y,deleteSourceFromStorage:k}};h()&&(0,l.registerPaymentMethod)({name:h("name"),label:r.createElement(d.PaymentMethodLabel,{title:h("title"),paymentMethod:h("name"),icons:h("icon")}),ariaLabel:"WeChat",canMakePayment:(0,f.canMakePayment)(h),content:r.createElement(d.PaymentMethod,{content:b,getData:h}),edit:r.createElement(d.PaymentMethod,{content:b,getData:h}),supports:{showSavedCards:!1,showSaveOption:!1,features:h("features")}})},5180:(e,t,n)=>{n(3139),n(3726)},3726:(e,t,n)=>{var r=n(3027),a=n(5318),o=a(n(3038)),i=a(n(6479)),c=n(3027),s=n(4222),u=n(1134),l=n(3636),p=n(6664),d=(0,u.getSettings)("stripe_payment_request_data"),f=function(e){return r.createElement("div",{className:"wc-stripe-payment-request-container"},r.createElement(p.Elements,{stripe:u.initStripe},r.createElement(m,e)))},m=function(e){var t=e.getData,n=e.onClick,a=e.onClose,s=e.billing,u=e.shippingData,d=e.eventRegistration,f=e.emitResponse,m=e.onSubmit,y=e.activePaymentMethod,g=((0,i.default)(e,["getData","onClick","onClose","billing","shippingData","eventRegistration","emitResponse","onSubmit","activePaymentMethod"]),d.onPaymentProcessing),v=f.responseTypes,h=f.noticeContexts,b=(0,p.useStripe)(),P=(0,l.useStripeError)(),E=(0,o.default)(P,1)[0],O=(0,l.useExportedValues)();(0,l.useExpressBreakpointWidth)({payment_method:t("name"),width:300});var S=(0,l.useProcessPaymentIntent)({getData:t,billing:s,shippingData:u,onPaymentProcessing:g,emitResponse:f,error:E,onSubmit:m,activePaymentMethod:y,exportedValues:O}).setPaymentMethod;(0,l.useAfterProcessingPayment)({getData:t,eventRegistration:d,responseTypes:v,activePaymentMethod:y,messageContext:h.EXPRESS_PAYMENTS});var _=(0,l.usePaymentRequest)({getData:t,onClose:a,stripe:b,billing:s,shippingData:u,eventRegistration:d,setPaymentMethod:S,exportedValues:O,canPay:function(e){return null!=e&&!e.applePay}}).paymentRequest,w=(0,c.useMemo)((function(){return{paymentRequest:_,style:{paymentRequestButton:t("paymentRequestButton")}}}),[_]);return _?r.createElement(p.PaymentRequestButtonElement,{options:w,onClick:n}):null},y=function(e){e.getData,(0,i.default)(e,["getData"]);var t=(0,c.useRef)();return(0,c.useEffect)((function(){var e=window.devicePixelRatio;t.current.width=20*e,t.current.height=20*e;var n=t.current.getContext("2d");n.scale(e,e),n.beginPath(),n.arc(10,10,10,0,2*Math.PI),n.fillStyle="#986fff",n.fill()})),r.createElement("div",{className:"payment-request-block-editor"},r.createElement("div",{className:"icon-container"},r.createElement("span",null,"Buy now"),r.createElement("canvas",{className:"PaymentRequestButton-icon",ref:t}),r.createElement("i",{className:"payment-request-arrow"})))};(0,s.registerExpressPaymentMethod)({name:d("name"),canMakePayment:function(e){var t=e.cartTotals;if(d("isAdmin"))return!0;var n=t.currency_code,r=t.total_price;return(0,u.canMakePayment)({country:d("countryCode"),currency:n.toLowerCase(),total:{label:d("totalLabel"),amount:parseInt(r)}},(function(e){return null!=e&&!e.applePay}))},content:r.createElement(f,{getData:d}),edit:r.createElement(y,{getData:d}),supports:{showSavedCards:d("showSavedCards"),showSaveOption:d("showSaveOption"),features:d("features")}})},1065:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(7015)),o=r(n(8926)),i=n(3027),c=n(1134);t.default=function(e){var t=e.eventRegistration,n=e.emitResponse,r=e.getData,s=t.onCheckoutAfterProcessingWithSuccess,u=n.responseTypes,l=(0,i.useCallback)(function(){var e=(0,o.default)(a.default.mark((function e(t){var n,o;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.redirectUrl,e.next=3,c.initStripe;case 3:return o=e.sent,e.next=6,(0,c.handleCardAction)({redirectUrl:n,getData:r,stripe:o,responseTypes:u});case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[s]);return(0,i.useEffect)((function(){var e=s(l);return function(){return e()}}),[s]),null}},1134:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.isCheckoutPage=t.isCartPage=t.deleteFromCache=t.getFromCache=t.storeInCache=t.isTestMode=t.getDefaultSourceArgs=t.cartContainsSubscription=t.cartContainsPreOrder=t.getLocalPaymentMethods=t.registerLocalPaymentMethod=t.canMakePayment=t.getDisplayItems=t.getShippingOptionId=t.getShippingOptions=t.formatPrice=t.filterEmptyValues=t.getIntermediateAddress=t.toCartAddress=t.handleCardAction=t.isUserLoggedIn=t.hasShippingRates=t.getSelectedShippingOption=t.isFieldRequired=t.getLocaleFields=t.isAddressValid=t.removeNumberPrecision=t.isEmpty=t.StripeError=t.getSettings=t.getBillingDetailsFromAddress=t.getErrorMessage=t.ensureErrorResponse=t.ensureSuccessResponse=t.getRoute=t.getCreditCardForm=t.registerCreditCardForm=t.initStripe=void 0;var a=r(n(319)),o=r(n(7015)),i=r(n(8926)),c=r(n(3038)),s=r(n(8)),u=r(n(4575)),l=r(n(2205)),p=r(n(8585)),d=r(n(9754)),f=r(n(5957)),m=r(n(9713)),y=r(n(6479)),g=n(4465),v=n(2492),h=r(n(7606)),b=n(8419);function P(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw o}}}}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){(0,m.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _=(0,v.getSetting)("stripeGeneralData"),w=_.publishableKey,C=_.account,k=(0,v.getSetting)("stripeErrorMessages"),M=(0,v.getSetting)("countryLocale",{}),j=/^([\w]+)\:(.+)$/,D=(0,v.getSetting)("stripeGeneralData").routes,R={},x=[],A={recipient:function(e,t){return e.first_name=t.split(" ").slice(0,-1).join(" "),e.last_name=t.split(" ").pop(),e},payerName:function(e,t){return e.first_name=t.split(" ").slice(0,-1).join(" "),e.last_name=t.split(" ").pop(),e},country:"country",addressLine:function(e,t){return t[0]&&(e.address_1=t[0]),t[1]&&(e.address_2=t[1]),e},line1:"address_1",line2:"address_2",city:"city",region:"state",postalCode:"postcode",postal_code:"postcode",payerEmail:"email",payerPhone:"phone"},I=new Promise((function(e,t){(0,g.loadStripe)(w,C?{stripeAccount:C}:{}).then((function(t){e(t)})).catch((function(t){e({error:t})}))}));t.initStripe=I,t.registerCreditCardForm=function(e){var t=e.id,n=(0,y.default)(e,["id"]);R[t]=n},t.getCreditCardForm=function(e){return R[e]};var T=function(e){return null!=D&&D[e]?D[e]:console.log("".concat(e," is not a valid route"))};t.getRoute=T;var L=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return S({type:e.SUCCESS},t)};t.ensureSuccessResponse=L;var N=function(e,t){return{type:e.ERROR,message:B(t)}};t.ensureErrorResponse=N;var B=function(e){return"string"==typeof e?e:null!=e&&e.code&&null!=k&&k[e.code]?k[e.code]:null!=e&&e.statusCode?null!=k&&k[e.statusCode]?k[e.statusCode]:e.statusMessage:e.message};t.getErrorMessage=B;var q=function(e){var t={name:"".concat(e.first_name," ").concat(e.last_name),address:{city:e.city||"",country:e.country||"",line1:e.address_1||"",line2:e.address_2||"",postal_code:e.postcode||"",state:e.state||""}};return null!=e&&e.phone&&(t.phone=e.phone),null!=e&&e.email&&(t.email=e.email),t};t.getBillingDetailsFromAddress=q,t.getSettings=function(e){return function(t){return t?(0,v.getSetting)(e)[t]:(0,v.getSetting)(e)}};var F=function(e){(0,l.default)(a,e);var t,n,r=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,d.default)(t);if(n){var a=(0,d.default)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,p.default)(this,e)});function a(e){var t;return(0,u.default)(this,a),(t=r.call(this,e.message)).error=e,t}return a}((0,f.default)(Error));t.StripeError=F;var V=function(e){return"string"==typeof e?0==e.length||""==e:Array.isArray(e)?0==array.length:"object"!==(0,s.default)(e)||0==Object.keys(e).length};t.isEmpty=V,t.removeNumberPrecision=function(e,t){return e/Math.pow(10,t)},t.isAddressValid=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=U(e.country),r=0,a=Object.entries(e);r<a.length;r++){var o=(0,c.default)(a[r],2),i=o[0],s=o[1];if(!t.includes(i)&&null!=n&&n[i]&&n[i].required&&V(s))return!1}return!0};var U=function(e){var t=S({},M.default);return e&&null!=M&&M[e]&&(t=Object.entries(M[e]).reduce((function(e,t){var n=(0,c.default)(t,2),r=n[0],a=n[1];return e[r]=S(S({},e[r]),a),e}),t),["phone","email"].forEach((function(e){var n=document.getElementById(e);n&&(t[e]={required:n.required})}))),t};t.getLocaleFields=U,t.isFieldRequired=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=U(t);return[e]in n&&n[e].required},t.getSelectedShippingOption=function(e){var t=e.match(j);if(t){var n=t[1];return[t[2],n]}return[]},t.hasShippingRates=function(e){return e.map((function(e){return e.shipping_rates.length>0})).filter(Boolean).length>0},t.isUserLoggedIn=function(e){return e>0};var W=function(){var e=(0,i.default)(o.default.mark((function e(t,n){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,h.default)({url:D["sync/intent"],method:"POST",data:{order_id:t,client_secret:n}});case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.log(e.t0);case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(t,n){return e.apply(this,arguments)}}(),Y=function(){var e=(0,i.default)(o.default.mark((function e(t){var n,r,a,i,c,s,u,l,p,d,f,y,g,v;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.redirectUrl,r=t.responseTypes,a=t.stripe,i=t.getData,c=t.savePaymentMethod,s=void 0!==c&&c,e.prev=1,!(u=n.match(/#response=(.+)/))){e.next=20;break}return l=JSON.parse(window.atob(decodeURIComponent(u[1]))),p=l.client_secret,d=l.order_id,f=l.order_key,e.next=7,a.handleCardAction(p);case 7:if(!(y=e.sent).error){e.next=11;break}return W(d,p),e.abrupt("return",N(r,y.error));case 11:return g=(0,m.default)({order_id:d,order_key:f},"".concat(i("name"),"_save_source_key"),s),e.next=14,(0,h.default)({url:T("process/payment"),method:"POST",data:g});case 14:if(!(v=e.sent).messages){e.next=17;break}return e.abrupt("return",N(r,v.messages));case 17:return e.abrupt("return",L(r,{redirectUrl:v.redirect}));case 20:return e.abrupt("return",L(r));case 21:e.next=27;break;case 23:return e.prev=23,e.t0=e.catch(1),console.log(e.t0),e.abrupt("return",N(r,e.t0));case 27:case"end":return e.stop()}}),e,null,[[1,23]])})));return function(t){return e.apply(this,arguments)}}();t.handleCardAction=Y,t.toCartAddress=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:A;return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={};t=S(S({},t),K(n));for(var a=0,o=Object.entries(e);a<o.length;a++){var i,s=(0,c.default)(o[a],2),u=s[0],l=s[1];null!==(i=t)&&void 0!==i&&i[u]&&("function"==typeof l?l(r,t[u]):r[l]=t[u])}return r}},t.getIntermediateAddress=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["city","postcode","state","country"],r={},a=P(n);try{for(a.s();!(t=a.n()).done;){var o=t.value;r[o]=e[o]}}catch(e){a.e(e)}finally{a.f()}return r};var K=function(e){return Object.keys(e).filter((function(t){return Boolean(e[t])})).reduce((function(t,n){return S(S({},t),{},(0,m.default)({},n,e[n]))}),{})};t.filterEmptyValues=K;var G=function(e,t){var n=(0,b.getCurrency)(t),r=n.prefix,a=n.suffix,o=n.decimalSeparator,i=n.minorUnit,c=n.thousandSeparator;if(""==e||void 0===e)return e;e="string"==typeof e?parseInt(e,10):e;var s,u=(e=(e/=Math.pow(10,i)).toString().replace(".",o)).indexOf(o);if(u<0)e+="".concat(o).concat(new Array(i+1).join("0"));else{var l=e.substr(u+1);l.length<i&&(e+=new Array(i-l.length+1).join("0"))}var p=e.match(new RegExp("(\\d+)\\".concat(o,"(\\d+)")));return e=p[1],s=p[2],r+(e=(e=e.replace(new RegExp("\\B(?=(\\d{3})+(?!\\d))","g"),"".concat(c)))+o+s)+a};t.formatPrice=G,t.getShippingOptions=function(e){var t=[];return e.forEach((function(e,n){e.shipping_rates.sort((function(e){return e.selected?-1:1}));var r=e.shipping_rates.map((function(e){var t=document.createElement("textarea");return t.innerHTML=e.name,G(e.price,e.currency_code),{id:H(n,e.rate_id),label:t.value,amount:parseInt(e.price,10)}}));t=[].concat((0,a.default)(t),(0,a.default)(r))})),t};var H=function(e,t){return"".concat(e,":").concat(t)};t.getShippingOptionId=H,t.getDisplayItems=function(e,t){t.minorUnit;var n=[];return e.forEach((function(e){0<e.value&&n.push({label:e.label,pending:!1,amount:e.value})})),n};var z={};t.canMakePayment=function(e,t){var n=e.country,r=e.currency,a=e.total;return new Promise((function(e,o){var i=[n,r,a.amount].reduce((function(e,t){return"".concat(e,"-").concat(t)}));return i in z?e(z[i]):I.then((function(c){if(c.error)return o(c.error);c.paymentRequest({country:n,currency:r,total:a}).canMakePayment().then((function(n){return z[i]=t(n),e(z[i])}))})).catch(o)}))},t.registerLocalPaymentMethod=function(e){x.push(e)},t.getLocalPaymentMethods=function(){return x},t.cartContainsPreOrder=function(){var e=(0,v.getSetting)("stripePaymentData");return e&&e.pre_order},t.cartContainsSubscription=function(){var e=(0,v.getSetting)("stripePaymentData");return e&&e.subscription},t.getDefaultSourceArgs=function(e){var t=e.type,n=e.amount,r=e.billingData,a=e.currency,o=e.returnUrl;return{type:t,amount:n,currency:a,owner:q(r),redirect:{return_url:o}}},t.isTestMode=function(){return"test"===(0,v.getSetting)("stripeGeneralData").mode};var J=function(e){return"".concat("stripe:").concat(e)};t.storeInCache=function(e,t){var n=Math.floor((new Date).getTime()/1e3)+900;"sessionStorage"in window&&sessionStorage.setItem(J(e),JSON.stringify({value:t,exp:n}))},t.getFromCache=function(e){if("sessionStorage"in window)try{var t=JSON.parse(sessionStorage.getItem(J(e)));if(t){var n=t.value,r=t.exp;if(!(Math.floor((new Date).getTime()/1e3)>r))return n;Q(J(e))}}catch(e){}return null};var Q=function(e){"sessionStorage"in window&&sessionStorage.removeItem(J(e))};t.deleteFromCache=Q,t.isCartPage=function(){return"cart"===(0,v.getSetting)("stripeGeneralData").page},t.isCheckoutPage=function(){return"checkout"===(0,v.getSetting)("stripeGeneralData").page}},4184:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)&&n.length){var i=a.apply(null,n);i&&e.push(i)}else if("object"===o)for(var c in n)r.call(n,c)&&n[c]&&e.push(c)}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},1127:()=>{},7776:()=>{},4836:()=>{},85:()=>{},3110:()=>{},8356:()=>{},5773:()=>{},9509:()=>{},1530:()=>{},3139:()=>{}}]);
|
3 |
Â
//# sourceMappingURL=commons.js.map
|
1 |
Â
/*! For license information please see commons.js.LICENSE.txt */
|
2 |
+
(self.webpackChunkwc_stripe_name_=self.webpackChunkwc_stripe_name_||[]).push([[351],{7228:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},2858:e=>{e.exports=function(e){if(Array.isArray(e))return e}},3646:(e,t,n)=>{var r=n(7228);e.exports=function(e){if(Array.isArray(e))return r(e)}},1506:e=>{e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},8926:e=>{function t(e,t,n,r,a,o,i){try{var c=e[o](i),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,a)}e.exports=function(e){return function(){var n=this,r=arguments;return new Promise((function(a,o){var i=e.apply(n,r);function c(e){t(i,a,o,c,s,"next",e)}function s(e){t(i,a,o,c,s,"throw",e)}c(void 0)}))}}},4575:e=>{e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},9100:(e,t,n)=>{var r=n(9489),a=n(7067);function o(t,n,i){return a()?e.exports=o=Reflect.construct:e.exports=o=function(e,t,n){var a=[null];a.push.apply(a,t);var o=new(Function.bind.apply(e,a));return n&&r(o,n.prototype),o},o.apply(null,arguments)}e.exports=o},3913:e=>{function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}},9713:e=>{e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},7154:e=>{function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}e.exports=t},9754:e=>{function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(n)}e.exports=t},2205:(e,t,n)=>{var r=n(9489);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},5318:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}}},430:e=>{e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}},7067:e=>{e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},6860:e=>{e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},3884:e=>{e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,a=!1,o=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(a)throw o}}return n}}},521:e=>{e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},8206:e=>{e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},6479:(e,t,n)=>{var r=n(7316);e.exports=function(e,t){if(null==e)return{};var n,a,o=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},7316:e=>{e.exports=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}},8585:(e,t,n)=>{var r=n(8),a=n(1506);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?a(e):t}},9489:e=>{function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(n,r)}e.exports=t},3038:(e,t,n)=>{var r=n(2858),a=n(3884),o=n(379),i=n(521);e.exports=function(e,t){return r(e)||a(e,t)||o(e,t)||i()}},319:(e,t,n)=>{var r=n(3646),a=n(6860),o=n(379),i=n(8206);e.exports=function(e){return r(e)||a(e)||o(e)||i()}},8:e=>{function t(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(n)}e.exports=t},379:(e,t,n)=>{var r=n(7228);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},5957:(e,t,n)=>{var r=n(9754),a=n(9489),o=n(430),i=n(9100);function c(t){var n="function"==typeof Map?new Map:void 0;return e.exports=c=function(e){if(null===e||!o(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return i(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),a(t,e)},c(t)}e.exports=c},6664:function(e,t,n){!function(e,t){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,a=!1,o=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(a)throw o}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;function i(){}function c(){}c.resetWarningCache=i;var s,u=(function(e){e.exports=function(){function e(e,t,n,r,a,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:i};return n.PropTypes=n,n}()}(s={exports:{}},s.exports),s.exports),l=function(e){return null!==e&&"object"===n(e)},p="[object Object]",d=function e(t,n){if(!l(t)||!l(n))return t===n;var r=Array.isArray(t);if(r!==Array.isArray(n))return!1;var a=Object.prototype.toString.call(t)===p;if(a!==(Object.prototype.toString.call(n)===p))return!1;if(!a&&!r)return!1;var o=Object.keys(t),i=Object.keys(n);if(o.length!==i.length)return!1;for(var c={},s=0;s<o.length;s+=1)c[o[s]]=!0;for(var u=0;u<i.length;u+=1)c[i[u]]=!0;var d=Object.keys(c);if(d.length!==o.length)return!1;var f=t,m=n;return d.every((function(t){return e(f[t],m[t])}))},f=function(e){var n=t.useRef(e);return t.useEffect((function(){n.current=e}),[e]),n.current},m=function(e){if(null===e||l(t=e)&&"function"==typeof t.elements&&"function"==typeof t.createToken&&"function"==typeof t.createPaymentMethod&&"function"==typeof t.confirmCardPayment)return e;var t;throw new Error("Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.")},y=function(e){if(function(e){return l(e)&&"function"==typeof e.then}(e))return{tag:"async",stripePromise:Promise.resolve(e).then(m)};var t=m(e);return null===t?{tag:"empty"}:{tag:"sync",stripe:t}},g=t.createContext(null);g.displayName="ElementsContext";var v=function(e){var n=e.stripe,r=e.options,o=e.children,i=t.useRef(!1),c=t.useRef(!0),s=t.useMemo((function(){return y(n)}),[n]),u=a(t.useState((function(){return{stripe:null,elements:null}})),2),l=u[0],p=u[1],m=f(n),v=f(r);return null!==m&&(m!==n&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it."),d(r,v)||console.warn("Unsupported prop change on Elements: You cannot change the `options` prop after setting the `stripe` prop.")),i.current||("sync"===s.tag&&(i.current=!0,p({stripe:s.stripe,elements:s.stripe.elements(r)})),"async"===s.tag&&(i.current=!0,s.stripePromise.then((function(e){e&&c.current&&p({stripe:e,elements:e.elements(r)})})))),t.useEffect((function(){return function(){c.current=!1}}),[]),t.useEffect((function(){var e=l.stripe;e&&e._registerWrapper&&e._registerWrapper({name:"react-stripe-js",version:"1.4.0"})}),[l.stripe]),t.createElement(g.Provider,{value:l},o)};v.propTypes={stripe:u.any,options:u.object};var h=function(e){return function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e}(t.useContext(g),e)},b=function(e){return(0,e.children)(h("mounts <ElementsConsumer>"))};b.propTypes={children:u.func.isRequired};var P=function(e){var n=t.useRef(e);return t.useEffect((function(){n.current=e}),[e]),function(){n.current&&n.current.apply(n,arguments)}},E=function(e){return l(e)?(e.paymentRequest,r(e,["paymentRequest"])):{}},O=function(){},S=function(e,n){var r,a="".concat((r=e).charAt(0).toUpperCase()+r.slice(1),"Element"),o=n?function(e){h("mounts <".concat(a,">"));var n=e.id,r=e.className;return t.createElement("div",{id:n,className:r})}:function(n){var r=n.id,o=n.className,i=n.options,c=void 0===i?{}:i,s=n.onBlur,u=void 0===s?O:s,l=n.onFocus,p=void 0===l?O:l,f=n.onReady,m=void 0===f?O:f,y=n.onChange,g=void 0===y?O:y,v=n.onEscape,b=void 0===v?O:v,S=n.onClick,_=void 0===S?O:S,w=h("mounts <".concat(a,">")).elements,C=t.useRef(null),k=t.useRef(null),M=P(m),j=P(u),D=P(p),R=P(_),x=P(g),A=P(b);t.useLayoutEffect((function(){if(null==C.current&&w&&null!=k.current){var t=w.create(e,c);C.current=t,t.mount(k.current),t.on("ready",(function(){return M(t)})),t.on("change",x),t.on("blur",j),t.on("focus",D),t.on("escape",A),t.on("click",R)}}));var I=t.useRef(c);return t.useEffect((function(){I.current&&I.current.paymentRequest!==c.paymentRequest&&console.warn("Unsupported prop change: options.paymentRequest is not a customizable property.");var e=E(c);0===Object.keys(e).length||d(e,E(I.current))||C.current&&(C.current.update(e),I.current=c)}),[c]),t.useLayoutEffect((function(){return function(){C.current&&C.current.destroy()}}),[]),t.createElement("div",{id:r,className:o,ref:k})};return o.propTypes={id:u.string,className:u.string,onChange:u.func,onBlur:u.func,onFocus:u.func,onReady:u.func,onClick:u.func,options:u.object},o.displayName=a,o.__elementType=e,o},_="undefined"==typeof window,w=S("auBankAccount",_),C=S("card",_),k=S("cardNumber",_),M=S("cardExpiry",_),j=S("cardCvc",_),D=S("fpxBank",_),R=S("iban",_),x=S("idealBank",_),A=S("p24Bank",_),I=S("epsBank",_),T=S("paymentRequestButton",_),L=S("afterpayClearpayMessage",_);e.AfterpayClearpayMessageElement=L,e.AuBankAccountElement=w,e.CardCvcElement=j,e.CardElement=C,e.CardExpiryElement=M,e.CardNumberElement=k,e.Elements=v,e.ElementsConsumer=b,e.EpsBankElement=I,e.FpxBankElement=D,e.IbanElement=R,e.IdealBankElement=x,e.P24BankElement=A,e.PaymentRequestButtonElement=T,e.useElements=function(){return h("calls useElements()").elements},e.useStripe=function(){return h("calls useStripe()").stripe},Object.defineProperty(e,"__esModule",{value:!0})}(t,n(3804))},4465:(e,t,n)=>{"use strict";n.r(t),n.d(t,{loadStripe:()=>l});var r="https://js.stripe.com/v3",a=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,o="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",i=null,c=function(e,t,n){if(null===e)return null;var r=e.apply(void 0,t);return function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"1.12.1",startTime:t})}(r,n),r},s=Promise.resolve().then((function(){return e=null,null!==i?i:i=new Promise((function(t,n){if("undefined"!=typeof window)if(window.Stripe&&e&&console.warn(o),window.Stripe)t(window.Stripe);else try{var i=function(){for(var e=document.querySelectorAll('script[src^="'.concat(r,'"]')),t=0;t<e.length;t++){var n=e[t];if(a.test(n.src))return n}return null}();i&&e?console.warn(o):i||(i=function(e){var t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",n=document.createElement("script");n.src="".concat(r).concat(t);var a=document.head||document.body;if(!a)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return a.appendChild(n),n}(e)),i.addEventListener("load",(function(){window.Stripe?t(window.Stripe):n(new Error("Stripe.js not available"))})),i.addEventListener("error",(function(){n(new Error("Failed to load Stripe.js"))}))}catch(e){return void n(e)}else t(null)}));var e})),u=!1;s.catch((function(e){u||console.warn(e)}));var l=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];u=!0;var r=Date.now();return s.then((function(e){return c(e,t,r)}))}},8149:(e,t,n)=>{var r=n(3027),a=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.SavePaymentMethod=void 0;var o=a(n(4184));n(1127),t.SavePaymentMethod=function(e){var t=e.label,n=e.onChange,a=e.checked;return r.createElement("div",{className:"wc-stripe-save-payment-method"},r.createElement("label",null,r.createElement("input",{type:"checkbox",onChange:function(e){return n(e.target.checked)}}),r.createElement("svg",{className:(0,o.default)("wc-stripe-components-checkbox__mark",{checked:a}),"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20"},r.createElement("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}))),r.createElement("span",null,t))}},3187:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(2029);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var a=n(8149);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var o=n(8744);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var i=n(4901);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}))},2029:(e,t,n)=>{var r=n(3027),a=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.PaymentMethodLabel=void 0;var o=a(n(6479));n(7776),t.PaymentMethodLabel=function(e){var t=e.title,n=e.icons,a=e.paymentMethod,i=(0,o.default)(e,["title","icons","paymentMethod"]).components,c=i.PaymentMethodLabel,s=i.PaymentMethodIcons;return Array.isArray(n)||(n=[n]),r.createElement("span",{className:"wc-stripe-label-container ".concat(a)},r.createElement(c,{text:t}),r.createElement(s,{icons:n,align:"left"}))}},4901:(e,t,n)=>{var r=n(3027),a=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.PaymentMethod=void 0;var o=a(n(9713)),i=a(n(6479)),c=n(3027);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.PaymentMethod=function(e){var t=e.getData,n=e.content,a=(0,i.default)(e,["getData","content"]),o=n,s=t("description"),p=(0,c.useRef)(null);return(0,c.useEffect)((function(){p.current&&0==p.current.childNodes.length&&p.current.classList.add("no-content")})),r.createElement(r.Fragment,null,s&&r.createElement(l,{desc:s,payment_method:t("name")}),r.createElement("div",{ref:p,className:"wc-stripe-blocks-payment-method-content"},r.createElement(o,u(u({},a),{},{getData:t}))))};var l=function(e){var t=e.desc,n=e.payment_method;return r.createElement("div",{className:"wc-stripe-blocks-payment-method__desc ".concat(n)},r.createElement("p",null,t))}},6630:(e,t,n)=>{var r=n(3027),a=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.RadioControlAccordion=void 0;var o=a(n(8744)),i=a(n(4184)),c=function(e){var t=e.option,n=e.checked,a=e.onChange,c=t.label,s=t.value;return r.createElement("div",{className:"wc-stripe-blocks-radio-accordion"},r.createElement(o.default,{checked:n,onChange:a,value:s,label:c}),r.createElement("div",{className:(0,i.default)("wc-stripe-blocks-radio-accordion__content",{"wc-stripe-blocks-radio-accordion__content-visible":n})},t.content))};t.RadioControlAccordion=c;var s=c;t.default=s},8744:(e,t,n)=>{var r=n(3027),a=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.RadioControlOption=void 0;var o=a(n(4184)),i=function(e){var t=e.checked,n=e.onChange,a=e.value,i=e.label;return r.createElement("label",{className:(0,o.default)("wc-stripe-blocks-radio-control__option",{"wc-stripe-blocks-radio-control__option-checked":t})},r.createElement("input",{className:"wc-stripe-blocks-radio-control__input",type:"radio",value:a,checked:t,onChange:function(e){return n(e.target.value)}}),r.createElement("div",{className:"wc-stripe-blocks-radio-control__label"},r.createElement("span",null,i)))};t.RadioControlOption=i;var c=i;t.default=c},7260:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(1293);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var a=n(7150);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var o=n(5201);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}))},1293:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useCreateLinkToken=void 0;var a=r(n(7015)),o=r(n(8926)),i=r(n(3038)),c=n(3027),s=r(n(7606)),u=n(1134);t.useCreateLinkToken=function(e){var t=e.setValidationError,n=(0,c.useState)(!1),r=(0,i.default)(n,2),l=r[0],p=r[1],d=(0,c.useCallback)((0,o.default)(a.default.mark((function e(){var n;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,s.default)({url:(0,u.getRoute)("create/linkToken"),method:"POST",data:{}});case 3:(n=e.sent).token&&((0,u.storeInCache)("linkToken",n.token),p(n.token)),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),t(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])}))),[]);return(0,c.useEffect)((function(){if(!l){var e=(0,u.getFromCache)("linkToken");e?p(e):d()}}),[l,p]),l}},7150:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useInitializePlaid=void 0;var a=n(3027),o=r(n(2810)),i=n(1134);t.useInitializePlaid=function(e){var t=e.getData,n=e.linkToken,r=(0,a.useRef)(null),c=(0,a.useRef)(null),s=(0,a.useCallback)((function(){return new Promise((function(e,t){c.current={resolve:e,reject:t},r.current.open()}))}),[]);return(0,a.useEffect)((function(){n&&(r.current=o.default.create({clientName:t("clientName"),env:t("plaidEnvironment"),product:["auth"],token:n,selectAccount:!0,countryCodes:["US"],onSuccess:function(e,t){c.current.resolve({publicToken:e,metaData:t})},onExit:function(e){c.current.reject(!!e&&(0,i.getErrorMessage)(e.error_message))}}))}),[n]),s}},5201:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useProcessPayment=void 0;var a=r(n(7015)),o=r(n(9713)),i=r(n(8926)),c=n(3027),s=n(1134);t.useProcessPayment=function(e){var t=e.openLinkPopup,n=e.onPaymentProcessing,r=e.responseTypes,u=e.paymentMethod;(0,c.useEffect)((function(){var e=n((0,i.default)(a.default.mark((function e(){var n,i,c,l;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t();case 3:return i=e.sent,c=i.publicToken,l=i.metaData,(0,s.deleteFromCache)("linkToken"),e.abrupt("return",(0,s.ensureSuccessResponse)(r,{meta:{paymentMethodData:(n={},(0,o.default)(n,"".concat(u,"_token_key"),c),(0,o.default)(n,"".concat(u,"_metadata"),JSON.stringify(l)),n)}}));case 9:return e.prev=9,e.t0=e.catch(0),e.abrupt("return",(0,s.ensureErrorResponse)(r,e.t0));case 12:case"end":return e.stop()}}),e,null,[[0,9]])}))));return function(){return e()}}),[n,r,t])}},5605:(e,t,n)=>{n(4836),n(4888)},4888:(e,t,n)=>{var r=n(3027),a=n(5318),o=a(n(3038)),i=a(n(6479)),c=n(3027),s=n(4222),u=n(1134),l=n(3187),p=a(n(1065)),d=n(7260),f=n(3636),m=n(3163),y=(0,u.getSettings)("stripe_ach_data"),g=function(e){var t=e.getData,n=e.eventRegistration,a=e.components,s=e.emitResponse,l=e.onSubmit,p=((0,i.default)(e,["getData","eventRegistration","components","emitResponse","onSubmit"]),s.responseTypes),m=n.onPaymentProcessing,y=n.onCheckoutAfterProcessingWithError,g=a.ValidationInputError,h=(0,c.useState)(!1),b=(0,o.default)(h,2),P=b[0],E=b[1],O=(0,d.useCreateLinkToken)({setValidationError:E});(0,f.useProcessCheckoutError)({responseTypes:p,subscriber:y});var S=(0,d.useInitializePlaid)({getData:t,linkToken:O,onSubmit:l});return(0,d.useProcessPayment)({openLinkPopup:S,onPaymentProcessing:m,responseTypes:p,paymentMethod:t("name")}),r.createElement(r.Fragment,null,u.isTestMode&&r.createElement(v,null),P&&r.createElement(g,{errorMessage:P}))},v=function(){return r.createElement("div",{className:"wc-stripe-blocks-ach__creds"},r.createElement("label",{className:"wc-stripe-blocks-ach__creds-label"},(0,m.__)("Test Credentials","woo-stripe-payment")),r.createElement("div",{className:"wc-stripe-blocks-ach__username"},r.createElement("div",null,r.createElement("strong",null,(0,m.__)("username","woo-stripe-payment")),": user_good"),r.createElement("div",null,r.createElement("strong",null,(0,m.__)("password","woo-stripe-payment")),": pass_good"),r.createElement("div",null,r.createElement("strong",null,(0,m.__)("pin","woo-stripe-payment")),": credential_good")))};(0,s.registerPaymentMethod)({name:y("name"),label:r.createElement(l.PaymentMethodLabel,{title:y("title"),paymentMethod:y("name"),icons:y("icons")}),ariaLabel:"ACH Payment",canMakePayment:function(e){return"USD"===e.cartTotals.currency_code},content:r.createElement(l.PaymentMethod,{getData:y,content:g}),savedTokenComponent:r.createElement(p.default,{getData:y}),edit:r.createElement(g,{getData:y}),placeOrderButtonLabel:y("placeOrderButtonLabel"),supports:{showSavedCards:y("showSavedCards"),showSaveOption:!1,features:y("features")}})},3846:(e,t,n)=>{n(85),n(660)},660:(e,t,n)=>{var r=n(3027),a=n(5318),o=a(n(3038)),i=a(n(6479)),c=n(3027),s=n(4222),u=n(1134),l=n(6664),p=a(n(7082)),d=n(3636),f=(0,u.getSettings)("stripe_applepay_data"),m=function(e){return r.createElement(p.default,null,r.createElement("div",{className:"wc-stripe-apple-pay-container"},r.createElement(l.Elements,{stripe:u.initStripe},r.createElement(y,e))))},y=function(e){var t=e.getData,n=e.onClick,a=e.onClose,s=e.billing,u=e.shippingData,p=e.eventRegistration,f=e.emitResponse,m=e.onSubmit,y=e.activePaymentMethod,g=((0,i.default)(e,["getData","onClick","onClose","billing","shippingData","eventRegistration","emitResponse","onSubmit","activePaymentMethod"]),p.onPaymentProcessing),v=f.responseTypes,h=f.noticeContexts,b=(0,l.useStripe)(),P=(0,d.useStripeError)(),E=(0,o.default)(P,1)[0],O=(0,d.useExportedValues)();(0,d.useExpressBreakpointWidth)({payment_method:t("name"),width:300});var S=(0,d.useProcessPaymentIntent)({getData:t,billing:s,shippingData:u,onPaymentProcessing:g,emitResponse:f,error:E,onSubmit:m,activePaymentMethod:y,exportedValues:O}).setPaymentMethod;(0,d.useAfterProcessingPayment)({getData:t,eventRegistration:p,responseTypes:v,activePaymentMethod:y,messageContext:h.EXPRESS_PAYMENTS});var _=(0,d.usePaymentRequest)({getData:t,onClose:a,stripe:b,billing:s,shippingData:u,eventRegistration:p,setPaymentMethod:S,exportedValues:O,canPay:function(e){return null!=e&&e.applePay}}).paymentRequest,w=(0,c.useCallback)((function(){_&&(n(),_.show())}),[_]);return _?r.createElement("button",{className:"apple-pay-button ".concat(t("buttonStyle")),style:{"-apple-pay-button-type":t("buttonType")},onClick:w}):null},g=function(e){var t=e.getData;return(0,i.default)(e,["getData"]),r.createElement("div",{className:"apple-pay-block-editor"},r.createElement("img",{src:t("editorIcon")}))};(0,s.registerExpressPaymentMethod)({name:f("name"),canMakePayment:function(e){var t=e.cartTotals;if((0,i.default)(e,["cartTotals"]),f("isAdmin"))return!0;var n=t.currency_code,r=t.total_price;return(0,u.canMakePayment)({country:f("countryCode"),currency:n.toLowerCase(),total:{label:f("totalLabel"),amount:parseInt(r)}},(function(e){return null!=e&&e.applePay}))},content:r.createElement(m,{getData:f}),edit:r.createElement(g,{getData:f}),supports:{showSavedCards:f("showSavedCards"),showSaveOption:f("showSaveOption"),features:f("features")}})},7354:(e,t,n)=>{var r=n(3027);n(3110);var a=n(1134),o=n(6664),i=n(3163),c=function(e){var t=e.CardIcon,n=e.options,a=e.onChange;return r.createElement("div",{className:"wc-stripe-bootstrap-form"},r.createElement("div",{className:"row"},r.createElement("div",{className:"col-md-6 mb-3"},r.createElement(o.CardNumberElement,{className:"md-form md-outline stripe-input",options:n.cardNumber,onChange:a(o.CardNumberElement)}),r.createElement("label",{htmlFor:"stripe-card-number"},(0,i.__)("Card Number","woo-stripe-payment")),t),r.createElement("div",{className:"col-md-3 mb-3"},r.createElement(o.CardExpiryElement,{className:"md-form md-outline stripe-input",options:n.cardExpiry,onChange:a(o.CardExpiryElement)}),r.createElement("label",{htmlFor:"stripe-exp"},(0,i.__)("Exp","woo-stripe-payment"))),r.createElement("div",{className:"col-md-3 mb-3"},r.createElement(o.CardCvcElement,{className:"md-form md-outline stripe-input",options:n.cardCvc,onChange:a(o.CardCvcElement)}),r.createElement("label",{htmlFor:"stripe-cvv"},(0,i.__)("CVV","woo-stripe-payment")))))};(0,a.registerCreditCardForm)({id:"bootstrap",breakpoint:475,component:r.createElement(c,null)})},3329:(e,t,n)=>{var r=n(3027),a=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(9713)),i=a(n(3038)),c=n(1134),s=n(3027),u=n(6664),l=n(3163),p=n(3636);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y={focus:"focused",empty:"empty",invalid:"invalid"},g=function(e){var t=e.type,n=e.src;return t?r.createElement("img",{className:"wc-stripe-card ".concat(t),src:n}):null};t.default=function(e){var t=e.getData,n=e.onChange,a=(e.ValidationInputError,(0,s.useState)(window.innerWidth)),o=(0,i.default)(a,2),f=(o[0],o[1],(0,s.useState)("")),v=(0,i.default)(f,2),h=v[0],b=v[1],P=(0,s.useRef)([]),E=(0,s.useState)(null),O=(0,i.default)(E,2),S=O[0],_=O[1],w=(0,u.useElements)(),C=t("customForm"),k=(0,c.getCreditCardForm)(C),M=k.component,j=k.breakpoint,D=void 0===j?475:j,R=t("postalCodeEnabled"),x={};["cardNumber","cardExpiry","cardCvc"].forEach((function(e){x[e]=m(m({classes:y},t("cardOptions")),t("customFieldOptions")[e])}));var A=(0,s.useCallback)((function(e){P.current.includes(e)||P.current.push(e)}),[]);(0,p.useBreakpointWidth)({name:"creditCardForm",width:D,node:S,className:"small-form"});var I=(0,s.useCallback)((function(e){var n,r=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw o}}}}(t("icons"));try{for(r.s();!(n=r.n()).done;){var a=n.value;if(a.id===e)return a.src}}catch(e){r.e(e)}finally{r.f()}return""}),[]);return M?r.createElement("div",{className:"wc-stripe-custom-form ".concat(C),ref:_},(0,s.cloneElement)(M,{postalCodeEnabled:R,options:x,onChange:function(e){return A(e),function(t){if(n(t),"cardNumber"===t.elementType&&("unknown"===t.brand?b(""):b(t.brand)),t.complete){var r=P.current.indexOf(e);if(P.current[r+1]){var a=P.current[r+1];w.getElement(a).focus()}}}},CardIcon:r.createElement(g,{type:h,src:I(h)})})):r.createElement("div",{className:"wc-stripe-custom-form-error"},r.createElement("p",null,(0,l.sprintf)((0,l.__)("%s is not a valid blocks Stripe custom form. Please choose another custom form option in the Credit Card Settings.","woo-stripe-payment"),t("customFormLabels")[C])))}},6835:(e,t,n)=>{var r=n(3027);n(8356);var a=n(1134),o=n(6664),i=n(3163),c=n(3027),s=function(e){var t=e.CardIcon,n=e.options,a=e.onChange;return(0,c.useEffect)((function(){}),[]),r.createElement("div",{className:"wc-stripe-simple-form"},r.createElement("div",{className:"row"},r.createElement("div",{className:"field"},r.createElement("div",{className:"field-item"},r.createElement(o.CardNumberElement,{id:"stripe-card-number",className:"input empty",options:n.cardNumber,onChange:a(o.CardNumberElement)}),r.createElement("label",{htmlFor:"stripe-card-number","data-tid":""},(0,i.__)("Card Number","woo-stripe-payment")),r.createElement("div",{className:"baseline"}),t))),r.createElement("div",{className:"row"},r.createElement("div",{className:"field half-width"},r.createElement("div",{className:"field-item"},r.createElement(o.CardExpiryElement,{id:"stripe-exp",className:"input empty",options:n.cardExpiry,onChange:a(o.CardExpiryElement)}),r.createElement("label",{htmlFor:"stripe-exp","data-tid":""},(0,i.__)("Expiration","woo-stripe-payment")),r.createElement("div",{className:"baseline"}))),r.createElement("div",{className:"field half-width cvc"},r.createElement("div",{className:"field-item"},r.createElement(o.CardCvcElement,{id:"stripe-cvv",className:"input empty",options:n.cardCvc,onChange:a(o.CardCvcElement)}),r.createElement("label",{htmlFor:"stripe-cvv","data-tid":""},(0,i.__)("CVV","woo-stripe-payment")),r.createElement("div",{className:"baseline"})))))};(0,a.registerCreditCardForm)({id:"simple",component:r.createElement(s,null),breakpoint:375})},9775:(e,t,n)=>{var r=n(3027),a=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(9713)),i=n(6664),c=n(1134),s=n(3027);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.default=function(e){var t=e.getData,n=e.billing,a=e.onChange,o=(0,s.useMemo)((function(){var e;return l(l({},{value:{postalCode:null==n||null===(e=n.billingData)||void 0===e?void 0:e.postcode},hidePostalCode:(0,c.isFieldRequired)("postcode"),iconStyle:"default"}),t("cardOptions"))}),[n.billingData]);return r.createElement("div",{className:"wc-stripe-inline-form"},r.createElement(i.CardElement,{options:o,onChange:a}))}},627:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),n(5773);var r=n(7205);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))})),n(7354),n(6835)},7205:(e,t,n)=>{var r=n(3027),a=n(5318),o=a(n(3038)),i=n(3027),c=n(4222),s=n(1134),u=n(6664),l=n(3187),p=a(n(1065)),d=a(n(3329)),f=a(n(9775)),m=n(3636),y=(0,s.getSettings)("stripe_cc_data"),g=function(e){return(0,s.isUserLoggedIn)(e)&&y("saveCardEnabled")&&!(0,s.cartContainsSubscription)()&&!(0,s.cartContainsPreOrder)()},v=function(e){var t=(0,i.useState)(!1),n=(0,o.default)(t,2),a=n[0],c=n[1];if((0,i.useEffect)((function(){s.initStripe.catch((function(e){c(e)}))}),[c]),a)throw new Error(a);return r.createElement(u.Elements,{stripe:s.initStripe},r.createElement(h,e))},h=function(e){var t=e.getData,n=e.billing,a=e.shippingData,c=e.emitResponse,s=e.eventRegistration,p=e.activePaymentMethod,y=(0,m.useStripeError)(),v=(0,o.default)(y,2),h=v[0],b=v[1],P=(0,i.useState)(!1),E=(0,o.default)(P,2),O=E[0],S=E[1],_=s.onPaymentProcessing,w=(0,u.useStripe)(),C=(0,u.useElements)(),k=(0,i.useCallback)((function(){var e=t("customFormActive")?u.CardNumberElement:u.CardElement;return{card:C.getElement(e)}}),[w,C]),M=(0,m.useSetupIntent)({getData:t,cartTotal:n.cartTotal,setError:b}),j=M.setupIntent,D=M.removeSetupIntent;(0,m.useProcessPaymentIntent)({getData:t,billing:n,shippingData:a,emitResponse:c,error:h,onPaymentProcessing:_,savePaymentMethod:O,setupIntent:j,removeSetupIntent:D,getPaymentMethodArgs:k,activePaymentMethod:p}),(0,m.useAfterProcessingPayment)({getData:t,eventRegistration:s,responseTypes:c.responseTypes,activePaymentMethod:p,savePaymentMethod:O});var R=t("customFormActive")?d.default:f.default;return r.createElement("div",{className:"wc-stripe-card-container"},r.createElement(R,{getData:t,billing:n,onChange:function(e){e.error?b(e.error):b(!1)}}),g(n.customerId)&&r.createElement(l.SavePaymentMethod,{label:t("savePaymentMethodLabel"),onChange:function(e){return S(e)},checked:O}))};(0,c.registerPaymentMethod)({name:y("name"),label:r.createElement(l.PaymentMethodLabel,{title:y("title"),paymentMethod:y("name"),icons:y("icons")}),ariaLabel:"Credit Cards",canMakePayment:function(){return s.initStripe},content:r.createElement(l.PaymentMethod,{content:v,getData:y}),savedTokenComponent:r.createElement(p.default,{getData:y}),edit:r.createElement(l.PaymentMethod,{content:v,getData:y}),supports:{showSavedCards:y("showSavedCards"),showSaveOption:!1,features:y("features")}})},7082:(e,t,n)=>{var r=n(3027),a=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(4575)),i=a(n(3913)),c=a(n(2205)),s=a(n(8585)),u=a(n(9754));var l=function(e){(0,c.default)(l,e);var t,n,a=(t=l,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.default)(t);if(n){var a=(0,u.default)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,s.default)(this,e)});function l(e){var t;return(0,o.default)(this,l),(t=a.call(this,e)).state={hasError:!1,error:null,errorInfo:null},t}return(0,i.default)(l,[{key:"componentDidCatch",value:function(e,t){this.setState({hasError:!0,error:e,errorInfo:t})}},{key:"render",value:function(){return this.state.hasError?r.createElement(r.Fragment,null,this.state.error&&r.createElement("div",{className:"wc-stripe-block-error"},this.state.error.toString()),this.state.errorInfo&&r.createElement("div",{className:"wc-stripe-block-error"},this.state.errorInfo.componentStack)):this.props.children}}]),l}(n(3027).Component);t.default=l},5212:(e,t,n)=>{var r=n(3027),a=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(3038)),i=a(n(6479)),c=n(3027),s=n(5516),u=n(3636),l=(0,n(1134).getSettings)("stripeGeneralData")().publishableKey;t.default=function(e){var t=e.getData,n=e.setErrorMessage,a=e.billing,p=e.shippingData,d=e.canMakePayment,f=e.checkoutStatus,m=e.eventRegistration,y=e.activePaymentMethod,g=e.onClick,v=e.onClose,h=(0,i.default)(e,["getData","setErrorMessage","billing","shippingData","canMakePayment","checkoutStatus","eventRegistration","activePaymentMethod","onClick","onClose"]),b={merchantId:t("merchantId"),merchantName:t("merchantName")},P=(0,u.useStripeError)(),E=(0,o.default)(P,2),O=E[0],S=(E[1],(0,c.useRef)()),_=h.onSubmit,w=h.emitResponse,C=m.onPaymentProcessing,k=(0,u.useExportedValues)(),M="long"===t("buttonStyle").buttonType?390:300,j=(0,u.useProcessPaymentIntent)({getData:t,billing:a,shippingData:p,onPaymentProcessing:C,emitResponse:w,error:O,exportedValues:k,onSubmit:_,checkoutStatus:f,activePaymentMethod:y}).setPaymentMethod,D=(0,s.usePaymentRequest)({getData:t,publishableKey:l,merchantInfo:b,billing:a,shippingData:p}),R=(0,s.usePaymentsClient)({merchantInfo:b,paymentRequest:D,billing:a,shippingData:p,eventRegistration:m,canMakePayment:d,setErrorMessage:n,onSubmit:_,setPaymentMethod:j,exportedValues:k,onClick:g,onClose:v,getData:t}),x=R.button,A=R.removeButton;return(0,u.useExpressBreakpointWidth)({payment_method:t("name"),width:M}),(0,c.useEffect)((function(){x&&(A(S.current),S.current.append(x))}),[x]),r.createElement("div",{className:"wc-stripe-gpay-button-container",ref:S})}},3097:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BASE_PAYMENT_REQUEST=t.BASE_PAYMENT_METHOD=void 0,t.BASE_PAYMENT_METHOD={type:"CARD",parameters:{allowedAuthMethods:["PAN_ONLY"],allowedCardNetworks:["AMEX","DISCOVER","INTERAC","JCB","MASTERCARD","VISA"],assuranceDetailsRequired:!0}},t.BASE_PAYMENT_REQUEST={apiVersion:2,apiVersionMinor:0}},5516:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(1674);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var a=n(1735);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var o=n(9808);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}))},9808:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useErrorMessage=void 0;var a=r(n(3038)),o=n(3027);t.useErrorMessage=function(){var e=(0,o.useState)(!1),t=(0,a.default)(e,2);return{errorMessage:t[0],setErrorMessage:t[1]}}},1735:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.usePaymentRequest=void 0;var a=r(n(319)),o=r(n(9713)),i=n(3027),c=n(3097),s=n(1134),u=n(8664);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.usePaymentRequest=function(e){var t=e.getData,n=e.publishableKey,r=e.merchantInfo,o=e.billing,l=e.shippingData,d=o.billingData,f=l.shippingRates,m=(l.shippingAddress,t()),y=m.processingCountry,g=m.totalPriceLabel;return(0,i.useMemo)((function(){var e=p(p({},{emailRequired:(0,s.isEmpty)(d.email),merchantInfo:r,allowedPaymentMethods:[p(p({},{type:"CARD",tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{gateway:"stripe","stripe:version":"2018-10-31","stripe:publishableKey":n}}}),c.BASE_PAYMENT_METHOD)],shippingAddressRequired:l.needsShipping,transactionInfo:(0,u.getTransactionInfo)({billing:o,processingCountry:y,totalPriceLabel:g}),callbackIntents:["PAYMENT_AUTHORIZATION"]}),c.BASE_PAYMENT_REQUEST);if(e.allowedPaymentMethods[0].parameters.billingAddressRequired=!0,e.allowedPaymentMethods[0].parameters.billingAddressParameters={format:"FULL",phoneNumberRequired:(0,s.isFieldRequired)("phone",d.country)&&(0,s.isEmpty)(d.phone)},e.shippingAddressRequired){e.callbackIntents=[].concat((0,a.default)(e.callbackIntents),["SHIPPING_ADDRESS","SHIPPING_OPTION"]),e.shippingOptionRequired=!0;var t=(0,u.getShippingOptionParameters)(f);t.shippingOptions.length>0&&(e=p(p({},e),{},{shippingOptionParameters:t}))}return e}),[o.cartTotal,o.cartTotalItems,d,l])}},1674:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.usePaymentsClient=void 0;var a=r(n(319)),o=r(n(9713)),i=r(n(7015)),c=r(n(8926)),s=r(n(3038)),u=n(3027),l=r(n(4306)),p=n(1134),d=n(6664),f=n(8664),m=n(3163),y=n(3636);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.usePaymentsClient=function(e){var t=e.merchantInfo,n=e.paymentRequest,r=e.billing,g=e.shippingData,h=e.eventRegistration,b=e.canMakePayment,P=e.setErrorMessage,E=e.setPaymentMethod,O=e.exportedValues,S=e.onClick,_=e.onClose,w=e.getData,C=w().environment,k=(0,u.useState)(),M=(0,s.default)(k,2),j=M[0],D=M[1],R=(0,u.useState)(null),x=(0,s.default)(R,2),A=x[0],I=x[1],T=(0,u.useRef)(r),L=(0,u.useRef)(g),N=(0,d.useStripe)(),B=(0,y.usePaymentEvents)({billing:r,shippingData:g,eventRegistration:h}).addPaymentEvent;(0,u.useEffect)((function(){T.current=r,L.current=g}));var q=(0,u.useCallback)((function(e){var t,n;if(null!=e&&null!==(t=e.paymentMethodData)&&void 0!==t&&null!==(n=t.info)&&void 0!==n&&n.billingAddress){var r,a=e.paymentMethodData.info.billingAddress;(0,p.isAddressValid)(T.current.billingData,["phone","email"])&&(0,p.isEmpty)(null===(r=T.current.billingData)||void 0===r?void 0:r.phone)&&(a={phoneNumber:a.phoneNumber}),O.billingData=(0,f.toCartAddress)(a,{email:e.email})}null!=e&&e.shippingAddress&&(O.shippingAddress=(0,f.toCartAddress)(e.shippingAddress))}),[O,n]),F=(0,u.useCallback)((function(e){for(;e.firstChild;)e.removeChild(e.firstChild)}),[A]),V=(0,u.useCallback)((0,c.default)(i.default.mark((function e(){var t,r,a,o;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return S(),e.prev=1,e.next=4,j.loadPaymentData(n);case 4:return t=e.sent,r=T.current.billingData,q(t),a=JSON.parse(t.paymentMethodData.tokenizationData.token),e.next=10,N.createPaymentMethod({type:"card",card:{token:a.id},billing_details:(0,p.getBillingDetailsFromAddress)(r)});case 10:if(!(o=e.sent).error){e.next=13;break}throw new p.StripeError(o.error);case 13:E(o.paymentMethod.id),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(1),"CANCELED"===(null===e.t0||void 0===e.t0?void 0:e.t0.statusCode)?_():(console.log((0,p.getErrorMessage)(e.t0)),P((0,p.getErrorMessage)(e.t0)));case 19:case"end":return e.stop()}}),e,null,[[1,16]])}))),[N,j,S]),U=(0,u.useCallback)((0,c.default)(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!j||A||!N){e.next=5;break}return e.next=4,b;case 4:I(j.createButton(v({onClick:V},w("buttonStyle"))));case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])}))),[N,A,j]),W=(0,u.useMemo)((function(){var e={environment:C,merchantInfo:t,paymentDataCallbacks:{onPaymentAuthorized:function(){return Promise.resolve({transactionState:"SUCCESS"})}}};return n.shippingAddressRequired&&(e.paymentDataCallbacks.onPaymentDataChanged=function(e){return new Promise((function(t,n){var r,i=L.current,c=e.shippingAddress,s=e.shippingOptionData,u=(0,f.toCartAddress)(c),d=(0,p.getSelectedShippingOption)(s.id),y=(0,l.default)((0,p.getIntermediateAddress)(i.shippingAddress),u),g=(0,l.default)(i.selectedRates,(0,o.default)({},d[1],d[0]));B("onShippingChanged",(function(e,n){var r=n.billing,a=n.shipping;t(e?(0,f.getPaymentRequestUpdate)({billing:r,shippingData:{needsShipping:!0,shippingRates:a.shippingRates},processingCountry:w("processingCountry"),totalPriceLabel:w("totalPriceLabel")}):{error:{reason:"SHIPPING_ADDRESS_UNSERVICEABLE",message:(0,m.__)("Your shipping address is not serviceable.","woo-stripe-payment"),intent:"SHIPPING_ADDRESS"}})}),y&&g),L.current.setShippingAddress(v(v({},L.current.shippingAddress),u)),"shipping_option_unselected"!==s.id&&(r=L.current).setSelectedRates.apply(r,(0,a.default)(d))}))}),e}),[n]);return(0,u.useEffect)((function(){D(new google.payments.api.PaymentsClient(W))}),[W]),(0,u.useEffect)((function(){U()}),[U]),{button:A,removeButton:F}}},5341:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),n(9509);var r=n(9031);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}))},9031:(e,t,n)=>{var r=n(3027),a=n(5318),o=a(n(7154)),i=a(n(6479)),c=a(n(9713)),s=n(4222),u=n(1134),l=n(5516),p=a(n(5212)),d=n(3097),f=a(n(3905)),m=n(6664);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,c.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v,h,b=(0,u.getSettings)("stripe_googlepay_data"),P=(v=new f.default.payments.api.PaymentsClient({environment:b("environment"),merchantInfo:{merchantId:b("merchantId"),merchantName:b("merchantName")}}),h=g(g({},d.BASE_PAYMENT_REQUEST),{},{allowedPaymentMethods:[d.BASE_PAYMENT_METHOD]}),v.isReadyToPay(h).then((function(){return!0})).catch((function(e){return console.log(e),!1}))),E=function(e){var t=e.getData,n=e.components,a=(0,i.default)(e,["getData","components"]),c=n.ValidationInputError,s=(0,l.useErrorMessage)(),d=s.errorMessage,f=s.setErrorMessage;return r.createElement("div",{className:"wc-stripe-gpay-container"},r.createElement(m.Elements,{stripe:u.initStripe},r.createElement(p.default,(0,o.default)({getData:t,canMakePayment:P,setErrorMessage:f},a)),d&&r.createElement(c,{errorMessage:d})))},O=function(e){var t,n=e.getData,a=((0,i.default)(e,["getData"]),n("buttonStyle").buttonType),o=(null===(t=n("editorIcons"))||void 0===t?void 0:t[a])||"long";return r.createElement("div",{className:"gpay-block-editor ".concat(a)},r.createElement("img",{src:o}))};(0,s.registerExpressPaymentMethod)({name:b("name"),canMakePayment:function(){return b("isAdmin")?!(0,u.isCartPage)()||b("cartCheckoutEnabled"):!((0,u.isCartPage)()&&!b("cartCheckoutEnabled"))&&u.initStripe.then((function(e){return e.error?e:P}))},content:r.createElement(E,{getData:b}),edit:r.createElement(O,{getData:b}),supports:{showSavedCards:b("showSavedCards"),showSaveOption:b("showSaveOption"),features:b("features")}})},8664:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.toCartAddress=t.getShippingOptions=t.getShippingOptionParameters=t.getPaymentRequestUpdate=t.getTransactionInfo=void 0;var a=r(n(319)),o=n(1134),i=function(e){var t=e.billing,n=e.processingCountry,r=e.totalPriceLabel,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ESTIMATED",i=t.cartTotal,s=t.cartTotalItems,u=t.currency,l={countryCode:n,currencyCode:u.code,totalPriceStatus:a,totalPrice:(0,o.removeNumberPrecision)(i.value,u.minorUnit).toString(),displayItems:c(s,u.minorUnit),totalPriceLabel:r};return l};t.getTransactionInfo=i,t.getPaymentRequestUpdate=function(e){var t=e.billing,n=e.shippingData,r=e.processingCountry,a=e.totalPriceLabel,o=n.needsShipping,c=n.shippingRates,u={newTransactionInfo:i({billing:t,processingCountry:r,totalPriceLabel:a},"FINAL")};return o&&(u.newShippingOptionParameters=s(c)),u};var c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=[];return e.forEach((function(e){0<e.value&&n.push({label:e.label,type:"LINE_ITEM",price:(0,o.removeNumberPrecision)(e.value,t).toString()})})),n},s=function(e){var t=u(e),n=t.map((function(e){return e.id})).slice(0,1).shift();return e.forEach((function(e,t){e.shipping_rates.forEach((function(e){e.selected&&(n=(0,o.getShippingOptionId)(t,e.rate_id))}))})),{shippingOptions:t,defaultSelectedOptionId:n}};t.getShippingOptionParameters=s;var u=function(e){var t=[];return e.forEach((function(e,n){var r=e.shipping_rates.map((function(e){var t=document.createElement("textarea");t.innerHTML=e.name;var r=(0,o.formatPrice)(e.price,e.currency_code);return{id:(0,o.getShippingOptionId)(n,e.rate_id),label:t.value,description:"".concat(r)}}));t=[].concat((0,a.default)(t),(0,a.default)(r))})),t};t.getShippingOptions=u;var l=(0,o.toCartAddress)({name:function(e,t){return e.first_name=t.split(" ").slice(0,-1).join(" "),e.last_name=t.split(" ").pop(),e},countryCode:"country",address1:"address_1",address2:"address_2",locality:"city",administrativeArea:"state",postalCode:"postcode",email:"email",phoneNumber:"phone"});t.toCartAddress=l},3636:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(4332);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var a=n(1261);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var o=n(6107);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var i=n(2715);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var c=n(2343);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var s=n(1500);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var u=n(6095);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var l=n(5554);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var p=n(3893);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===p[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))}))},1261:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useAfterProcessingPayment=void 0;var a=r(n(7015)),o=r(n(8926)),i=n(3027),c=n(6664),s=n(1134),u=n(3893);t.useAfterProcessingPayment=function(e){var t=e.getData,n=e.eventRegistration,r=e.responseTypes,l=e.activePaymentMethod,p=e.savePaymentMethod,d=void 0!==p&&p,f=e.messageContext,m=void 0===f?null:f,y=(0,c.useStripe)(),g=n.onCheckoutAfterProcessingWithSuccess,v=n.onCheckoutAfterProcessingWithError;(0,u.useProcessCheckoutError)({responseTypes:r,subscriber:v,messageContext:m}),(0,i.useEffect)((function(){var e=g(function(){var e=(0,o.default)(a.default.mark((function e(n){var o;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=n.redirectUrl,t("name")!==l){e.next=5;break}return e.next=4,(0,s.handleCardAction)({redirectUrl:o,responseTypes:r,stripe:y,getData:t,savePaymentMethod:d});case 4:return e.abrupt("return",e.sent);case 5:return e.abrupt("return",null);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());return function(){return e()}}),[y,r,g,l,d])}},5554:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useExpressBreakpointWidth=t.useBreakpointWidth=void 0;var a=r(n(3038)),o=n(3027),i=n(1134),c=function(e){var t=e.name,n=e.width,r=e.node,c=e.className,s=(0,o.useState)(window.innerWidth),u=(0,a.default)(s,2),l=u[0],p=u[1],d=(0,o.useCallback)((function(e){var t=(0,i.getFromCache)(e);return t?parseInt(t):0}),[]),f=(0,o.useCallback)((function(e,t){return(0,i.storeInCache)(e,t)}),[]);(0,o.useEffect)((function(){var e="function"==typeof r?r():r;if(e){var a=d(t);(!a||n>a)&&f(t,n),e.clientWidth<n?e.classList.add(c):e.clientWidth>a&&e.classList.remove(c)}}),[l,r]),(0,o.useEffect)((function(){var e=function(){return p(window.innerWidth)};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}))};t.useBreakpointWidth=c,t.useExpressBreakpointWidth=function(e){var t=e.payment_method,n=e.width,r=(0,o.useCallback)((function(){var e=document.getElementById("express-payment-method-".concat(t));return e?e.parentNode:null}),[]);c({name:"expressMaxWidth",width:n,node:r,className:"wc-stripe-express__sm"})}},2343:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useExportedValues=void 0;var r=n(3027);t.useExportedValues=function(){return(0,r.useRef)({}).current}},6095:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.usePaymentEvents=void 0;var a=r(n(9713)),o=r(n(3038)),i=n(3027),c=n(1134);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.usePaymentEvents=function(e){var t=e.billing,n=e.shippingData,r=e.eventRegistration,s=r.onShippingRateSuccess,l=r.onShippingRateFail,p=r.onShippingRateSelectSuccess,d=(0,i.useRef)(t),f=(0,i.useRef)(n),m=(0,i.useState)(null),y=(0,o.default)(m,2),g=y[0],v=y[1],h=(0,i.useState)({onShippingChanged:!1}),b=(0,o.default)(h,2),P=b[0],E=b[1],O=(0,i.useCallback)((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];n?v((0,a.default)({},e,t)):E(u(u({},P),{},(0,a.default)({},e,t)))}),[P,E]),S=(0,i.useCallback)((function(e){P[e]&&(delete P[e],E(P))}),[P]),_=(0,i.useCallback)((function(){var e=f.current,t=d.current;if(P.onShippingChanged&&!e.isSelectingRate&&!e.shippingRatesLoading){var n=P.onShippingChanged,r=!0;(0,c.hasShippingRates)(e.shippingRates)||(r=!1),n(r,{billing:t,shipping:e}),S("onShippingChanged")}}),[P,S]);return(0,i.useEffect)((function(){d.current=t,f.current=n})),(0,i.useEffect)((function(){g&&g.onShippingChanged&&(g.onShippingChanged(!0,{billing:d.current,shipping:f.current}),v(null))}),[g]),(0,i.useEffect)((function(){var e=s(_),t=p(_),n=l((function(e){e.hasInvalidAddress,e.hasError,P.onShippingChanged&&((0,P.onShippingChanged)(!1),S("onShippingChanged"))}));return function(){e(),n(),t()}}),[P,s,l,p]),{addPaymentEvent:O,removePaymentEvent:S}}},1500:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.usePaymentRequest=void 0;var a=r(n(319)),o=r(n(9713)),i=r(n(3038)),c=n(3027),s=n(6095),u=n(1134),l=r(n(4306));function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=(0,u.toCartAddress)();t.usePaymentRequest=function(e){var t=e.getData,n=e.onClose,r=e.stripe,o=e.billing,p=e.shippingData,m=e.eventRegistration,y=e.setPaymentMethod,g=e.exportedValues,v=e.canPay,h=(0,s.usePaymentEvents)({billing:o,shippingData:p,eventRegistration:m}).addPaymentEvent,b=p.needsShipping,P=p.shippingRates,E=o.billingData,O=o.cartTotalItems,S=o.currency,_=o.cartTotal,w=(0,c.useState)(null),C=(0,i.default)(w,2),k=C[0],M=C[1],j=(0,c.useRef)({}),D=(0,c.useRef)(p),R=(0,c.useRef)(o);(0,c.useEffect)((function(){D.current=p,R.current=o}),[p]),(0,c.useEffect)((function(){if(r){var e={country:t("countryCode"),currency:null==S?void 0:S.code.toLowerCase(),total:{amount:_.value,label:_.label,pending:!0},requestPayerName:!0,requestPayerEmail:(0,u.isFieldRequired)("email",E.country),requestPayerPhone:(0,u.isFieldRequired)("phone",E.country),requestShipping:b,displayItems:(0,u.getDisplayItems)(O,S)};e.requestShipping&&(e.shippingOptions=(0,u.getShippingOptions)(P)),j.current=e;var n=r.paymentRequest(j.current);n.canMakePayment().then((function(e){v(e)?M(n):M(null)}))}}),[r,E,P,b]),(0,c.useEffect)((function(){k&&(j.current.requestShipping&&(k.on("shippingaddresschange",A),k.on("shippingoptionchange",I)),k.on("cancel",n),k.on("paymentmethod",T))}),[k]);var x=(0,c.useCallback)((function(e){return function(t,n){var r=n.billing,a=n.shipping,o=r.cartTotal,i=r.cartTotalItems,c=r.currency,s=a.shippingRates;t?e.updateWith({status:"success",total:{amount:o.value,label:o.label,pending:!1},displayItems:(0,u.getDisplayItems)(i,c),shippingOptions:(0,u.getShippingOptions)(s)}):e.updateWith({status:"invalid_shipping_address"})}}),[]),A=(0,c.useCallback)((function(e){var t=e.shippingAddress,n=D.current,r=f(t);n.setShippingAddress(d(d({},n.shippingAddress),r));var a=(0,l.default)((0,u.getIntermediateAddress)(n.shippingAddress),r);h("onShippingChanged",x(e),a)}),[h]),I=(0,c.useCallback)((function(e){var t=e.shippingOption,n=D.current;n.setSelectedRates.apply(n,(0,a.default)((0,u.getSelectedShippingOption)(t.id))),h("onShippingChanged",x(e))}),[h]),T=(0,c.useCallback)((function(e){var t=e.paymentMethod,n=e.payerName,r=void 0===n?null:n,a=e.payerEmail,o=void 0===a?null:a,i=e.payerPhone,c={payerName:r,payerEmail:o,payerPhone:void 0===i?null:i};null!=t&&t.billing_details.address&&(c=f(t.billing_details.address,c)),g.billingData=c,e.shippingAddress&&(g.shippingAddress=f(e.shippingAddress)),y(t.id),e.complete("success")}),[y]);return{paymentRequest:k}}},3893:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useProcessCheckoutError=void 0;var r=n(3027);t.useProcessCheckoutError=function(e){var t=e.responseTypes,n=e.subscriber,a=e.messageContext,o=void 0===a?null:a;(0,r.useEffect)((function(){var e=n((function(e){var n;return null!=e&&null!==(n=e.processingResponse.paymentDetails)&&void 0!==n&&n.stripeErrorMessage?{type:t.ERROR,message:e.processingResponse.paymentDetails.stripeErrorMessage,messageContext:o}:null}));return function(){return e()}}),[t,n])}},4332:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useProcessPaymentIntent=void 0;var a=r(n(7015)),o=r(n(8926)),i=r(n(9713)),c=r(n(3038)),s=n(3027),u=n(6664),l=n(1134);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.useProcessPaymentIntent=function(e){var t=e.getData,n=e.billing,r=e.shippingData,p=e.onPaymentProcessing,f=e.emitResponse,m=e.error,y=e.onSubmit,g=e.activePaymentMethod,v=e.paymentType,h=void 0===v?"card":v,b=e.setupIntent,P=void 0===b?null:b,E=e.removeSetupIntent,O=void 0===E?null:E,S=e.savePaymentMethod,_=void 0!==S&&S,w=e.exportedValues,C=void 0===w?{}:w,k=e.getPaymentMethodArgs,M=void 0===k?function(){return{}}:k,j=n.billingData,D=r.shippingAddress,R=f.responseTypes,x=(0,s.useState)(null),A=(0,c.default)(x,2),I=A[0],T=A[1],L=(0,u.useStripe)(),N=(0,s.useRef)(M);(0,s.useEffect)((function(){N.current=M}),[M]);var B=(0,s.useCallback)((function(){return d(d({},{type:h,billing_details:(0,l.getBillingDetailsFromAddress)(null!=C&&C.billingData?C.billingData:j)}),N.current())}),[j,h,M]),q=(0,s.useCallback)((function(e,n){var r,a={meta:{paymentMethodData:(r={},(0,i.default)(r,"".concat(t("name"),"_token_key"),e),(0,i.default)(r,"".concat(t("name"),"_save_source_key"),n),r)}};return null!=C&&C.billingData&&(a.meta.billingData=C.billingData),null!=C&&C.shippingAddress&&(a.meta.shippingData={address:C.shippingAddress}),a}),[j,D]);return(0,s.useEffect)((function(){I&&"string"==typeof I&&y()}),[I]),(0,s.useEffect)((function(){var e=p((0,o.default)(a.default.mark((function e(){var n,r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(g===t("name")){e.next=2;break}return e.abrupt("return",null);case 2:if(n=null,r=null,e.prev=3,!m){e.next=6;break}throw new l.StripeError(m);case 6:if(!P){e.next=16;break}return e.next=9,L.confirmCardSetup(P.client_secret,{payment_method:B()});case 9:if(!(n=e.sent).error){e.next=12;break}throw new l.StripeError(n.error);case 12:r=n.setupIntent.payment_method,O(),e.next=26;break;case 16:if(!I){e.next=20;break}r=I,e.next=26;break;case 20:return e.next=22,L.createPaymentMethod(B());case 22:if(!(n=e.sent).error){e.next=25;break}throw new l.StripeError(n.error);case 25:r=n.paymentMethod.id;case 26:return e.abrupt("return",(0,l.ensureSuccessResponse)(R,q(r,_)));case 29:return e.prev=29,e.t0=e.catch(3),console.log(e.t0),T(null),e.abrupt("return",(0,l.ensureErrorResponse)(R,e.t0.error));case 34:case"end":return e.stop()}}),e,null,[[3,29]])}))));return function(){return e()}}),[I,j,p,L,P,g,_]),{setPaymentMethod:T}}},6107:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useSetupIntent=void 0;var a=r(n(7015)),o=r(n(8926)),i=r(n(3038)),c=n(3027),s=r(n(7606)),u=n(1134);t.useSetupIntent=function(e){var t=e.cartTotal,n=e.setError,r=(0,c.useState)((0,u.getFromCache)("setupIntent")),l=(0,i.default)(r,2),p=l[0],d=l[1];(0,c.useEffect)((function(){var e=function(){var e=(0,o.default)(a.default.mark((function e(){var t;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!p){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,(0,s.default)({url:(0,u.getRoute)("create/setup_intent"),method:"POST"});case 4:(t=e.sent).code?n(t.message):((0,u.storeInCache)("setupIntent",t.intent),d(t.intent));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,u.cartContainsPreOrder)()||(0,u.cartContainsSubscription)()&&0==t.value?p||e():d(null)}),[t.value]);var f=(0,c.useCallback)((function(){(0,u.deleteFromCache)("setupIntent")}),[t.value]);return{setupIntent:p,removeSetupIntent:f}}},2715:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useStripeError=void 0;var a=r(n(3038)),o=n(3027);t.useStripeError=function(){var e=(0,o.useState)(!1),t=(0,a.default)(e,2);return[t[0],t[1]]}},6480:(e,t,n)=>{var r=n(3027),a=n(5318),o=a(n(6479)),i=a(n(9713)),c=a(n(3038)),s=n(3027),u=n(4222),l=n(1134),p=n(3539),d=n(3187),f=n(6664),m=n(3163);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=(0,l.getSettings)("stripe_afterpay_data"),h=function(e){var t=e.getData,n=(0,s.useState)({amount:t("cartTotal"),currency:t("currency")}),a=(0,c.default)(n,2),o=a[0];a[1];return r.createElement(f.Elements,{stripe:l.initStripe},r.createElement("div",{className:"wc-stripe-blocks-afterpay__label"},r.createElement(f.AfterpayClearpayMessageElement,{options:g(g({},t("msgOptions")),{amount:o.amount,currency:o.currency})})))},b=function(e){var t=e.content,n=e.billing,a=e.shippingData,i=(0,o.default)(e,["content","billing","shippingData"]),c=t,u=n.cartTotal,l=n.currency,p=a.needsShipping;return(0,s.useEffect)((function(){u.value,l.code}),[u.value,l.code,p]),r.createElement(r.Fragment,null,p&&r.createElement("div",{className:"wc-stripe-blocks-payment-method-content"},r.createElement("div",{className:"wc-stripe-blocks-afterpay-offsite__container"},r.createElement("div",{className:"wc-stripe-blocks-afterpay__offsite"},r.createElement("img",{src:v("offSiteSrc")}),r.createElement("p",null,(0,m.sprintf)((0,m.__)('After clicking "%s", you will be redirected to Afterpay to complete your purchase securely.',"woo-stripe-payment"),v("placeOrderButtonLabel"))))),r.createElement(c,g(g({},i),{},{billing:n,shippingData:a}))))};v()&&(0,u.registerPaymentMethod)({name:v("name"),label:r.createElement(h,{getData:v}),ariaLabel:"Ideal",placeOrderButtonLabel:v("placeOrderButtonLabel"),canMakePayment:(0,p.canMakePayment)(v,(function(e){var t=e.settings,n=e.billingData,r=e.cartTotals,a=n.country,o=r.currency_code,i=t("requiredParams");return a==(0,c.default)(i[o],1)[0]})),content:r.createElement(b,{content:p.LocalPaymentIntentContent,getData:v,confirmationMethod:"confirmAfterpayClearpayPayment"}),edit:r.createElement(d.PaymentMethod,{content:p.LocalPaymentIntentContent,getData:v}),supports:{showSavedCards:!1,showSaveOption:!1,features:v("features")}})},39:(e,t,n)=>{var r=n(3027),a=n(4222),o=n(1134),i=n(3539),c=n(2029),s=n(3187),u=(0,o.getSettings)("stripe_alipay_data");u()&&(0,a.registerPaymentMethod)({name:u("name"),label:r.createElement(c.PaymentMethodLabel,{title:u("title"),paymentMethod:u("name"),icons:u("icon")}),ariaLabel:"Alipay",placeOrderButtonLabel:u("placeOrderButtonLabel"),canMakePayment:(0,i.canMakePayment)(u),content:r.createElement(s.PaymentMethod,{content:i.LocalPaymentSourceContent,getData:u}),edit:r.createElement(s.PaymentMethod,{content:i.LocalPaymentSourceContent,getData:u}),supports:{showSavedCards:!1,showSaveOption:!1,features:u("features")}})},8641:(e,t,n)=>{var r=n(3027),a=n(4222),o=n(1134),i=n(3539),c=n(3187),s=(0,o.getSettings)("stripe_bancontact_data");s()&&(0,a.registerPaymentMethod)({name:s("name"),label:r.createElement(c.PaymentMethodLabel,{title:s("title"),paymentMethod:s("name"),icons:s("icon")}),ariaLabel:"Bancontact",placeOrderButtonLabel:s("placeOrderButtonLabel"),canMakePayment:(0,i.canMakePayment)(s),content:r.createElement(c.PaymentMethod,{content:i.LocalPaymentSourceContent,getData:s}),edit:r.createElement(c.PaymentMethod,{content:i.LocalPaymentSourceContent,getData:s}),supports:{showSavedCards:!1,showSaveOption:!1,features:s("features")}})},5176:(e,t,n)=>{var r=n(3027),a=n(4222),o=n(1134),i=n(3539),c=n(3187),s=n(6664),u=(0,o.getSettings)("stripe_becs_data");u()&&(0,a.registerPaymentMethod)({name:u("name"),label:r.createElement(c.PaymentMethodLabel,{title:u("title"),paymentMethod:u("name"),icons:u("icon")}),ariaLabel:"BECS",placeOrderButtonLabel:u("placeOrderButtonLabel"),canMakePayment:(0,i.canMakePayment)(u),content:r.createElement(c.PaymentMethod,{content:i.LocalPaymentIntentContent,getData:u,confirmationMethod:"confirmAuBecsDebitPayment",component:s.AuBankAccountElement}),edit:r.createElement(c.PaymentMethod,{content:i.LocalPaymentIntentContent,getData:u}),supports:{showSavedCards:!1,showSaveOption:!1,features:u("features")}})},4494:(e,t,n)=>{var r=n(3027),a=n(4222),o=n(1134),i=n(3539),c=n(3187),s=(0,o.getSettings)("stripe_eps_data");s()&&(0,a.registerPaymentMethod)({name:s("name"),label:r.createElement(c.PaymentMethodLabel,{title:s("title"),paymentMethod:s("name"),icons:s("icon")}),ariaLabel:"EPS",placeOrderButtonLabel:s("placeOrderButtonLabel"),canMakePayment:(0,i.canMakePayment)(s),content:r.createElement(c.PaymentMethod,{content:i.LocalPaymentSourceContent,getData:s}),edit:r.createElement(c.PaymentMethod,{content:i.LocalPaymentSourceContent,getData:s}),supports:{showSavedCards:!1,showSaveOption:!1,features:s("features")}})},4031:(e,t,n)=>{var r=n(3027),a=n(4222),o=n(1134),i=n(3539),c=n(3187),s=n(6664),u=(0,o.getSettings)("stripe_fpx_data");u()&&(0,a.registerPaymentMethod)({name:u("name"),label:r.createElement(c.PaymentMethodLabel,{title:u("title"),paymentMethod:u("name"),icons:u("icon")}),ariaLabel:"FPX",placeOrderButtonLabel:u("placeOrderButtonLabel"),canMakePayment:(0,i.canMakePayment)(u),content:r.createElement(c.PaymentMethod,{content:i.LocalPaymentIntentContent,getData:u,confirmationMethod:"confirmIdealPayment",component:s.FpxBankElement}),edit:r.createElement(c.PaymentMethod,{content:i.LocalPaymentIntentContent,getData:u}),supports:{showSavedCards:!1,showSaveOption:!1,features:u("features")}})},3817:(e,t,n)=>{var r=n(3027),a=n(4222),o=n(1134),i=n(3539),c=n(3187),s=(0,o.getSettings)("stripe_giropay_data");s()&&(0,a.registerPaymentMethod)({name:s("name"),label:r.createElement(c.PaymentMethodLabel,{title:s("title"),paymentMethod:s("name"),icons:s("icon")}),ariaLabel:"Giropay",placeOrderButtonLabel:s("placeOrderButtonLabel"),canMakePayment:(0,i.canMakePayment)(s),content:r.createElement(c.PaymentMethod,{content:i.LocalPaymentSourceContent,getData:s}),edit:r.createElement(c.PaymentMethod,{content:i.LocalPaymentSourceContent,getData:s}),supports:{showSavedCards:!1,showSaveOption:!1,features:s("features")}})},3140:(e,t,n)=>{var r=n(3027),a=n(4222),o=n(1134),i=n(3539),c=n(3187),s=(0,o.getSettings)("stripe_grabpay_data");s()&&(0,a.registerPaymentMethod)({name:s("name"),label:r.createElement(c.PaymentMethodLabel,{title:s("title"),paymentMethod:s("name"),icons:s("icon")}),ariaLabel:"GrabPay",placeOrderButtonLabel:s("placeOrderButtonLabel"),canMakePayment:(0,i.canMakePayment)(s),content:r.createElement(c.PaymentMethod,{content:i.LocalPaymentIntentContent,getData:s,confirmationMethod:"confirmGrabPayPayment"}),edit:r.createElement(c.PaymentMethod,{content:i.LocalPaymentIntentContent,getData:s}),supports:{showSavedCards:!1,showSaveOption:!1,features:s("features")}})},8522:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(3160);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var a=n(3994);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var o=n(878);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}))},3160:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useAfterProcessLocalPayment=void 0;var a=r(n(7015)),o=r(n(9713)),i=r(n(6479)),c=r(n(8926)),s=n(3027),u=n(6664),l=n(1134);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.useAfterProcessLocalPayment=function(e){var t=e.getData,n=e.billingData,r=e.eventRegistration,o=e.responseTypes,p=e.activePaymentMethod,f=e.confirmationMethod,m=e.getPaymentMethodArgs,y=void 0===m?function(){return{}}:m,g=(0,u.useStripe)(),v=r.onCheckoutAfterProcessingWithSuccess,h=r.onCheckoutAfterProcessingWithError,b=(0,s.useRef)(n),P=(0,s.useRef)(y);(0,s.useEffect)((function(){b.current=n}),[n]),(0,s.useEffect)((function(){P.current=y}),[y]),(0,s.useEffect)((function(){var e=v(function(){var e=(0,c.default)(a.default.mark((function e(n){var r,c,s,u,m,y;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.redirectUrl,t("name")!==p){e.next=17;break}if(e.prev=2,!(c=r.match(/#response=(.+)/))){e.next=11;break}return s=JSON.parse(window.atob(decodeURIComponent(c[1]))),u=s.client_secret,m=s.return_url,(0,i.default)(s,["client_secret","return_url"]),e.next=8,g[f](u,{payment_method:d({billing_details:(0,l.getBillingDetailsFromAddress)(b.current)},P.current()),return_url:m});case 8:if(!(y=e.sent).error){e.next=11;break}throw new l.StripeError(y.error);case 11:e.next=17;break;case 13:return e.prev=13,e.t0=e.catch(2),console.log(e.t0),e.abrupt("return",(0,l.ensureErrorResponse)(o,e.t0.error));case 17:case"end":return e.stop()}}),e,null,[[2,13]])})));return function(t){return e.apply(this,arguments)}}());return function(){return e()}}),[g,v,h])}},878:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useCreateSource=void 0;var a=r(n(7015)),o=r(n(8926)),i=r(n(9713)),c=r(n(3038)),s=n(3027),u=n(1134),l=n(6664),p=n(3163);t.useCreateSource=function(e){var t=e.getData,n=e.billing,r=e.shippingAddress,d=e.onPaymentProcessing,f=e.responseTypes,m=e.getSourceArgs,y=void 0!==m&&m,g=e.element,v=void 0!==g&&g,h=(0,s.useState)(!1),b=(0,c.default)(h,2),P=b[0],E=b[1],O=(0,s.useState)(!1),S=(0,c.default)(O,2),_=S[0],w=S[1],C=(0,s.useRef)({billing:n,shippingAddress:r}),k=(0,l.useStripe)(),M=(0,l.useElements)();(0,s.useEffect)((function(){C.current={billing:n,shippingAddress:r}}));var j=(0,s.useCallback)((function(){var e=C.current.billing,n=e.cartTotal,r=e.currency,a=e.billingData,o=(0,u.getDefaultSourceArgs)({type:t("paymentType"),amount:n.value,billingData:a,currency:r.code,returnUrl:t("returnUrl")});return y&&(o=y(o,{billingData:a})),o}),[]),D=(0,s.useCallback)((function(e){return{meta:{paymentMethodData:(0,i.default)({},"".concat(t("name"),"_token_key"),e)}}}),[]);return(0,s.useEffect)((function(){var e=d((0,o.default)(a.default.mark((function e(){var t;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!P){e.next=2;break}return e.abrupt("return",(0,u.ensureSuccessResponse)(f,D(P.id)));case 2:if(e.prev=2,!v){e.next=11;break}if(_){e.next=6;break}throw(0,p.__)("Please enter your payment info before proceeding.","woo-stripe-payment");case 6:return e.next=8,k.createSource(M.getElement(v),j());case 8:t=e.sent,e.next=14;break;case 11:return e.next=13,k.createSource(j());case 13:t=e.sent;case 14:if(!t.error){e.next=16;break}throw new u.StripeError(t.error);case 16:return E(t.source),e.abrupt("return",(0,u.ensureSuccessResponse)(f,D(t.source.id)));case 20:return e.prev=20,e.t0=e.catch(2),console.log(e.t0),e.abrupt("return",(0,u.ensureErrorResponse)(f,e.t0.error||e.t0));case 24:case"end":return e.stop()}}),e,null,[[2,20]])}))));return function(){return e()}}),[P,d,k,f,v,_,w]),{setIsValid:w}}},3994:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useValidateCheckout=void 0;var a=r(n(3038)),o=n(3027),i=n(1134),c=n(3163);t.useValidateCheckout=function(e){var t=e.subscriber,n=e.responseTypes,r=e.component,s=void 0===r?null:r,u=e.msg,l=void 0===u?(0,c.__)("Please enter your payment info before proceeding.","woo-stripe-payment"):u,p=(0,o.useState)(!1),d=(0,a.default)(p,2),f=d[0],m=d[1];return(0,o.useEffect)((function(){var e=t((function(){return!(s&&!f)||(0,i.ensureErrorResponse)(n,l)}));return function(){return e()}}),[t,f,m,n,s]),{isValid:f,setIsValid:m}}},9474:(e,t,n)=>{var r=n(3027),a=n(4222),o=n(1134),i=n(3539),c=n(3187),s=n(6664),u=(0,o.getSettings)("stripe_ideal_data");u()&&(0,a.registerPaymentMethod)({name:u("name"),label:r.createElement(c.PaymentMethodLabel,{title:u("title"),paymentMethod:u("name"),icons:u("icon")}),ariaLabel:"Ideal",placeOrderButtonLabel:u("placeOrderButtonLabel"),canMakePayment:(0,i.canMakePayment)(u),content:r.createElement(c.PaymentMethod,{content:i.LocalPaymentIntentContent,getData:u,confirmationMethod:"confirmIdealPayment",component:s.IdealBankElement}),edit:r.createElement(c.PaymentMethod,{content:i.LocalPaymentIntentContent,getData:u}),supports:{showSavedCards:!1,showSaveOption:!1,features:u("features")}})},9738:(e,t,n)=>{n(7156),n(9474),n(3868),n(8641),n(3817),n(4494),n(4784),n(1192),n(7894),n(3766),n(4031),n(5176),n(3140),n(39),n(6480)},6867:(e,t,n)=>{var r=n(3027),a=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.KlarnaPaymentCategories=void 0;var o=n(3027),i=a(n(6630));t.KlarnaPaymentCategories=function(e){var t=e.categories,n=e.onChange,a=e.selected;return r.createElement("div",{className:"wc-stripe-blocks-klarna-container"},r.createElement("ul",null,t.map((function(e){return r.createElement(c,{key:e.type,category:e,onChange:n,selected:a})}))))};var c=function(e){var t=e.category,n=e.selected,a=e.onChange,c=t.type===n;(0,o.useEffect)((function(){Klarna.Payments.load({container:"#klarna-category-".concat(t.type),payment_method_category:t.type})}),[]);var s={label:t.label,value:t.type,content:r.createElement("div",{id:"klarna-category-".concat(t.type)})};return r.createElement("li",{className:"wc-stripe-blocks-klarna__category",key:t.type},r.createElement(i.default,{option:s,checked:c,onChange:a}))}},6028:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(8092);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var a=n(437);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}))},8092:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useCreateSource=void 0;var a=r(n(7015)),o=r(n(8926)),i=r(n(8)),c=r(n(9713)),s=r(n(3038)),u=n(3027),l=n(6664),p=n(3636),d=n(1134),f=r(n(7606));function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,c.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.useCreateSource=function(e){var t=e.getData,n=e.billing,r=e.shippingData,m=(0,l.useStripe)(),g=(0,p.useStripeError)(),v=(0,s.default)(g,2),h=(v[0],v[1]),b=(0,u.useRef)(new AbortController),P=(0,u.useRef)({}),E=(0,u.useRef)({}),O=(0,u.useState)(!1),S=(0,s.default)(O,2),_=S[0],w=S[1],C=(0,u.useState)(!1),k=(0,s.default)(C,2),M=k[0],j=k[1],D=n.billingData,R=n.cartTotal,x=n.cartTotalItems,A=n.currency,I=(0,u.useCallback)((function(e){var t=e.billingData,n=e.shippingData,r=n.needsShipping,a=n.shippingAddress;return!!(0,d.isAddressValid)(t)&&(!r||(0,d.isAddressValid)(a))}),[]),T=(0,u.useCallback)((function(e,t){var n=[];return e.forEach((function(e){n.push({amount:e.value,currency:t,description:e.label,quantity:1})})),n}),[]),L=(0,u.useCallback)((function(e){var n=e.cartTotal,r=e.cartTotalItems,a=e.billingData,o=e.currency,i=e.shippingData,c=a.first_name,s=a.last_name,u=a.country,l=i.needsShipping,p=i.shippingAddress,f=(0,d.getDefaultSourceArgs)({type:t("paymentType"),amount:n.value,billingData:a,currency:o.code,returnUrl:t("returnUrl")});return f=y(y({},f),{source_order:{items:T(r,o.code)},klarna:{locale:t("locale"),product:"payment",purchase_country:u,first_name:c,last_name:s}}),"US"==u&&(f.klarna.custom_payment_methods="payin4,installments"),l&&(f.klarna=y(y({},f.klarna),{shipping_first_name:p.first_name,shipping_last_name:p.last_name}),f.source_order.shipping={address:{city:p.city||"",country:p.country||"",line1:p.address_1||"",line2:p.address_2||"",postal_code:p.postcode||"",state:p.state||""}}),E.current=P.current,P.current=f,f}),[]),N=(0,u.useCallback)((function(e,t){var n=function e(t,n){for(var r={},a=0,o=Object.keys(t);a<o.length;a++){var c=o[a];"object"!==(0,i.default)(t[c])||Array.isArray(t[c])?r[c]=n[c]:r[c]=e(t[c],n[c])}return r}(e,t);return JSON.stringify(e)==JSON.stringify(n)}),[]),B=(0,u.useCallback)(function(){var e=(0,o.default)(a.default.mark((function e(t){var n,r,o,i,s,u,l;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.billingData,r=t.shippingData,o=t.cartTotal,i=t.cartTotalItems,s=t.currency,u=L({cartTotal:o,cartTotalItems:i,billingData:n,currency:s,shippingData:r}),e.prev=2,e.next=5,m.createSource(u);case 5:if(!(l=e.sent).error){e.next=8;break}throw new d.StripeError(l.error);case 8:(0,d.storeInCache)("klarna:source",(0,c.default)({},s.code,{source:l.source,args:P.current})),j(l.source),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(2),console.log(e.t0),h(e.t0.error);case 16:case"end":return e.stop()}}),e,null,[[2,12]])})));return function(t){return e.apply(this,arguments)}}(),[m,j]),q=(0,u.useCallback)(function(){var e=(0,o.default)(a.default.mark((function e(n){var r,o,i;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.source,o=n.updates,i={updates:o,source_id:r.id,client_secret:r.client_secret,payment_method:t("name")},e.prev=2,b.current.abort(),b.current=new AbortController,e.next=7,(0,f.default)({url:(0,d.getRoute)("update/source"),method:"POST",data:i,signal:b.current.signal});case 7:e.sent.source&&((0,d.storeInCache)("klarna:source",{source:r,args:P.current}),j(r)),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(2),console.log("update aborted");case 14:case"end":return e.stop()}}),e,null,[[2,11]])})));return function(t){return e.apply(this,arguments)}}(),[j]);return(0,u.useEffect)((function(){var e;if(!M)if(null!==(e=(0,d.getFromCache)("klarna:source"))&&void 0!==e&&e[A.code]){var t=(0,d.getFromCache)("klarna:source")[A.code],n=t.source,a=t.args;P.current=a,j(n)}else m&&I({billingData:D,shippingData:r})&&(w(!0),B({billingData:D,shippingData:r,cartTotal:R,cartTotalItems:x,currency:A}).then((function(){return w(!1)})))}),[m,null==M?void 0:M.id,B,D,R.value,r,w,x,A.code]),(0,u.useEffect)((function(){if(m&&M){var e=(t=L({billingData:D,cartTotal:R,cartTotalItems:x,currency:A,shippingData:r}),["type","currency","statement_descriptor","redirect","klarna.product","klarna.locale","klarna.custom_payment_methods"].reduce((function(e,t){if(t.indexOf(".")>-1){var n=t.split(".");return delete n.slice(0,n.length-1).reduce((function(e,t){return e[t]}),e)[t=n[n.length-1]],e}return delete e[t],e}),t));N(e,E.current)||q({source:M,updates:e})}var t}),[null==M?void 0:M.id,D,R.value,x,r,A.code]),{source:M,setSource:j,isLoading:_}}},437:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.useProcessPayment=void 0;var a=r(n(9713)),o=n(3027),i=n(1134),c=n(3163);t.useProcessPayment=function(e){var t=e.payment_method,n=e.source_id,r=e.paymentCategory,s=e.onPaymentProcessing,u=e.responseTypes;(0,o.useEffect)((function(){var e=s((function(){return new Promise((function(e){Klarna.Payments.authorize({payment_method_category:r},(function(r){r.approved?((0,i.deleteFromCache)("klarna:source"),e((0,i.ensureSuccessResponse)(u,{meta:{paymentMethodData:(0,a.default)({},"".concat(t,"_token_key"),n)}}))):e((0,i.ensureErrorResponse)(u,r.error||(0,c.__)("Your purchase is not approved.","woo-stripe-payment")))}))}))}));return function(){return e()}}),[n,r,s])}},7156:(e,t,n)=>{var r=n(3027),a=n(5318)(n(3038)),o=n(3027),i=n(4222),c=n(3163),s=n(3636),u=n(1134),l=n(3187),p=n(3539),d=n(6664),f=n(6867),m=n(8567),y=n(6028);n(1530);var g=(0,u.getSettings)("stripe_klarna_data"),v=function(e){return r.createElement(d.Elements,{stripe:u.initStripe},r.createElement(h,e))},h=function(e){var t=e.getData,n=e.billing,i=e.shippingData,u=e.emitResponse,l=e.eventRegistration,p=u.responseTypes,d=l.onPaymentProcessing,g=l.onCheckoutAfterProcessingWithError,v=(0,o.useState)(""),h=(0,a.default)(v,2),b=h[0],P=h[1],E=function(e){for(var n=e.klarna.payment_method_categories.split(","),r=[],a=0,o=Object.keys(t("categories"));a<o.length;a++){var i=o[a];n.includes(i)&&r.push({type:i,label:t("categories")[i]})}return r},O=(0,y.useCreateSource)({getData:t,billing:n,shippingData:i}),S=O.source,_=O.isLoading;if((0,y.useProcessPayment)({payment_method:t("name"),source_id:S.id,paymentCategory:b,onPaymentProcessing:d,responseTypes:p}),(0,s.useProcessCheckoutError)({responseTypes:p,subscriber:g}),(0,o.useEffect)((function(){if(!b&&S){var e=E(S);e.length&&P(e.shift().type)}}),[S]),S){Klarna.Payments.init({client_token:S.klarna.client_token});var w=E(S);return r.createElement(f.KlarnaPaymentCategories,{categories:w,selected:!b&&w.length>0?w[0].type:b,onChange:P})}return _?r.createElement(m.KlarnaLoader,null):r.createElement("div",{className:"wc-stripe-blocks-klarna__notice"},(0,c.__)("Please fill out all required fields before paying with Klarna.","woo-stripe-payment"))};g()&&(0,i.registerPaymentMethod)({name:g("name"),label:r.createElement(l.PaymentMethodLabel,{title:g("title"),paymentMethod:g("name"),icons:g("icon")}),ariaLabel:"Klarna",placeOrderButtonLabel:g("placeOrderButtonLabel"),canMakePayment:(0,p.canMakePayment)(g,(function(e){var t=e.settings,n=e.billingData,r=e.cartTotals,a=n.country,o=r.currency_code,i=t("requiredParams");return[o]in i&&i[o].includes(a)})),content:r.createElement(l.PaymentMethod,{getData:g,content:v}),edit:r.createElement(l.PaymentMethod,{getData:g,content:v}),supports:{showSavedCards:!1,showSaveOption:!1,features:g("features")}})},8567:(e,t,n)=>{var r=n(3027);Object.defineProperty(t,"__esModule",{value:!0}),t.KlarnaLoader=void 0,t.KlarnaLoader=function(){return r.createElement("div",{className:"wc-stripe-klarna-loader"},r.createElement("div",null),r.createElement("div",null),r.createElement("div",null))}},3539:(e,t,n)=>{var r=n(3027),a=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.LocalPaymentSourceContent=t.LocalPaymentIntentContent=t.canMakePayment=void 0;var o=a(n(9713)),i=a(n(6479)),c=n(3027),s=n(6664),u=n(1134),l=n(8522),p=n(3636);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.canMakePayment=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n){var r=n.billingData,a=n.cartTotals,o=(0,i.default)(n,["billingData","cartTotals"]),c=a.currency_code,s=r.country,l=e("countries"),p=e("allowedCountries"),d=e("features"),m=!1;if(e("isAdmin"))m=!0;else{if((0,u.cartContainsSubscription)()&&!d.includes("subscriptions"))return!1;if((0,u.cartContainsPreOrder)()&&!d.includes("pre-orders"))return!1;e("currencies").includes(c)&&(m="all_except"===p?!e("exceptCountries").includes(s):"specific"===p?e("specificCountries").includes(s):!(l.length>0)||l.includes(s)),t&&m&&(m=t(f({settings:e,billingData:r,cartTotals:a},o)))}return m}},t.LocalPaymentIntentContent=function(e){return r.createElement(s.Elements,{stripe:u.initStripe},r.createElement(y,e))},t.LocalPaymentSourceContent=function(e){return r.createElement(s.Elements,{stripe:u.initStripe},r.createElement(m,e))};var m=function(e){var t=e.getData,n=e.billing,a=e.shippingData,o=e.emitResponse,i=e.eventRegistration,c=e.getSourceArgs,s=void 0!==c&&c,u=e.element,p=void 0!==u&&u,d=a.shippingAddress,f=i.onPaymentProcessing,m=(i.onCheckoutAfterProcessingWithError,o.responseTypes),y=(o.noticeContexts,(0,l.useCreateSource)({getData:t,billing:n,shippingAddress:d,onPaymentProcessing:f,responseTypes:m,getSourceArgs:s,element:p}).setIsValid);return p?r.createElement(g,{name:t("name"),options:t("elementOptions"),onChange:function(e){y(e.complete)},element:p}):null},y=function(e){var t=e.getData,n=e.billing,a=e.emitResponse,i=e.eventRegistration,u=e.activePaymentMethod,d=e.confirmationMethod,f=void 0===d?null:d,m=e.component,y=void 0===m?null:m,v=(0,s.useElements)(),h=n.billingData,b=i.onPaymentProcessing,P=i.onCheckoutAfterProcessingWithError,E=a.responseTypes,O=a.noticeContexts,S=(0,c.useCallback)((function(){return y?(0,o.default)({},t("paymentType"),v.getElement(y)):{}}),[v]),_=(0,l.useValidateCheckout)({subscriber:b,responseTypes:E,component:y}).setIsValid;return(0,l.useAfterProcessLocalPayment)({getData:t,billingData:h,eventRegistration:i,responseTypes:E,activePaymentMethod:u,confirmationMethod:f,getPaymentMethodArgs:S}),(0,p.useProcessCheckoutError)({responseTypes:E,subscriber:P,messageContext:O.PAYMENT}),y?r.createElement(g,{name:t("name"),options:t("elementOptions"),onChange:function(e){return _(!e.empty)},element:y}):null},g=function(e){var t=e.name,n=e.onChange,a=e.element,o=e.options,i=a;return r.createElement("div",{className:"wc-stripe-local-payment-container ".concat(t," ").concat(i.displayName)},r.createElement(i,{options:o,onChange:n}))}},4784:(e,t,n)=>{var r=n(3027),a=n(4222),o=n(1134),i=n(3539),c=n(3187),s=(0,o.getSettings)("stripe_multibanco_data");s()&&(0,a.registerPaymentMethod)({name:s("name"),label:r.createElement(c.PaymentMethodLabel,{title:s("title"),paymentMethod:s("name"),icons:s("icon")}),ariaLabel:"MultiBanco",placeOrderButtonLabel:s("placeOrderButtonLabel"),canMakePayment:(0,i.canMakePayment)(s),content:r.createElement(c.PaymentMethod,{content:i.LocalPaymentSourceContent,getData:s}),edit:r.createElement(c.PaymentMethod,{content:i.LocalPaymentSourceContent,getData:s}),supports:{showSavedCards:!1,showSaveOption:!1,features:s("features")}})},3868:(e,t,n)=>{var r=n(3027),a=n(4222),o=n(1134),i=n(3539),c=n(3187),s=n(6664),u=(0,o.getSettings)("stripe_p24_data");u()&&(0,a.registerPaymentMethod)({name:u("name"),label:r.createElement(c.PaymentMethodLabel,{title:u("title"),paymentMethod:u("name"),icons:u("icon")}),ariaLabel:"P24",placeOrderButtonLabel:u("placeOrderButtonLabel"),canMakePayment:(0,i.canMakePayment)(u),content:r.createElement(c.PaymentMethod,{content:i.LocalPaymentIntentContent,getData:u,confirmationMethod:"confirmP24Payment",component:s.P24BankElement}),edit:r.createElement(c.PaymentMethod,{content:i.LocalPaymentIntentContent,getData:u}),supports:{showSavedCards:!1,showSaveOption:!1,features:u("features")}})},1192:(e,t,n)=>{var r=n(3027),a=n(5318),o=a(n(9713)),i=a(n(6479)),c=n(4222),s=n(1134),u=n(3539),l=n(3187),p=n(6664);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m,y=(0,s.getSettings)("stripe_sepa_data"),g=(m=l.PaymentMethod,function(e){var t=e.getData,n=(0,i.default)(e,["getData"]);return r.createElement(r.Fragment,null,r.createElement(m,f(f({},n),{},{getData:t})),r.createElement("div",{className:"wc-stripe-blocks-sepa__mandate"},t("mandate")))});y()&&(0,c.registerPaymentMethod)({name:y("name"),label:r.createElement(l.PaymentMethodLabel,{title:y("title"),paymentMethod:y("name"),icons:y("icon")}),ariaLabel:"SEPA",placeOrderButtonLabel:y("placeOrderButtonLabel"),canMakePayment:(0,u.canMakePayment)(y),content:r.createElement(g,{content:u.LocalPaymentSourceContent,getData:y,element:p.IbanElement,getSourceArgs:function(e,t){var n=t.billingData;return e.mandate={notification_method:n.email?"email":"manual",interval:(0,s.cartContainsSubscription)()||(0,s.cartContainsPreOrder)()?"scheduled":"one_time"},"scheduled"===e.mandate.interval&&delete e.amount,e}}),edit:r.createElement(u.LocalPaymentSourceContent,{getData:y}),supports:{showSavedCards:!1,showSaveOption:!1,features:y("features")}})},7894:(e,t,n)=>{var r=n(3027),a=n(5318)(n(9713)),o=n(4222),i=n(1134),c=n(3539),s=n(3187);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=(0,i.getSettings)("stripe_sofort_data");p()&&(0,o.registerPaymentMethod)({name:p("name"),label:r.createElement(s.PaymentMethodLabel,{title:p("title"),paymentMethod:p("name"),icons:p("icon")}),ariaLabel:"Sofort",placeOrderButtonLabel:p("placeOrderButtonLabel"),canMakePayment:(0,c.canMakePayment)(p),content:r.createElement(s.PaymentMethod,{content:c.LocalPaymentSourceContent,getData:p,getSourceArgs:function(e,t){var n=t.billingData;return l(l({},e),{},{sofort:{country:n.country}})}}),edit:r.createElement(s.PaymentMethod,{content:c.LocalPaymentSourceContent,getData:p}),supports:{showSavedCards:!1,showSaveOption:!1,features:p("features")}})},3766:(e,t,n)=>{var r=n(3027),a=n(5318),o=a(n(7015)),i=a(n(8926)),c=a(n(9713)),s=a(n(3038)),u=n(3027),l=n(4222),p=n(1134),d=n(3187),f=n(3539),m=n(6664),y=n(8522),g=n(3163),v=n(3636),h=(0,p.getSettings)("stripe_wechat_data"),b=function(e){return r.createElement(m.Elements,{stripe:p.initStripe},r.createElement(P,e))},P=function(e){var t=e.getData,n=e.billing,a=(e.shippingData,e.emitResponse),o=e.eventRegistration,i=e.components,c=a.responseTypes,s=o.onPaymentProcessing,l=o.onCheckoutAfterProcessingWithSuccess,d=i.ValidationInputError,f=(0,y.useValidateCheckout)({subscriber:o.onPaymentProcessing,responseTypes:a.responseTypes,msg:(0,g.__)("Please scan your QR code to continue with payment.","woo-stripe-payment")}),m=(f.isValid,f.setIsValid),v=O({getData:t,billing:n,responseTypes:c,subscriber:s}),h=v.source,b=v.error,P=v.deleteSourceFromStorage;return(0,u.useEffect)((function(){var e=l((function(){return P(),(0,p.ensureSuccessResponse)(c)}));return function(){return e()}}),[h,l,P]),(0,u.useEffect)((function(){h&&m(!0)}),[h]),h?r.createElement(E,{text:h.wechat.qr_code_url}):b?r.createElement("div",{className:"wechat-validation-error"},r.createElement(d,{errorMessage:(0,p.getErrorMessage)(b)})):(0,p.isAddressValid)(n.billingData)?null:(0,g.__)("Please fill out all the required fields in order to complete the WeChat payment.","woo-stripe-payment")},E=function(e){var t=e.text,n=e.width,a=void 0===n?128:n,o=e.height,i=void 0===o?128:o,c=e.colorDark,s=void 0===c?"#424770":c,l=e.colorLight,d=void 0===l?"#f8fbfd":l,f=e.correctLevel,m=void 0===f?QRCode.CorrectLevel.H:f,y=(0,u.useRef)();return(0,u.useEffect)((function(){new QRCode(y.current,{text:t,width:a,height:i,colorDark:s,colorLight:d,correctLevel:m})}),[y]),r.createElement(r.Fragment,null,r.createElement("div",{id:"wc-stripe-block-qrcode",ref:y}),(0,p.isTestMode)()&&r.createElement("p",null,(0,g.__)("Test mode: Click the Place Order button to proceed.","woo-stripe-payment")),!(0,p.isTestMode)()&&r.createElement("p",null,(0,g.__)("Scan the QR code using your WeChat app. Once scanned click the Place Order button.","woo-stripe-payment")))},O=function(e){var t=e.getData,n=e.billing,r=e.responseTypes,a=e.subscriber,l=(0,m.useStripe)(),d=(0,v.useStripeError)(),f=(0,s.default)(d,2),y=f[0],g=f[1],h=(0,u.useState)((0,p.getFromCache)("wechat:source")),b=(0,s.default)(h,2),P=b[0],E=b[1],O=(0,u.useRef)(null),S=n.cartTotal,_=n.billingData,w=n.currency;(0,u.useEffect)((function(){var e=a((function(){return(0,p.ensureSuccessResponse)(r,{meta:{paymentMethodData:(0,c.default)({},"".concat(t("name"),"_token_key"),P.id)}})}));return function(){return e()}}),[P,a]);var C=(0,u.useCallback)((0,i.default)(o.default.mark((function e(){var n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,y||!(0,p.isAddressValid)(_)){e.next=9;break}return e.next=4,l.createSource((0,p.getDefaultSourceArgs)({type:t("paymentType"),amount:S.value,billingData:_,currency:w.code,returnUrl:t("returnUrl")}));case 4:if(!(n=e.sent).error){e.next=7;break}throw new p.StripeError(n.error);case 7:E(n.source),(0,p.storeInCache)("wechat:source",n.source);case 9:e.next=15;break;case 11:e.prev=11,e.t0=e.catch(0),console.log("error: ",e.t0),g(e.t0.error);case 15:case"end":return e.stop()}}),e,null,[[0,11]])}))),[l,P,S.value,_,w,y]),k=(0,u.useCallback)((function(){(0,p.deleteFromCache)("wechat:source")}),[]);return(0,u.useEffect)((function(){l&&!P&&(clearTimeout(O.current),O.current=setTimeout(C,1e3))}),[l,P]),{source:P,setSource:E,error:y,deleteSourceFromStorage:k}};h()&&(0,l.registerPaymentMethod)({name:h("name"),label:r.createElement(d.PaymentMethodLabel,{title:h("title"),paymentMethod:h("name"),icons:h("icon")}),ariaLabel:"WeChat",canMakePayment:(0,f.canMakePayment)(h),content:r.createElement(d.PaymentMethod,{content:b,getData:h}),edit:r.createElement(d.PaymentMethod,{content:b,getData:h}),supports:{showSavedCards:!1,showSaveOption:!1,features:h("features")}})},5180:(e,t,n)=>{n(3139),n(3726)},3726:(e,t,n)=>{var r=n(3027),a=n(5318),o=a(n(3038)),i=a(n(6479)),c=n(3027),s=n(4222),u=n(1134),l=n(3636),p=n(6664),d=(0,u.getSettings)("stripe_payment_request_data"),f=function(e){return r.createElement("div",{className:"wc-stripe-payment-request-container"},r.createElement(p.Elements,{stripe:u.initStripe},r.createElement(m,e)))},m=function(e){var t=e.getData,n=e.onClick,a=e.onClose,s=e.billing,u=e.shippingData,d=e.eventRegistration,f=e.emitResponse,m=e.onSubmit,y=e.activePaymentMethod,g=((0,i.default)(e,["getData","onClick","onClose","billing","shippingData","eventRegistration","emitResponse","onSubmit","activePaymentMethod"]),d.onPaymentProcessing),v=f.responseTypes,h=f.noticeContexts,b=(0,p.useStripe)(),P=(0,l.useStripeError)(),E=(0,o.default)(P,1)[0],O=(0,l.useExportedValues)();(0,l.useExpressBreakpointWidth)({payment_method:t("name"),width:300});var S=(0,l.useProcessPaymentIntent)({getData:t,billing:s,shippingData:u,onPaymentProcessing:g,emitResponse:f,error:E,onSubmit:m,activePaymentMethod:y,exportedValues:O}).setPaymentMethod;(0,l.useAfterProcessingPayment)({getData:t,eventRegistration:d,responseTypes:v,activePaymentMethod:y,messageContext:h.EXPRESS_PAYMENTS});var _=(0,l.usePaymentRequest)({getData:t,onClose:a,stripe:b,billing:s,shippingData:u,eventRegistration:d,setPaymentMethod:S,exportedValues:O,canPay:function(e){return null!=e&&!e.applePay}}).paymentRequest,w=(0,c.useMemo)((function(){return{paymentRequest:_,style:{paymentRequestButton:t("paymentRequestButton")}}}),[_]);return _?r.createElement(p.PaymentRequestButtonElement,{options:w,onClick:n}):null},y=function(e){e.getData,(0,i.default)(e,["getData"]);var t=(0,c.useRef)();return(0,c.useEffect)((function(){var e=window.devicePixelRatio;t.current.width=20*e,t.current.height=20*e;var n=t.current.getContext("2d");n.scale(e,e),n.beginPath(),n.arc(10,10,10,0,2*Math.PI),n.fillStyle="#986fff",n.fill()})),r.createElement("div",{className:"payment-request-block-editor"},r.createElement("div",{className:"icon-container"},r.createElement("span",null,"Buy now"),r.createElement("canvas",{className:"PaymentRequestButton-icon",ref:t}),r.createElement("i",{className:"payment-request-arrow"})))};(0,s.registerExpressPaymentMethod)({name:d("name"),canMakePayment:function(e){var t=e.cartTotals;if(d("isAdmin"))return!0;var n=t.currency_code,r=t.total_price;return(0,u.canMakePayment)({country:d("countryCode"),currency:n.toLowerCase(),total:{label:d("totalLabel"),amount:parseInt(r)}},(function(e){return null!=e&&!e.applePay}))},content:r.createElement(f,{getData:d}),edit:r.createElement(y,{getData:d}),supports:{showSavedCards:d("showSavedCards"),showSaveOption:d("showSaveOption"),features:d("features")}})},1065:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(7015)),o=r(n(8926)),i=n(3027),c=n(1134);t.default=function(e){var t=e.eventRegistration,n=e.emitResponse,r=e.getData,s=t.onCheckoutAfterProcessingWithSuccess,u=n.responseTypes,l=(0,i.useCallback)(function(){var e=(0,o.default)(a.default.mark((function e(t){var n,o;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.redirectUrl,e.next=3,c.initStripe;case 3:return o=e.sent,e.next=6,(0,c.handleCardAction)({redirectUrl:n,getData:r,stripe:o,responseTypes:u});case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[s]);return(0,i.useEffect)((function(){var e=s(l);return function(){return e()}}),[s]),null}},1134:(e,t,n)=>{var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.isCheckoutPage=t.isCartPage=t.deleteFromCache=t.getFromCache=t.storeInCache=t.isTestMode=t.getDefaultSourceArgs=t.cartContainsSubscription=t.cartContainsPreOrder=t.getLocalPaymentMethods=t.registerLocalPaymentMethod=t.canMakePayment=t.getDisplayItems=t.getShippingOptionId=t.getShippingOptions=t.formatPrice=t.filterEmptyValues=t.getIntermediateAddress=t.toCartAddress=t.handleCardAction=t.isUserLoggedIn=t.hasShippingRates=t.getSelectedShippingOption=t.isFieldRequired=t.getLocaleFields=t.isAddressValid=t.removeNumberPrecision=t.isEmpty=t.StripeError=t.getSettings=t.getBillingDetailsFromAddress=t.getErrorMessage=t.ensureErrorResponse=t.ensureSuccessResponse=t.getRoute=t.getCreditCardForm=t.registerCreditCardForm=t.initStripe=void 0;var a=r(n(319)),o=r(n(7015)),i=r(n(8926)),c=r(n(3038)),s=r(n(8)),u=r(n(4575)),l=r(n(2205)),p=r(n(8585)),d=r(n(9754)),f=r(n(5957)),m=r(n(9713)),y=r(n(6479)),g=n(4465),v=n(2492),h=r(n(7606)),b=n(8419);function P(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw o}}}}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){(0,m.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _=(0,v.getSetting)("stripeGeneralData"),w=_.publishableKey,C=_.account,k=(0,v.getSetting)("stripeErrorMessages"),M=(0,v.getSetting)("countryLocale",{}),j=/^([\w]+)\:(.+)$/,D=(0,v.getSetting)("stripeGeneralData").routes,R={},x=[],A={recipient:function(e,t){return e.first_name=t.split(" ").slice(0,-1).join(" "),e.last_name=t.split(" ").pop(),e},payerName:function(e,t){return e.first_name=t.split(" ").slice(0,-1).join(" "),e.last_name=t.split(" ").pop(),e},country:"country",addressLine:function(e,t){return t[0]&&(e.address_1=t[0]),t[1]&&(e.address_2=t[1]),e},line1:"address_1",line2:"address_2",city:"city",region:"state",postalCode:"postcode",postal_code:"postcode",payerEmail:"email",payerPhone:"phone"},I=new Promise((function(e,t){(0,g.loadStripe)(w,C?{stripeAccount:C}:{}).then((function(t){e(t)})).catch((function(t){e({error:t})}))}));t.initStripe=I,t.registerCreditCardForm=function(e){var t=e.id,n=(0,y.default)(e,["id"]);R[t]=n},t.getCreditCardForm=function(e){return R[e]};var T=function(e){return null!=D&&D[e]?D[e]:console.log("".concat(e," is not a valid route"))};t.getRoute=T;var L=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return S({type:e.SUCCESS},t)};t.ensureSuccessResponse=L;var N=function(e,t){return{type:e.ERROR,message:B(t)}};t.ensureErrorResponse=N;var B=function(e){return"string"==typeof e?e:null!=e&&e.code&&null!=k&&k[e.code]?k[e.code]:null!=e&&e.statusCode?null!=k&&k[e.statusCode]?k[e.statusCode]:e.statusMessage:e.message};t.getErrorMessage=B;var q=function(e){var t={name:"".concat(e.first_name," ").concat(e.last_name),address:{city:e.city||"",country:e.country||"",line1:e.address_1||"",line2:e.address_2||"",postal_code:e.postcode||"",state:e.state||""}};return null!=e&&e.phone&&(t.phone=e.phone),null!=e&&e.email&&(t.email=e.email),t};t.getBillingDetailsFromAddress=q,t.getSettings=function(e){return function(t){return t?(0,v.getSetting)(e)[t]:(0,v.getSetting)(e)}};var F=function(e){(0,l.default)(a,e);var t,n,r=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,d.default)(t);if(n){var a=(0,d.default)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,p.default)(this,e)});function a(e){var t;return(0,u.default)(this,a),(t=r.call(this,e.message)).error=e,t}return a}((0,f.default)(Error));t.StripeError=F;var V=function(e){return"string"==typeof e?0==e.length||""==e:Array.isArray(e)?0==array.length:"object"!==(0,s.default)(e)||0==Object.keys(e).length};t.isEmpty=V,t.removeNumberPrecision=function(e,t){return e/Math.pow(10,t)},t.isAddressValid=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=U(e.country),r=0,a=Object.entries(e);r<a.length;r++){var o=(0,c.default)(a[r],2),i=o[0],s=o[1];if(!t.includes(i)&&null!=n&&n[i]&&n[i].required&&V(s))return!1}return!0};var U=function(e){var t=S({},M.default);return e&&null!=M&&M[e]&&(t=Object.entries(M[e]).reduce((function(e,t){var n=(0,c.default)(t,2),r=n[0],a=n[1];return e[r]=S(S({},e[r]),a),e}),t),["phone","email"].forEach((function(e){var n=document.getElementById(e);n&&(t[e]={required:n.required})}))),t};t.getLocaleFields=U,t.isFieldRequired=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=U(t);return[e]in n&&n[e].required},t.getSelectedShippingOption=function(e){var t=e.match(j);if(t){var n=t[1];return[t[2],n]}return[]},t.hasShippingRates=function(e){return e.map((function(e){return e.shipping_rates.length>0})).filter(Boolean).length>0},t.isUserLoggedIn=function(e){return e>0};var W=function(){var e=(0,i.default)(o.default.mark((function e(t,n){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,h.default)({url:D["sync/intent"],method:"POST",data:{order_id:t,client_secret:n}});case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.log(e.t0);case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(t,n){return e.apply(this,arguments)}}(),Y=function(){var e=(0,i.default)(o.default.mark((function e(t){var n,r,a,i,c,s,u,l,p,d,f,y,g,v;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.redirectUrl,r=t.responseTypes,a=t.stripe,i=t.getData,c=t.savePaymentMethod,s=void 0!==c&&c,e.prev=1,!(u=n.match(/#response=(.+)/))){e.next=20;break}return l=JSON.parse(window.atob(decodeURIComponent(u[1]))),p=l.client_secret,d=l.order_id,f=l.order_key,e.next=7,a.handleCardAction(p);case 7:if(!(y=e.sent).error){e.next=11;break}return W(d,p),e.abrupt("return",N(r,y.error));case 11:return g=(0,m.default)({order_id:d,order_key:f},"".concat(i("name"),"_save_source_key"),s),e.next=14,(0,h.default)({url:T("process/payment"),method:"POST",data:g});case 14:if(!(v=e.sent).messages){e.next=17;break}return e.abrupt("return",N(r,v.messages));case 17:return e.abrupt("return",L(r,{redirectUrl:v.redirect}));case 20:return e.abrupt("return",L(r));case 21:e.next=27;break;case 23:return e.prev=23,e.t0=e.catch(1),console.log(e.t0),e.abrupt("return",N(r,e.t0));case 27:case"end":return e.stop()}}),e,null,[[1,23]])})));return function(t){return e.apply(this,arguments)}}();t.handleCardAction=Y,t.toCartAddress=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:A;return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={};t=S(S({},t),K(n));for(var a=0,o=Object.entries(e);a<o.length;a++){var i,s=(0,c.default)(o[a],2),u=s[0],l=s[1];null!==(i=t)&&void 0!==i&&i[u]&&("function"==typeof l?l(r,t[u]):r[l]=t[u])}return r}},t.getIntermediateAddress=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["city","postcode","state","country"],r={},a=P(n);try{for(a.s();!(t=a.n()).done;){var o=t.value;r[o]=e[o]}}catch(e){a.e(e)}finally{a.f()}return r};var K=function(e){return Object.keys(e).filter((function(t){return Boolean(e[t])})).reduce((function(t,n){return S(S({},t),{},(0,m.default)({},n,e[n]))}),{})};t.filterEmptyValues=K;var G=function(e,t){var n=(0,b.getCurrency)(t),r=n.prefix,a=n.suffix,o=n.decimalSeparator,i=n.minorUnit,c=n.thousandSeparator;if(""==e||void 0===e)return e;e="string"==typeof e?parseInt(e,10):e;var s,u=(e=(e/=Math.pow(10,i)).toString().replace(".",o)).indexOf(o);if(u<0)e+="".concat(o).concat(new Array(i+1).join("0"));else{var l=e.substr(u+1);l.length<i&&(e+=new Array(i-l.length+1).join("0"))}var p=e.match(new RegExp("(\\d+)\\".concat(o,"(\\d+)")));return e=p[1],s=p[2],r+(e=(e=e.replace(new RegExp("\\B(?=(\\d{3})+(?!\\d))","g"),"".concat(c)))+o+s)+a};t.formatPrice=G,t.getShippingOptions=function(e){var t=[];return e.forEach((function(e,n){e.shipping_rates.sort((function(e){return e.selected?-1:1}));var r=e.shipping_rates.map((function(e){var t=document.createElement("textarea");return t.innerHTML=e.name,G(e.price,e.currency_code),{id:H(n,e.rate_id),label:t.value,amount:parseInt(e.price,10)}}));t=[].concat((0,a.default)(t),(0,a.default)(r))})),t};var H=function(e,t){return"".concat(e,":").concat(t)};t.getShippingOptionId=H,t.getDisplayItems=function(e,t){t.minorUnit;var n=[];return e.forEach((function(e){0<e.value&&n.push({label:e.label,pending:!1,amount:e.value})})),n};var z={};t.canMakePayment=function(e,t){var n=e.country,r=e.currency,a=e.total;return new Promise((function(e,o){var i=[n,r,a.amount].reduce((function(e,t){return"".concat(e,"-").concat(t)}));return i in z?e(z[i]):I.then((function(c){if(c.error)return o(c.error);c.paymentRequest({country:n,currency:r,total:a}).canMakePayment().then((function(n){return z[i]=t(n),e(z[i])}))})).catch(o)}))},t.registerLocalPaymentMethod=function(e){x.push(e)},t.getLocalPaymentMethods=function(){return x},t.cartContainsPreOrder=function(){var e=(0,v.getSetting)("stripePaymentData");return e&&e.pre_order},t.cartContainsSubscription=function(){var e=(0,v.getSetting)("stripePaymentData");return e&&e.subscription},t.getDefaultSourceArgs=function(e){var t=e.type,n=e.amount,r=e.billingData,a=e.currency,o=e.returnUrl;return{type:t,amount:n,currency:a,owner:q(r),redirect:{return_url:o}}},t.isTestMode=function(){return"test"===(0,v.getSetting)("stripeGeneralData").mode};var J=function(e){return"".concat("stripe:").concat(e)};t.storeInCache=function(e,t){var n=Math.floor((new Date).getTime()/1e3)+900;"sessionStorage"in window&&sessionStorage.setItem(J(e),JSON.stringify({value:t,exp:n}))},t.getFromCache=function(e){if("sessionStorage"in window)try{var t=JSON.parse(sessionStorage.getItem(J(e)));if(t){var n=t.value,r=t.exp;if(!(Math.floor((new Date).getTime()/1e3)>r))return n;Q(J(e))}}catch(e){}return null};var Q=function(e){"sessionStorage"in window&&sessionStorage.removeItem(J(e))};t.deleteFromCache=Q,t.isCartPage=function(){return"cart"===(0,v.getSetting)("stripeGeneralData").page},t.isCheckoutPage=function(){return"checkout"===(0,v.getSetting)("stripeGeneralData").page}},4184:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)&&n.length){var i=a.apply(null,n);i&&e.push(i)}else if("object"===o)for(var c in n)r.call(n,c)&&n[c]&&e.push(c)}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},1127:()=>{},7776:()=>{},4836:()=>{},85:()=>{},3110:()=>{},8356:()=>{},5773:()=>{},9509:()=>{},1530:()=>{},3139:()=>{}}]);
|
3 |
Â
//# sourceMappingURL=commons.js.map
|
packages/blocks/build/commons.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/asyncToGenerator.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/classCallCheck.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/construct.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/createClass.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/defineProperty.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/extends.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/getPrototypeOf.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/inherits.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/isNativeFunction.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/objectWithoutProperties.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/slicedToArray.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/typeof.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/wrapNativeSuper.js","webpack://wc_stripe.[name]/./node_modules/@stripe/react-stripe-js/dist/react-stripe.umd.js","webpack://wc_stripe.[name]/./node_modules/@stripe/stripe-js/dist/stripe.esm.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/components/checkout/checkbox/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/components/checkout/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/components/checkout/payment-method-label/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/components/checkout/payment-method/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/components/checkout/radio-control-accordion/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/components/checkout/radio-option/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/ach/hooks/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/ach/hooks/use-create-link-token.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/ach/hooks/use-initialize-plaid.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/ach/hooks/use-process-payment.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/ach/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/ach/payment-method.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/applepay/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/applepay/payment-method.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/credit-card/components/bootstrap/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/credit-card/components/custom-card-form.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/credit-card/components/simple/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/credit-card/components/stripe-card-form.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/credit-card/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/credit-card/payment-method.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/error-boundary.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/googlepay/button.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/googlepay/constants.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/googlepay/hooks/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/googlepay/hooks/use-error-message.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/googlepay/hooks/use-payment-request.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/googlepay/hooks/use-payments-client.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/googlepay/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/googlepay/payment-method.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/googlepay/util.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/hooks/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/hooks/use-after-process-payment.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/hooks/use-breakpoint-width.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/hooks/use-exported-values.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/hooks/use-payment-events.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/hooks/use-payment-request.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/hooks/use-process-checkout-error.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/hooks/use-process-payment-intent.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/hooks/use-setup-intent.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/hooks/use-stripe-error.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/alipay.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/bancontact.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/becs.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/eps.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/fpx.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/giropay.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/grabpay.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/hooks/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/hooks/use-after-process-local-payment.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/hooks/use-create-source.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/hooks/use-validate-checkout.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/ideal.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/klarna/categories.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/klarna/hooks/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/klarna/hooks/use-create-source.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/klarna/hooks/use-process-payment.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/klarna/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/klarna/loader.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/local-payment-method.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/multibanco.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/p24.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/sepa.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/sofort.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/wechat.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/payment-request/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/payment-request/payment-method.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/saved-card-component.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/util.js","webpack://wc_stripe.[name]/./node_modules/classnames/index.js"],"names":["module","exports","arr","len","length","i","arr2","Array","isArray","arrayLikeToArray","self","ReferenceError","asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","then","fn","this","args","arguments","apply","err","undefined","instance","Constructor","TypeError","setPrototypeOf","isNativeReflectConstruct","_construct","Parent","Class","Reflect","construct","a","push","Function","bind","prototype","_defineProperties","target","props","descriptor","enumerable","configurable","writable","Object","defineProperty","protoProps","staticProps","obj","_extends","assign","source","hasOwnProperty","call","_getPrototypeOf","o","getPrototypeOf","__proto__","subClass","superClass","create","constructor","__esModule","toString","indexOf","sham","Proxy","Date","e","iter","Symbol","iterator","from","_arr","_n","_d","_e","_s","_i","next","objectWithoutPropertiesLoose","excluded","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","sourceKeys","keys","_typeof","assertThisInitialized","_setPrototypeOf","p","arrayWithHoles","iterableToArrayLimit","unsupportedIterableToArray","nonIterableRest","arrayWithoutHoles","iterableToArray","nonIterableSpread","minLen","n","slice","name","test","isNativeFunction","_wrapNativeSuper","_cache","Map","has","get","set","Wrapper","React","_objectWithoutProperties","_objectWithoutPropertiesLoose","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_arrayLikeToArray","_unsupportedIterableToArray","_nonIterableRest","emptyFunction","emptyFunctionWithReset","resetWarningCache","propTypes","shim","propName","componentName","location","propFullName","secret","Error","getShim","isRequired","ReactPropTypes","array","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","factoryWithThrowingShims","isUnknownObject","raw","PLAIN_OBJECT_STR","isEqual","left","right","leftArray","leftPlainObject","leftKeys","rightKeys","keySet","allKeys","l","r","every","usePrevious","ref","useRef","useEffect","current","validateStripe","maybeStripe","elements","createToken","createPaymentMethod","confirmCardPayment","parseStripeProp","isPromise","tag","stripePromise","stripe","ElementsContext","createContext","displayName","Elements","_ref","rawStripeProp","options","children","_final","isMounted","parsed","useMemo","_React$useState2","useState","ctx","setContext","prevStripe","prevOptions","console","warn","anyStripe","_registerWrapper","version","createElement","Provider","useElementsContextWithUseCase","useCaseMessage","useCase","concat","parseElementsContext","useContext","ElementsConsumer","_ref2","useCallbackReference","cb","extractUpdateableOptions","paymentRequest","noop","createElementComponent","type","isServer","str","charAt","toUpperCase","Element","id","className","_ref$options","_ref$onBlur","onBlur","_ref$onFocus","onFocus","_ref$onReady","onReady","_ref$onChange","onChange","_ref$onEscape","onEscape","_ref$onClick","onClick","elementRef","domNode","callOnReady","callOnBlur","callOnFocus","callOnClick","callOnChange","callOnEscape","useLayoutEffect","mount","on","updateableOptions","update","destroy","__elementType","window","AuBankAccountElement","CardElement","CardNumberElement","CardExpiryElement","CardCvcElement","FpxBankElement","IbanElement","IdealBankElement","PaymentRequestButtonElement","useElements","useStripe","factory","V3_URL","V3_URL_REGEX","EXISTING_SCRIPT_MESSAGE","initStripe","startTime","registerWrapper","stripePromise$1","params","Stripe","script","scripts","document","querySelectorAll","src","findScript","queryString","advancedFraudSignals","headOrBody","head","body","appendChild","injectScript","addEventListener","loadCalled","loadStripe","_len","_key","now","label","checked","aria-hidden","xmlns","viewBox","d","title","icons","paymentMethod","components","Label","PaymentMethodLabel","Icons","PaymentMethodIcons","text","align","getData","content","Content","desc","el","childNodes","classList","add","Description","payment_method","RadioControlAccordion","option","RadioControlOption","event","setValidationError","linkToken","setLinkToken","useCallback","url","getRoute","method","data","response","token","storeInCache","getFromCache","linkHandler","resolvePopup","openLinkPopup","open","Plaid","clientName","env","product","selectAccount","countryCodes","onSuccess","publicToken","metaData","onExit","getErrorMessage","error_message","onPaymentProcessing","responseTypes","unsubscribe","result","deleteFromCache","ensureSuccessResponse","meta","paymentMethodData","JSON","stringify","ensureErrorResponse","getSettings","ACHPaymentContent","eventRegistration","emitResponse","onSubmit","onCheckoutAfterProcessingWithError","ValidationInputError","validationError","useCreateLinkToken","useProcessCheckoutError","subscriber","useInitializePlaid","useProcessPayment","isTestMode","ACHTestModeCredentials","errorMessage","__","registerPaymentMethod","ariaLabel","canMakePayment","cartTotals","currency_code","PaymentMethod","savedTokenComponent","edit","placeOrderButtonLabel","supports","showSavedCards","showSaveOption","features","ApplePayContent","ApplePayButton","onClose","billing","shippingData","activePaymentMethod","noticeContexts","useStripeError","exportedValues","useExportedValues","useExpressBreakpointWidth","width","setPaymentMethod","useProcessPaymentIntent","useAfterProcessingPayment","messageContext","EXPRESS_PAYMENTS","usePaymentRequest","canPay","applePay","handleClick","show","style","ApplePayEdit","registerExpressPaymentMethod","currency","total_price","country","toLowerCase","total","amount","parseInt","Bootstrap","CardIcon","htmlFor","registerCreditCardForm","breakpoint","component","classes","focus","empty","invalid","eventChange","innerWidth","cardType","setCardType","elementOrder","container","setContainer","getCreditCardForm","CardForm","postalCodeEnabled","forEach","setElementOrder","includes","useBreakpointWidth","getCardIconSrc","icon","cloneElement","brand","complete","idx","nextElement","getElement","sprintf","SimpleForm","data-tid","cardOptions","postalCode","billingData","postcode","hidePostalCode","isFieldRequired","iconStyle","CreditCardContent","setError","catch","CreditCardElement","savePaymentMethod","setSavePaymentMethod","getPaymentMethodArgs","elType","card","useSetupIntent","cartTotal","setupIntent","removeSetupIntent","Tag","CustomCardForm","StripeCardForm","isUserLoggedIn","customerId","SavePaymentMethod","state","hasError","errorInfo","setState","componentStack","Component","publishableKey","setErrorMessage","checkoutStatus","merchantInfo","merchantId","merchantName","buttonContainer","buttonType","usePaymentsClient","button","removeButton","append","parameters","allowedAuthMethods","allowedCardNetworks","assuranceDetailsRequired","apiVersion","apiVersionMinor","shippingRates","shippingAddress","processingCountry","totalPriceLabel","emailRequired","isEmpty","email","allowedPaymentMethods","tokenizationSpecification","gateway","BASE_PAYMENT_METHOD","shippingAddressRequired","needsShipping","transactionInfo","getTransactionInfo","callbackIntents","BASE_PAYMENT_REQUEST","billingAddressRequired","billingAddressParameters","format","phoneNumberRequired","phone","shippingOptionRequired","shippingOptionParameters","getShippingOptionParameters","shippingOptions","cartTotalItems","environment","paymentsClient","setPaymentsClient","setButton","currentBilling","currentShipping","addPaymentEvent","usePaymentEvents","setAddressData","paymentData","billingAddress","isAddressValid","phoneNumber","toCartAddress","parentElement","firstChild","removeChild","loadPaymentData","parse","tokenizationData","billing_details","getBillingDetailsFromAddress","StripeError","statusCode","log","createButton","paymentOptions","paymentDataCallbacks","onPaymentAuthorized","transactionState","onPaymentDataChanged","shipping","address","shippingOptionData","intermediateAddress","selectedRates","getSelectedShippingOption","addressEqual","getIntermediateAddress","shippingEqual","success","getPaymentRequestUpdate","reason","message","intent","setShippingAddress","setSelectedRates","google","payments","api","PaymentsClient","isReadyToPayRequest","isReadyToPay","GooglePayContent","useErrorMessage","GooglePayEdit","isCartPage","status","countryCode","currencyCode","code","totalPriceStatus","totalPrice","removeNumberPrecision","minorUnit","displayItems","getDisplayItems","newTransactionInfo","newShippingOptionParameters","unit","items","item","price","getShippingOptions","defaultSelectedOptionId","map","shift","shippingPackage","shipping_rates","rate","selected","getShippingOptionId","rate_id","rates","txt","innerHTML","formatPrice","description","first_name","split","join","last_name","pop","address1","address2","locality","administrativeArea","onCheckoutAfterProcessingWithSuccess","unsubscribeAfterProcessingWithSuccess","redirectUrl","handleCardAction","windowWidth","setWindowWith","getMaxWidth","maxWidth","setMaxWidth","clientWidth","remove","handleResize","removeEventListener","getElementById","parentNode","onShippingRateSuccess","onShippingRateFail","onShippingRateSelectSuccess","handler","setHandler","onShippingChanged","paymentEvents","setPaymentEvent","execute","removePaymentEvent","isSelectingRate","shippingRatesLoading","hasShippingRates","unsubscribeShippingRateSuccess","unsubscribeShippingRateSelectSuccess","unsubscribeShippingRateFail","hasInvalidAddress","setPaymentRequest","paymentRequestOptions","pending","requestPayerName","requestPayerEmail","requestPayerPhone","requestShipping","onShippingAddressChange","onShippingOptionChange","onPaymentMethodReceived","updatePaymentEvent","updateWith","shippingOption","paymentResponse","payerName","payerEmail","payerPhone","processingResponse","paymentDetails","stripeErrorMessage","ERROR","paymentType","currentPaymentMethodArgs","getCreatePaymentMethodArgs","getSuccessResponse","paymentMethodId","unsubscribeProcessingPayment","confirmCardSetup","client_secret","setSetupIntent","createSetupIntent","cartContainsPreOrder","cartContainsSubscription","LocalPaymentSourceContent","LocalPaymentIntentContent","confirmationMethod","currentBillingData","match","atob","decodeURIComponent","return_url","getSourceArgs","setSource","isValid","setIsValid","currentValues","getSourceArgsInternal","getDefaultSourceArgs","returnUrl","getSuccessData","sourceId","createSource","msg","categories","category","KlarnaPaymentCategory","Klarna","Payments","load","payment_method_category","abortController","AbortController","currentSourceArgs","oldSourceArgs","isLoading","setIsLoading","isCheckoutValid","getLineItems","quantity","source_order","klarna","locale","purchase_country","custom_payment_methods","shipping_first_name","shipping_last_name","city","line1","address_1","line2","address_2","postal_code","compareSourceArgs","args2","newArgs","getArgs","args1","updateSource","updates","source_id","abort","signal","reduce","k","paymentCategory","authorize","approved","KlarnaContainer","KlarnaPaymentMethod","setSelected","getCategoriesFromSource","paymentMethodCategories","payment_method_categories","useCreateSource","init","client_token","KlarnaPaymentCategories","KlarnaLoader","settings","requiredParams","callback","countries","LocalPaymentIntentMethod","LocalPaymentSourceMethod","LocalPaymentElementContainer","useValidateCheckout","useAfterProcessLocalPayment","PAYMENT","SepaPaymentMethod","mandate","notification_method","interval","sofort","WeChatComponent","WeChatPaymentMethod","deleteSourceFromStorage","QRCodeComponent","wechat","qr_code_url","height","colorDark","colorLight","correctLevel","QRCode","CorrectLevel","H","createSourceTimeoutId","clearTimeout","setTimeout","PaymentRequestContent","PaymentRequestButton","paymentRequestButton","PaymentRequestEdit","canvas","scale","devicePixelRatio","getContext","beginPath","arc","Math","PI","fillStyle","fill","handleSuccessResult","unsubscribeOnCheckoutAfterProcessingWithSuccess","getSetting","account","messages","countryLocale","SHIPPING_OPTION_REGEX","routes","creditCardForms","localPaymentMethods","PAYMENT_REQUEST_ADDRESS_MAPPINGS","recipient","addressLine","region","stripeAccount","route","SUCCESS","statusMessage","exclude","fields","getLocaleFields","entries","required","localeFields","default","field","packageIdx","filter","Boolean","syncPaymentIntentWithOrder","order_id","order_key","redirect","address_mappings","cartAddress","filterEmptyValues","cartKey","values","getCurrency","prefix","suffix","decimalSeparator","thousandSeparator","fractional","index","replace","substr","RegExp","sort","packageId","rateId","cartItems","pre_order","subscription","owner","mode","getCacheKey","exp","floor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(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}\n\nmodule.exports = _asyncToGenerator;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","var setPrototypeOf = require(\"./setPrototypeOf\");\n\nvar isNativeReflectConstruct = require(\"./isNativeReflectConstruct\");\n\nfunction _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n module.exports = _construct = Reflect.construct;\n } else {\n module.exports = _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}\n\nmodule.exports = _construct;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;","function _extends() {\n module.exports = _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nmodule.exports = _extends;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;","var setPrototypeOf = require(\"./setPrototypeOf\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nmodule.exports = _interopRequireDefault;","function _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}\n\nmodule.exports = _isNativeFunction;","function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nmodule.exports = _isNativeReflectConstruct;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;","var objectWithoutPropertiesLoose = require(\"./objectWithoutPropertiesLoose\");\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutProperties;","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutPropertiesLoose;","var _typeof = require(\"@babel/runtime/helpers/typeof\");\n\nvar assertThisInitialized = require(\"./assertThisInitialized\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","var arrayWithoutHoles = require(\"./arrayWithoutHoles\");\n\nvar iterableToArray = require(\"./iterableToArray\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;","var getPrototypeOf = require(\"./getPrototypeOf\");\n\nvar setPrototypeOf = require(\"./setPrototypeOf\");\n\nvar isNativeFunction = require(\"./isNativeFunction\");\n\nvar construct = require(\"./construct\");\n\nfunction _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n\n _cache.set(Class, Wrapper);\n }\n\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n\n return _wrapNativeSuper(Class);\n}\n\nmodule.exports = _wrapNativeSuper;","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :\n typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :\n (global = global || self, factory(global.ReactStripe = {}, global.React));\n}(this, (function (exports, React) { 'use strict';\n\n React = React && Object.prototype.hasOwnProperty.call(React, 'default') ? React['default'] : React;\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n }\n\n function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n }\n\n function _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n }\n\n function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n }\n\n function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n }\n\n function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n\n function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n function createCommonjsModule(fn, module) {\n \treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n }\n\n /**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n var ReactPropTypesSecret_1 = ReactPropTypesSecret;\n\n function emptyFunction() {}\n\n function emptyFunctionWithReset() {}\n\n emptyFunctionWithReset.resetWarningCache = emptyFunction;\n\n var factoryWithThrowingShims = function () {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret_1) {\n // It is still safe when called from React.\n return;\n }\n\n var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');\n err.name = 'Invariant Violation';\n throw err;\n }\n shim.isRequired = shim;\n\n function getShim() {\n return shim;\n }\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n ReactPropTypes.PropTypes = ReactPropTypes;\n return ReactPropTypes;\n };\n\n var propTypes = createCommonjsModule(function (module) {\n /**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = factoryWithThrowingShims();\n }\n });\n\n var isUnknownObject = function isUnknownObject(raw) {\n return raw !== null && _typeof(raw) === 'object';\n };\n var isPromise = function isPromise(raw) {\n return isUnknownObject(raw) && typeof raw.then === 'function';\n }; // We are using types to enforce the `stripe` prop in this lib,\n // but in an untyped integration `stripe` could be anything, so we need\n // to do some sanity validation to prevent type errors.\n\n var isStripe = function isStripe(raw) {\n return isUnknownObject(raw) && typeof raw.elements === 'function' && typeof raw.createToken === 'function' && typeof raw.createPaymentMethod === 'function' && typeof raw.confirmCardPayment === 'function';\n };\n\n var PLAIN_OBJECT_STR = '[object Object]';\n var isEqual = function isEqual(left, right) {\n if (!isUnknownObject(left) || !isUnknownObject(right)) {\n return left === right;\n }\n\n var leftArray = Array.isArray(left);\n var rightArray = Array.isArray(right);\n if (leftArray !== rightArray) return false;\n var leftPlainObject = Object.prototype.toString.call(left) === PLAIN_OBJECT_STR;\n var rightPlainObject = Object.prototype.toString.call(right) === PLAIN_OBJECT_STR;\n if (leftPlainObject !== rightPlainObject) return false;\n if (!leftPlainObject && !leftArray) return false;\n var leftKeys = Object.keys(left);\n var rightKeys = Object.keys(right);\n if (leftKeys.length !== rightKeys.length) return false;\n var keySet = {};\n\n for (var i = 0; i < leftKeys.length; i += 1) {\n keySet[leftKeys[i]] = true;\n }\n\n for (var _i = 0; _i < rightKeys.length; _i += 1) {\n keySet[rightKeys[_i]] = true;\n }\n\n var allKeys = Object.keys(keySet);\n\n if (allKeys.length !== leftKeys.length) {\n return false;\n }\n\n var l = left;\n var r = right;\n\n var pred = function pred(key) {\n return isEqual(l[key], r[key]);\n };\n\n return allKeys.every(pred);\n };\n\n var usePrevious = function usePrevious(value) {\n var ref = React.useRef(value);\n React.useEffect(function () {\n ref.current = value;\n }, [value]);\n return ref.current;\n };\n\n var INVALID_STRIPE_ERROR = 'Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.'; // We are using types to enforce the `stripe` prop in this lib, but in a real\n // integration `stripe` could be anything, so we need to do some sanity\n // validation to prevent type errors.\n\n var validateStripe = function validateStripe(maybeStripe) {\n if (maybeStripe === null || isStripe(maybeStripe)) {\n return maybeStripe;\n }\n\n throw new Error(INVALID_STRIPE_ERROR);\n };\n\n var parseStripeProp = function parseStripeProp(raw) {\n if (isPromise(raw)) {\n return {\n tag: 'async',\n stripePromise: Promise.resolve(raw).then(validateStripe)\n };\n }\n\n var stripe = validateStripe(raw);\n\n if (stripe === null) {\n return {\n tag: 'empty'\n };\n }\n\n return {\n tag: 'sync',\n stripe: stripe\n };\n };\n\n var ElementsContext = /*#__PURE__*/React.createContext(null);\n ElementsContext.displayName = 'ElementsContext';\n var parseElementsContext = function parseElementsContext(ctx, useCase) {\n if (!ctx) {\n throw new Error(\"Could not find Elements context; You need to wrap the part of your app that \".concat(useCase, \" in an <Elements> provider.\"));\n }\n\n return ctx;\n };\n /**\n * The `Elements` provider allows you to use [Element components](https://stripe.com/docs/stripe-js/react#element-components) and access the [Stripe object](https://stripe.com/docs/js/initializing) in any nested component.\n * Render an `Elements` provider at the root of your React app so that it is available everywhere you need it.\n *\n * To use the `Elements` provider, call `loadStripe` from `@stripe/stripe-js` with your publishable key.\n * The `loadStripe` function will asynchronously load the Stripe.js script and initialize a `Stripe` object.\n * Pass the returned `Promise` to `Elements`.\n *\n * @docs https://stripe.com/docs/stripe-js/react#elements-provider\n */\n\n var Elements = function Elements(_ref) {\n var rawStripeProp = _ref.stripe,\n options = _ref.options,\n children = _ref.children;\n\n var _final = React.useRef(false);\n\n var isMounted = React.useRef(true);\n var parsed = React.useMemo(function () {\n return parseStripeProp(rawStripeProp);\n }, [rawStripeProp]);\n\n var _React$useState = React.useState(function () {\n return {\n stripe: null,\n elements: null\n };\n }),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n ctx = _React$useState2[0],\n setContext = _React$useState2[1];\n\n var prevStripe = usePrevious(rawStripeProp);\n var prevOptions = usePrevious(options);\n\n if (prevStripe !== null) {\n if (prevStripe !== rawStripeProp) {\n console.warn('Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.');\n }\n\n if (!isEqual(options, prevOptions)) {\n console.warn('Unsupported prop change on Elements: You cannot change the `options` prop after setting the `stripe` prop.');\n }\n }\n\n if (!_final.current) {\n if (parsed.tag === 'sync') {\n _final.current = true;\n setContext({\n stripe: parsed.stripe,\n elements: parsed.stripe.elements(options)\n });\n }\n\n if (parsed.tag === 'async') {\n _final.current = true;\n parsed.stripePromise.then(function (stripe) {\n if (stripe && isMounted.current) {\n // Only update Elements context if the component is still mounted\n // and stripe is not null. We allow stripe to be null to make\n // handling SSR easier.\n setContext({\n stripe: stripe,\n elements: stripe.elements(options)\n });\n }\n });\n }\n }\n\n React.useEffect(function () {\n return function () {\n isMounted.current = false;\n };\n }, []);\n React.useEffect(function () {\n var anyStripe = ctx.stripe;\n\n if (!anyStripe || !anyStripe._registerWrapper) {\n return;\n }\n\n anyStripe._registerWrapper({\n name: 'react-stripe-js',\n version: \"1.2.2\"\n });\n }, [ctx.stripe]);\n return /*#__PURE__*/React.createElement(ElementsContext.Provider, {\n value: ctx\n }, children);\n };\n Elements.propTypes = {\n stripe: propTypes.any,\n options: propTypes.object\n };\n var useElementsContextWithUseCase = function useElementsContextWithUseCase(useCaseMessage) {\n var ctx = React.useContext(ElementsContext);\n return parseElementsContext(ctx, useCaseMessage);\n };\n /**\n * @docs https://stripe.com/docs/stripe-js/react#useelements-hook\n */\n\n var useElements = function useElements() {\n var _useElementsContextWi = useElementsContextWithUseCase('calls useElements()'),\n elements = _useElementsContextWi.elements;\n\n return elements;\n };\n /**\n * @docs https://stripe.com/docs/stripe-js/react#usestripe-hook\n */\n\n var useStripe = function useStripe() {\n var _useElementsContextWi2 = useElementsContextWithUseCase('calls useStripe()'),\n stripe = _useElementsContextWi2.stripe;\n\n return stripe;\n };\n /**\n * @docs https://stripe.com/docs/stripe-js/react#elements-consumer\n */\n\n var ElementsConsumer = function ElementsConsumer(_ref2) {\n var children = _ref2.children;\n var ctx = useElementsContextWithUseCase('mounts <ElementsConsumer>'); // Assert to satisfy the busted React.FC return type (it should be ReactNode)\n\n return children(ctx);\n };\n ElementsConsumer.propTypes = {\n children: propTypes.func.isRequired\n };\n\n var useCallbackReference = function useCallbackReference(cb) {\n var ref = React.useRef(cb);\n React.useEffect(function () {\n ref.current = cb;\n }, [cb]);\n return function () {\n if (ref.current) {\n ref.current.apply(ref, arguments);\n }\n };\n };\n\n var extractUpdateableOptions = function extractUpdateableOptions(options) {\n if (!isUnknownObject(options)) {\n return {};\n }\n\n var _ = options.paymentRequest,\n rest = _objectWithoutProperties(options, [\"paymentRequest\"]);\n\n return rest;\n };\n\n var noop = function noop() {};\n\n var capitalized = function capitalized(str) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n };\n\n var createElementComponent = function createElementComponent(type, isServer) {\n var displayName = \"\".concat(capitalized(type), \"Element\");\n\n var ClientElement = function ClientElement(_ref) {\n var id = _ref.id,\n className = _ref.className,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options,\n _ref$onBlur = _ref.onBlur,\n onBlur = _ref$onBlur === void 0 ? noop : _ref$onBlur,\n _ref$onFocus = _ref.onFocus,\n onFocus = _ref$onFocus === void 0 ? noop : _ref$onFocus,\n _ref$onReady = _ref.onReady,\n onReady = _ref$onReady === void 0 ? noop : _ref$onReady,\n _ref$onChange = _ref.onChange,\n onChange = _ref$onChange === void 0 ? noop : _ref$onChange,\n _ref$onEscape = _ref.onEscape,\n onEscape = _ref$onEscape === void 0 ? noop : _ref$onEscape,\n _ref$onClick = _ref.onClick,\n onClick = _ref$onClick === void 0 ? noop : _ref$onClick;\n\n var _useElementsContextWi = useElementsContextWithUseCase(\"mounts <\".concat(displayName, \">\")),\n elements = _useElementsContextWi.elements;\n\n var elementRef = React.useRef(null);\n var domNode = React.useRef(null);\n var callOnReady = useCallbackReference(onReady);\n var callOnBlur = useCallbackReference(onBlur);\n var callOnFocus = useCallbackReference(onFocus);\n var callOnClick = useCallbackReference(onClick);\n var callOnChange = useCallbackReference(onChange);\n var callOnEscape = useCallbackReference(onEscape);\n React.useLayoutEffect(function () {\n if (elementRef.current == null && elements && domNode.current != null) {\n var element = elements.create(type, options);\n elementRef.current = element;\n element.mount(domNode.current);\n element.on('ready', function () {\n return callOnReady(element);\n });\n element.on('change', callOnChange);\n element.on('blur', callOnBlur);\n element.on('focus', callOnFocus);\n element.on('escape', callOnEscape); // Users can pass an an onClick prop on any Element component\n // just as they could listen for the `click` event on any Element,\n // but only the PaymentRequestButton will actually trigger the event.\n\n element.on('click', callOnClick);\n }\n });\n var prevOptions = React.useRef(options);\n React.useEffect(function () {\n if (prevOptions.current && prevOptions.current.paymentRequest !== options.paymentRequest) {\n console.warn('Unsupported prop change: options.paymentRequest is not a customizable property.');\n }\n\n var updateableOptions = extractUpdateableOptions(options);\n\n if (Object.keys(updateableOptions).length !== 0 && !isEqual(updateableOptions, extractUpdateableOptions(prevOptions.current))) {\n if (elementRef.current) {\n elementRef.current.update(updateableOptions);\n prevOptions.current = options;\n }\n }\n }, [options]);\n React.useLayoutEffect(function () {\n return function () {\n if (elementRef.current) {\n elementRef.current.destroy();\n }\n };\n }, []);\n return /*#__PURE__*/React.createElement(\"div\", {\n id: id,\n className: className,\n ref: domNode\n });\n }; // Only render the Element wrapper in a server environment.\n\n\n var ServerElement = function ServerElement(props) {\n // Validate that we are in the right context by calling useElementsContextWithUseCase.\n useElementsContextWithUseCase(\"mounts <\".concat(displayName, \">\"));\n var id = props.id,\n className = props.className;\n return /*#__PURE__*/React.createElement(\"div\", {\n id: id,\n className: className\n });\n };\n\n var Element = isServer ? ServerElement : ClientElement;\n Element.propTypes = {\n id: propTypes.string,\n className: propTypes.string,\n onChange: propTypes.func,\n onBlur: propTypes.func,\n onFocus: propTypes.func,\n onReady: propTypes.func,\n onClick: propTypes.func,\n options: propTypes.object\n };\n Element.displayName = displayName;\n Element.__elementType = type;\n return Element;\n };\n\n var isServer = typeof window === 'undefined';\n /**\n * Requires beta access:\n * Contact [Stripe support](https://support.stripe.com/) for more information.\n *\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var AuBankAccountElement = createElementComponent('auBankAccount', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var CardElement = createElementComponent('card', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var CardNumberElement = createElementComponent('cardNumber', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var CardExpiryElement = createElementComponent('cardExpiry', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var CardCvcElement = createElementComponent('cardCvc', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var FpxBankElement = createElementComponent('fpxBank', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var IbanElement = createElementComponent('iban', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var IdealBankElement = createElementComponent('idealBank', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var PaymentRequestButtonElement = createElementComponent('paymentRequestButton', isServer);\n\n exports.AuBankAccountElement = AuBankAccountElement;\n exports.CardCvcElement = CardCvcElement;\n exports.CardElement = CardElement;\n exports.CardExpiryElement = CardExpiryElement;\n exports.CardNumberElement = CardNumberElement;\n exports.Elements = Elements;\n exports.ElementsConsumer = ElementsConsumer;\n exports.FpxBankElement = FpxBankElement;\n exports.IbanElement = IbanElement;\n exports.IdealBankElement = IdealBankElement;\n exports.PaymentRequestButtonElement = PaymentRequestButtonElement;\n exports.useElements = useElements;\n exports.useStripe = useStripe;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n","var V3_URL = 'https://js.stripe.com/v3';\nvar V3_URL_REGEX = /^https:\\/\\/js\\.stripe\\.com\\/v3\\/?(\\?.*)?$/;\nvar EXISTING_SCRIPT_MESSAGE = 'loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used';\nvar findScript = function findScript() {\n var scripts = document.querySelectorAll(\"script[src^=\\\"\".concat(V3_URL, \"\\\"]\"));\n\n for (var i = 0; i < scripts.length; i++) {\n var script = scripts[i];\n\n if (!V3_URL_REGEX.test(script.src)) {\n continue;\n }\n\n return script;\n }\n\n return null;\n};\n\nvar injectScript = function injectScript(params) {\n var queryString = params && !params.advancedFraudSignals ? '?advancedFraudSignals=false' : '';\n var script = document.createElement('script');\n script.src = \"\".concat(V3_URL).concat(queryString);\n var headOrBody = document.head || document.body;\n\n if (!headOrBody) {\n throw new Error('Expected document.body not to be null. Stripe.js requires a <body> element.');\n }\n\n headOrBody.appendChild(script);\n return script;\n};\n\nvar registerWrapper = function registerWrapper(stripe, startTime) {\n if (!stripe || !stripe._registerWrapper) {\n return;\n }\n\n stripe._registerWrapper({\n name: 'stripe-js',\n version: \"1.12.1\",\n startTime: startTime\n });\n};\n\nvar stripePromise = null;\nvar loadScript = function loadScript(params) {\n // Ensure that we only attempt to load Stripe.js at most once\n if (stripePromise !== null) {\n return stripePromise;\n }\n\n stripePromise = new Promise(function (resolve, reject) {\n if (typeof window === 'undefined') {\n // Resolve to null when imported server side. This makes the module\n // safe to import in an isomorphic code base.\n resolve(null);\n return;\n }\n\n if (window.Stripe && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n }\n\n if (window.Stripe) {\n resolve(window.Stripe);\n return;\n }\n\n try {\n var script = findScript();\n\n if (script && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n } else if (!script) {\n script = injectScript(params);\n }\n\n script.addEventListener('load', function () {\n if (window.Stripe) {\n resolve(window.Stripe);\n } else {\n reject(new Error('Stripe.js not available'));\n }\n });\n script.addEventListener('error', function () {\n reject(new Error('Failed to load Stripe.js'));\n });\n } catch (error) {\n reject(error);\n return;\n }\n });\n return stripePromise;\n};\nvar initStripe = function initStripe(maybeStripe, args, startTime) {\n if (maybeStripe === null) {\n return null;\n }\n\n var stripe = maybeStripe.apply(undefined, args);\n registerWrapper(stripe, startTime);\n return stripe;\n};\n\n// own script injection.\n\nvar stripePromise$1 = Promise.resolve().then(function () {\n return loadScript(null);\n});\nvar loadCalled = false;\nstripePromise$1[\"catch\"](function (err) {\n if (!loadCalled) {\n console.warn(err);\n }\n});\nvar loadStripe = function loadStripe() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n loadCalled = true;\n var startTime = Date.now();\n return stripePromise$1.then(function (maybeStripe) {\n return initStripe(maybeStripe, args, startTime);\n });\n};\n\nexport { loadStripe };\n","import classNames from 'classnames';\r\nimport './styles.scss';\r\n\r\nexport const SavePaymentMethod = ({label, onChange, checked}) => {\r\n return (\r\n <div className='wc-stripe-save-payment-method'>\r\n <label>\r\n <input type='checkbox' onChange={(e) => onChange(e.target.checked)}/>\r\n <svg\r\n className={classNames('wc-stripe-components-checkbox__mark', {checked: checked})}\r\n aria-hidden=\"true\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 24 20\">\r\n <path d=\"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z\"/>\r\n </svg>\r\n </label>\r\n <span>{label}</span>\r\n </div>\r\n )\r\n}","export * from './payment-method-label';\r\nexport * from './checkbox';\r\nexport * from './radio-option';\r\nexport * from './payment-method';","import './style.scss';\r\n\r\nexport const PaymentMethodLabel = ({title, icons, paymentMethod, ...props}) => {\r\n const {PaymentMethodLabel: Label, PaymentMethodIcons: Icons} = props.components;\r\n if (!Array.isArray(icons)) {\r\n icons = [icons];\r\n }\r\n return (\r\n <span className={`wc-stripe-label-container ${paymentMethod}`}>\r\n <Label text={title}/>\r\n <Icons icons={icons} align='left'/>\r\n </span>\r\n )\r\n}","import {useState, useEffect, useRef} from '@wordpress/element';\r\n\r\nexport const PaymentMethod = ({getData, content, ...props}) => {\r\n const Content = content;\r\n const desc = getData('description');\r\n const el = useRef(null);\r\n useEffect(() => {\r\n if (el.current && el.current.childNodes.length == 0) {\r\n el.current.classList.add('no-content');\r\n }\r\n });\r\n return (\r\n <>\r\n {desc && <Description desc={desc} payment_method={getData('name')}/>}\r\n <div ref={el} className='wc-stripe-blocks-payment-method-content'>\r\n <Content {...{...props, getData}}/>\r\n </div>\r\n </>);\r\n}\r\n\r\nconst Description = ({desc, payment_method}) => {\r\n return (\r\n <div className={`wc-stripe-blocks-payment-method__desc ${payment_method}`}>\r\n <span>{desc}</span>\r\n </div>\r\n )\r\n}","import RadioControlOption from '../radio-option';\r\nimport classnames from 'classnames';\r\n\r\nexport const RadioControlAccordion = ({option, checked, onChange}) => {\r\n const {label, value} = option;\r\n return (\r\n <div className='wc-stripe-blocks-radio-accordion'>\r\n <RadioControlOption checked={checked} onChange={onChange} value={value} label={label}/>\r\n <div\r\n className={classnames('wc-stripe-blocks-radio-accordion__content', {\r\n 'wc-stripe-blocks-radio-accordion__content-visible': checked\r\n })}>\r\n {option.content}\r\n </div>\r\n </div>\r\n\r\n )\r\n}\r\n\r\nexport default RadioControlAccordion;","import classnames from 'classnames';\r\n\r\nexport const RadioControlOption = ({checked, onChange, value, label}) => {\r\n return (\r\n <label\r\n className={classnames('wc-stripe-blocks-radio-control__option', {\r\n 'wc-stripe-blocks-radio-control__option-checked': checked\r\n })}>\r\n <input\r\n className='wc-stripe-blocks-radio-control__input'\r\n type='radio'\r\n value={value}\r\n checked={checked}\r\n onChange={(event) => onChange(event.target.value)}/>\r\n <div className='wc-stripe-blocks-radio-control__label'>\r\n <span>{label}</span>\r\n </div>\r\n </label>\r\n )\r\n}\r\n\r\nexport default RadioControlOption;","export * from './use-create-link-token';\r\nexport * from './use-initialize-plaid';\r\nexport * from './use-process-payment';","import {useEffect, useState, useCallback} from '@wordpress/element';\r\nimport apiFetch from '@wordpress/api-fetch';\r\nimport {getRoute, getFromCache, storeInCache} from '../../util';\r\n\r\nexport const useCreateLinkToken = (\r\n {\r\n setValidationError\r\n }) => {\r\n const [linkToken, setLinkToken] = useState(false);\r\n\r\n const createToken = useCallback(async () => {\r\n try {\r\n const response = await apiFetch({\r\n url: getRoute('create/linkToken'),\r\n method: 'POST',\r\n data: {}\r\n });\r\n if (response.token) {\r\n storeInCache('linkToken', response.token);\r\n setLinkToken(response.token);\r\n }\r\n } catch (err) {\r\n setValidationError(err);\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!linkToken) {\r\n const token = getFromCache('linkToken');\r\n if (token) {\r\n // cached token exist so use it\r\n setLinkToken(token);\r\n } else {\r\n // create the Plaid Link token\r\n createToken();\r\n }\r\n }\r\n }, [\r\n linkToken,\r\n setLinkToken\r\n ]);\r\n return linkToken;\r\n}","import {useState, useEffect, useRef, useCallback} from '@wordpress/element';\r\nimport Plaid from '@plaid';\r\nimport {getErrorMessage} from \"../../util\";\r\n\r\nexport const useInitializePlaid = (\r\n {\r\n getData,\r\n linkToken\r\n }) => {\r\n const linkHandler = useRef(null);\r\n const resolvePopup = useRef(null);\r\n const openLinkPopup = useCallback(() => new Promise((resolve, reject) => {\r\n resolvePopup.current = {resolve, reject};\r\n linkHandler.current.open();\r\n }), []);\r\n\r\n // if the token exists, initialize Plaid's link handler\r\n useEffect(() => {\r\n if (linkToken) {\r\n linkHandler.current = Plaid.create({\r\n clientName: getData('clientName'),\r\n env: getData('plaidEnvironment'),\r\n product: ['auth'],\r\n token: linkToken,\r\n selectAccount: true,\r\n countryCodes: ['US'],\r\n onSuccess: (publicToken, metaData) => {\r\n resolvePopup.current.resolve({publicToken, metaData});\r\n },\r\n onExit: (err) => {\r\n resolvePopup.current.reject(err ? getErrorMessage(err.error_message) : false);\r\n }\r\n });\r\n }\r\n }, [linkToken]);\r\n\r\n return openLinkPopup;\r\n}","import {useEffect, useCallback} from '@wordpress/element';\r\nimport {ensureSuccessResponse, ensureErrorResponse, deleteFromCache} from \"../../util\";\r\n\r\nexport const useProcessPayment = (\r\n {\r\n openLinkPopup,\r\n onPaymentProcessing,\r\n responseTypes,\r\n paymentMethod\r\n\r\n }) => {\r\n\r\n useEffect(() => {\r\n const unsubscribe = onPaymentProcessing(async () => {\r\n try {\r\n // open the Plaid popup\r\n const result = await openLinkPopup();\r\n const {publicToken, metaData} = result;\r\n // remove the cached link token.\r\n deleteFromCache('linkToken');\r\n return ensureSuccessResponse(responseTypes, {\r\n meta: {\r\n paymentMethodData: {\r\n [`${paymentMethod}_token_key`]: publicToken,\r\n [`${paymentMethod}_metadata`]: JSON.stringify(metaData)\r\n }\r\n }\r\n });\r\n } catch (err) {\r\n return ensureErrorResponse(responseTypes, err);\r\n }\r\n });\r\n return () => unsubscribe();\r\n }, [\r\n onPaymentProcessing,\r\n responseTypes,\r\n openLinkPopup\r\n ]);\r\n}","import './styles.scss';\r\nimport './payment-method'","import {useState} from '@wordpress/element';\r\nimport {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings, isTestMode} from '../util';\r\nimport {PaymentMethodLabel, PaymentMethod} from '../../components/checkout';\r\nimport SavedCardComponent from '../saved-card-component';\r\nimport {useCreateLinkToken, useInitializePlaid, useProcessPayment} from './hooks';\r\nimport {useProcessCheckoutError} from \"../hooks\";\r\nimport {__} from '@wordpress/i18n';\r\n\r\nconst getData = getSettings('stripe_ach_data');\r\n\r\nconst ACHPaymentContent = (\r\n {\r\n getData,\r\n eventRegistration,\r\n components,\r\n emitResponse,\r\n onSubmit,\r\n ...props\r\n }) => {\r\n const {responseTypes} = emitResponse;\r\n const {onPaymentProcessing, onCheckoutAfterProcessingWithError} = eventRegistration;\r\n const {ValidationInputError} = components;\r\n const [validationError, setValidationError] = useState(false);\r\n\r\n const linkToken = useCreateLinkToken({setValidationError});\r\n\r\n useProcessCheckoutError({\r\n responseTypes,\r\n subscriber: onCheckoutAfterProcessingWithError\r\n });\r\n\r\n const openLinkPopup = useInitializePlaid({\r\n getData,\r\n linkToken,\r\n onSubmit\r\n });\r\n\r\n useProcessPayment({\r\n openLinkPopup,\r\n onPaymentProcessing,\r\n responseTypes,\r\n paymentMethod: getData('name')\r\n });\r\n return (\r\n <>\r\n {isTestMode && <ACHTestModeCredentials/>}\r\n {validationError && <ValidationInputError errorMessage={validationError}/>}\r\n </>\r\n )\r\n}\r\n\r\nconst ACHTestModeCredentials = () => {\r\n return (\r\n <div className='wc-stripe-blocks-ach__creds'>\r\n <label className='wc-stripe-blocks-ach__creds-label'>{__('Test Credentials', 'woo-stripe-payment')}</label>\r\n <div className='wc-stripe-blocks-ach__username'>\r\n <div>\r\n <strong>{__('username', 'woo-stripe-payment')}</strong>: user_good\r\n </div>\r\n <div>\r\n <strong>{__('password', 'woo-stripe-payment')}</strong>: pass_good\r\n </div>\r\n <div>\r\n <strong>{__('pin', 'woo-stripe-payment')}</strong>: credential_good\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n\r\nregisterPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icons')}/>,\r\n ariaLabel: 'ACH Payment',\r\n canMakePayment: ({cartTotals}) => cartTotals.currency_code === 'USD',\r\n content: <PaymentMethod\r\n getData={getData}\r\n content={ACHPaymentContent}/>,\r\n savedTokenComponent: <SavedCardComponent getData={getData}/>,\r\n edit: <ACHPaymentContent getData={getData}/>,\r\n placeOrderButtonLabel: getData('placeOrderButtonLabel'),\r\n supports: {\r\n showSavedCards: getData('showSavedCards'),\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n})","import './style.scss';\r\n\r\nimport './payment-method';","import {useCallback} from '@wordpress/element';\r\nimport {registerExpressPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings, initStripe as loadStripe, canMakePayment} from \"../util\";\r\nimport {Elements, PaymentRequestButtonElement, useStripe} from \"@stripe/react-stripe-js\";\r\nimport ErrorBoundary from \"../error-boundary\";\r\nimport {\r\n usePaymentRequest,\r\n useProcessPaymentIntent,\r\n useExportedValues,\r\n useAfterProcessingPayment,\r\n useStripeError,\r\n useExpressBreakpointWidth\r\n} from '../hooks';\r\n\r\nconst getData = getSettings('stripe_applepay_data');\r\n\r\nconst ApplePayContent = (props) => {\r\n return (\r\n <ErrorBoundary>\r\n <div className='wc-stripe-apple-pay-container'>\r\n <Elements stripe={loadStripe}>\r\n <ApplePayButton {...props}/>\r\n </Elements>\r\n </div>\r\n </ErrorBoundary>\r\n );\r\n}\r\n\r\nconst ApplePayButton = (\r\n {\r\n getData,\r\n onClick,\r\n onClose,\r\n billing,\r\n shippingData,\r\n eventRegistration,\r\n emitResponse,\r\n onSubmit,\r\n activePaymentMethod,\r\n ...props\r\n }) => {\r\n const {onPaymentProcessing} = eventRegistration;\r\n const {responseTypes, noticeContexts} = emitResponse;\r\n const stripe = useStripe();\r\n const [error] = useStripeError();\r\n const canPay = (result) => result != null && result.applePay;\r\n const exportedValues = useExportedValues();\r\n useExpressBreakpointWidth({payment_method: getData('name'), width: 300});\r\n const {setPaymentMethod} = useProcessPaymentIntent({\r\n getData,\r\n billing,\r\n shippingData,\r\n onPaymentProcessing,\r\n emitResponse,\r\n error,\r\n onSubmit,\r\n activePaymentMethod,\r\n exportedValues\r\n });\r\n useAfterProcessingPayment({\r\n getData,\r\n eventRegistration,\r\n responseTypes,\r\n activePaymentMethod,\r\n messageContext: noticeContexts.EXPRESS_PAYMENTS\r\n });\r\n const {paymentRequest} = usePaymentRequest({\r\n getData,\r\n onClose,\r\n stripe,\r\n billing,\r\n shippingData,\r\n eventRegistration,\r\n setPaymentMethod,\r\n exportedValues,\r\n canPay\r\n });\r\n\r\n const handleClick = useCallback(() => {\r\n if (paymentRequest) {\r\n onClick();\r\n paymentRequest.show();\r\n }\r\n }, [paymentRequest]);\r\n\r\n if (paymentRequest) {\r\n return (\r\n <button\r\n className={`apple-pay-button ${getData('buttonStyle')}`}\r\n style={{\r\n '-apple-pay-button-type': getData('buttonType')\r\n }}\r\n onClick={handleClick}/>\r\n\r\n )\r\n }\r\n return null;\r\n}\r\n\r\nconst ApplePayEdit = ({getData, ...props}) => {\r\n return (\r\n <div className={'apple-pay-block-editor'}>\r\n <img src={getData('editorIcon')}/>\r\n </div>\r\n )\r\n}\r\n\r\nregisterExpressPaymentMethod({\r\n name: getData('name'),\r\n canMakePayment: ({cartTotals, ...props}) => {\r\n if (getData('isAdmin')) {\r\n return true;\r\n }\r\n const {currency_code: currency, total_price} = cartTotals;\r\n return canMakePayment({\r\n country: getData('countryCode'),\r\n currency: currency.toLowerCase(),\r\n total: {\r\n label: getData('totalLabel'),\r\n amount: parseInt(total_price)\r\n }\r\n }, (result) => result != null && result.applePay);\r\n },\r\n content: <ApplePayContent getData={getData}/>,\r\n edit: <ApplePayEdit getData={getData}/>,\r\n supports: {\r\n showSavedCards: getData('showSavedCards'),\r\n showSaveOption: getData('showSaveOption'),\r\n features: getData('features')\r\n }\r\n})","import './style.scss';\r\nimport {registerCreditCardForm} from \"@paymentplugins/stripe/util\";\r\nimport {CardNumberElement, CardExpiryElement, CardCvcElement} from '@stripe/react-stripe-js';\r\nimport {__} from \"@wordpress/i18n\";\r\n\r\nconst Bootstrap = ({CardIcon, options, onChange}) => {\r\n return (\r\n <div className='wc-stripe-bootstrap-form'>\r\n <div className='row'>\r\n <div className='col-md-6 mb-3'>\r\n <CardNumberElement className='md-form md-outline stripe-input' options={options['cardNumber']}\r\n onChange={onChange(CardNumberElement)}/>\r\n <label htmlFor=\"stripe-card-number\">{__('Card Number', 'woo-stripe-payment')}</label>\r\n {CardIcon}\r\n </div>\r\n <div className='col-md-3 mb-3'>\r\n <CardExpiryElement className='md-form md-outline stripe-input' options={options['cardExpiry']}\r\n onChange={onChange(CardExpiryElement)}/>\r\n <label htmlFor=\"stripe-exp\">{__('Exp', 'woo-stripe-payment')}</label>\r\n </div>\r\n <div className='col-md-3 mb-3'>\r\n <CardCvcElement className=\"md-form md-outline stripe-input\" options={options['cardCvc']}\r\n onChange={onChange(CardCvcElement)}/>\r\n <label htmlFor=\"stripe-cvv\">{__('CVV', 'woo-stripe-payment')}</label>\r\n </div>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nregisterCreditCardForm({\r\n id: 'bootstrap',\r\n breakpoint: 475,\r\n component: <Bootstrap/>\r\n})","import {getCreditCardForm} from \"../../util\";\r\nimport {cloneElement, useRef, useCallback, useEffect, useState} from '@wordpress/element';\r\nimport {useElements, CardNumberElement, CardExpiryElement, CardCvcElement} from '@stripe/react-stripe-js';\r\nimport {sprintf, __} from '@wordpress/i18n';\r\nimport {useBreakpointWidth} from \"../../hooks\";\r\n\r\nconst classes = {\r\n focus: 'focused',\r\n empty: 'empty',\r\n invalid: 'invalid'\r\n}\r\n\r\nconst CustomCardForm = (\r\n {\r\n getData,\r\n onChange: eventChange,\r\n ValidationInputError\r\n }) => {\r\n const [windowSize, setWindowSize] = useState(window.innerWidth);\r\n const [cardType, setCardType] = useState('');\r\n const elementOrder = useRef([]);\r\n const [container, setContainer] = useState(null);\r\n const elements = useElements();\r\n const id = getData('customForm');\r\n const {component: CardForm, breakpoint = 475} = getCreditCardForm(id);\r\n const postalCodeEnabled = getData('postalCodeEnabled');\r\n const options = {};\r\n ['cardNumber', 'cardExpiry', 'cardCvc'].forEach(type => {\r\n options[type] = {\r\n classes,\r\n ...getData('cardOptions'),\r\n ...getData('customFieldOptions')[type],\r\n }\r\n });\r\n const onChange = (element) => {\r\n setElementOrder(element);\r\n return (event) => {\r\n eventChange(event);\r\n if (event.elementType === 'cardNumber') {\r\n if (event.brand === 'unknown') {\r\n setCardType('');\r\n } else {\r\n setCardType(event.brand);\r\n }\r\n }\r\n if (event.complete) {\r\n const idx = elementOrder.current.indexOf(element);\r\n if (elementOrder.current[idx + 1]) {\r\n const nextElement = elementOrder.current[idx + 1];\r\n elements.getElement(nextElement).focus();\r\n }\r\n }\r\n }\r\n }\r\n const setElementOrder = useCallback((element) => {\r\n if (!elementOrder.current.includes(element)) {\r\n elementOrder.current.push(element);\r\n }\r\n }, []);\r\n\r\n useBreakpointWidth({name: 'creditCardForm', width: breakpoint, node: container, className: 'small-form'});\r\n\r\n const getCardIconSrc = useCallback((type) => {\r\n for (let icon of getData('icons')) {\r\n if (icon.id === type) {\r\n return icon.src;\r\n }\r\n }\r\n return '';\r\n }, []);\r\n\r\n if (!CardForm) {\r\n return (\r\n <div className='wc-stripe-custom-form-error'>\r\n <p>{sprintf(__('%s is not a valid blocks Stripe custom form. Please choose another custom form option in the Credit Card Settings.', 'woo-stripe-payment'), getData('customFormLabels')[id])}</p>\r\n </div>\r\n )\r\n }\r\n return (\r\n <div className={`wc-stripe-custom-form ${id}`} ref={setContainer}>\r\n {cloneElement(CardForm, {\r\n postalCodeEnabled,\r\n options,\r\n onChange,\r\n CardIcon: <CardIcon type={cardType} src={getCardIconSrc(cardType)}/>\r\n })}\r\n </div>\r\n )\r\n\r\n}\r\n\r\nconst CardIcon = ({type, src}) => {\r\n if (type) {\r\n return <img className={`wc-stripe-card ${type}`} src={src}/>\r\n }\r\n return null;\r\n}\r\n\r\nexport default CustomCardForm;\r\n","import './style.scss';\r\nimport {registerCreditCardForm} from \"@paymentplugins/stripe/util\";\r\nimport {CardNumberElement, CardExpiryElement, CardCvcElement} from '@stripe/react-stripe-js';\r\nimport {__} from \"@wordpress/i18n\";\r\nimport {useEffect, useCallback, useRef} from '@wordpress/element';\r\n\r\nconst SimpleForm = ({CardIcon, options, onChange}) => {\r\n useEffect(() => {\r\n }, []);\r\n return (\r\n <div className='wc-stripe-simple-form'>\r\n <div className=\"row\">\r\n <div className=\"field\">\r\n <div className='field-item'>\r\n <CardNumberElement id=\"stripe-card-number\" className=\"input empty\"\r\n options={options['cardNumber']}\r\n onChange={onChange(CardNumberElement)}/>\r\n <label htmlFor=\"stripe-card-number\"\r\n data-tid=\"\">{__('Card Number', 'woo-stripe-payment')}</label>\r\n <div className=\"baseline\"></div>\r\n {CardIcon}\r\n </div>\r\n </div>\r\n </div>\r\n <div className=\"row\">\r\n <div className=\"field half-width\">\r\n <div className='field-item'>\r\n <CardExpiryElement id=\"stripe-exp\" className=\"input empty\" options={options['cardExpiry']}\r\n onChange={onChange(CardExpiryElement)}/>\r\n <label htmlFor=\"stripe-exp\"\r\n data-tid=\"\">{__('Expiration', 'woo-stripe-payment')}</label>\r\n <div className=\"baseline\"></div>\r\n </div>\r\n </div>\r\n <div className=\"field half-width cvc\">\r\n <div className='field-item'>\r\n <CardCvcElement id=\"stripe-cvv\" className=\"input empty\" options={options['cardCvc']}\r\n onChange={onChange(CardCvcElement)}/>\r\n <label htmlFor=\"stripe-cvv\"\r\n data-tid=\"\">{__('CVV', 'woo-stripe-payment')}</label>\r\n <div className=\"baseline\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nregisterCreditCardForm({\r\n id: 'simple',\r\n component: <SimpleForm/>,\r\n breakpoint: 375\r\n})","import {CardElement} from \"@stripe/react-stripe-js\";\r\nimport {isFieldRequired} from \"../../util\";\r\nimport {useMemo} from '@wordpress/element';\r\n\r\nconst StripeCardForm = ({getData, billing, onChange}) => {\r\n const cardOptions = useMemo(() => {\r\n return {\r\n ...{\r\n value: {\r\n postalCode: billing?.billingData?.postcode\r\n },\r\n hidePostalCode: isFieldRequired('postcode'),\r\n iconStyle: 'default'\r\n }, ...getData('cardOptions')\r\n };\r\n }, [billing.billingData]);\r\n return (\r\n <div className='wc-stripe-inline-form'>\r\n <CardElement options={cardOptions} onChange={onChange}/>\r\n </div>\r\n )\r\n}\r\n\r\nexport default StripeCardForm;","import './style.scss';\r\n\r\nexport * from './payment-method';\r\n\r\nimport './components/bootstrap';\r\nimport './components/simple';\r\n","import {useEffect, useState, useCallback, useMemo} from '@wordpress/element';\r\nimport {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {initStripe as loadStripe, getSettings, isFieldRequired, isUserLoggedIn} from '../util';\r\nimport {Elements, CardElement, useStripe, useElements, CardNumberElement} from '@stripe/react-stripe-js';\r\nimport {PaymentMethodLabel, PaymentMethod, SavePaymentMethod} from '../../components/checkout';\r\nimport SavedCardComponent from '@paymentplugins/stripe/saved-card-component';\r\nimport CustomCardForm from './components/custom-card-form';\r\nimport StripeCardForm from \"./components/stripe-card-form\";\r\nimport {\r\n useProcessPaymentIntent,\r\n useAfterProcessingPayment,\r\n useSetupIntent,\r\n useStripeError\r\n} from \"../hooks\";\r\n\r\nconst getData = getSettings('stripe_cc_data');\r\n\r\nconst CreditCardContent = (props) => {\r\n const [error, setError] = useState(false);\r\n useEffect(() => {\r\n loadStripe.catch(error => {\r\n setError(error);\r\n })\r\n }, [setError]);\r\n if (error) {\r\n throw new Error(error);\r\n }\r\n return (\r\n <Elements stripe={loadStripe}>\r\n <CreditCardElement {...props}/>\r\n </Elements>\r\n );\r\n};\r\n\r\nconst CreditCardElement = (\r\n {\r\n getData,\r\n billing,\r\n shippingData,\r\n emitResponse,\r\n eventRegistration,\r\n activePaymentMethod\r\n }) => {\r\n const [error, setError] = useStripeError();\r\n const [savePaymentMethod, setSavePaymentMethod] = useState(false);\r\n const onSavePaymentMethod = (checked) => setSavePaymentMethod(checked);\r\n const {onPaymentProcessing} = eventRegistration;\r\n const stripe = useStripe();\r\n const elements = useElements();\r\n const getPaymentMethodArgs = useCallback(() => {\r\n const elType = getData('customFormActive') ? CardNumberElement : CardElement;\r\n return {card: elements.getElement(elType)};\r\n }, [stripe, elements]);\r\n\r\n const {setupIntent, removeSetupIntent} = useSetupIntent({\r\n getData,\r\n cartTotal: billing.cartTotal,\r\n setError\r\n })\r\n\r\n useProcessPaymentIntent({\r\n getData,\r\n billing,\r\n shippingData,\r\n emitResponse,\r\n error,\r\n onPaymentProcessing,\r\n savePaymentMethod,\r\n setupIntent,\r\n removeSetupIntent,\r\n getPaymentMethodArgs,\r\n activePaymentMethod\r\n });\r\n useAfterProcessingPayment({\r\n getData,\r\n eventRegistration,\r\n responseTypes: emitResponse.responseTypes,\r\n activePaymentMethod,\r\n savePaymentMethod\r\n });\r\n\r\n const onChange = (event) => {\r\n if (event.error) {\r\n setError(event.error);\r\n } else {\r\n setError(false);\r\n }\r\n }\r\n const Tag = getData('customFormActive') ? CustomCardForm : StripeCardForm;\r\n return (\r\n <div className='wc-stripe-card-container'>\r\n <Tag {...{getData, billing, onChange}}/>\r\n {isUserLoggedIn(billing.customerId) && getData('saveCardEnabled') &&\r\n <SavePaymentMethod label={getData('savePaymentMethodLabel')}\r\n onChange={onSavePaymentMethod}\r\n checked={savePaymentMethod}/>}\r\n </div>\r\n );\r\n}\r\n\r\nregisterPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icons')}/>,\r\n ariaLabel: 'Credit Cards',\r\n canMakePayment: () => loadStripe,\r\n content: <PaymentMethod content={CreditCardContent} getData={getData}/>,\r\n savedTokenComponent: <SavedCardComponent getData={getData}/>,\r\n edit: <PaymentMethod content={CreditCardContent} getData={getData}/>,\r\n supports: {\r\n showSavedCards: getData('showSavedCards'),\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n})","import {Component} from '@wordpress/element';\r\n\r\nclass ErrorBoundary extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {hasError: false, error: null, errorInfo: null};\r\n }\r\n\r\n componentDidCatch(error, errorInfo) {\r\n this.setState({\r\n hasError: true,\r\n error,\r\n errorInfo\r\n })\r\n }\r\n\r\n render() {\r\n if (this.state.hasError) {\r\n return (\r\n <>\r\n {this.state.error && <div className='wc-stripe-block-error'>{this.state.error.toString()}</div>}\r\n {this.state.errorInfo &&\r\n <div className='wc-stripe-block-error'>{this.state.errorInfo.componentStack}</div>}\r\n </>\r\n )\r\n }\r\n return this.props.children;\r\n }\r\n}\r\n\r\nexport default ErrorBoundary;","import {useRef, useEffect} from '@wordpress/element';\r\nimport {usePaymentsClient, usePaymentRequest} from './hooks';\r\nimport {\r\n useProcessPaymentIntent,\r\n useStripeError,\r\n useExportedValues,\r\n useExpressBreakpointWidth\r\n} from '../hooks';\r\nimport {getSettings} from '@paymentplugins/stripe/util';\r\n\r\nconst {publishableKey} = getSettings('stripeGeneralData')();\r\n\r\nconst GooglePayButton = (\r\n {\r\n getData,\r\n setErrorMessage,\r\n billing,\r\n shippingData,\r\n canMakePayment,\r\n checkoutStatus,\r\n eventRegistration,\r\n activePaymentMethod,\r\n onClick,\r\n onClose,\r\n ...props\r\n }) => {\r\n const merchantInfo = {\r\n merchantId: getData('merchantId'),\r\n merchantName: getData('merchantName')\r\n };\r\n const [error, setError] = useStripeError();\r\n const buttonContainer = useRef();\r\n const {onSubmit, emitResponse} = props;\r\n const {onPaymentProcessing} = eventRegistration;\r\n const exportedValues = useExportedValues();\r\n const width = getData('buttonStyle').buttonType === 'long' ? 390 : 300;\r\n const {setPaymentMethod} = useProcessPaymentIntent({\r\n getData,\r\n billing,\r\n shippingData,\r\n onPaymentProcessing,\r\n emitResponse,\r\n error,\r\n exportedValues,\r\n onSubmit,\r\n checkoutStatus,\r\n activePaymentMethod\r\n });\r\n\r\n const paymentRequest = usePaymentRequest({\r\n getData,\r\n publishableKey,\r\n merchantInfo,\r\n billing,\r\n shippingData\r\n })\r\n\r\n const {button, removeButton} = usePaymentsClient({\r\n merchantInfo,\r\n paymentRequest,\r\n billing,\r\n shippingData,\r\n eventRegistration,\r\n canMakePayment,\r\n setErrorMessage,\r\n onSubmit,\r\n setPaymentMethod,\r\n exportedValues,\r\n onClick,\r\n onClose,\r\n getData\r\n });\r\n\r\n useExpressBreakpointWidth({payment_method: getData('name'), width});\r\n\r\n useEffect(() => {\r\n if (button) {\r\n // prevent button duplicates\r\n removeButton(buttonContainer.current);\r\n buttonContainer.current.append(button);\r\n }\r\n }, [button]);\r\n\r\n return (\r\n <div className='wc-stripe-gpay-button-container' ref={buttonContainer}></div>\r\n )\r\n}\r\n\r\nexport default GooglePayButton;","export const BASE_PAYMENT_METHOD = {\r\n type: 'CARD',\r\n parameters: {\r\n allowedAuthMethods: [\"PAN_ONLY\"],\r\n allowedCardNetworks: [\"AMEX\", \"DISCOVER\", \"INTERAC\", \"JCB\", \"MASTERCARD\", \"VISA\"],\r\n assuranceDetailsRequired: true\r\n }\r\n};\r\n\r\nexport const BASE_PAYMENT_REQUEST = {\r\n apiVersion: 2,\r\n apiVersionMinor: 0\r\n}","export * from './use-payments-client';\r\nexport * from './use-payment-request';\r\nexport * from './use-error-message';","import {useState} from '@wordpress/element';\r\n\r\nexport const useErrorMessage = () => {\r\n const [errorMessage, setErrorMessage] = useState(false);\r\n return {errorMessage, setErrorMessage};\r\n}","import {useState, useEffect, useMemo} from '@wordpress/element';\r\nimport {BASE_PAYMENT_REQUEST, BASE_PAYMENT_METHOD} from \"../constants\";\r\nimport {isEmpty, isFieldRequired} from \"../../util\";\r\nimport {getTransactionInfo, getShippingOptionParameters} from \"../util\";\r\n\r\nexport const usePaymentRequest = ({getData, publishableKey, merchantInfo, billing, shippingData}) => {\r\n const {billingData} = billing;\r\n const {shippingRates, shippingAddress} = shippingData;\r\n const {processingCountry, totalPriceLabel} = getData();\r\n\r\n const paymentRequest = useMemo(() => {\r\n let options = {\r\n ...{\r\n emailRequired: isEmpty(billingData.email),\r\n merchantInfo,\r\n allowedPaymentMethods: [{\r\n ...{\r\n type: 'CARD',\r\n tokenizationSpecification: {\r\n type: \"PAYMENT_GATEWAY\",\r\n parameters: {\r\n gateway: 'stripe',\r\n \"stripe:version\": \"2018-10-31\",\r\n \"stripe:publishableKey\": publishableKey\r\n }\r\n }\r\n }, ...BASE_PAYMENT_METHOD\r\n }],\r\n shippingAddressRequired: shippingData.needsShipping,\r\n transactionInfo: getTransactionInfo({\r\n billing,\r\n processingCountry,\r\n totalPriceLabel\r\n }),\r\n callbackIntents: ['PAYMENT_AUTHORIZATION']\r\n }, ...BASE_PAYMENT_REQUEST\r\n };\r\n options.allowedPaymentMethods[0].parameters.billingAddressRequired = true;\r\n options.allowedPaymentMethods[0].parameters.billingAddressParameters = {\r\n format: 'FULL',\r\n phoneNumberRequired: isFieldRequired('phone', billingData.country) && isEmpty(billingData.phone)\r\n };\r\n if (options.shippingAddressRequired) {\r\n options.callbackIntents = [...options.callbackIntents, ...['SHIPPING_ADDRESS', 'SHIPPING_OPTION']];\r\n options.shippingOptionRequired = true;\r\n const shippingOptionParameters = getShippingOptionParameters(shippingRates);\r\n if (shippingOptionParameters.shippingOptions.length > 0) {\r\n options = {...options, shippingOptionParameters};\r\n }\r\n }\r\n return options;\r\n }, [\r\n billing.cartTotal,\r\n billing.cartTotalItems,\r\n billingData,\r\n shippingData\r\n ]);\r\n return paymentRequest;\r\n}","import {useState, useEffect, useCallback, useMemo, useRef} from '@wordpress/element';\r\nimport isShallowEqual from \"@wordpress/is-shallow-equal\";\r\nimport {\r\n getErrorMessage,\r\n getSelectedShippingOption,\r\n getBillingDetailsFromAddress,\r\n isAddressValid,\r\n isEmpty,\r\n StripeError,\r\n getIntermediateAddress\r\n} from \"../../util\";\r\nimport {useStripe} from \"@stripe/react-stripe-js\";\r\nimport {getPaymentRequestUpdate, toCartAddress} from \"../util\";\r\nimport {__} from \"@wordpress/i18n\";\r\nimport {usePaymentEvents} from \"../../hooks\";\r\n\r\nexport const usePaymentsClient = (\r\n {\r\n merchantInfo,\r\n paymentRequest,\r\n billing,\r\n shippingData,\r\n eventRegistration,\r\n canMakePayment,\r\n setErrorMessage,\r\n setPaymentMethod,\r\n exportedValues,\r\n onClick,\r\n onClose,\r\n getData\r\n }) => {\r\n const {environment} = getData();\r\n const [paymentsClient, setPaymentsClient] = useState();\r\n const [button, setButton] = useState(null);\r\n const currentBilling = useRef(billing);\r\n const currentShipping = useRef(shippingData);\r\n const stripe = useStripe();\r\n const {addPaymentEvent} = usePaymentEvents({\r\n billing,\r\n shippingData,\r\n eventRegistration\r\n });\r\n useEffect(() => {\r\n currentBilling.current = billing;\r\n currentShipping.current = shippingData;\r\n });\r\n\r\n const setAddressData = useCallback((paymentData) => {\r\n if (paymentData?.paymentMethodData?.info?.billingAddress) {\r\n let billingAddress = paymentData.paymentMethodData.info.billingAddress;\r\n if (isAddressValid(currentBilling.current.billingData, ['phone', 'email']) && isEmpty(currentBilling.current.billingData?.phone)) {\r\n billingAddress = {phoneNumber: billingAddress.phoneNumber};\r\n }\r\n exportedValues.billingData = toCartAddress(billingAddress, {email: paymentData.email});\r\n }\r\n if (paymentData?.shippingAddress) {\r\n exportedValues.shippingAddress = toCartAddress(paymentData.shippingAddress);\r\n }\r\n }, [exportedValues, paymentRequest]);\r\n\r\n const removeButton = useCallback((parentElement) => {\r\n while (parentElement.firstChild) {\r\n parentElement.removeChild(parentElement.firstChild);\r\n }\r\n }, [button]);\r\n const handleClick = useCallback(async () => {\r\n onClick();\r\n try {\r\n let paymentData = await paymentsClient.loadPaymentData(paymentRequest);\r\n const {billingData} = currentBilling.current;\r\n\r\n // set the address data so it can be used during the checkout process\r\n setAddressData(paymentData);\r\n\r\n const data = JSON.parse(paymentData.paymentMethodData.tokenizationData.token);\r\n\r\n let result = await stripe.createPaymentMethod({\r\n type: 'card',\r\n card: {token: data.id},\r\n billing_details: getBillingDetailsFromAddress(billingData)\r\n });\r\n\r\n if (result.error) {\r\n throw new StripeError(result.error);\r\n }\r\n\r\n setPaymentMethod(result.paymentMethod.id);\r\n } catch (err) {\r\n if (err?.statusCode === \"CANCELED\") {\r\n onClose();\r\n } else {\r\n console.log(getErrorMessage(err));\r\n setErrorMessage(getErrorMessage(err));\r\n }\r\n }\r\n }, [\r\n stripe,\r\n paymentsClient,\r\n onClick\r\n ]);\r\n\r\n const createButton = useCallback(async () => {\r\n try {\r\n if (paymentsClient && !button && stripe) {\r\n await canMakePayment;\r\n setButton(paymentsClient.createButton({\r\n onClick: handleClick,\r\n ...getData('buttonStyle')\r\n }));\r\n }\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }, [\r\n stripe,\r\n button,\r\n paymentsClient\r\n ]);\r\n\r\n const paymentOptions = useMemo(() => {\r\n let options = {\r\n environment,\r\n merchantInfo,\r\n paymentDataCallbacks: {\r\n onPaymentAuthorized: () => Promise.resolve({transactionState: \"SUCCESS\"})\r\n }\r\n }\r\n if (paymentRequest.shippingAddressRequired) {\r\n options.paymentDataCallbacks.onPaymentDataChanged = (paymentData) => {\r\n return new Promise((resolve, reject) => {\r\n const shipping = currentShipping.current;\r\n const {shippingAddress: address, shippingOptionData} = paymentData;\r\n const intermediateAddress = toCartAddress(address);\r\n // pass the Promise resolve to a ref so it persists beyond the re-render\r\n const selectedRates = getSelectedShippingOption(shippingOptionData.id);\r\n const addressEqual = isShallowEqual(getIntermediateAddress(shipping.shippingAddress), intermediateAddress);\r\n const shippingEqual = isShallowEqual(shipping.selectedRates, {\r\n [selectedRates[1]]: selectedRates[0]\r\n });\r\n addPaymentEvent('onShippingChanged', (success, {billing, shipping}) => {\r\n if (success) {\r\n resolve(getPaymentRequestUpdate({\r\n billing,\r\n shippingData: {\r\n needsShipping: true,\r\n shippingRates: shipping.shippingRates\r\n },\r\n processingCountry: getData('processingCountry'),\r\n totalPriceLabel: getData('totalPriceLabel')\r\n }))\r\n } else {\r\n resolve({\r\n error: {\r\n reason: 'SHIPPING_ADDRESS_UNSERVICEABLE',\r\n message: __('Your shipping address is not serviceable.', 'woo-stripe-payment'),\r\n intent: 'SHIPPING_ADDRESS'\r\n }\r\n });\r\n }\r\n }, addressEqual && shippingEqual);\r\n currentShipping.current.setShippingAddress({...currentShipping.current.shippingAddress, ...intermediateAddress});\r\n if (shippingOptionData.id !== 'shipping_option_unselected') {\r\n currentShipping.current.setSelectedRates(...selectedRates);\r\n }\r\n })\r\n }\r\n }\r\n return options;\r\n }, [paymentRequest]);\r\n\r\n useEffect(() => {\r\n setPaymentsClient(new google.payments.api.PaymentsClient(paymentOptions));\r\n }, [paymentOptions]);\r\n\r\n useEffect(() => {\r\n createButton();\r\n }, [createButton])\r\n\r\n return {\r\n button,\r\n removeButton\r\n };\r\n}","import './style.scss';\r\n\r\nexport * from './payment-method';","import {registerExpressPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings, initStripe as loadStripe, isCartPage} from '../util';\r\nimport {useErrorMessage} from \"./hooks\";\r\nimport GooglePayButton from './button';\r\nimport {BASE_PAYMENT_METHOD, BASE_PAYMENT_REQUEST} from './constants';\r\nimport google from '@googlepay';\r\nimport {Elements} from \"@stripe/react-stripe-js\";\r\n\r\nconst getData = getSettings('stripe_googlepay_data');\r\n\r\nconst canMakePayment = (() => {\r\n const paymentsClient = new google.payments.api.PaymentsClient({\r\n environment: getData('environment'),\r\n merchantInfo: {\r\n merchantId: getData('merchantId'),\r\n merchantName: getData('merchantName')\r\n }\r\n });\r\n const isReadyToPayRequest = {...BASE_PAYMENT_REQUEST, allowedPaymentMethods: [BASE_PAYMENT_METHOD]};\r\n return paymentsClient.isReadyToPay(isReadyToPayRequest).then(() => {\r\n return true;\r\n }).catch(err => {\r\n console.log(err);\r\n return false;\r\n })\r\n})();\r\n\r\nconst GooglePayContent = ({getData, components, ...props}) => {\r\n const {ValidationInputError} = components;\r\n const {errorMessage, setErrorMessage} = useErrorMessage();\r\n return (\r\n <div className='wc-stripe-gpay-container'>\r\n <Elements stripe={loadStripe}>\r\n <GooglePayButton getData={getData}\r\n canMakePayment={canMakePayment}\r\n setErrorMessage={setErrorMessage}\r\n {...props}/>\r\n {errorMessage && <ValidationInputError errorMessage={errorMessage}/>}\r\n </Elements>\r\n </div>\r\n )\r\n}\r\n\r\nconst GooglePayEdit = ({getData, ...props}) => {\r\n const buttonType = getData('buttonStyle').buttonType;\r\n const src = getData('editorIcons')?.[buttonType] || 'long';\r\n return (\r\n <div className={`gpay-block-editor ${buttonType}`}>\r\n <img src={src}/>\r\n </div>\r\n )\r\n}\r\n\r\nregisterExpressPaymentMethod({\r\n name: getData('name'),\r\n canMakePayment: () => {\r\n if (getData('isAdmin')) {\r\n if (isCartPage()) {\r\n return getData('cartCheckoutEnabled');\r\n }\r\n return true;\r\n }\r\n if (isCartPage() && !getData('cartCheckoutEnabled')) {\r\n return false;\r\n }\r\n return loadStripe.then(stripe => {\r\n if (stripe.error) {\r\n return stripe;\r\n }\r\n return canMakePayment;\r\n });\r\n },\r\n content: <GooglePayContent getData={getData}/>,\r\n edit: <GooglePayEdit getData={getData}/>,\r\n supports: {\r\n showSavedCards: getData('showSavedCards'),\r\n showSaveOption: getData('showSaveOption'),\r\n features: getData('features')\r\n }\r\n})","import {getShippingOptionId, removeNumberPrecision, toCartAddress as mapAddressToCartAddress} from \"../util\";\r\nimport {formatPrice} from '../util';\r\n\r\nconst ADDRESS_MAPPINGS = {\r\n name: (address, name) => {\r\n address.first_name = name.split(' ').slice(0, -1).join(' ');\r\n address.last_name = name.split(' ').pop();\r\n return address;\r\n },\r\n countryCode: 'country',\r\n address1: 'address_1',\r\n address2: 'address_2',\r\n locality: 'city',\r\n administrativeArea: 'state',\r\n postalCode: 'postcode',\r\n email: 'email',\r\n phoneNumber: 'phone'\r\n}\r\n\r\nexport const getTransactionInfo = ({billing, processingCountry, totalPriceLabel}, status = 'ESTIMATED') => {\r\n const {cartTotal, cartTotalItems, currency} = billing;\r\n const transactionInfo = {\r\n countryCode: processingCountry,\r\n currencyCode: currency.code,\r\n totalPriceStatus: status,\r\n totalPrice: removeNumberPrecision(cartTotal.value, currency.minorUnit).toString(),\r\n displayItems: getDisplayItems(cartTotalItems, currency.minorUnit),\r\n totalPriceLabel\r\n }\r\n return transactionInfo;\r\n}\r\n\r\nexport const getPaymentRequestUpdate = ({billing, shippingData, processingCountry, totalPriceLabel}) => {\r\n const {needsShipping, shippingRates} = shippingData;\r\n let update = {\r\n newTransactionInfo: getTransactionInfo({\r\n billing, processingCountry, totalPriceLabel\r\n }, 'FINAL')\r\n }\r\n if (needsShipping) {\r\n update.newShippingOptionParameters = getShippingOptionParameters(shippingRates);\r\n }\r\n return update;\r\n}\r\n\r\n/**\r\n * Return an array of line item objects\r\n * @param cartTotalItems\r\n * @param unit\r\n * @returns {[]}\r\n */\r\nconst getDisplayItems = (cartTotalItems, unit = 2) => {\r\n let items = [];\r\n cartTotalItems.forEach(item => {\r\n if (0 < item.value) {\r\n items.push({\r\n label: item.label,\r\n type: 'LINE_ITEM',\r\n price: removeNumberPrecision(item.value, unit).toString()\r\n });\r\n }\r\n })\r\n return items;\r\n}\r\n\r\nexport const getShippingOptionParameters = (shippingRates) => {\r\n const shippingOptions = getShippingOptions(shippingRates);\r\n const shippingOptionIds = shippingOptions.map(option => option.id);\r\n let defaultSelectedOptionId = shippingOptionIds.slice(0, 1).shift();\r\n shippingRates.forEach((shippingPackage, idx) => {\r\n shippingPackage.shipping_rates.forEach(rate => {\r\n if (rate.selected) {\r\n defaultSelectedOptionId = getShippingOptionId(idx, rate.rate_id);\r\n }\r\n });\r\n });\r\n return {\r\n shippingOptions,\r\n defaultSelectedOptionId,\r\n }\r\n}\r\n\r\n//id label description\r\nexport const getShippingOptions = (shippingRates) => {\r\n let options = [];\r\n shippingRates.forEach((shippingPackage, idx) => {\r\n let rates = shippingPackage.shipping_rates.map(rate => {\r\n let txt = document.createElement('textarea');\r\n txt.innerHTML = rate.name;\r\n let price = formatPrice(rate.price, rate.currency_code);\r\n return {\r\n id: getShippingOptionId(idx, rate.rate_id),\r\n label: txt.value,\r\n description: `${price}`\r\n }\r\n });\r\n options = [...options, ...rates];\r\n });\r\n return options;\r\n}\r\n\r\nexport const toCartAddress = mapAddressToCartAddress(ADDRESS_MAPPINGS);\r\n","export * from './use-process-payment-intent';\r\nexport * from './use-after-process-payment';\r\nexport * from './use-setup-intent';\r\nexport * from './use-stripe-error';\r\nexport * from './use-exported-values';\r\nexport * from './use-payment-request';\r\nexport * from './use-payment-events';\r\nexport * from './use-breakpoint-width';\r\nexport * from './use-process-checkout-error'","import {useEffect} from '@wordpress/element'\r\nimport {useStripe} from \"@stripe/react-stripe-js\";\r\nimport {handleCardAction} from \"../util\";\r\nimport {useProcessCheckoutError} from \"./use-process-checkout-error\";\r\n\r\nexport const useAfterProcessingPayment = (\r\n {\r\n getData,\r\n eventRegistration,\r\n responseTypes,\r\n activePaymentMethod,\r\n savePaymentMethod = false,\r\n messageContext = null\r\n }) => {\r\n const stripe = useStripe();\r\n const {onCheckoutAfterProcessingWithSuccess, onCheckoutAfterProcessingWithError} = eventRegistration;\r\n useProcessCheckoutError({\r\n responseTypes,\r\n subscriber: onCheckoutAfterProcessingWithError,\r\n messageContext\r\n });\r\n useEffect(() => {\r\n let unsubscribeAfterProcessingWithSuccess = onCheckoutAfterProcessingWithSuccess(async ({redirectUrl}) => {\r\n if (getData('name') === activePaymentMethod) {\r\n //check if response is in redirect. If so, open modal\r\n return await handleCardAction({\r\n redirectUrl,\r\n responseTypes,\r\n stripe,\r\n getData,\r\n savePaymentMethod\r\n });\r\n }\r\n return null;\r\n })\r\n return () => unsubscribeAfterProcessingWithSuccess()\r\n }, [\r\n stripe,\r\n responseTypes,\r\n onCheckoutAfterProcessingWithSuccess,\r\n activePaymentMethod,\r\n savePaymentMethod\r\n ]);\r\n}","import {useState, useEffect, useCallback} from '@wordpress/element';\r\nimport {storeInCache, getFromCache} from \"../util\";\r\n\r\nexport const useBreakpointWidth = (\r\n {\r\n name,\r\n width,\r\n node,\r\n className\r\n }) => {\r\n const [windowWidth, setWindowWith] = useState(window.innerWidth);\r\n const getMaxWidth = useCallback((name) => {\r\n const maxWidth = getFromCache(name);\r\n return maxWidth ? parseInt(maxWidth) : 0;\r\n }, []);\r\n const setMaxWidth = useCallback((name, width) => storeInCache(name, width), []);\r\n\r\n useEffect(() => {\r\n const el = typeof node === 'function' ? node() : node;\r\n\r\n if (el) {\r\n const maxWidth = getMaxWidth(name);\r\n if (!maxWidth || width > maxWidth) {\r\n setMaxWidth(name, width);\r\n }\r\n if (el.clientWidth < width) {\r\n el.classList.add(className);\r\n } else {\r\n if (el.clientWidth > maxWidth) {\r\n el.classList.remove(className);\r\n }\r\n }\r\n }\r\n }, [windowWidth, node]);\r\n useEffect(() => {\r\n const handleResize = () => setWindowWith(window.innerWidth);\r\n window.addEventListener('resize', handleResize);\r\n return () => window.removeEventListener('resize', handleResize);\r\n });\r\n}\r\n\r\nexport const useExpressBreakpointWidth = (\r\n {\r\n payment_method,\r\n width\r\n }) => {\r\n const node = useCallback(() => {\r\n const el = document.getElementById(`express-payment-method-${payment_method}`);\r\n return el ? el.parentNode : null;\r\n }, []);\r\n useBreakpointWidth({\r\n name: 'expressMaxWidth',\r\n width,\r\n node,\r\n className: 'wc-stripe-express__sm'\r\n });\r\n\r\n}","import {useRef} from '@wordpress/element';\r\n\r\nexport const useExportedValues = () => {\r\n const exportedValues = useRef({});\r\n return exportedValues.current;\r\n}","import {useEffect, useCallback, useRef, useState} from '@wordpress/element';\r\nimport {hasShippingRates} from '../util';\r\n\r\nexport const usePaymentEvents = (\r\n {\r\n billing,\r\n shippingData,\r\n eventRegistration\r\n }) => {\r\n const {onShippingRateSuccess, onShippingRateFail, onShippingRateSelectSuccess} = eventRegistration;\r\n const currentBilling = useRef(billing);\r\n const currentShipping = useRef(shippingData);\r\n const [handler, setHandler] = useState(null);\r\n const [paymentEvents, setPaymentEvent] = useState({\r\n onShippingChanged: false\r\n });\r\n const addPaymentEvent = useCallback((name, handler, execute = false) => {\r\n if (execute) {\r\n setHandler({[name]: handler});\r\n } else {\r\n setPaymentEvent({...paymentEvents, [name]: handler});\r\n }\r\n }, [paymentEvents, setPaymentEvent]);\r\n const removePaymentEvent = useCallback((name) => {\r\n if (paymentEvents[name]) {\r\n delete paymentEvents[name];\r\n setPaymentEvent(paymentEvents);\r\n }\r\n }, [paymentEvents]);\r\n\r\n const onShippingChanged = useCallback(() => {\r\n const shipping = currentShipping.current;\r\n const billing = currentBilling.current;\r\n if (paymentEvents.onShippingChanged && !shipping.isSelectingRate && !shipping.shippingRatesLoading) {\r\n const handler = paymentEvents.onShippingChanged;\r\n let success = true;\r\n if (!hasShippingRates(shipping.shippingRates)) {\r\n success = false;\r\n }\r\n handler(success, {\r\n billing,\r\n shipping\r\n });\r\n removePaymentEvent('onShippingChanged');\r\n }\r\n }, [paymentEvents, removePaymentEvent]);\r\n\r\n useEffect(() => {\r\n currentBilling.current = billing;\r\n currentShipping.current = shippingData;\r\n });\r\n\r\n useEffect(() => {\r\n if (handler) {\r\n if (handler.onShippingChanged) {\r\n handler.onShippingChanged(true, {\r\n billing: currentBilling.current,\r\n shipping: currentShipping.current\r\n })\r\n setHandler(null);\r\n }\r\n }\r\n }, [handler]);\r\n\r\n useEffect(() => {\r\n const unsubscribeShippingRateSuccess = onShippingRateSuccess(onShippingChanged);\r\n const unsubscribeShippingRateSelectSuccess = onShippingRateSelectSuccess(onShippingChanged);\r\n const unsubscribeShippingRateFail = onShippingRateFail(({hasInvalidAddress, hasError}) => {\r\n if (paymentEvents.onShippingChanged) {\r\n const handler = paymentEvents.onShippingChanged;\r\n handler(false);\r\n removePaymentEvent('onShippingChanged');\r\n }\r\n });\r\n\r\n return () => {\r\n unsubscribeShippingRateSuccess();\r\n unsubscribeShippingRateFail();\r\n unsubscribeShippingRateSelectSuccess();\r\n }\r\n }, [\r\n paymentEvents,\r\n onShippingRateSuccess,\r\n onShippingRateFail,\r\n onShippingRateSelectSuccess\r\n ]);\r\n\r\n return {addPaymentEvent, removePaymentEvent};\r\n}","import {useState, useEffect, useRef, useCallback} from '@wordpress/element';\r\nimport {usePaymentEvents} from './use-payment-events';\r\nimport {getIntermediateAddress} from '../util';\r\nimport isShallowEqual from '@wordpress/is-shallow-equal';\r\nimport {\r\n getDisplayItems,\r\n getShippingOptions,\r\n getSelectedShippingOption,\r\n isFieldRequired,\r\n toCartAddress as mapToCartAddress\r\n} from \"../util\";\r\n\r\nconst toCartAddress = mapToCartAddress();\r\n\r\nexport const usePaymentRequest = (\r\n {\r\n getData,\r\n onClose,\r\n stripe,\r\n billing,\r\n shippingData,\r\n eventRegistration,\r\n setPaymentMethod,\r\n exportedValues,\r\n canPay\r\n }) => {\r\n const {addPaymentEvent} = usePaymentEvents({\r\n billing,\r\n shippingData,\r\n eventRegistration\r\n });\r\n const {needsShipping, shippingRates} = shippingData;\r\n const {billingData, cartTotalItems, currency, cartTotal} = billing;\r\n const [paymentRequest, setPaymentRequest] = useState(null);\r\n const paymentRequestOptions = useRef({});\r\n const currentShipping = useRef(shippingData)\r\n const currentBilling = useRef(billing);\r\n\r\n useEffect(() => {\r\n currentShipping.current = shippingData;\r\n currentBilling.current = billing;\r\n }, [shippingData]);\r\n\r\n useEffect(() => {\r\n if (stripe) {\r\n const options = {\r\n country: getData('countryCode'),\r\n currency: currency?.code.toLowerCase(),\r\n total: {\r\n amount: cartTotal.value,\r\n label: cartTotal.label,\r\n pending: true\r\n },\r\n requestPayerName: true,\r\n requestPayerEmail: isFieldRequired('email', billingData.country),\r\n requestPayerPhone: isFieldRequired('phone', billingData.country),\r\n requestShipping: needsShipping,\r\n displayItems: getDisplayItems(cartTotalItems, currency)\r\n }\r\n if (options.requestShipping) {\r\n options.shippingOptions = getShippingOptions(shippingRates);\r\n }\r\n paymentRequestOptions.current = options;\r\n const paymentRequest = stripe.paymentRequest(paymentRequestOptions.current);\r\n paymentRequest.canMakePayment().then(result => {\r\n if (canPay(result)) {\r\n setPaymentRequest(paymentRequest);\r\n } else {\r\n setPaymentRequest(null);\r\n }\r\n });\r\n }\r\n }, [stripe, billingData, shippingRates, needsShipping]);\r\n\r\n useEffect(() => {\r\n if (paymentRequest) {\r\n if (paymentRequestOptions.current.requestShipping) {\r\n paymentRequest.on('shippingaddresschange', onShippingAddressChange);\r\n paymentRequest.on('shippingoptionchange', onShippingOptionChange);\r\n }\r\n paymentRequest.on('cancel', onClose);\r\n paymentRequest.on('paymentmethod', onPaymentMethodReceived);\r\n }\r\n }, [paymentRequest]);\r\n\r\n const updatePaymentEvent = useCallback((event) => (success, {billing, shipping}) => {\r\n const {cartTotal, cartTotalItems, currency} = billing;\r\n const {shippingRates} = shipping;\r\n if (success) {\r\n event.updateWith({\r\n status: 'success',\r\n total: {\r\n amount: cartTotal.value,\r\n label: cartTotal.label,\r\n pending: false\r\n },\r\n displayItems: getDisplayItems(cartTotalItems, currency),\r\n shippingOptions: getShippingOptions(shippingRates)\r\n });\r\n } else {\r\n event.updateWith({status: 'invalid_shipping_address'});\r\n }\r\n }, []);\r\n\r\n const onShippingAddressChange = useCallback(event => {\r\n const {shippingAddress} = event;\r\n const shipping = currentShipping.current;\r\n const intermediateAddress = toCartAddress(shippingAddress);\r\n shipping.setShippingAddress({...shipping.shippingAddress, ...intermediateAddress});\r\n const addressEqual = isShallowEqual(getIntermediateAddress(shipping.shippingAddress), intermediateAddress);\r\n addPaymentEvent('onShippingChanged', updatePaymentEvent(event), addressEqual);\r\n }, [addPaymentEvent]);\r\n\r\n const onShippingOptionChange = useCallback(event => {\r\n const {shippingOption} = event;\r\n const shipping = currentShipping.current;\r\n shipping.setSelectedRates(...getSelectedShippingOption(shippingOption.id));\r\n addPaymentEvent('onShippingChanged', updatePaymentEvent(event));\r\n }, [addPaymentEvent]);\r\n\r\n const onPaymentMethodReceived = useCallback((paymentResponse) => {\r\n const {paymentMethod, payerName = null, payerEmail = null, payerPhone = null} = paymentResponse;\r\n // set address data\r\n let billingData = {payerName, payerEmail, payerPhone};\r\n if (paymentMethod?.billing_details.address) {\r\n billingData = toCartAddress(paymentMethod.billing_details.address, billingData);\r\n }\r\n exportedValues.billingData = billingData;\r\n\r\n if (paymentResponse.shippingAddress) {\r\n exportedValues.shippingAddress = toCartAddress(paymentResponse.shippingAddress);\r\n }\r\n\r\n // set payment method\r\n setPaymentMethod(paymentMethod.id);\r\n paymentResponse.complete(\"success\");\r\n }, [setPaymentMethod]);\r\n\r\n return {paymentRequest};\r\n}","import {useEffect} from '@wordpress/element';\r\n\r\nexport const useProcessCheckoutError = (\r\n {\r\n responseTypes,\r\n subscriber,\r\n messageContext = null\r\n }) => {\r\n useEffect(() => {\r\n const unsubscribe = subscriber((data) => {\r\n if (data?.processingResponse.paymentDetails?.stripeErrorMessage) {\r\n return {\r\n type: responseTypes.ERROR,\r\n message: data.processingResponse.paymentDetails.stripeErrorMessage,\r\n messageContext\r\n };\r\n }\r\n return null;\r\n });\r\n return () => unsubscribe();\r\n }, [responseTypes, subscriber]);\r\n}","import {useEffect, useState, useCallback, useRef} from '@wordpress/element';\r\nimport {useStripe} from '@stripe/react-stripe-js';\r\nimport {\r\n ensureSuccessResponse,\r\n ensureErrorResponse,\r\n getBillingDetailsFromAddress,\r\n StripeError\r\n} from '../util';\r\n\r\nexport const useProcessPaymentIntent = (\r\n {\r\n getData,\r\n billing,\r\n shippingData,\r\n onPaymentProcessing,\r\n emitResponse,\r\n error,\r\n onSubmit,\r\n activePaymentMethod,\r\n paymentType = 'card',\r\n setupIntent = null,\r\n removeSetupIntent = null,\r\n savePaymentMethod = false,\r\n exportedValues = {},\r\n getPaymentMethodArgs = () => ({})\r\n }) => {\r\n const {billingData} = billing;\r\n const {shippingAddress} = shippingData;\r\n const {responseTypes} = emitResponse;\r\n const [paymentMethod, setPaymentMethod] = useState(null);\r\n const stripe = useStripe();\r\n const currentPaymentMethodArgs = useRef(getPaymentMethodArgs);\r\n\r\n useEffect(() => {\r\n currentPaymentMethodArgs.current = getPaymentMethodArgs;\r\n }, [getPaymentMethodArgs]);\r\n\r\n const getCreatePaymentMethodArgs = useCallback(() => {\r\n const args = {\r\n type: paymentType,\r\n billing_details: getBillingDetailsFromAddress(exportedValues?.billingData ? exportedValues.billingData : billingData)\r\n }\r\n return {...args, ...currentPaymentMethodArgs.current()};\r\n }, [billingData, paymentType, getPaymentMethodArgs]);\r\n\r\n const getSuccessResponse = useCallback((paymentMethodId, savePaymentMethod) => {\r\n const response = {\r\n meta: {\r\n paymentMethodData: {\r\n [`${getData('name')}_token_key`]: paymentMethodId,\r\n [`${getData('name')}_save_source_key`]: savePaymentMethod\r\n }\r\n }\r\n }\r\n if (exportedValues?.billingData) {\r\n response.meta.billingData = exportedValues.billingData;\r\n }\r\n if (exportedValues?.shippingAddress) {\r\n response.meta.shippingData = {address: exportedValues.shippingAddress};\r\n }\r\n return response;\r\n }, [billingData, shippingAddress]);\r\n\r\n useEffect(() => {\r\n if (paymentMethod && typeof paymentMethod === 'string') {\r\n onSubmit();\r\n }\r\n }, [paymentMethod]);\r\n\r\n useEffect(() => {\r\n const unsubscribeProcessingPayment = onPaymentProcessing(async () => {\r\n if (activePaymentMethod !== getData('name')) {\r\n return null;\r\n }\r\n let [result, paymentMethodId] = [null, null];\r\n try {\r\n if (error) {\r\n throw new StripeError(error);\r\n }\r\n if (setupIntent) {\r\n result = await stripe.confirmCardSetup(setupIntent.client_secret, {\r\n payment_method: getCreatePaymentMethodArgs()\r\n });\r\n if (result.error) {\r\n throw new StripeError(result.error);\r\n }\r\n paymentMethodId = result.setupIntent.payment_method;\r\n removeSetupIntent();\r\n } else {\r\n // payment method has already been created.\r\n if (paymentMethod) {\r\n paymentMethodId = paymentMethod;\r\n } else {\r\n //create the payment method\r\n result = await stripe.createPaymentMethod(getCreatePaymentMethodArgs());\r\n if (result.error) {\r\n throw new StripeError(result.error);\r\n }\r\n paymentMethodId = result.paymentMethod.id;\r\n }\r\n }\r\n return ensureSuccessResponse(responseTypes, getSuccessResponse(paymentMethodId, savePaymentMethod));\r\n } catch (e) {\r\n console.log(e);\r\n setPaymentMethod(null);\r\n return ensureErrorResponse(responseTypes, e.error);\r\n }\r\n\r\n });\r\n return () => unsubscribeProcessingPayment();\r\n }, [\r\n paymentMethod,\r\n billingData,\r\n onPaymentProcessing,\r\n stripe,\r\n setupIntent,\r\n activePaymentMethod,\r\n savePaymentMethod\r\n ]);\r\n return {setPaymentMethod};\r\n}","import {useEffect, useState, useCallback} from '@wordpress/element';\r\nimport apiFetch from \"@wordpress/api-fetch\";\r\nimport {\r\n getSettings,\r\n getRoute,\r\n cartContainsPreOrder,\r\n cartContainsSubscription,\r\n getFromCache,\r\n storeInCache,\r\n deleteFromCache\r\n} from '../util';\r\n\r\nexport const useSetupIntent = (\r\n {\r\n cartTotal,\r\n setError\r\n }) => {\r\n const [setupIntent, setSetupIntent] = useState(getFromCache('setupIntent'));\r\n\r\n useEffect(() => {\r\n const createSetupIntent = async () => {\r\n if (setupIntent) {\r\n return;\r\n }\r\n // only create intent under certain conditions\r\n let result = await apiFetch({\r\n url: getRoute('create/setup_intent'),\r\n method: 'POST'\r\n });\r\n if (result.code) {\r\n setError(result.message);\r\n } else {\r\n storeInCache('setupIntent', result.intent);\r\n setSetupIntent(result.intent);\r\n }\r\n }\r\n if (cartContainsPreOrder() || (cartContainsSubscription() && cartTotal.value == 0)) {\r\n if (!setupIntent) {\r\n createSetupIntent();\r\n }\r\n } else {\r\n setSetupIntent(null);\r\n }\r\n }, [cartTotal.value]);\r\n const removeSetupIntent = useCallback(() => {\r\n deleteFromCache('setupIntent');\r\n }, [cartTotal.value]);\r\n return {setupIntent, removeSetupIntent};\r\n}","import {useState} from '@wordpress/element'\r\n\r\nexport const useStripeError = () => {\r\n const [error, setError] = useState(false);\r\n return [error, setError];\r\n}","import {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings} from \"../util\";\r\nimport {LocalPaymentSourceContent} from './local-payment-method';\r\nimport {PaymentMethodLabel} from \"../../components/checkout/payment-method-label\";\r\nimport {canMakePayment} from \"./local-payment-method\";\r\nimport {PaymentMethod} from \"../../components/checkout\";\r\n\r\nconst getData = getSettings('stripe_alipay_data');\r\n\r\nif (getData()) {\r\n registerPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icon')}/>,\r\n ariaLabel: 'Alipay',\r\n placeOrderButtonLabel: getData('placeOrderButtonLabel'),\r\n canMakePayment: canMakePayment(getData),\r\n content: <PaymentMethod\r\n content={LocalPaymentSourceContent}\r\n getData={getData}/>,\r\n edit: <PaymentMethod\r\n content={LocalPaymentSourceContent}\r\n getData={getData}/>,\r\n supports: {\r\n showSavedCards: false,\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n })\r\n}\r\n","import {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings} from \"../util\";\r\nimport {LocalPaymentSourceContent} from './local-payment-method';\r\nimport {PaymentMethodLabel, PaymentMethod} from \"../../components/checkout\";\r\nimport {canMakePayment} from \"./local-payment-method\";\r\n\r\nconst getData = getSettings('stripe_bancontact_data');\r\n\r\nif (getData()) {\r\n registerPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icon')}/>,\r\n ariaLabel: 'Bancontact',\r\n placeOrderButtonLabel: getData('placeOrderButtonLabel'),\r\n canMakePayment: canMakePayment(getData),\r\n content: <PaymentMethod\r\n content={LocalPaymentSourceContent}\r\n getData={getData}/>,\r\n edit: <PaymentMethod\r\n content={LocalPaymentSourceContent}\r\n getData={getData}/>,\r\n supports: {\r\n showSavedCards: false,\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n })\r\n}","import {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings} from \"../util\";\r\nimport {LocalPaymentIntentContent} from './local-payment-method';\r\nimport {PaymentMethodLabel, PaymentMethod} from \"../../components/checkout\";\r\nimport {canMakePayment} from \"./local-payment-method\";\r\nimport {AuBankAccountElement} from \"@stripe/react-stripe-js\";\r\n\r\nconst getData = getSettings('stripe_becs_data');\r\n\r\nif (getData()) {\r\n registerPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icon')}/>,\r\n ariaLabel: 'BECS',\r\n placeOrderButtonLabel: getData('placeOrderButtonLabel'),\r\n canMakePayment: canMakePayment(getData),\r\n content: <PaymentMethod\r\n content={LocalPaymentIntentContent}\r\n getData={getData}\r\n confirmationMethod={'confirmAuBecsDebitPayment'}\r\n component={AuBankAccountElement}/>,\r\n edit: <PaymentMethod content={LocalPaymentIntentContent} getData={getData}/>,\r\n supports: {\r\n showSavedCards: false,\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n })\r\n}","import {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings} from \"../util\";\r\nimport {LocalPaymentSourceContent} from './local-payment-method';\r\nimport {PaymentMethodLabel, PaymentMethod} from \"../../components/checkout\";\r\nimport {canMakePayment} from \"./local-payment-method\";\r\n\r\nconst getData = getSettings('stripe_eps_data');\r\n\r\nif (getData()) {\r\n registerPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icon')}/>,\r\n ariaLabel: 'EPS',\r\n placeOrderButtonLabel: getData('placeOrderButtonLabel'),\r\n canMakePayment: canMakePayment(getData),\r\n content: <PaymentMethod content={LocalPaymentSourceContent} getData={getData}/>,\r\n edit: <PaymentMethod content={LocalPaymentSourceContent} getData={getData}/>,\r\n supports: {\r\n showSavedCards: false,\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n })\r\n}","import {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings} from \"../util\";\r\nimport {LocalPaymentIntentContent} from './local-payment-method';\r\nimport {PaymentMethodLabel, PaymentMethod} from \"../../components/checkout\";\r\nimport {canMakePayment} from \"./local-payment-method\";\r\nimport {FpxBankElement} from \"@stripe/react-stripe-js\";\r\n\r\nconst getData = getSettings('stripe_fpx_data');\r\n\r\nif (getData()) {\r\n registerPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icon')}/>,\r\n ariaLabel: 'FPX',\r\n placeOrderButtonLabel: getData('placeOrderButtonLabel'),\r\n canMakePayment: canMakePayment(getData),\r\n content: <PaymentMethod\r\n content={LocalPaymentIntentContent}\r\n getData={getData}\r\n confirmationMethod={'confirmIdealPayment'}\r\n component={FpxBankElement}/>,\r\n edit: <PaymentMethod content={LocalPaymentIntentContent} getData={getData}/>,\r\n supports: {\r\n showSavedCards: false,\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n })\r\n}","import {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings} from \"../util\";\r\nimport {LocalPaymentSourceContent} from './local-payment-method';\r\nimport {PaymentMethodLabel, PaymentMethod} from \"../../components/checkout\";\r\nimport {canMakePayment} from \"./local-payment-method\";\r\n\r\nconst getData = getSettings('stripe_giropay_data');\r\n\r\nif (getData()) {\r\n registerPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icon')}/>,\r\n ariaLabel: 'Giropay',\r\n placeOrderButtonLabel: getData('placeOrderButtonLabel'),\r\n canMakePayment: canMakePayment(getData),\r\n content: <PaymentMethod content={LocalPaymentSourceContent} getData={getData}/>,\r\n edit: <PaymentMethod content={LocalPaymentSourceContent} getData={getData}/>,\r\n supports: {\r\n showSavedCards: false,\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n })\r\n}","import {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings} from \"../util\";\r\nimport {LocalPaymentIntentContent} from './local-payment-method';\r\nimport {PaymentMethodLabel, PaymentMethod} from \"../../components/checkout\";\r\nimport {canMakePayment} from \"./local-payment-method\";\r\n\r\nconst getData = getSettings('stripe_grabpay_data');\r\n\r\nif (getData()) {\r\n registerPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icon')}/>,\r\n ariaLabel: 'GrabPay',\r\n placeOrderButtonLabel: getData('placeOrderButtonLabel'),\r\n canMakePayment: canMakePayment(getData),\r\n content: <PaymentMethod\r\n content={LocalPaymentIntentContent}\r\n getData={getData}\r\n confirmationMethod={'confirmGrabPayPayment'}/>,\r\n edit: <PaymentMethod content={LocalPaymentIntentContent} getData={getData}/>,\r\n supports: {\r\n showSavedCards: false,\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n })\r\n}","export * from './use-after-process-local-payment';\r\nexport * from './use-validate-checkout';\r\nexport * from './use-create-source';","import {useEffect, useRef} from '@wordpress/element';\r\nimport {useStripe} from \"@stripe/react-stripe-js\";\r\nimport {ensureErrorResponse, getBillingDetailsFromAddress, StripeError} from \"../../util\";\r\n\r\nexport const useAfterProcessLocalPayment = (\r\n {\r\n getData,\r\n billingData,\r\n eventRegistration,\r\n responseTypes,\r\n activePaymentMethod,\r\n confirmationMethod,\r\n getPaymentMethodArgs = () => ({})\r\n }\r\n) => {\r\n const stripe = useStripe();\r\n const {onCheckoutAfterProcessingWithSuccess, onCheckoutAfterProcessingWithError} = eventRegistration;\r\n const currentBillingData = useRef(billingData);\r\n const currentPaymentMethodArgs = useRef(getPaymentMethodArgs);\r\n useEffect(() => {\r\n currentBillingData.current = billingData;\r\n }, [billingData]);\r\n\r\n useEffect(() => {\r\n currentPaymentMethodArgs.current = getPaymentMethodArgs;\r\n }, [getPaymentMethodArgs]);\r\n\r\n useEffect(() => {\r\n const unsubscribeAfterProcessingWithSuccess = onCheckoutAfterProcessingWithSuccess(async ({redirectUrl}) => {\r\n if (getData('name') === activePaymentMethod) {\r\n try {\r\n let match = redirectUrl.match(/#response=(.+)/);\r\n if (match) {\r\n let {client_secret, return_url, ...order} = JSON.parse(window.atob(decodeURIComponent(match[1])));\r\n let result = await stripe[confirmationMethod](client_secret, {\r\n payment_method: {\r\n billing_details: getBillingDetailsFromAddress(currentBillingData.current),\r\n ...currentPaymentMethodArgs.current()\r\n },\r\n return_url\r\n });\r\n if (result.error) {\r\n throw new StripeError(result.error);\r\n }\r\n }\r\n } catch (e) {\r\n console.log(e);\r\n return ensureErrorResponse(responseTypes, e.error);\r\n }\r\n }\r\n })\r\n return () => unsubscribeAfterProcessingWithSuccess();\r\n }, [\r\n stripe,\r\n onCheckoutAfterProcessingWithSuccess,\r\n onCheckoutAfterProcessingWithError\r\n ]);\r\n}","import {useState, useEffect, useRef, useCallback} from '@wordpress/element';\r\nimport {\r\n getDefaultSourceArgs,\r\n ensureSuccessResponse,\r\n ensureErrorResponse,\r\n StripeError\r\n} from \"../../util\";\r\nimport {useStripe, useElements} from \"@stripe/react-stripe-js\";\r\nimport {__} from '@wordpress/i18n';\r\n\r\nexport const useCreateSource = (\r\n {\r\n getData,\r\n billing,\r\n shippingAddress,\r\n onPaymentProcessing,\r\n responseTypes,\r\n getSourceArgs = false,\r\n element = false\r\n }) => {\r\n const [source, setSource] = useState(false);\r\n const [isValid, setIsValid] = useState(false);\r\n const currentValues = useRef({\r\n billing,\r\n shippingAddress,\r\n });\r\n const stripe = useStripe();\r\n const elements = useElements();\r\n useEffect(() => {\r\n currentValues.current = {\r\n billing,\r\n shippingAddress\r\n }\r\n });\r\n\r\n const getSourceArgsInternal = useCallback(() => {\r\n const {billing} = currentValues.current;\r\n const {cartTotal, currency, billingData} = billing;\r\n let args = getDefaultSourceArgs({\r\n type: getData('paymentType'),\r\n amount: cartTotal.value,\r\n billingData,\r\n currency: currency.code,\r\n returnUrl: getData('returnUrl')\r\n });\r\n if (getSourceArgs) {\r\n args = getSourceArgs(args, {billingData});\r\n }\r\n return args;\r\n }, []);\r\n\r\n const getSuccessData = useCallback((sourceId) => {\r\n return {\r\n meta: {\r\n paymentMethodData: {\r\n [`${getData('name')}_token_key`]: sourceId\r\n }\r\n }\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n const unsubscribe = onPaymentProcessing(async () => {\r\n if (source) {\r\n return ensureSuccessResponse(responseTypes, getSuccessData(source.id));\r\n }\r\n // create the source\r\n try {\r\n let result;\r\n if (element) {\r\n // validate the element\r\n if (!isValid) {\r\n throw __('Please enter your payment info before proceeding.', 'woo-stripe-payment');\r\n }\r\n result = await stripe.createSource(elements.getElement(element), getSourceArgsInternal());\r\n } else {\r\n result = await stripe.createSource(getSourceArgsInternal());\r\n }\r\n if (result.error) {\r\n throw new StripeError(result.error);\r\n }\r\n setSource(result.source);\r\n return ensureSuccessResponse(responseTypes, getSuccessData(result.source.id));\r\n } catch (err) {\r\n console.log(err);\r\n return ensureErrorResponse(responseTypes, err.error || err);\r\n }\r\n });\r\n return () => unsubscribe();\r\n }, [\r\n source,\r\n onPaymentProcessing,\r\n stripe,\r\n responseTypes,\r\n element,\r\n isValid,\r\n setIsValid\r\n ]);\r\n return {setIsValid};\r\n}","import {useEffect, useRef, useState} from '@wordpress/element';\r\nimport {ensureErrorResponse} from \"../../util\";\r\nimport {__} from \"@wordpress/i18n\";\r\n\r\nexport const useValidateCheckout = (\r\n {\r\n subscriber,\r\n responseTypes,\r\n component = null,\r\n msg = __('Please enter your payment info before proceeding.', 'woo-stripe-payment')\r\n }) => {\r\n const [isValid, setIsValid] = useState(false);\r\n\r\n useEffect(() => {\r\n const unsubscribe = subscriber(() => {\r\n if (component && !isValid) {\r\n return ensureErrorResponse(responseTypes, msg);\r\n }\r\n return true;\r\n });\r\n return () => unsubscribe();\r\n }, [\r\n subscriber,\r\n isValid,\r\n setIsValid,\r\n responseTypes,\r\n component\r\n ]);\r\n return {isValid, setIsValid};\r\n}","import {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings} from \"../util\";\r\nimport {LocalPaymentIntentContent} from './local-payment-method';\r\nimport {PaymentMethodLabel, PaymentMethod} from \"../../components/checkout\";\r\nimport {canMakePayment} from \"./local-payment-method\";\r\nimport {IdealBankElement} from \"@stripe/react-stripe-js\";\r\n\r\nconst getData = getSettings('stripe_ideal_data');\r\n\r\nif (getData()) {\r\n registerPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icon')}/>,\r\n ariaLabel: 'Ideal',\r\n placeOrderButtonLabel: getData('placeOrderButtonLabel'),\r\n canMakePayment: canMakePayment(getData),\r\n content: <PaymentMethod\r\n content={LocalPaymentIntentContent}\r\n getData={getData}\r\n confirmationMethod={'confirmIdealPayment'}\r\n component={IdealBankElement}/>,\r\n edit: <PaymentMethod content={LocalPaymentIntentContent} getData={getData}/>,\r\n supports: {\r\n showSavedCards: false,\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n })\r\n}","import './klarna';\r\nimport './ideal';\r\nimport './p24';\r\nimport './bancontact';\r\nimport './giropay';\r\nimport './eps';\r\nimport './multibanco';\r\nimport './sepa';\r\nimport './sofort';\r\nimport './wechat';\r\nimport './fpx';\r\nimport './becs';\r\nimport './grabpay';\r\nimport './alipay'","import {useEffect} from '@wordpress/element';\r\nimport RadioControlAccordion from \"../../../components/checkout/radio-control-accordion\";\r\n\r\nexport const KlarnaPaymentCategories = ({categories, onChange, selected}) => {\r\n return (\r\n <div className={'wc-stripe-blocks-klarna-container'}>\r\n <ul>\r\n {categories.map(category => {\r\n return <KlarnaPaymentCategory\r\n key={category.type}\r\n category={category}\r\n onChange={onChange}\r\n selected={selected}/>\r\n })}\r\n </ul>\r\n </div>\r\n );\r\n}\r\n\r\nconst KlarnaPaymentCategory = ({category, selected, onChange}) => {\r\n const checked = category.type === selected;\r\n useEffect(() => {\r\n Klarna.Payments.load({\r\n container: `#klarna-category-${category.type}`,\r\n payment_method_category: category.type,\r\n //instance_id: `klarna-instance-${category.type}`\r\n });\r\n }, []);\r\n const option = {\r\n label: category.label,\r\n value: category.type,\r\n content: (<div id={`klarna-category-${category.type}`}></div>)\r\n }\r\n return (\r\n <li className='wc-stripe-blocks-klarna__category' key={category.type}>\r\n <RadioControlAccordion option={option} checked={checked} onChange={onChange}/>\r\n </li>\r\n )\r\n}","export * from './use-create-source';\r\nexport * from './use-process-payment';","import {useEffect, useState, useRef, useCallback} from '@wordpress/element';\r\nimport {useStripe} from \"@stripe/react-stripe-js\";\r\nimport {useStripeError} from \"../../../hooks\";\r\nimport {getDefaultSourceArgs, getRoute, isAddressValid, StripeError, storeInCache, getFromCache} from \"../../../util\";\r\nimport apiFetch from \"@wordpress/api-fetch\";\r\n\r\nlet klarnaSource = {};\r\n\r\nexport const useCreateSource = (\r\n {\r\n getData,\r\n billing,\r\n shippingData,\r\n }) => {\r\n const stripe = useStripe();\r\n const [error, setError] = useStripeError();\r\n const abortController = useRef(new AbortController());\r\n const currentSourceArgs = useRef({});\r\n const oldSourceArgs = useRef({});\r\n const [isLoading, setIsLoading] = useState(false);\r\n const [source, setSource] = useState(false);\r\n const {billingData, cartTotal, cartTotalItems, currency} = billing;\r\n const isCheckoutValid = useCallback(({billingData, shippingData}) => {\r\n const {needsShipping, shippingAddress} = shippingData;\r\n if (isAddressValid(billingData)) {\r\n if (needsShipping) {\r\n return isAddressValid(shippingAddress);\r\n }\r\n return true;\r\n }\r\n return false;\r\n }, []);\r\n const getLineItems = useCallback((cartTotalItems, currency) => {\r\n const items = [];\r\n cartTotalItems.forEach(item => {\r\n items.push({\r\n amount: item.value,\r\n currency,\r\n description: item.label,\r\n quantity: 1\r\n });\r\n });\r\n return items;\r\n }, []);\r\n\r\n const getSourceArgs = useCallback(({cartTotal, cartTotalItems, billingData, currency, shippingData}) => {\r\n const {first_name, last_name, country} = billingData;\r\n const {needsShipping, shippingAddress} = shippingData;\r\n let args = getDefaultSourceArgs({\r\n type: getData('paymentType'),\r\n amount: cartTotal.value,\r\n billingData,\r\n currency: currency.code,\r\n returnUrl: getData('returnUrl')\r\n });\r\n args = {\r\n ...args, ...{\r\n source_order: {\r\n items: getLineItems(cartTotalItems, currency.code)\r\n },\r\n klarna: {\r\n locale: getData('locale'),\r\n product: 'payment',\r\n purchase_country: country,\r\n first_name,\r\n last_name\r\n }\r\n }\r\n }\r\n if (country == 'US') {\r\n args.klarna.custom_payment_methods = 'payin4,installments';\r\n }\r\n if (needsShipping) {\r\n args.klarna = {\r\n ...args.klarna, ...{\r\n shipping_first_name: shippingAddress.first_name,\r\n shipping_last_name: shippingAddress.last_name\r\n }\r\n }\r\n args.source_order.shipping = {\r\n address: {\r\n city: shippingAddress.city || '',\r\n country: shippingAddress.country || '',\r\n line1: shippingAddress.address_1 || '',\r\n line2: shippingAddress.address_2 || '',\r\n postal_code: shippingAddress.postcode || '',\r\n state: shippingAddress.state || ''\r\n }\r\n }\r\n }\r\n oldSourceArgs.current = currentSourceArgs.current;\r\n currentSourceArgs.current = args;\r\n return args;\r\n }, []);\r\n const filterUpdateSourceArgs = (args) => {\r\n return ['type', 'currency', 'statement_descriptor', 'redirect', 'klarna.product', 'klarna.locale', 'klarna.custom_payment_methods'].reduce((obj, k) => {\r\n if (k.indexOf('.') > -1) {\r\n let keys = k.split('.');\r\n let obj2 = keys.slice(0, keys.length - 1).reduce(function (obj, k) {\r\n return obj[k];\r\n }, obj);\r\n k = keys[keys.length - 1];\r\n delete obj2[k];\r\n return obj;\r\n }\r\n delete obj[k];\r\n return obj;\r\n }, args);\r\n }\r\n\r\n const compareSourceArgs = useCallback((args, args2) => {\r\n const getArgs = (args1, args2) => {\r\n const newArgs = {};\r\n for (let key of Object.keys(args1)) {\r\n if (typeof args1[key] === 'object' && !Array.isArray(args1[key])) {\r\n newArgs[key] = getArgs(args1[key], args2[key]);\r\n } else {\r\n newArgs[key] = args2[key];\r\n }\r\n }\r\n return newArgs;\r\n }\r\n const newArgs = getArgs(args, args2);\r\n return JSON.stringify(args) == JSON.stringify(newArgs);\r\n }, []);\r\n const createSource = useCallback(async (\r\n {\r\n billingData,\r\n shippingData,\r\n cartTotal,\r\n cartTotalItems,\r\n currency,\r\n }) => {\r\n let args = getSourceArgs({\r\n cartTotal,\r\n cartTotalItems,\r\n billingData,\r\n currency,\r\n shippingData\r\n });\r\n try {\r\n let result = await stripe.createSource(args);\r\n if (result.error) {\r\n throw new StripeError(result.error);\r\n }\r\n storeInCache('klarna:source', {[currency.code]: {source: result.source, args: currentSourceArgs.current}});\r\n setSource(result.source);\r\n } catch (err) {\r\n console.log(err);\r\n setError(err.error);\r\n }\r\n }, [\r\n stripe,\r\n setSource\r\n ]);\r\n\r\n const updateSource = useCallback(async ({source, updates}) => {\r\n\r\n const data = {\r\n updates,\r\n source_id: source.id,\r\n client_secret: source.client_secret,\r\n payment_method: getData('name')\r\n };\r\n try {\r\n abortController.current.abort();\r\n abortController.current = new AbortController();\r\n let result = await apiFetch({\r\n url: getRoute('update/source'),\r\n method: 'POST',\r\n data,\r\n signal: abortController.current.signal\r\n });\r\n if (result.source) {\r\n storeInCache('klarna:source', {source, args: currentSourceArgs.current});\r\n setSource(source);\r\n }\r\n } catch (err) {\r\n console.log('update aborted');\r\n }\r\n }, [setSource]);\r\n\r\n // Create the source if the required data is available\r\n useEffect(() => {\r\n if (!source) {\r\n if (getFromCache('klarna:source')?.[currency.code]) {\r\n const {source, args} = getFromCache('klarna:source')[currency.code];\r\n currentSourceArgs.current = args;\r\n setSource(source);\r\n } else {\r\n if (stripe && isCheckoutValid({billingData, shippingData})) {\r\n setIsLoading(true);\r\n createSource({\r\n billingData,\r\n shippingData,\r\n cartTotal,\r\n cartTotalItems,\r\n currency\r\n }).then(() => setIsLoading(false));\r\n }\r\n }\r\n }\r\n }, [\r\n stripe,\r\n source?.id,\r\n createSource,\r\n billingData,\r\n cartTotal.value,\r\n shippingData,\r\n setIsLoading,\r\n cartTotalItems,\r\n currency.code\r\n ]);\r\n\r\n // update the source if data has changed and the source exists\r\n useEffect(() => {\r\n if (stripe && source) {\r\n // perform a comparison to see if the source needs to be updated\r\n const updates = filterUpdateSourceArgs(getSourceArgs({\r\n billingData,\r\n cartTotal,\r\n cartTotalItems,\r\n currency,\r\n shippingData\r\n }));\r\n if (!compareSourceArgs(updates, oldSourceArgs.current)) {\r\n updateSource({source, updates});\r\n }\r\n }\r\n }, [\r\n source?.id,\r\n billingData,\r\n cartTotal.value,\r\n cartTotalItems,\r\n shippingData,\r\n currency.code\r\n ]);\r\n\r\n return {source, setSource, isLoading};\r\n}","import {useEffect} from '@wordpress/element';\r\nimport {ensureErrorResponse, ensureSuccessResponse, deleteFromCache} from \"../../../util\";\r\nimport {__} from \"@wordpress/i18n\";\r\n\r\nexport const useProcessPayment = (\r\n {\r\n payment_method,\r\n source_id,\r\n paymentCategory,\r\n onPaymentProcessing,\r\n responseTypes\r\n }) => {\r\n useEffect(() => {\r\n const unsubscribe = onPaymentProcessing(() => {\r\n return new Promise(resolve => {\r\n // authorize the Klarna payment\r\n Klarna.Payments.authorize({\r\n payment_method_category: paymentCategory\r\n }, (response) => {\r\n if (response.approved) {\r\n deleteFromCache('klarna:source');\r\n // add the source to the response\r\n resolve(ensureSuccessResponse(responseTypes, {\r\n meta: {\r\n paymentMethodData: {\r\n [`${payment_method}_token_key`]: source_id\r\n }\r\n }\r\n }));\r\n } else {\r\n resolve(ensureErrorResponse(responseTypes, response.error || __('Your purchase is not approved.', 'woo-stripe-payment')));\r\n }\r\n });\r\n });\r\n });\r\n return () => unsubscribe();\r\n }, [\r\n source_id,\r\n paymentCategory,\r\n onPaymentProcessing\r\n ]\r\n );\r\n}","import {useEffect, useState} from '@wordpress/element';\r\nimport {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {__} from '@wordpress/i18n';\r\nimport {useProcessCheckoutError} from '../../hooks';\r\nimport {\r\n getSettings,\r\n initStripe,\r\n} from \"../../util\";\r\nimport {PaymentMethodLabel, PaymentMethod} from \"../../../components/checkout\";\r\nimport {canMakePayment} from \"../local-payment-method\";\r\nimport {Elements} from \"@stripe/react-stripe-js\";\r\nimport {KlarnaPaymentCategories} from \"./categories\";\r\nimport {KlarnaLoader} from \"./loader\";\r\nimport {useCreateSource, useProcessPayment} from \"./hooks\";\r\nimport './styles.scss';\r\n\r\nconst getData = getSettings('stripe_klarna_data');\r\n\r\nconst KlarnaContainer = (props) => {\r\n return (\r\n <Elements stripe={initStripe}>\r\n <KlarnaPaymentMethod {...props}/>\r\n </Elements>\r\n );\r\n}\r\n\r\nconst KlarnaPaymentMethod = (\r\n {\r\n getData,\r\n billing,\r\n shippingData,\r\n emitResponse,\r\n eventRegistration\r\n }) => {\r\n const {responseTypes} = emitResponse;\r\n const {onPaymentProcessing, onCheckoutAfterProcessingWithError} = eventRegistration;\r\n const [selected, setSelected] = useState('');\r\n const getCategoriesFromSource = (source) => {\r\n const paymentMethodCategories = source.klarna.payment_method_categories.split(',');\r\n const categories = [];\r\n for (let type of Object.keys(getData('categories'))) {\r\n if (paymentMethodCategories.includes(type)) {\r\n categories.push({type, label: getData('categories')[type]});\r\n }\r\n }\r\n return categories;\r\n }\r\n\r\n const {source, isLoading} = useCreateSource({\r\n getData,\r\n billing,\r\n shippingData\r\n });\r\n\r\n useProcessPayment({\r\n payment_method: getData('name'),\r\n source_id: source.id,\r\n paymentCategory: selected,\r\n onPaymentProcessing,\r\n responseTypes\r\n });\r\n\r\n useProcessCheckoutError({responseTypes, subscriber: onCheckoutAfterProcessingWithError});\r\n\r\n useEffect(() => {\r\n if (!selected && source) {\r\n const categories = getCategoriesFromSource(source);\r\n if (categories.length) {\r\n setSelected(categories.shift().type);\r\n }\r\n\r\n }\r\n }, [source]);\r\n\r\n if (source) {\r\n Klarna.Payments.init({\r\n client_token: source.klarna.client_token\r\n });\r\n const categories = getCategoriesFromSource(source);\r\n return (\r\n <KlarnaPaymentCategories\r\n categories={categories}\r\n selected={!selected && categories.length > 0 ? categories[0].type : selected}\r\n onChange={setSelected}/>\r\n )\r\n } else {\r\n if (isLoading) {\r\n return <KlarnaLoader/>\r\n }\r\n }\r\n return (\r\n <div className='wc-stripe-blocks-klarna__notice'>\r\n {__('Please fill out all required fields before paying with Klarna.', 'woo-stripe-payment')}\r\n </div>\r\n );\r\n}\r\n\r\nif (getData()) {\r\n registerPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icon')}/>,\r\n ariaLabel: 'Klarna',\r\n placeOrderButtonLabel: getData('placeOrderButtonLabel'),\r\n canMakePayment: canMakePayment(getData, ({settings, billingData, cartTotals}) => {\r\n const {country} = billingData;\r\n const {currency_code: currency} = cartTotals;\r\n const requiredParams = settings('requiredParams');\r\n return [currency] in requiredParams && requiredParams[currency].includes(country);\r\n }),\r\n content: <PaymentMethod\r\n getData={getData}\r\n content={KlarnaContainer}/>,\r\n edit: <PaymentMethod\r\n getData={getData}\r\n content={KlarnaContainer}/>,\r\n supports: {\r\n showSavedCards: false,\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n })\r\n}\r\n","export const KlarnaLoader = () => {\r\n return (\r\n <div className=\"wc-stripe-klarna-loader\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n )\r\n}","import {useCallback} from '@wordpress/element';\r\nimport {useElements, Elements} from \"@stripe/react-stripe-js\";\r\nimport {initStripe as loadStripe, cartContainsSubscription, cartContainsPreOrder} from '../util'\r\nimport {useAfterProcessLocalPayment, useValidateCheckout, useCreateSource} from \"./hooks\";\r\nimport {useProcessCheckoutError} from \"../hooks\";\r\n\r\n/**\r\n * Return true if the local payment method can be used.\r\n * @param settings\r\n * @returns {function({billingData: *, [p: string]: *}): *}\r\n */\r\nexport const canMakePayment = (settings, callback = false) => ({billingData, cartTotals, ...props}) => {\r\n const {currency_code} = cartTotals;\r\n const {country} = billingData;\r\n const countries = settings('countries');\r\n const type = settings('allowedCountries');\r\n const supports = settings('features');\r\n let canMakePayment = false;\r\n if (settings('isAdmin')) {\r\n canMakePayment = true;\r\n } else {\r\n // Check if there are any subscriptions or pre-orders in the cart.\r\n if (cartContainsSubscription() && !supports.includes('subscriptions')) {\r\n return false;\r\n } else if (cartContainsPreOrder() && !supports.includes('pre-orders')) {\r\n return false;\r\n }\r\n if (settings('currencies').includes(currency_code)) {\r\n if (type === 'all_except') {\r\n canMakePayment = !settings('exceptCountries').includes(country);\r\n } else if (type === 'specific') {\r\n canMakePayment = settings('specificCountries').includes(country);\r\n } else {\r\n canMakePayment = countries.length > 0 ? countries.includes(country) : true;\r\n }\r\n }\r\n if (callback && canMakePayment) {\r\n canMakePayment = callback({settings, billingData, cartTotals, ...props});\r\n }\r\n }\r\n return canMakePayment;\r\n}\r\n\r\nexport const LocalPaymentIntentContent = (props) => {\r\n return (\r\n <Elements stripe={loadStripe}>\r\n <LocalPaymentIntentMethod {...props}/>\r\n </Elements>\r\n )\r\n}\r\n\r\nexport const LocalPaymentSourceContent = (props) => {\r\n return (\r\n <Elements stripe={loadStripe}>\r\n <LocalPaymentSourceMethod {...props}/>\r\n </Elements>\r\n )\r\n}\r\n\r\nconst LocalPaymentSourceMethod = (\r\n {\r\n getData,\r\n billing,\r\n shippingData,\r\n emitResponse,\r\n eventRegistration,\r\n getSourceArgs = false,\r\n element = false\r\n }) => {\r\n const {shippingAddress} = shippingData;\r\n const {onPaymentProcessing, onCheckoutAfterProcessingWithError} = eventRegistration;\r\n const {responseTypes, noticeContexts} = emitResponse;\r\n const onChange = (event) => {\r\n setIsValid(event.complete);\r\n }\r\n const {setIsValid} = useCreateSource({\r\n getData,\r\n billing,\r\n shippingAddress,\r\n onPaymentProcessing,\r\n responseTypes,\r\n getSourceArgs,\r\n element\r\n });\r\n\r\n if (element) {\r\n return (\r\n <LocalPaymentElementContainer\r\n name={getData('name')}\r\n options={getData('elementOptions')}\r\n onChange={onChange}\r\n element={element}/>\r\n )\r\n }\r\n return null;\r\n}\r\n\r\nconst LocalPaymentIntentMethod = (\r\n {\r\n getData,\r\n billing,\r\n emitResponse,\r\n eventRegistration,\r\n activePaymentMethod,\r\n confirmationMethod = null,\r\n component = null\r\n }) => {\r\n const elements = useElements();\r\n const {billingData} = billing;\r\n const {onPaymentProcessing, onCheckoutAfterProcessingWithError} = eventRegistration;\r\n const {responseTypes, noticeContexts} = emitResponse;\r\n const getPaymentMethodArgs = useCallback(() => {\r\n if (component) {\r\n return {\r\n [getData('paymentType')]: elements.getElement(component)\r\n }\r\n }\r\n return {};\r\n }, [elements]);\r\n const {setIsValid} = useValidateCheckout({\r\n subscriber: onPaymentProcessing,\r\n responseTypes,\r\n component\r\n }\r\n );\r\n\r\n useAfterProcessLocalPayment({\r\n getData,\r\n billingData,\r\n eventRegistration,\r\n responseTypes,\r\n activePaymentMethod,\r\n confirmationMethod,\r\n getPaymentMethodArgs\r\n });\r\n useProcessCheckoutError({\r\n responseTypes,\r\n subscriber: onCheckoutAfterProcessingWithError,\r\n messageContext: noticeContexts.PAYMENT\r\n });\r\n if (component) {\r\n const onChange = (event) => setIsValid(!event.empty)\r\n return (\r\n <LocalPaymentElementContainer\r\n name={getData('name')}\r\n options={getData('elementOptions')}\r\n onChange={onChange}\r\n element={component}/>\r\n )\r\n }\r\n return null;\r\n}\r\n\r\nconst LocalPaymentElementContainer = ({name, onChange, element, options}) => {\r\n const Tag = element;\r\n return (\r\n <div className={`wc-stripe-local-payment-container ${name} ${Tag.displayName}`}>\r\n <Tag options={options} onChange={onChange}/>\r\n </div>\r\n )\r\n}","import {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings} from \"../util\";\r\nimport {LocalPaymentSourceContent} from './local-payment-method';\r\nimport {PaymentMethodLabel, PaymentMethod} from \"../../components/checkout\";\r\nimport {canMakePayment} from \"./local-payment-method\";\r\n\r\nconst getData = getSettings('stripe_multibanco_data');\r\n\r\nif (getData()) {\r\n registerPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icon')}/>,\r\n ariaLabel: 'MultiBanco',\r\n placeOrderButtonLabel: getData('placeOrderButtonLabel'),\r\n canMakePayment: canMakePayment(getData),\r\n content: <PaymentMethod content={LocalPaymentSourceContent} getData={getData}/>,\r\n edit: <PaymentMethod content={LocalPaymentSourceContent} getData={getData}/>,\r\n supports: {\r\n showSavedCards: false,\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n })\r\n}\r\n","import {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings} from \"../util\";\r\nimport {LocalPaymentSourceContent} from './local-payment-method';\r\nimport {PaymentMethodLabel, PaymentMethod} from \"../../components/checkout\";\r\nimport {canMakePayment} from \"./local-payment-method\";\r\n\r\nconst getData = getSettings('stripe_p24_data');\r\n\r\nif (getData()) {\r\n registerPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icon')}/>,\r\n ariaLabel: 'P24',\r\n placeOrderButtonLabel: getData('placeOrderButtonLabel'),\r\n canMakePayment: canMakePayment(getData),\r\n content: <PaymentMethod content={LocalPaymentSourceContent} getData={getData}/>,\r\n edit: <PaymentMethod content={LocalPaymentSourceContent} getData={getData}/>,\r\n supports: {\r\n showSavedCards: false,\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n })\r\n}\r\n","import {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings, cartContainsPreOrder, cartContainsSubscription} from \"../util\";\r\nimport {LocalPaymentSourceContent} from './local-payment-method';\r\nimport {PaymentMethodLabel, PaymentMethod} from \"../../components/checkout\";\r\nimport {canMakePayment} from \"./local-payment-method\";\r\nimport {IbanElement} from \"@stripe/react-stripe-js\";\r\n\r\nconst getData = getSettings('stripe_sepa_data');\r\n\r\nconst getSourceArgs = (args, {billingData}) => {\r\n args.mandate = {\r\n notification_method: billingData.email ? 'email' : 'manual',\r\n interval: cartContainsSubscription() || cartContainsPreOrder() ? 'scheduled' : 'one_time'\r\n }\r\n if (args.mandate.interval === 'scheduled') {\r\n delete args.amount;\r\n }\r\n return args;\r\n}\r\n\r\nconst LocalPaymentMethod = (PaymentMethod) => ({getData, ...props}) => {\r\n return (\r\n <>\r\n <PaymentMethod {...{...props, getData}}/>\r\n <div className={'wc-stripe-blocks-sepa__mandate'}>\r\n {getData('mandate')}\r\n </div>\r\n </>\r\n )\r\n}\r\n\r\nconst SepaPaymentMethod = LocalPaymentMethod(PaymentMethod);\r\n\r\nif (getData()) {\r\n registerPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icon')}/>,\r\n ariaLabel: 'SEPA',\r\n placeOrderButtonLabel: getData('placeOrderButtonLabel'),\r\n canMakePayment: canMakePayment(getData),\r\n content: <SepaPaymentMethod\r\n content={LocalPaymentSourceContent}\r\n getData={getData}\r\n element={IbanElement}\r\n getSourceArgs={getSourceArgs}/>,\r\n edit: <LocalPaymentSourceContent getData={getData}/>,\r\n supports: {\r\n showSavedCards: false,\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n })\r\n}","import {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings} from \"../util\";\r\nimport {LocalPaymentSourceContent} from './local-payment-method';\r\nimport {PaymentMethodLabel, PaymentMethod} from \"../../components/checkout\";\r\nimport {canMakePayment} from \"./local-payment-method\";\r\n\r\nconst getData = getSettings('stripe_sofort_data');\r\n\r\nconst getSourceArgs = (args, {billingData}) => {\r\n return {...args, sofort: {country: billingData.country}};\r\n}\r\n\r\nif (getData()) {\r\n registerPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icon')}/>,\r\n ariaLabel: 'Sofort',\r\n placeOrderButtonLabel: getData('placeOrderButtonLabel'),\r\n canMakePayment: canMakePayment(getData),\r\n content: <PaymentMethod\r\n content={LocalPaymentSourceContent}\r\n getData={getData}\r\n getSourceArgs={getSourceArgs}/>,\r\n edit: <PaymentMethod content={LocalPaymentSourceContent} getData={getData}/>,\r\n supports: {\r\n showSavedCards: false,\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n })\r\n}\r\n","import {useEffect, useRef, useState, useCallback} from '@wordpress/element';\r\nimport {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {\r\n getSettings,\r\n initStripe as loadStripe,\r\n getDefaultSourceArgs,\r\n isAddressValid,\r\n StripeError,\r\n isTestMode,\r\n ensureSuccessResponse,\r\n getErrorMessage,\r\n storeInCache,\r\n getFromCache,\r\n deleteFromCache\r\n} from \"../util\";\r\nimport {PaymentMethodLabel, PaymentMethod} from \"../../components/checkout\";\r\nimport {canMakePayment} from \"./local-payment-method\";\r\nimport {Elements} from \"@stripe/react-stripe-js\";\r\nimport {useValidateCheckout} from \"./hooks\";\r\nimport {__} from '@wordpress/i18n';\r\n//import QRCode from 'QRCode';\r\nimport {useStripe} from \"@stripe/react-stripe-js\";\r\nimport {useStripeError} from \"../hooks\";\r\n\r\nconst getData = getSettings('stripe_wechat_data');\r\n\r\nconst WeChatComponent = (props) => {\r\n return (\r\n <Elements stripe={loadStripe}>\r\n <WeChatPaymentMethod {...props}/>\r\n </Elements>\r\n )\r\n}\r\n\r\nconst WeChatPaymentMethod = (\r\n {\r\n getData,\r\n billing,\r\n shippingData,\r\n emitResponse,\r\n eventRegistration,\r\n components\r\n }) => {\r\n const {responseTypes} = emitResponse;\r\n const {onPaymentProcessing, onCheckoutAfterProcessingWithSuccess} = eventRegistration;\r\n const {ValidationInputError} = components;\r\n const {isValid, setIsValid} = useValidateCheckout({\r\n subscriber: eventRegistration.onPaymentProcessing,\r\n responseTypes: emitResponse.responseTypes,\r\n msg: __('Please scan your QR code to continue with payment.', 'woo-stripe-payment')\r\n });\r\n\r\n const {source, error, deleteSourceFromStorage} = useCreateSource({\r\n getData,\r\n billing,\r\n responseTypes,\r\n subscriber: onPaymentProcessing\r\n })\r\n\r\n /**\r\n * delete the source from storage once payment is successful.\r\n * If test mode, redirect to the Stripe test url.\r\n * If live mode, redirect to the return Url.\r\n */\r\n useEffect(() => {\r\n const unsubscribe = onCheckoutAfterProcessingWithSuccess(() => {\r\n deleteSourceFromStorage();\r\n return ensureSuccessResponse(responseTypes);\r\n });\r\n return () => unsubscribe();\r\n }, [\r\n source,\r\n onCheckoutAfterProcessingWithSuccess,\r\n deleteSourceFromStorage\r\n ]);\r\n\r\n useEffect(() => {\r\n if (source) {\r\n setIsValid(true);\r\n }\r\n }, [source]);\r\n\r\n if (source) {\r\n return (\r\n <QRCodeComponent text={source.wechat.qr_code_url}/>\r\n );\r\n } else if (error) {\r\n return (\r\n <div className='wechat-validation-error'>\r\n <ValidationInputError errorMessage={getErrorMessage(error)}/>\r\n </div>\r\n );\r\n } else {\r\n // if billing address is not valid\r\n if (!isAddressValid(billing.billingData)) {\r\n return __('Please fill out all the required fields in order to complete the WeChat payment.', 'woo-stripe-payment');\r\n }\r\n }\r\n return null;\r\n}\r\n\r\nconst QRCodeComponent = (\r\n {\r\n text,\r\n width = 128,\r\n height = 128,\r\n colorDark = '#424770',\r\n colorLight = '#f8fbfd',\r\n correctLevel = QRCode.CorrectLevel.H\r\n }) => {\r\n const el = useRef();\r\n useEffect(() => {\r\n new QRCode(el.current, {\r\n text,\r\n width,\r\n height,\r\n colorDark,\r\n colorLight,\r\n correctLevel\r\n })\r\n }, [el]);\r\n return (\r\n <>\r\n <div id='wc-stripe-block-qrcode' ref={el}></div>\r\n {isTestMode() && <p>\r\n {__('Test mode: Click the Place Order button to proceed.', 'woo-stripe-payment')}\r\n </p>}\r\n {!isTestMode() && <p>\r\n {__('Scan the QR code using your WeChat app. Once scanned click the Place Order button.', 'woo-stripe-payment')}\r\n </p>}\r\n </>\r\n )\r\n}\r\n\r\nconst useCreateSource = (\r\n {\r\n getData,\r\n billing,\r\n responseTypes,\r\n subscriber\r\n }) => {\r\n const stripe = useStripe();\r\n const [error, setError] = useStripeError();\r\n const [source, setSource] = useState(getFromCache('wechat:source'));\r\n const createSourceTimeoutId = useRef(null);\r\n const {cartTotal, billingData, currency} = billing;\r\n\r\n useEffect(() => {\r\n const unsubscribe = subscriber(() => {\r\n return ensureSuccessResponse(responseTypes, {\r\n meta: {\r\n paymentMethodData: {\r\n [`${getData('name')}_token_key`]: source.id\r\n }\r\n }\r\n })\r\n });\r\n return () => unsubscribe();\r\n }, [source, subscriber]);\r\n\r\n const createSource = useCallback(async () => {\r\n // validate the billing fields. If valid, create the source.\r\n try {\r\n if (!error && isAddressValid(billingData)) {\r\n let result = await stripe.createSource(getDefaultSourceArgs({\r\n type: getData('paymentType'),\r\n amount: cartTotal.value,\r\n billingData,\r\n currency: currency.code,\r\n returnUrl: getData('returnUrl')\r\n }));\r\n if (result.error) {\r\n throw new StripeError(result.error);\r\n }\r\n setSource(result.source);\r\n storeInCache('wechat:source', result.source);\r\n }\r\n } catch (err) {\r\n console.log('error: ', err);\r\n setError(err.error);\r\n }\r\n }, [\r\n stripe,\r\n source,\r\n cartTotal.value,\r\n billingData,\r\n currency,\r\n error\r\n ]);\r\n const deleteSourceFromStorage = useCallback(() => {\r\n deleteFromCache('wechat:source');\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (stripe && !source) {\r\n // if there is an existing request, cancel it.\r\n clearTimeout(createSourceTimeoutId.current);\r\n createSourceTimeoutId.current = setTimeout(createSource, 1000);\r\n }\r\n }, [\r\n stripe,\r\n source\r\n ]);\r\n\r\n return {source, setSource, error, deleteSourceFromStorage};\r\n}\r\n\r\n\r\nif (getData()) {\r\n registerPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icon')}/>,\r\n ariaLabel: 'WeChat',\r\n canMakePayment: canMakePayment(getData),\r\n content: <PaymentMethod content={WeChatComponent} getData={getData}/>,\r\n edit: <PaymentMethod content={WeChatComponent} getData={getData}/>,\r\n supports: {\r\n showSavedCards: false,\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n })\r\n}\r\n","import './style.scss';\r\n\r\nimport './payment-method';","import {useMemo, useEffect, useRef} from '@wordpress/element';\r\nimport {registerExpressPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings, initStripe as loadStripe, canMakePayment} from \"../util\";\r\nimport {useBreakpointWidth, useExpressBreakpointWidth} from '../hooks';\r\nimport {Elements, PaymentRequestButtonElement, useStripe} from \"@stripe/react-stripe-js\";\r\nimport {\r\n usePaymentRequest,\r\n useProcessPaymentIntent,\r\n useExportedValues,\r\n useAfterProcessingPayment,\r\n useStripeError\r\n} from '../hooks';\r\n\r\nconst getData = getSettings('stripe_payment_request_data');\r\n\r\nconst PaymentRequestContent = (props) => {\r\n return (\r\n <div className='wc-stripe-payment-request-container'>\r\n <Elements stripe={loadStripe}>\r\n <PaymentRequestButton {...props}/>\r\n </Elements>\r\n </div>\r\n );\r\n}\r\n\r\nconst PaymentRequestButton = (\r\n {\r\n getData,\r\n onClick,\r\n onClose,\r\n billing,\r\n shippingData,\r\n eventRegistration,\r\n emitResponse,\r\n onSubmit,\r\n activePaymentMethod,\r\n ...props\r\n }) => {\r\n const {onPaymentProcessing} = eventRegistration;\r\n const {responseTypes, noticeContexts} = emitResponse;\r\n const stripe = useStripe();\r\n const [error] = useStripeError();\r\n const canPay = (result) => result != null && !result.applePay;\r\n const exportedValues = useExportedValues();\r\n useExpressBreakpointWidth({payment_method: getData('name'), width: 300});\r\n const {setPaymentMethod} = useProcessPaymentIntent({\r\n getData,\r\n billing,\r\n shippingData,\r\n onPaymentProcessing,\r\n emitResponse,\r\n error,\r\n onSubmit,\r\n activePaymentMethod,\r\n exportedValues\r\n });\r\n useAfterProcessingPayment({\r\n getData,\r\n eventRegistration,\r\n responseTypes,\r\n activePaymentMethod,\r\n messageContext: noticeContexts.EXPRESS_PAYMENTS\r\n });\r\n const {paymentRequest} = usePaymentRequest({\r\n getData,\r\n onClose,\r\n stripe,\r\n billing,\r\n shippingData,\r\n eventRegistration,\r\n setPaymentMethod,\r\n exportedValues,\r\n canPay\r\n });\r\n\r\n const options = useMemo(() => {\r\n return {\r\n paymentRequest,\r\n style: {\r\n paymentRequestButton: getData('paymentRequestButton')\r\n }\r\n }\r\n }, [paymentRequest]);\r\n\r\n if (paymentRequest) {\r\n return (\r\n <PaymentRequestButtonElement options={options} onClick={onClick}/>\r\n )\r\n }\r\n return null;\r\n}\r\n\r\nconst PaymentRequestEdit = ({getData, ...props}) => {\r\n const canvas = useRef();\r\n useEffect(() => {\r\n const scale = window.devicePixelRatio;\r\n canvas.current.width = 20 * scale;\r\n canvas.current.height = 20 * scale;\r\n let ctx = canvas.current.getContext('2d');\r\n ctx.scale(scale, scale);\r\n ctx.beginPath();\r\n ctx.arc(10, 10, 10, 0, 2 * Math.PI);\r\n ctx.fillStyle = '#986fff';\r\n ctx.fill();\r\n });\r\n return (\r\n <div className='payment-request-block-editor'>\r\n <div className={'icon-container'}>\r\n <span>Buy now</span>\r\n <canvas className='PaymentRequestButton-icon' ref={canvas}/>\r\n <i className={'payment-request-arrow'}></i>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nregisterExpressPaymentMethod({\r\n name: getData('name'),\r\n canMakePayment: ({cartTotals}) => {\r\n if (getData('isAdmin')) {\r\n return true;\r\n }\r\n const {currency_code: currency, total_price} = cartTotals;\r\n return canMakePayment({\r\n country: getData('countryCode'),\r\n currency: currency.toLowerCase(),\r\n total: {\r\n label: getData('totalLabel'),\r\n amount: parseInt(total_price)\r\n }\r\n }, (result) => result != null && !result.applePay);\r\n },\r\n content: <PaymentRequestContent getData={getData}/>,\r\n edit: <PaymentRequestEdit getData={getData}/>,\r\n supports: {\r\n showSavedCards: getData('showSavedCards'),\r\n showSaveOption: getData('showSaveOption'),\r\n features: getData('features')\r\n }\r\n});","import {useEffect, useCallback} from '@wordpress/element';\r\nimport {initStripe as loadStripe, getSettings, handleCardAction} from '@paymentplugins/stripe/util';\r\n\r\nconst SavedCardComponent = (\r\n {\r\n eventRegistration,\r\n emitResponse,\r\n getData\r\n }) => {\r\n const {onCheckoutAfterProcessingWithSuccess} = eventRegistration;\r\n const {responseTypes} = emitResponse;\r\n const handleSuccessResult = useCallback(async ({redirectUrl}) => {\r\n const stripe = await loadStripe;\r\n return await handleCardAction({redirectUrl, getData, stripe, responseTypes});\r\n }, [onCheckoutAfterProcessingWithSuccess]);\r\n\r\n useEffect(() => {\r\n const unsubscribeOnCheckoutAfterProcessingWithSuccess = onCheckoutAfterProcessingWithSuccess(handleSuccessResult);\r\n return () => unsubscribeOnCheckoutAfterProcessingWithSuccess();\r\n }, [\r\n onCheckoutAfterProcessingWithSuccess\r\n ]);\r\n return null;\r\n}\r\n\r\nexport default SavedCardComponent;\r\n","import {loadStripe} from '@stripe/stripe-js';\r\nimport {getSetting} from '@woocommerce/settings'\r\nimport apiFetch from \"@wordpress/api-fetch\";\r\nimport {getCurrency, formatPrice as wcFormatPrice} from '@woocommerce/price-format';\r\n\r\nconst {publishableKey, account} = getSetting('stripeGeneralData');\r\nconst messages = getSetting('stripeErrorMessages');\r\nconst countryLocale = getSetting('countryLocale', {});\r\n\r\nconst SHIPPING_OPTION_REGEX = /^([\\w]+)\\:(.+)$/;\r\n\r\nconst routes = getSetting('stripeGeneralData').routes;\r\n\r\nconst creditCardForms = {};\r\n\r\nconst localPaymentMethods = [];\r\n\r\nconst CACHE_PREFIX = 'stripe:';\r\n\r\nconst PAYMENT_REQUEST_ADDRESS_MAPPINGS = {\r\n recipient: (address, name) => {\r\n address.first_name = name.split(' ').slice(0, -1).join(' ');\r\n address.last_name = name.split(' ').pop();\r\n return address;\r\n },\r\n payerName: (address, name) => {\r\n address.first_name = name.split(' ').slice(0, -1).join(' ');\r\n address.last_name = name.split(' ').pop();\r\n return address;\r\n },\r\n country: 'country',\r\n addressLine: (address, value) => {\r\n if (value[0]) {\r\n address.address_1 = value[0];\r\n }\r\n if (value[1]) {\r\n address.address_2 = value[1];\r\n }\r\n return address;\r\n },\r\n line1: 'address_1',\r\n line2: 'address_2',\r\n city: 'city',\r\n region: 'state',\r\n postalCode: 'postcode',\r\n postal_code: 'postcode',\r\n payerEmail: 'email',\r\n payerPhone: 'phone'\r\n}\r\n\r\nexport const initStripe = new Promise((resolve, reject) => {\r\n loadStripe(publishableKey, (() => account ? {stripeAccount: account} : {})()).then(stripe => {\r\n resolve(stripe);\r\n }).catch(err => {\r\n resolve({error: err});\r\n });\r\n});\r\n\r\nexport const registerCreditCardForm = ({id, ...props}) => {\r\n creditCardForms[id] = props;\r\n}\r\n\r\nexport const getCreditCardForm = (id) => {\r\n return creditCardForms[id];\r\n}\r\n\r\nexport const getRoute = (route) => {\r\n return routes?.[route] ? routes[route] : console.log(`${route} is not a valid route`);\r\n}\r\n\r\nexport const ensureSuccessResponse = (responseTypes, data = {}) => {\r\n return {type: responseTypes.SUCCESS, ...data};\r\n}\r\n\r\n/**\r\n * Returns a formatted error object used by observers\r\n * @param responseTypes\r\n * @param error\r\n * @returns {{type: *, message: *}}\r\n */\r\nexport const ensureErrorResponse = (responseTypes, error) => {\r\n return {type: responseTypes.ERROR, message: getErrorMessage(error)}\r\n};\r\n\r\n/**\r\n * Return a customized error message.\r\n * @param error\r\n */\r\nexport const getErrorMessage = (error) => {\r\n if (typeof error == 'string') {\r\n return error;\r\n }\r\n if (error?.code && messages?.[error.code]) {\r\n return messages[error.code];\r\n }\r\n if (error?.statusCode) {\r\n return messages?.[error.statusCode] ? messages[error.statusCode] : error.statusMessage;\r\n }\r\n return error.message;\r\n}\r\n\r\n/**\r\n * Return a Stripe formatted billing_details object from a WC address\r\n * @param billingAddress\r\n */\r\nexport const getBillingDetailsFromAddress = (billingAddress) => {\r\n let billing_details = {\r\n name: `${billingAddress.first_name} ${billingAddress.last_name}`,\r\n address: {\r\n city: billingAddress.city || '',\r\n country: billingAddress.country || '',\r\n line1: billingAddress.address_1 || '',\r\n line2: billingAddress.address_2 || '',\r\n postal_code: billingAddress.postcode || '',\r\n state: billingAddress.state || ''\r\n }\r\n }\r\n if (billingAddress?.phone) {\r\n billing_details.phone = billingAddress.phone;\r\n }\r\n if (billingAddress?.email) {\r\n billing_details.email = billingAddress.email;\r\n }\r\n return billing_details;\r\n}\r\n\r\nexport const getSettings = (name) => (key) => {\r\n if (key) {\r\n return getSetting(name)[key];\r\n }\r\n return getSetting(name);\r\n}\r\n\r\nexport class StripeError extends Error {\r\n constructor(error) {\r\n super(error.message);\r\n this.error = error;\r\n }\r\n}\r\n\r\n/**\r\n * Returns true if the provided value is empty.\r\n * @param value\r\n * @returns {boolean}\r\n */\r\nexport const isEmpty = (value) => {\r\n if (typeof value === 'string') {\r\n return value.length == 0 || value == '';\r\n }\r\n if (Array.isArray(value)) {\r\n return array.length == 0;\r\n }\r\n if (typeof value === 'object') {\r\n return Object.keys(value).length == 0;\r\n }\r\n if (typeof value === 'undefined') {\r\n return true;\r\n }\r\n return true;\r\n}\r\n\r\nexport const removeNumberPrecision = (value, unit) => {\r\n return value / 10 ** unit;\r\n}\r\n\r\n/**\r\n *\r\n * @param address\r\n * @param country\r\n */\r\nexport const isAddressValid = (address, exclude = []) => {\r\n const fields = getLocaleFields(address.country);\r\n for (const [key, value] of Object.entries(address)) {\r\n if (!exclude.includes(key) && fields?.[key] && fields[key].required) {\r\n if (isEmpty(value)) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n}\r\n\r\nexport const getLocaleFields = (country) => {\r\n let localeFields = {...countryLocale.default};\r\n if (country && countryLocale?.[country]) {\r\n localeFields = Object.entries(countryLocale[country]).reduce((locale, [key, value]) => {\r\n locale[key] = {...locale[key], ...value}\r\n return locale;\r\n }, localeFields);\r\n ['phone', 'email'].forEach(key => {\r\n let node = document.getElementById(key);\r\n if (node) {\r\n localeFields[key] = {required: node.required};\r\n }\r\n });\r\n }\r\n return localeFields;\r\n}\r\n\r\n/**\r\n * Return true if the field is required by the cart\r\n * @param field\r\n * @param country\r\n * @returns {boolean|*}\r\n */\r\nexport const isFieldRequired = (field, country = false) => {\r\n const fields = getLocaleFields(country);\r\n return [field] in fields && fields[field].required;\r\n}\r\n\r\nexport const getSelectedShippingOption = (id) => {\r\n const result = id.match(SHIPPING_OPTION_REGEX);\r\n if (result) {\r\n const {1: packageIdx, 2: rate} = result;\r\n return [rate, packageIdx];\r\n }\r\n return [];\r\n}\r\n\r\nexport const hasShippingRates = (shippingRates) => {\r\n return shippingRates.map(rate => {\r\n return rate.shipping_rates.length > 0;\r\n }).filter(Boolean).length > 0;\r\n}\r\n\r\n/**\r\n * Return true if the customer is logged in.\r\n * @param customerId\r\n * @returns {boolean}\r\n */\r\nexport const isUserLoggedIn = (customerId) => {\r\n return customerId > 0;\r\n}\r\n\r\nconst syncPaymentIntentWithOrder = async (order_id, client_secret) => {\r\n try {\r\n await apiFetch({\r\n url: routes['sync/intent'],\r\n method: 'POST',\r\n data: {order_id, client_secret}\r\n })\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n}\r\n\r\nexport const handleCardAction = async (\r\n {\r\n redirectUrl,\r\n responseTypes,\r\n stripe,\r\n getData,\r\n savePaymentMethod = false\r\n }) => {\r\n try {\r\n let match = redirectUrl.match(/#response=(.+)/)\r\n if (match) {\r\n let {client_secret, order_id, order_key} = JSON.parse(window.atob(decodeURIComponent(match[1])));\r\n let result = await stripe.handleCardAction(client_secret);\r\n if (result.error) {\r\n syncPaymentIntentWithOrder(order_id, client_secret);\r\n return ensureErrorResponse(responseTypes, result.error);\r\n }\r\n // success so finish processing order then redirect to thank you page\r\n let data = {order_id, order_key, [`${getData('name')}_save_source_key`]: savePaymentMethod};\r\n let response = await apiFetch({\r\n url: getRoute('process/payment'),\r\n method: 'POST',\r\n data\r\n })\r\n if (response.messages) {\r\n return ensureErrorResponse(responseTypes, response.messages);\r\n }\r\n return ensureSuccessResponse(responseTypes, {\r\n redirectUrl: response.redirect\r\n });\r\n } else {\r\n return ensureSuccessResponse(responseTypes);\r\n }\r\n } catch (err) {\r\n console.log(err);\r\n return ensureErrorResponse(responseTypes, err);\r\n }\r\n}\r\n\r\n/**\r\n * Convert a payment wallet address to a WC cart address.\r\n * @param address_mappings\r\n * @returns {function(*, *=): {}}\r\n */\r\nexport const toCartAddress = (address_mappings = PAYMENT_REQUEST_ADDRESS_MAPPINGS) => (address, args = {}) => {\r\n const cartAddress = {};\r\n address = {...address, ...filterEmptyValues(args)};\r\n for (let [key, cartKey] of Object.entries(address_mappings)) {\r\n if (address?.[key]) {\r\n if (typeof cartKey === 'function') {\r\n cartKey(cartAddress, address[key]);\r\n } else {\r\n cartAddress[cartKey] = address[key];\r\n }\r\n }\r\n }\r\n return cartAddress;\r\n}\r\n\r\n/**\r\n * Given a WC formatted address, return only the intermediate address values\r\n * @param address\r\n * @param fields\r\n */\r\nexport const getIntermediateAddress = (address, fields = ['city', 'postcode', 'state', 'country']) => {\r\n const intermediateAddress = {};\r\n for (let key of fields) {\r\n intermediateAddress[key] = address[key];\r\n }\r\n return intermediateAddress;\r\n}\r\n\r\n/**\r\n *\r\n * @param values\r\n * @returns {{}|{[p: string]: *}}\r\n */\r\nexport const filterEmptyValues = (values) => {\r\n return Object.keys(values).filter(key => Boolean(values[key])).reduce((obj, key) => ({\r\n ...obj,\r\n [key]: values[key]\r\n }), {});\r\n}\r\n\r\nexport const formatPrice = (price, currencyCode) => {\r\n const {prefix, suffix, decimalSeparator, minorUnit, thousandSeparator} = getCurrency(currencyCode);\r\n if (price == '' || price === undefined) {\r\n return price;\r\n }\r\n\r\n price = typeof price === 'string' ? parseInt(price, 10) : price;\r\n price = price / 10 ** minorUnit;\r\n price = price.toString().replace('.', decimalSeparator);\r\n let fractional = '';\r\n const index = price.indexOf(decimalSeparator);\r\n if (index < 0) {\r\n price += `${decimalSeparator}${new Array(minorUnit + 1).join('0')}`;\r\n } else {\r\n const fractional = price.substr(index + 1);\r\n if (fractional.length < minorUnit) {\r\n price += new Array(minorUnit - fractional.length + 1).join('0');\r\n }\r\n }\r\n\r\n // separate out price and decimals so thousands separator can be added.\r\n ({1: price, 2: fractional} = price.match(new RegExp(`(\\\\d+)\\\\${decimalSeparator}(\\\\d+)`)));\r\n price = price.replace(new RegExp(`\\\\B(?=(\\\\d{3})+(?!\\\\d))`, 'g'), `${thousandSeparator}`);\r\n price = price + decimalSeparator + fractional;\r\n price = prefix + price + suffix;\r\n return price;\r\n}\r\n\r\nexport const getShippingOptions = (shippingRates) => {\r\n let options = [];\r\n shippingRates.forEach((shippingPackage, idx) => {\r\n // sort by selected rate\r\n shippingPackage.shipping_rates.sort((rate) => {\r\n return rate.selected ? -1 : 1;\r\n });\r\n let rates = shippingPackage.shipping_rates.map(rate => {\r\n let txt = document.createElement('textarea');\r\n txt.innerHTML = rate.name;\r\n let price = formatPrice(rate.price, rate.currency_code);\r\n return {\r\n id: getShippingOptionId(idx, rate.rate_id),\r\n label: txt.value,\r\n //detail: `${price}`,\r\n amount: parseInt(rate.price, 10)\r\n }\r\n });\r\n options = [...options, ...rates];\r\n });\r\n return options;\r\n}\r\n\r\nexport const getShippingOptionId = (packageId, rateId) => `${packageId}:${rateId}`\r\n\r\nexport const getDisplayItems = (cartItems, {minorUnit}) => {\r\n let items = [];\r\n cartItems.forEach(item => {\r\n if (0 < item.value) {\r\n items.push({\r\n label: item.label,\r\n pending: false,\r\n amount: item.value\r\n });\r\n }\r\n })\r\n return items;\r\n}\r\n\r\nconst canPay = {};\r\n\r\nexport const canMakePayment = ({country, currency, total}, callback) => {\r\n return new Promise((resolve, reject) => {\r\n const key = [country, currency, total.amount].reduce((key, value) => `${key}-${value}`);\r\n if (key in canPay) {\r\n return resolve(canPay[key]);\r\n }\r\n return initStripe.then(stripe => {\r\n if (stripe.error) {\r\n return reject(stripe.error);\r\n }\r\n const request = stripe.paymentRequest({\r\n country,\r\n currency,\r\n total\r\n });\r\n request.canMakePayment().then(result => {\r\n canPay[key] = callback(result);\r\n return resolve(canPay[key]);\r\n });\r\n }).catch(reject);\r\n });\r\n};\r\n\r\nexport const registerLocalPaymentMethod = (paymentMethod) => {\r\n localPaymentMethods.push(paymentMethod);\r\n}\r\n\r\nexport const getLocalPaymentMethods = () => localPaymentMethods;\r\n\r\nexport const cartContainsPreOrder = () => {\r\n const data = getSetting('stripePaymentData');\r\n return data && data.pre_order;\r\n}\r\n\r\nexport const cartContainsSubscription = () => {\r\n const data = getSetting('stripePaymentData');\r\n return data && data.subscription;\r\n}\r\n\r\nexport const getDefaultSourceArgs = ({type, amount, billingData, currency, returnUrl}) => {\r\n return {\r\n type,\r\n amount,\r\n currency,\r\n owner: getBillingDetailsFromAddress(billingData),\r\n redirect: {\r\n return_url: returnUrl\r\n }\r\n }\r\n}\r\n\r\nexport const isTestMode = () => {\r\n return getSetting('stripeGeneralData').mode === 'test';\r\n}\r\n\r\nconst getCacheKey = (key) => `${CACHE_PREFIX}${key}`;\r\n\r\nexport const storeInCache = (key, value) => {\r\n const exp = Math.floor(new Date().getTime() / 1000) + (60 * 15);\r\n if ('sessionStorage' in window) {\r\n sessionStorage.setItem(getCacheKey(key), JSON.stringify({value, exp}));\r\n }\r\n}\r\n\r\nexport const getFromCache = (key) => {\r\n if ('sessionStorage' in window) {\r\n try {\r\n const item = JSON.parse(sessionStorage.getItem(getCacheKey(key)));\r\n if (item) {\r\n const {value, exp} = item;\r\n if (Math.floor(new Date().getTime() / 1000) > exp) {\r\n deleteFromCache(getCacheKey(key));\r\n } else {\r\n return value;\r\n }\r\n }\r\n } catch (err) {\r\n }\r\n }\r\n return null;\r\n}\r\n\r\nexport const deleteFromCache = (key) => {\r\n if ('sessionStorage' in window) {\r\n sessionStorage.removeItem(getCacheKey(key));\r\n }\r\n}\r\n\r\nexport const isCartPage = () => getSetting('stripeGeneralData').page === 'cart';\r\n\r\nexport const isCheckoutPage = () => getSetting('stripeGeneralData').page === 'checkout';","/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n"],"sourceRoot":""}
|
1 |
+
{"version":3,"sources":["webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/asyncToGenerator.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/classCallCheck.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/construct.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/createClass.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/defineProperty.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/extends.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/getPrototypeOf.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/inherits.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/isNativeFunction.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/objectWithoutProperties.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/slicedToArray.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/typeof.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack://wc_stripe.[name]/./node_modules/@babel/runtime/helpers/wrapNativeSuper.js","webpack://wc_stripe.[name]/./node_modules/@stripe/react-stripe-js/dist/react-stripe.umd.js","webpack://wc_stripe.[name]/./node_modules/@stripe/stripe-js/dist/stripe.esm.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/components/checkout/checkbox/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/components/checkout/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/components/checkout/payment-method-label/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/components/checkout/payment-method/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/components/checkout/radio-control-accordion/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/components/checkout/radio-option/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/ach/hooks/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/ach/hooks/use-create-link-token.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/ach/hooks/use-initialize-plaid.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/ach/hooks/use-process-payment.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/ach/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/ach/payment-method.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/applepay/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/applepay/payment-method.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/credit-card/components/bootstrap/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/credit-card/components/custom-card-form.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/credit-card/components/simple/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/credit-card/components/stripe-card-form.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/credit-card/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/credit-card/payment-method.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/error-boundary.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/googlepay/button.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/googlepay/constants.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/googlepay/hooks/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/googlepay/hooks/use-error-message.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/googlepay/hooks/use-payment-request.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/googlepay/hooks/use-payments-client.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/googlepay/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/googlepay/payment-method.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/googlepay/util.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/hooks/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/hooks/use-after-process-payment.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/hooks/use-breakpoint-width.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/hooks/use-exported-values.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/hooks/use-payment-events.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/hooks/use-payment-request.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/hooks/use-process-checkout-error.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/hooks/use-process-payment-intent.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/hooks/use-setup-intent.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/hooks/use-stripe-error.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/afterpay.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/alipay.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/bancontact.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/becs.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/eps.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/fpx.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/giropay.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/grabpay.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/hooks/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/hooks/use-after-process-local-payment.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/hooks/use-create-source.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/hooks/use-validate-checkout.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/ideal.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/klarna/categories.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/klarna/hooks/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/klarna/hooks/use-create-source.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/klarna/hooks/use-process-payment.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/klarna/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/klarna/loader.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/local-payment-method.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/multibanco.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/p24.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/sepa.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/sofort.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/local-payment/wechat.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/payment-request/index.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/payment-request/payment-method.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/saved-card-component.js","webpack://wc_stripe.[name]/./packages/blocks/assets/js/payment-methods/util.js","webpack://wc_stripe.[name]/./node_modules/classnames/index.js"],"names":["module","exports","arr","len","length","i","arr2","Array","isArray","arrayLikeToArray","self","ReferenceError","asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","then","fn","this","args","arguments","apply","err","undefined","instance","Constructor","TypeError","setPrototypeOf","isNativeReflectConstruct","_construct","Parent","Class","Reflect","construct","a","push","Function","bind","prototype","_defineProperties","target","props","descriptor","enumerable","configurable","writable","Object","defineProperty","protoProps","staticProps","obj","_extends","assign","source","hasOwnProperty","call","_getPrototypeOf","o","getPrototypeOf","__proto__","subClass","superClass","create","constructor","__esModule","toString","indexOf","sham","Proxy","Date","e","iter","Symbol","iterator","from","_arr","_n","_d","_e","_s","_i","next","objectWithoutPropertiesLoose","excluded","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","sourceKeys","keys","_typeof","assertThisInitialized","_setPrototypeOf","p","arrayWithHoles","iterableToArrayLimit","unsupportedIterableToArray","nonIterableRest","arrayWithoutHoles","iterableToArray","nonIterableSpread","minLen","n","slice","name","test","isNativeFunction","_wrapNativeSuper","_cache","Map","has","get","set","Wrapper","React","_objectWithoutProperties","_objectWithoutPropertiesLoose","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_arrayLikeToArray","_unsupportedIterableToArray","_nonIterableRest","emptyFunction","emptyFunctionWithReset","resetWarningCache","propTypes","shim","propName","componentName","location","propFullName","secret","Error","getShim","isRequired","ReactPropTypes","array","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","factoryWithThrowingShims","isUnknownObject","raw","PLAIN_OBJECT_STR","isEqual","left","right","leftArray","leftPlainObject","leftKeys","rightKeys","keySet","allKeys","l","r","every","usePrevious","ref","useRef","useEffect","current","validateStripe","maybeStripe","elements","createToken","createPaymentMethod","confirmCardPayment","parseStripeProp","isPromise","tag","stripePromise","stripe","ElementsContext","createContext","displayName","Elements","_ref","rawStripeProp","options","children","_final","isMounted","parsed","useMemo","_React$useState2","useState","ctx","setContext","prevStripe","prevOptions","console","warn","anyStripe","_registerWrapper","version","createElement","Provider","useElementsContextWithUseCase","useCaseMessage","useCase","concat","parseElementsContext","useContext","ElementsConsumer","_ref2","useCallbackReference","cb","extractUpdateableOptions","paymentRequest","noop","createElementComponent","type","isServer","str","charAt","toUpperCase","Element","id","className","_ref$options","_ref$onBlur","onBlur","_ref$onFocus","onFocus","_ref$onReady","onReady","_ref$onChange","onChange","_ref$onEscape","onEscape","_ref$onClick","onClick","elementRef","domNode","callOnReady","callOnBlur","callOnFocus","callOnClick","callOnChange","callOnEscape","useLayoutEffect","mount","on","updateableOptions","update","destroy","__elementType","window","AuBankAccountElement","CardElement","CardNumberElement","CardExpiryElement","CardCvcElement","FpxBankElement","IbanElement","IdealBankElement","P24BankElement","EpsBankElement","PaymentRequestButtonElement","AfterpayClearpayMessageElement","useElements","useStripe","factory","V3_URL","V3_URL_REGEX","EXISTING_SCRIPT_MESSAGE","initStripe","startTime","registerWrapper","stripePromise$1","params","Stripe","script","scripts","document","querySelectorAll","src","findScript","queryString","advancedFraudSignals","headOrBody","head","body","appendChild","injectScript","addEventListener","loadCalled","loadStripe","_len","_key","now","label","checked","aria-hidden","xmlns","viewBox","d","title","icons","paymentMethod","components","Label","PaymentMethodLabel","Icons","PaymentMethodIcons","text","align","getData","content","Content","desc","el","childNodes","classList","add","Description","payment_method","RadioControlAccordion","option","RadioControlOption","event","setValidationError","linkToken","setLinkToken","useCallback","url","getRoute","method","data","response","token","storeInCache","getFromCache","linkHandler","resolvePopup","openLinkPopup","open","Plaid","clientName","env","product","selectAccount","countryCodes","onSuccess","publicToken","metaData","onExit","getErrorMessage","error_message","onPaymentProcessing","responseTypes","unsubscribe","result","deleteFromCache","ensureSuccessResponse","meta","paymentMethodData","JSON","stringify","ensureErrorResponse","getSettings","ACHPaymentContent","eventRegistration","emitResponse","onSubmit","onCheckoutAfterProcessingWithError","ValidationInputError","validationError","useCreateLinkToken","useProcessCheckoutError","subscriber","useInitializePlaid","useProcessPayment","isTestMode","ACHTestModeCredentials","errorMessage","__","registerPaymentMethod","ariaLabel","canMakePayment","cartTotals","currency_code","PaymentMethod","savedTokenComponent","edit","placeOrderButtonLabel","supports","showSavedCards","showSaveOption","features","ApplePayContent","ApplePayButton","onClose","billing","shippingData","activePaymentMethod","noticeContexts","useStripeError","exportedValues","useExportedValues","useExpressBreakpointWidth","width","setPaymentMethod","useProcessPaymentIntent","useAfterProcessingPayment","messageContext","EXPRESS_PAYMENTS","usePaymentRequest","canPay","applePay","handleClick","show","style","ApplePayEdit","registerExpressPaymentMethod","currency","total_price","country","toLowerCase","total","amount","parseInt","Bootstrap","CardIcon","htmlFor","registerCreditCardForm","breakpoint","component","classes","focus","empty","invalid","eventChange","innerWidth","cardType","setCardType","elementOrder","container","setContainer","getCreditCardForm","CardForm","postalCodeEnabled","forEach","setElementOrder","includes","useBreakpointWidth","getCardIconSrc","icon","cloneElement","brand","complete","idx","nextElement","getElement","sprintf","SimpleForm","data-tid","cardOptions","postalCode","billingData","postcode","hidePostalCode","isFieldRequired","iconStyle","displaySaveCard","customerId","isUserLoggedIn","cartContainsSubscription","cartContainsPreOrder","CreditCardContent","setError","catch","CreditCardElement","savePaymentMethod","setSavePaymentMethod","getPaymentMethodArgs","elType","card","useSetupIntent","cartTotal","setupIntent","removeSetupIntent","Tag","CustomCardForm","StripeCardForm","SavePaymentMethod","state","hasError","errorInfo","setState","componentStack","Component","publishableKey","setErrorMessage","checkoutStatus","merchantInfo","merchantId","merchantName","buttonContainer","buttonType","usePaymentsClient","button","removeButton","append","parameters","allowedAuthMethods","allowedCardNetworks","assuranceDetailsRequired","apiVersion","apiVersionMinor","shippingRates","shippingAddress","processingCountry","totalPriceLabel","emailRequired","isEmpty","email","allowedPaymentMethods","tokenizationSpecification","gateway","BASE_PAYMENT_METHOD","shippingAddressRequired","needsShipping","transactionInfo","getTransactionInfo","callbackIntents","BASE_PAYMENT_REQUEST","billingAddressRequired","billingAddressParameters","format","phoneNumberRequired","phone","shippingOptionRequired","shippingOptionParameters","getShippingOptionParameters","shippingOptions","cartTotalItems","environment","paymentsClient","setPaymentsClient","setButton","currentBilling","currentShipping","addPaymentEvent","usePaymentEvents","setAddressData","paymentData","billingAddress","isAddressValid","phoneNumber","toCartAddress","parentElement","firstChild","removeChild","loadPaymentData","parse","tokenizationData","billing_details","getBillingDetailsFromAddress","StripeError","statusCode","log","createButton","paymentOptions","paymentDataCallbacks","onPaymentAuthorized","transactionState","onPaymentDataChanged","shipping","address","shippingOptionData","intermediateAddress","selectedRates","getSelectedShippingOption","addressEqual","getIntermediateAddress","shippingEqual","success","getPaymentRequestUpdate","reason","message","intent","setShippingAddress","setSelectedRates","google","payments","api","PaymentsClient","isReadyToPayRequest","isReadyToPay","GooglePayContent","useErrorMessage","GooglePayEdit","isCartPage","status","countryCode","currencyCode","code","totalPriceStatus","totalPrice","removeNumberPrecision","minorUnit","displayItems","getDisplayItems","newTransactionInfo","newShippingOptionParameters","unit","items","item","price","getShippingOptions","defaultSelectedOptionId","map","shift","shippingPackage","shipping_rates","rate","selected","getShippingOptionId","rate_id","rates","txt","innerHTML","formatPrice","description","first_name","split","join","last_name","pop","address1","address2","locality","administrativeArea","onCheckoutAfterProcessingWithSuccess","unsubscribeAfterProcessingWithSuccess","redirectUrl","handleCardAction","windowWidth","setWindowWith","getMaxWidth","maxWidth","setMaxWidth","clientWidth","remove","handleResize","removeEventListener","getElementById","parentNode","onShippingRateSuccess","onShippingRateFail","onShippingRateSelectSuccess","handler","setHandler","onShippingChanged","paymentEvents","setPaymentEvent","execute","removePaymentEvent","isSelectingRate","shippingRatesLoading","hasShippingRates","unsubscribeShippingRateSuccess","unsubscribeShippingRateSelectSuccess","unsubscribeShippingRateFail","hasInvalidAddress","setPaymentRequest","paymentRequestOptions","pending","requestPayerName","requestPayerEmail","requestPayerPhone","requestShipping","onShippingAddressChange","onShippingOptionChange","onPaymentMethodReceived","updatePaymentEvent","updateWith","shippingOption","paymentResponse","payerName","payerEmail","payerPhone","processingResponse","paymentDetails","stripeErrorMessage","ERROR","paymentType","currentPaymentMethodArgs","getCreatePaymentMethodArgs","getSuccessResponse","paymentMethodId","unsubscribeProcessingPayment","confirmCardSetup","client_secret","setSetupIntent","createSetupIntent","variables","PaymentMethodTest","settings","requiredParams","LocalPaymentIntentContent","confirmationMethod","LocalPaymentSourceContent","currentBillingData","match","atob","decodeURIComponent","return_url","getSourceArgs","setSource","isValid","setIsValid","currentValues","getSourceArgsInternal","getDefaultSourceArgs","returnUrl","getSuccessData","sourceId","createSource","msg","categories","category","KlarnaPaymentCategory","Klarna","Payments","load","payment_method_category","abortController","AbortController","currentSourceArgs","oldSourceArgs","isLoading","setIsLoading","isCheckoutValid","getLineItems","quantity","source_order","klarna","locale","purchase_country","custom_payment_methods","shipping_first_name","shipping_last_name","city","line1","address_1","line2","address_2","postal_code","compareSourceArgs","args2","newArgs","getArgs","args1","updateSource","updates","source_id","abort","signal","reduce","k","paymentCategory","authorize","approved","KlarnaContainer","KlarnaPaymentMethod","setSelected","getCategoriesFromSource","paymentMethodCategories","payment_method_categories","useCreateSource","init","client_token","KlarnaPaymentCategories","KlarnaLoader","callback","countries","LocalPaymentIntentMethod","LocalPaymentSourceMethod","LocalPaymentElementContainer","useValidateCheckout","useAfterProcessLocalPayment","PAYMENT","SepaPaymentMethod","mandate","notification_method","interval","sofort","WeChatComponent","WeChatPaymentMethod","deleteSourceFromStorage","QRCodeComponent","wechat","qr_code_url","height","colorDark","colorLight","correctLevel","QRCode","CorrectLevel","H","createSourceTimeoutId","clearTimeout","setTimeout","PaymentRequestContent","PaymentRequestButton","paymentRequestButton","PaymentRequestEdit","canvas","scale","devicePixelRatio","getContext","beginPath","arc","Math","PI","fillStyle","fill","handleSuccessResult","unsubscribeOnCheckoutAfterProcessingWithSuccess","getSetting","account","messages","countryLocale","SHIPPING_OPTION_REGEX","routes","creditCardForms","localPaymentMethods","PAYMENT_REQUEST_ADDRESS_MAPPINGS","recipient","addressLine","region","stripeAccount","route","SUCCESS","statusMessage","exclude","fields","getLocaleFields","entries","required","localeFields","default","field","packageIdx","filter","Boolean","syncPaymentIntentWithOrder","order_id","order_key","redirect","address_mappings","cartAddress","filterEmptyValues","cartKey","values","getCurrency","prefix","suffix","decimalSeparator","thousandSeparator","fractional","index","replace","substr","RegExp","sort","packageId","rateId","cartItems","pre_order","subscription","owner","mode","getCacheKey","exp","floor","getTime","sessionStorage","setItem","getItem","removeItem","page","hasOwn","classNames","argType","inner"],"mappings":";8FAUAA,EAAOC,QAVP,SAA2BC,EAAKC,IACnB,MAAPA,GAAeA,EAAMD,EAAIE,UAAQD,EAAMD,EAAIE,QAE/C,IAAK,IAAIC,EAAI,EAAGC,EAAO,IAAIC,MAAMJ,GAAME,EAAIF,EAAKE,IAC9CC,EAAKD,GAAKH,EAAIG,GAGhB,OAAOC,I,SCHTN,EAAOC,QAJP,SAAyBC,GACvB,GAAIK,MAAMC,QAAQN,GAAM,OAAOA,I,eCDjC,IAAIO,EAAmB,EAAQ,MAM/BT,EAAOC,QAJP,SAA4BC,GAC1B,GAAIK,MAAMC,QAAQN,GAAM,OAAOO,EAAiBP,K,SCKlDF,EAAOC,QARP,SAAgCS,GAC9B,QAAa,IAATA,EACF,MAAM,IAAIC,eAAe,6DAG3B,OAAOD,I,SCLT,SAASE,EAAmBC,EAAKC,EAASC,EAAQC,EAAOC,EAAQC,EAAKC,GACpE,IACE,IAAIC,EAAOP,EAAIK,GAAKC,GAChBE,EAAQD,EAAKC,MACjB,MAAOC,GAEP,YADAP,EAAOO,GAILF,EAAKG,KACPT,EAAQO,GAERG,QAAQ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AAKsM,MAAMoU,eAAeE,QAAQN,EAAYl3B,KAC3D,GAAIumB,EAAM,KACCpmB,EAAcomB,EAAdpmB,MAAOg3B,EAAO5Q,EAAP4Q,IACd,KAAI7D,KAAK8D,OAAM,IAAIxzB,MAAOyzB,UAAY,KAAQF,GAG1C,OAAOh3B,EAFPqW,EAAgB0gB,EAAYl3B,KAKtC,MAAOa,IAGb,OAAO,MAGJ,IAAM2V,EAAkB,SAACxW,GACxB,mBAAoB8P,QACpBwnB,eAAeG,WAAWP,EAAYl3B,K,iCAIpB,iBAA+C,UAAzC,IAAA4zB,YAAW,qBAAqB8D,M,iBAElC,iBAA+C,cAAzC,IAAA9D,YAAW,qBAAqB8D,O,aCzepE,OAOC,WACA,aAEA,IAAIC,EAAS,GAAG90B,eAEhB,SAAS+0B,IAGR,IAFA,IAAIzc,EAAU,GAELhc,EAAI,EAAGA,EAAIwB,UAAUzB,OAAQC,IAAK,CAC1C,IAAIc,EAAMU,UAAUxB,GACpB,GAAKc,EAAL,CAEA,IAAI43B,SAAiB53B,EAErB,GAAgB,WAAZ43B,GAAoC,WAAZA,EAC3B1c,EAAQzZ,KAAKzB,QACP,GAAIZ,MAAMC,QAAQW,IAAQA,EAAIf,OAAQ,CAC5C,IAAI44B,EAAQF,EAAWh3B,MAAM,KAAMX,GAC/B63B,GACH3c,EAAQzZ,KAAKo2B,QAER,GAAgB,WAAZD,EACV,IAAK,IAAI73B,KAAOC,EACX03B,EAAO70B,KAAK7C,EAAKD,IAAQC,EAAID,IAChCmb,EAAQzZ,KAAK1B,IAMjB,OAAOmb,EAAQuM,KAAK,KAGgB5oB,EAAOC,SAC3C64B,EAAW1C,QAAU0C,EACrB94B,EAAOC,QAAU64B,QAKhB,KAFwB,EAAF,WACtB,OAAOA,GACP,QAFoB,OAEpB,aAxCH,I","file":"commons.js","sourcesContent":["function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}\n\nmodule.exports = _asyncToGenerator;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","var setPrototypeOf = require(\"./setPrototypeOf\");\n\nvar isNativeReflectConstruct = require(\"./isNativeReflectConstruct\");\n\nfunction _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n module.exports = _construct = Reflect.construct;\n } else {\n module.exports = _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}\n\nmodule.exports = _construct;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;","function _extends() {\n module.exports = _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nmodule.exports = _extends;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;","var setPrototypeOf = require(\"./setPrototypeOf\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nmodule.exports = _interopRequireDefault;","function _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}\n\nmodule.exports = _isNativeFunction;","function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nmodule.exports = _isNativeReflectConstruct;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;","var objectWithoutPropertiesLoose = require(\"./objectWithoutPropertiesLoose\");\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutProperties;","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutPropertiesLoose;","var _typeof = require(\"@babel/runtime/helpers/typeof\");\n\nvar assertThisInitialized = require(\"./assertThisInitialized\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","var arrayWithoutHoles = require(\"./arrayWithoutHoles\");\n\nvar iterableToArray = require(\"./iterableToArray\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;","var getPrototypeOf = require(\"./getPrototypeOf\");\n\nvar setPrototypeOf = require(\"./setPrototypeOf\");\n\nvar isNativeFunction = require(\"./isNativeFunction\");\n\nvar construct = require(\"./construct\");\n\nfunction _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n\n _cache.set(Class, Wrapper);\n }\n\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n\n return _wrapNativeSuper(Class);\n}\n\nmodule.exports = _wrapNativeSuper;","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :\n typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :\n (global = global || self, factory(global.ReactStripe = {}, global.React));\n}(this, (function (exports, React) { 'use strict';\n\n React = React && Object.prototype.hasOwnProperty.call(React, 'default') ? React['default'] : React;\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n }\n\n function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n }\n\n function _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n }\n\n function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n }\n\n function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n }\n\n function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n\n function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n function createCommonjsModule(fn, module) {\n \treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n }\n\n /**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n var ReactPropTypesSecret_1 = ReactPropTypesSecret;\n\n function emptyFunction() {}\n\n function emptyFunctionWithReset() {}\n\n emptyFunctionWithReset.resetWarningCache = emptyFunction;\n\n var factoryWithThrowingShims = function () {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret_1) {\n // It is still safe when called from React.\n return;\n }\n\n var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');\n err.name = 'Invariant Violation';\n throw err;\n }\n shim.isRequired = shim;\n\n function getShim() {\n return shim;\n }\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n ReactPropTypes.PropTypes = ReactPropTypes;\n return ReactPropTypes;\n };\n\n var propTypes = createCommonjsModule(function (module) {\n /**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = factoryWithThrowingShims();\n }\n });\n\n var isUnknownObject = function isUnknownObject(raw) {\n return raw !== null && _typeof(raw) === 'object';\n };\n var isPromise = function isPromise(raw) {\n return isUnknownObject(raw) && typeof raw.then === 'function';\n }; // We are using types to enforce the `stripe` prop in this lib,\n // but in an untyped integration `stripe` could be anything, so we need\n // to do some sanity validation to prevent type errors.\n\n var isStripe = function isStripe(raw) {\n return isUnknownObject(raw) && typeof raw.elements === 'function' && typeof raw.createToken === 'function' && typeof raw.createPaymentMethod === 'function' && typeof raw.confirmCardPayment === 'function';\n };\n\n var PLAIN_OBJECT_STR = '[object Object]';\n var isEqual = function isEqual(left, right) {\n if (!isUnknownObject(left) || !isUnknownObject(right)) {\n return left === right;\n }\n\n var leftArray = Array.isArray(left);\n var rightArray = Array.isArray(right);\n if (leftArray !== rightArray) return false;\n var leftPlainObject = Object.prototype.toString.call(left) === PLAIN_OBJECT_STR;\n var rightPlainObject = Object.prototype.toString.call(right) === PLAIN_OBJECT_STR;\n if (leftPlainObject !== rightPlainObject) return false;\n if (!leftPlainObject && !leftArray) return false;\n var leftKeys = Object.keys(left);\n var rightKeys = Object.keys(right);\n if (leftKeys.length !== rightKeys.length) return false;\n var keySet = {};\n\n for (var i = 0; i < leftKeys.length; i += 1) {\n keySet[leftKeys[i]] = true;\n }\n\n for (var _i = 0; _i < rightKeys.length; _i += 1) {\n keySet[rightKeys[_i]] = true;\n }\n\n var allKeys = Object.keys(keySet);\n\n if (allKeys.length !== leftKeys.length) {\n return false;\n }\n\n var l = left;\n var r = right;\n\n var pred = function pred(key) {\n return isEqual(l[key], r[key]);\n };\n\n return allKeys.every(pred);\n };\n\n var usePrevious = function usePrevious(value) {\n var ref = React.useRef(value);\n React.useEffect(function () {\n ref.current = value;\n }, [value]);\n return ref.current;\n };\n\n var INVALID_STRIPE_ERROR = 'Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.'; // We are using types to enforce the `stripe` prop in this lib, but in a real\n // integration `stripe` could be anything, so we need to do some sanity\n // validation to prevent type errors.\n\n var validateStripe = function validateStripe(maybeStripe) {\n if (maybeStripe === null || isStripe(maybeStripe)) {\n return maybeStripe;\n }\n\n throw new Error(INVALID_STRIPE_ERROR);\n };\n\n var parseStripeProp = function parseStripeProp(raw) {\n if (isPromise(raw)) {\n return {\n tag: 'async',\n stripePromise: Promise.resolve(raw).then(validateStripe)\n };\n }\n\n var stripe = validateStripe(raw);\n\n if (stripe === null) {\n return {\n tag: 'empty'\n };\n }\n\n return {\n tag: 'sync',\n stripe: stripe\n };\n };\n\n var ElementsContext = /*#__PURE__*/React.createContext(null);\n ElementsContext.displayName = 'ElementsContext';\n var parseElementsContext = function parseElementsContext(ctx, useCase) {\n if (!ctx) {\n throw new Error(\"Could not find Elements context; You need to wrap the part of your app that \".concat(useCase, \" in an <Elements> provider.\"));\n }\n\n return ctx;\n };\n /**\n * The `Elements` provider allows you to use [Element components](https://stripe.com/docs/stripe-js/react#element-components) and access the [Stripe object](https://stripe.com/docs/js/initializing) in any nested component.\n * Render an `Elements` provider at the root of your React app so that it is available everywhere you need it.\n *\n * To use the `Elements` provider, call `loadStripe` from `@stripe/stripe-js` with your publishable key.\n * The `loadStripe` function will asynchronously load the Stripe.js script and initialize a `Stripe` object.\n * Pass the returned `Promise` to `Elements`.\n *\n * @docs https://stripe.com/docs/stripe-js/react#elements-provider\n */\n\n var Elements = function Elements(_ref) {\n var rawStripeProp = _ref.stripe,\n options = _ref.options,\n children = _ref.children;\n\n var _final = React.useRef(false);\n\n var isMounted = React.useRef(true);\n var parsed = React.useMemo(function () {\n return parseStripeProp(rawStripeProp);\n }, [rawStripeProp]);\n\n var _React$useState = React.useState(function () {\n return {\n stripe: null,\n elements: null\n };\n }),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n ctx = _React$useState2[0],\n setContext = _React$useState2[1];\n\n var prevStripe = usePrevious(rawStripeProp);\n var prevOptions = usePrevious(options);\n\n if (prevStripe !== null) {\n if (prevStripe !== rawStripeProp) {\n console.warn('Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.');\n }\n\n if (!isEqual(options, prevOptions)) {\n console.warn('Unsupported prop change on Elements: You cannot change the `options` prop after setting the `stripe` prop.');\n }\n }\n\n if (!_final.current) {\n if (parsed.tag === 'sync') {\n _final.current = true;\n setContext({\n stripe: parsed.stripe,\n elements: parsed.stripe.elements(options)\n });\n }\n\n if (parsed.tag === 'async') {\n _final.current = true;\n parsed.stripePromise.then(function (stripe) {\n if (stripe && isMounted.current) {\n // Only update Elements context if the component is still mounted\n // and stripe is not null. We allow stripe to be null to make\n // handling SSR easier.\n setContext({\n stripe: stripe,\n elements: stripe.elements(options)\n });\n }\n });\n }\n }\n\n React.useEffect(function () {\n return function () {\n isMounted.current = false;\n };\n }, []);\n React.useEffect(function () {\n var anyStripe = ctx.stripe;\n\n if (!anyStripe || !anyStripe._registerWrapper) {\n return;\n }\n\n anyStripe._registerWrapper({\n name: 'react-stripe-js',\n version: \"1.4.0\"\n });\n }, [ctx.stripe]);\n return /*#__PURE__*/React.createElement(ElementsContext.Provider, {\n value: ctx\n }, children);\n };\n Elements.propTypes = {\n stripe: propTypes.any,\n options: propTypes.object\n };\n var useElementsContextWithUseCase = function useElementsContextWithUseCase(useCaseMessage) {\n var ctx = React.useContext(ElementsContext);\n return parseElementsContext(ctx, useCaseMessage);\n };\n /**\n * @docs https://stripe.com/docs/stripe-js/react#useelements-hook\n */\n\n var useElements = function useElements() {\n var _useElementsContextWi = useElementsContextWithUseCase('calls useElements()'),\n elements = _useElementsContextWi.elements;\n\n return elements;\n };\n /**\n * @docs https://stripe.com/docs/stripe-js/react#usestripe-hook\n */\n\n var useStripe = function useStripe() {\n var _useElementsContextWi2 = useElementsContextWithUseCase('calls useStripe()'),\n stripe = _useElementsContextWi2.stripe;\n\n return stripe;\n };\n /**\n * @docs https://stripe.com/docs/stripe-js/react#elements-consumer\n */\n\n var ElementsConsumer = function ElementsConsumer(_ref2) {\n var children = _ref2.children;\n var ctx = useElementsContextWithUseCase('mounts <ElementsConsumer>'); // Assert to satisfy the busted React.FC return type (it should be ReactNode)\n\n return children(ctx);\n };\n ElementsConsumer.propTypes = {\n children: propTypes.func.isRequired\n };\n\n var useCallbackReference = function useCallbackReference(cb) {\n var ref = React.useRef(cb);\n React.useEffect(function () {\n ref.current = cb;\n }, [cb]);\n return function () {\n if (ref.current) {\n ref.current.apply(ref, arguments);\n }\n };\n };\n\n var extractUpdateableOptions = function extractUpdateableOptions(options) {\n if (!isUnknownObject(options)) {\n return {};\n }\n\n var _ = options.paymentRequest,\n rest = _objectWithoutProperties(options, [\"paymentRequest\"]);\n\n return rest;\n };\n\n var noop = function noop() {};\n\n var capitalized = function capitalized(str) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n };\n\n var createElementComponent = function createElementComponent(type, isServer) {\n var displayName = \"\".concat(capitalized(type), \"Element\");\n\n var ClientElement = function ClientElement(_ref) {\n var id = _ref.id,\n className = _ref.className,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options,\n _ref$onBlur = _ref.onBlur,\n onBlur = _ref$onBlur === void 0 ? noop : _ref$onBlur,\n _ref$onFocus = _ref.onFocus,\n onFocus = _ref$onFocus === void 0 ? noop : _ref$onFocus,\n _ref$onReady = _ref.onReady,\n onReady = _ref$onReady === void 0 ? noop : _ref$onReady,\n _ref$onChange = _ref.onChange,\n onChange = _ref$onChange === void 0 ? noop : _ref$onChange,\n _ref$onEscape = _ref.onEscape,\n onEscape = _ref$onEscape === void 0 ? noop : _ref$onEscape,\n _ref$onClick = _ref.onClick,\n onClick = _ref$onClick === void 0 ? noop : _ref$onClick;\n\n var _useElementsContextWi = useElementsContextWithUseCase(\"mounts <\".concat(displayName, \">\")),\n elements = _useElementsContextWi.elements;\n\n var elementRef = React.useRef(null);\n var domNode = React.useRef(null);\n var callOnReady = useCallbackReference(onReady);\n var callOnBlur = useCallbackReference(onBlur);\n var callOnFocus = useCallbackReference(onFocus);\n var callOnClick = useCallbackReference(onClick);\n var callOnChange = useCallbackReference(onChange);\n var callOnEscape = useCallbackReference(onEscape);\n React.useLayoutEffect(function () {\n if (elementRef.current == null && elements && domNode.current != null) {\n var element = elements.create(type, options);\n elementRef.current = element;\n element.mount(domNode.current);\n element.on('ready', function () {\n return callOnReady(element);\n });\n element.on('change', callOnChange);\n element.on('blur', callOnBlur);\n element.on('focus', callOnFocus);\n element.on('escape', callOnEscape); // Users can pass an an onClick prop on any Element component\n // just as they could listen for the `click` event on any Element,\n // but only the PaymentRequestButton will actually trigger the event.\n\n element.on('click', callOnClick);\n }\n });\n var prevOptions = React.useRef(options);\n React.useEffect(function () {\n if (prevOptions.current && prevOptions.current.paymentRequest !== options.paymentRequest) {\n console.warn('Unsupported prop change: options.paymentRequest is not a customizable property.');\n }\n\n var updateableOptions = extractUpdateableOptions(options);\n\n if (Object.keys(updateableOptions).length !== 0 && !isEqual(updateableOptions, extractUpdateableOptions(prevOptions.current))) {\n if (elementRef.current) {\n elementRef.current.update(updateableOptions);\n prevOptions.current = options;\n }\n }\n }, [options]);\n React.useLayoutEffect(function () {\n return function () {\n if (elementRef.current) {\n elementRef.current.destroy();\n }\n };\n }, []);\n return /*#__PURE__*/React.createElement(\"div\", {\n id: id,\n className: className,\n ref: domNode\n });\n }; // Only render the Element wrapper in a server environment.\n\n\n var ServerElement = function ServerElement(props) {\n // Validate that we are in the right context by calling useElementsContextWithUseCase.\n useElementsContextWithUseCase(\"mounts <\".concat(displayName, \">\"));\n var id = props.id,\n className = props.className;\n return /*#__PURE__*/React.createElement(\"div\", {\n id: id,\n className: className\n });\n };\n\n var Element = isServer ? ServerElement : ClientElement;\n Element.propTypes = {\n id: propTypes.string,\n className: propTypes.string,\n onChange: propTypes.func,\n onBlur: propTypes.func,\n onFocus: propTypes.func,\n onReady: propTypes.func,\n onClick: propTypes.func,\n options: propTypes.object\n };\n Element.displayName = displayName;\n Element.__elementType = type;\n return Element;\n };\n\n var isServer = typeof window === 'undefined';\n /**\n * Requires beta access:\n * Contact [Stripe support](https://support.stripe.com/) for more information.\n *\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var AuBankAccountElement = createElementComponent('auBankAccount', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var CardElement = createElementComponent('card', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var CardNumberElement = createElementComponent('cardNumber', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var CardExpiryElement = createElementComponent('cardExpiry', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var CardCvcElement = createElementComponent('cardCvc', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var FpxBankElement = createElementComponent('fpxBank', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var IbanElement = createElementComponent('iban', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var IdealBankElement = createElementComponent('idealBank', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var P24BankElement = createElementComponent('p24Bank', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var EpsBankElement = createElementComponent('epsBank', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var PaymentRequestButtonElement = createElementComponent('paymentRequestButton', isServer);\n /**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\n var AfterpayClearpayMessageElement = createElementComponent('afterpayClearpayMessage', isServer);\n\n exports.AfterpayClearpayMessageElement = AfterpayClearpayMessageElement;\n exports.AuBankAccountElement = AuBankAccountElement;\n exports.CardCvcElement = CardCvcElement;\n exports.CardElement = CardElement;\n exports.CardExpiryElement = CardExpiryElement;\n exports.CardNumberElement = CardNumberElement;\n exports.Elements = Elements;\n exports.ElementsConsumer = ElementsConsumer;\n exports.EpsBankElement = EpsBankElement;\n exports.FpxBankElement = FpxBankElement;\n exports.IbanElement = IbanElement;\n exports.IdealBankElement = IdealBankElement;\n exports.P24BankElement = P24BankElement;\n exports.PaymentRequestButtonElement = PaymentRequestButtonElement;\n exports.useElements = useElements;\n exports.useStripe = useStripe;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n","var V3_URL = 'https://js.stripe.com/v3';\nvar V3_URL_REGEX = /^https:\\/\\/js\\.stripe\\.com\\/v3\\/?(\\?.*)?$/;\nvar EXISTING_SCRIPT_MESSAGE = 'loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used';\nvar findScript = function findScript() {\n var scripts = document.querySelectorAll(\"script[src^=\\\"\".concat(V3_URL, \"\\\"]\"));\n\n for (var i = 0; i < scripts.length; i++) {\n var script = scripts[i];\n\n if (!V3_URL_REGEX.test(script.src)) {\n continue;\n }\n\n return script;\n }\n\n return null;\n};\n\nvar injectScript = function injectScript(params) {\n var queryString = params && !params.advancedFraudSignals ? '?advancedFraudSignals=false' : '';\n var script = document.createElement('script');\n script.src = \"\".concat(V3_URL).concat(queryString);\n var headOrBody = document.head || document.body;\n\n if (!headOrBody) {\n throw new Error('Expected document.body not to be null. Stripe.js requires a <body> element.');\n }\n\n headOrBody.appendChild(script);\n return script;\n};\n\nvar registerWrapper = function registerWrapper(stripe, startTime) {\n if (!stripe || !stripe._registerWrapper) {\n return;\n }\n\n stripe._registerWrapper({\n name: 'stripe-js',\n version: \"1.12.1\",\n startTime: startTime\n });\n};\n\nvar stripePromise = null;\nvar loadScript = function loadScript(params) {\n // Ensure that we only attempt to load Stripe.js at most once\n if (stripePromise !== null) {\n return stripePromise;\n }\n\n stripePromise = new Promise(function (resolve, reject) {\n if (typeof window === 'undefined') {\n // Resolve to null when imported server side. This makes the module\n // safe to import in an isomorphic code base.\n resolve(null);\n return;\n }\n\n if (window.Stripe && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n }\n\n if (window.Stripe) {\n resolve(window.Stripe);\n return;\n }\n\n try {\n var script = findScript();\n\n if (script && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n } else if (!script) {\n script = injectScript(params);\n }\n\n script.addEventListener('load', function () {\n if (window.Stripe) {\n resolve(window.Stripe);\n } else {\n reject(new Error('Stripe.js not available'));\n }\n });\n script.addEventListener('error', function () {\n reject(new Error('Failed to load Stripe.js'));\n });\n } catch (error) {\n reject(error);\n return;\n }\n });\n return stripePromise;\n};\nvar initStripe = function initStripe(maybeStripe, args, startTime) {\n if (maybeStripe === null) {\n return null;\n }\n\n var stripe = maybeStripe.apply(undefined, args);\n registerWrapper(stripe, startTime);\n return stripe;\n};\n\n// own script injection.\n\nvar stripePromise$1 = Promise.resolve().then(function () {\n return loadScript(null);\n});\nvar loadCalled = false;\nstripePromise$1[\"catch\"](function (err) {\n if (!loadCalled) {\n console.warn(err);\n }\n});\nvar loadStripe = function loadStripe() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n loadCalled = true;\n var startTime = Date.now();\n return stripePromise$1.then(function (maybeStripe) {\n return initStripe(maybeStripe, args, startTime);\n });\n};\n\nexport { loadStripe };\n","import classNames from 'classnames';\r\nimport './styles.scss';\r\n\r\nexport const SavePaymentMethod = ({label, onChange, checked}) => {\r\n return (\r\n <div className='wc-stripe-save-payment-method'>\r\n <label>\r\n <input type='checkbox' onChange={(e) => onChange(e.target.checked)}/>\r\n <svg\r\n className={classNames('wc-stripe-components-checkbox__mark', {checked: checked})}\r\n aria-hidden=\"true\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 24 20\">\r\n <path d=\"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z\"/>\r\n </svg>\r\n </label>\r\n <span>{label}</span>\r\n </div>\r\n )\r\n}","export * from './payment-method-label';\r\nexport * from './checkbox';\r\nexport * from './radio-option';\r\nexport * from './payment-method';","import './style.scss';\r\n\r\nexport const PaymentMethodLabel = ({title, icons, paymentMethod, ...props}) => {\r\n const {PaymentMethodLabel: Label, PaymentMethodIcons: Icons} = props.components;\r\n if (!Array.isArray(icons)) {\r\n icons = [icons];\r\n }\r\n return (\r\n <span className={`wc-stripe-label-container ${paymentMethod}`}>\r\n <Label text={title}/>\r\n <Icons icons={icons} align='left'/>\r\n </span>\r\n )\r\n}","import {useEffect, useRef} from '@wordpress/element';\r\n\r\nexport const PaymentMethod = ({getData, content, ...props}) => {\r\n const Content = content;\r\n const desc = getData('description');\r\n const el = useRef(null);\r\n useEffect(() => {\r\n if (el.current && el.current.childNodes.length == 0) {\r\n el.current.classList.add('no-content');\r\n }\r\n });\r\n return (\r\n <>\r\n {desc && <Description desc={desc} payment_method={getData('name')}/>}\r\n <div ref={el} className='wc-stripe-blocks-payment-method-content'>\r\n <Content {...{...props, getData}}/>\r\n </div>\r\n </>);\r\n}\r\n\r\nconst Description = ({desc, payment_method}) => {\r\n return (\r\n <div className={`wc-stripe-blocks-payment-method__desc ${payment_method}`}>\r\n <p>{desc}</p>\r\n </div>\r\n )\r\n}","import RadioControlOption from '../radio-option';\r\nimport classnames from 'classnames';\r\n\r\nexport const RadioControlAccordion = ({option, checked, onChange}) => {\r\n const {label, value} = option;\r\n return (\r\n <div className='wc-stripe-blocks-radio-accordion'>\r\n <RadioControlOption checked={checked} onChange={onChange} value={value} label={label}/>\r\n <div\r\n className={classnames('wc-stripe-blocks-radio-accordion__content', {\r\n 'wc-stripe-blocks-radio-accordion__content-visible': checked\r\n })}>\r\n {option.content}\r\n </div>\r\n </div>\r\n\r\n )\r\n}\r\n\r\nexport default RadioControlAccordion;","import classnames from 'classnames';\r\n\r\nexport const RadioControlOption = ({checked, onChange, value, label}) => {\r\n return (\r\n <label\r\n className={classnames('wc-stripe-blocks-radio-control__option', {\r\n 'wc-stripe-blocks-radio-control__option-checked': checked\r\n })}>\r\n <input\r\n className='wc-stripe-blocks-radio-control__input'\r\n type='radio'\r\n value={value}\r\n checked={checked}\r\n onChange={(event) => onChange(event.target.value)}/>\r\n <div className='wc-stripe-blocks-radio-control__label'>\r\n <span>{label}</span>\r\n </div>\r\n </label>\r\n )\r\n}\r\n\r\nexport default RadioControlOption;","export * from './use-create-link-token';\r\nexport * from './use-initialize-plaid';\r\nexport * from './use-process-payment';","import {useEffect, useState, useCallback} from '@wordpress/element';\r\nimport apiFetch from '@wordpress/api-fetch';\r\nimport {getRoute, getFromCache, storeInCache} from '../../util';\r\n\r\nexport const useCreateLinkToken = (\r\n {\r\n setValidationError\r\n }) => {\r\n const [linkToken, setLinkToken] = useState(false);\r\n\r\n const createToken = useCallback(async () => {\r\n try {\r\n const response = await apiFetch({\r\n url: getRoute('create/linkToken'),\r\n method: 'POST',\r\n data: {}\r\n });\r\n if (response.token) {\r\n storeInCache('linkToken', response.token);\r\n setLinkToken(response.token);\r\n }\r\n } catch (err) {\r\n setValidationError(err);\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (!linkToken) {\r\n const token = getFromCache('linkToken');\r\n if (token) {\r\n // cached token exist so use it\r\n setLinkToken(token);\r\n } else {\r\n // create the Plaid Link token\r\n createToken();\r\n }\r\n }\r\n }, [\r\n linkToken,\r\n setLinkToken\r\n ]);\r\n return linkToken;\r\n}","import {useState, useEffect, useRef, useCallback} from '@wordpress/element';\r\nimport Plaid from '@plaid';\r\nimport {getErrorMessage} from \"../../util\";\r\n\r\nexport const useInitializePlaid = (\r\n {\r\n getData,\r\n linkToken\r\n }) => {\r\n const linkHandler = useRef(null);\r\n const resolvePopup = useRef(null);\r\n const openLinkPopup = useCallback(() => new Promise((resolve, reject) => {\r\n resolvePopup.current = {resolve, reject};\r\n linkHandler.current.open();\r\n }), []);\r\n\r\n // if the token exists, initialize Plaid's link handler\r\n useEffect(() => {\r\n if (linkToken) {\r\n linkHandler.current = Plaid.create({\r\n clientName: getData('clientName'),\r\n env: getData('plaidEnvironment'),\r\n product: ['auth'],\r\n token: linkToken,\r\n selectAccount: true,\r\n countryCodes: ['US'],\r\n onSuccess: (publicToken, metaData) => {\r\n resolvePopup.current.resolve({publicToken, metaData});\r\n },\r\n onExit: (err) => {\r\n resolvePopup.current.reject(err ? getErrorMessage(err.error_message) : false);\r\n }\r\n });\r\n }\r\n }, [linkToken]);\r\n\r\n return openLinkPopup;\r\n}","import {useEffect, useCallback} from '@wordpress/element';\r\nimport {ensureSuccessResponse, ensureErrorResponse, deleteFromCache} from \"../../util\";\r\n\r\nexport const useProcessPayment = (\r\n {\r\n openLinkPopup,\r\n onPaymentProcessing,\r\n responseTypes,\r\n paymentMethod\r\n\r\n }) => {\r\n\r\n useEffect(() => {\r\n const unsubscribe = onPaymentProcessing(async () => {\r\n try {\r\n // open the Plaid popup\r\n const result = await openLinkPopup();\r\n const {publicToken, metaData} = result;\r\n // remove the cached link token.\r\n deleteFromCache('linkToken');\r\n return ensureSuccessResponse(responseTypes, {\r\n meta: {\r\n paymentMethodData: {\r\n [`${paymentMethod}_token_key`]: publicToken,\r\n [`${paymentMethod}_metadata`]: JSON.stringify(metaData)\r\n }\r\n }\r\n });\r\n } catch (err) {\r\n return ensureErrorResponse(responseTypes, err);\r\n }\r\n });\r\n return () => unsubscribe();\r\n }, [\r\n onPaymentProcessing,\r\n responseTypes,\r\n openLinkPopup\r\n ]);\r\n}","import './styles.scss';\r\nimport './payment-method'","import {useState} from '@wordpress/element';\r\nimport {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings, isTestMode} from '../util';\r\nimport {PaymentMethodLabel, PaymentMethod} from '../../components/checkout';\r\nimport SavedCardComponent from '../saved-card-component';\r\nimport {useCreateLinkToken, useInitializePlaid, useProcessPayment} from './hooks';\r\nimport {useProcessCheckoutError} from \"../hooks\";\r\nimport {__} from '@wordpress/i18n';\r\n\r\nconst getData = getSettings('stripe_ach_data');\r\n\r\nconst ACHPaymentContent = (\r\n {\r\n getData,\r\n eventRegistration,\r\n components,\r\n emitResponse,\r\n onSubmit,\r\n ...props\r\n }) => {\r\n const {responseTypes} = emitResponse;\r\n const {onPaymentProcessing, onCheckoutAfterProcessingWithError} = eventRegistration;\r\n const {ValidationInputError} = components;\r\n const [validationError, setValidationError] = useState(false);\r\n\r\n const linkToken = useCreateLinkToken({setValidationError});\r\n\r\n useProcessCheckoutError({\r\n responseTypes,\r\n subscriber: onCheckoutAfterProcessingWithError\r\n });\r\n\r\n const openLinkPopup = useInitializePlaid({\r\n getData,\r\n linkToken,\r\n onSubmit\r\n });\r\n\r\n useProcessPayment({\r\n openLinkPopup,\r\n onPaymentProcessing,\r\n responseTypes,\r\n paymentMethod: getData('name')\r\n });\r\n return (\r\n <>\r\n {isTestMode && <ACHTestModeCredentials/>}\r\n {validationError && <ValidationInputError errorMessage={validationError}/>}\r\n </>\r\n )\r\n}\r\n\r\nconst ACHTestModeCredentials = () => {\r\n return (\r\n <div className='wc-stripe-blocks-ach__creds'>\r\n <label className='wc-stripe-blocks-ach__creds-label'>{__('Test Credentials', 'woo-stripe-payment')}</label>\r\n <div className='wc-stripe-blocks-ach__username'>\r\n <div>\r\n <strong>{__('username', 'woo-stripe-payment')}</strong>: user_good\r\n </div>\r\n <div>\r\n <strong>{__('password', 'woo-stripe-payment')}</strong>: pass_good\r\n </div>\r\n <div>\r\n <strong>{__('pin', 'woo-stripe-payment')}</strong>: credential_good\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n\r\nregisterPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icons')}/>,\r\n ariaLabel: 'ACH Payment',\r\n canMakePayment: ({cartTotals}) => cartTotals.currency_code === 'USD',\r\n content: <PaymentMethod\r\n getData={getData}\r\n content={ACHPaymentContent}/>,\r\n savedTokenComponent: <SavedCardComponent getData={getData}/>,\r\n edit: <ACHPaymentContent getData={getData}/>,\r\n placeOrderButtonLabel: getData('placeOrderButtonLabel'),\r\n supports: {\r\n showSavedCards: getData('showSavedCards'),\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n})","import './style.scss';\r\n\r\nimport './payment-method';","import {useCallback} from '@wordpress/element';\r\nimport {registerExpressPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings, initStripe as loadStripe, canMakePayment} from \"../util\";\r\nimport {Elements, PaymentRequestButtonElement, useStripe} from \"@stripe/react-stripe-js\";\r\nimport ErrorBoundary from \"../error-boundary\";\r\nimport {\r\n usePaymentRequest,\r\n useProcessPaymentIntent,\r\n useExportedValues,\r\n useAfterProcessingPayment,\r\n useStripeError,\r\n useExpressBreakpointWidth\r\n} from '../hooks';\r\n\r\nconst getData = getSettings('stripe_applepay_data');\r\n\r\nconst ApplePayContent = (props) => {\r\n return (\r\n <ErrorBoundary>\r\n <div className='wc-stripe-apple-pay-container'>\r\n <Elements stripe={loadStripe}>\r\n <ApplePayButton {...props}/>\r\n </Elements>\r\n </div>\r\n </ErrorBoundary>\r\n );\r\n}\r\n\r\nconst ApplePayButton = (\r\n {\r\n getData,\r\n onClick,\r\n onClose,\r\n billing,\r\n shippingData,\r\n eventRegistration,\r\n emitResponse,\r\n onSubmit,\r\n activePaymentMethod,\r\n ...props\r\n }) => {\r\n const {onPaymentProcessing} = eventRegistration;\r\n const {responseTypes, noticeContexts} = emitResponse;\r\n const stripe = useStripe();\r\n const [error] = useStripeError();\r\n const canPay = (result) => result != null && result.applePay;\r\n const exportedValues = useExportedValues();\r\n useExpressBreakpointWidth({payment_method: getData('name'), width: 300});\r\n const {setPaymentMethod} = useProcessPaymentIntent({\r\n getData,\r\n billing,\r\n shippingData,\r\n onPaymentProcessing,\r\n emitResponse,\r\n error,\r\n onSubmit,\r\n activePaymentMethod,\r\n exportedValues\r\n });\r\n useAfterProcessingPayment({\r\n getData,\r\n eventRegistration,\r\n responseTypes,\r\n activePaymentMethod,\r\n messageContext: noticeContexts.EXPRESS_PAYMENTS\r\n });\r\n const {paymentRequest} = usePaymentRequest({\r\n getData,\r\n onClose,\r\n stripe,\r\n billing,\r\n shippingData,\r\n eventRegistration,\r\n setPaymentMethod,\r\n exportedValues,\r\n canPay\r\n });\r\n\r\n const handleClick = useCallback(() => {\r\n if (paymentRequest) {\r\n onClick();\r\n paymentRequest.show();\r\n }\r\n }, [paymentRequest]);\r\n\r\n if (paymentRequest) {\r\n return (\r\n <button\r\n className={`apple-pay-button ${getData('buttonStyle')}`}\r\n style={{\r\n '-apple-pay-button-type': getData('buttonType')\r\n }}\r\n onClick={handleClick}/>\r\n\r\n )\r\n }\r\n return null;\r\n}\r\n\r\nconst ApplePayEdit = ({getData, ...props}) => {\r\n return (\r\n <div className={'apple-pay-block-editor'}>\r\n <img src={getData('editorIcon')}/>\r\n </div>\r\n )\r\n}\r\n\r\nregisterExpressPaymentMethod({\r\n name: getData('name'),\r\n canMakePayment: ({cartTotals, ...props}) => {\r\n if (getData('isAdmin')) {\r\n return true;\r\n }\r\n const {currency_code: currency, total_price} = cartTotals;\r\n return canMakePayment({\r\n country: getData('countryCode'),\r\n currency: currency.toLowerCase(),\r\n total: {\r\n label: getData('totalLabel'),\r\n amount: parseInt(total_price)\r\n }\r\n }, (result) => result != null && result.applePay);\r\n },\r\n content: <ApplePayContent getData={getData}/>,\r\n edit: <ApplePayEdit getData={getData}/>,\r\n supports: {\r\n showSavedCards: getData('showSavedCards'),\r\n showSaveOption: getData('showSaveOption'),\r\n features: getData('features')\r\n }\r\n})","import './style.scss';\r\nimport {registerCreditCardForm} from \"@paymentplugins/stripe/util\";\r\nimport {CardNumberElement, CardExpiryElement, CardCvcElement} from '@stripe/react-stripe-js';\r\nimport {__} from \"@wordpress/i18n\";\r\n\r\nconst Bootstrap = ({CardIcon, options, onChange}) => {\r\n return (\r\n <div className='wc-stripe-bootstrap-form'>\r\n <div className='row'>\r\n <div className='col-md-6 mb-3'>\r\n <CardNumberElement className='md-form md-outline stripe-input' options={options['cardNumber']}\r\n onChange={onChange(CardNumberElement)}/>\r\n <label htmlFor=\"stripe-card-number\">{__('Card Number', 'woo-stripe-payment')}</label>\r\n {CardIcon}\r\n </div>\r\n <div className='col-md-3 mb-3'>\r\n <CardExpiryElement className='md-form md-outline stripe-input' options={options['cardExpiry']}\r\n onChange={onChange(CardExpiryElement)}/>\r\n <label htmlFor=\"stripe-exp\">{__('Exp', 'woo-stripe-payment')}</label>\r\n </div>\r\n <div className='col-md-3 mb-3'>\r\n <CardCvcElement className=\"md-form md-outline stripe-input\" options={options['cardCvc']}\r\n onChange={onChange(CardCvcElement)}/>\r\n <label htmlFor=\"stripe-cvv\">{__('CVV', 'woo-stripe-payment')}</label>\r\n </div>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nregisterCreditCardForm({\r\n id: 'bootstrap',\r\n breakpoint: 475,\r\n component: <Bootstrap/>\r\n})","import {getCreditCardForm} from \"../../util\";\r\nimport {cloneElement, useRef, useCallback, useEffect, useState} from '@wordpress/element';\r\nimport {useElements, CardNumberElement, CardExpiryElement, CardCvcElement} from '@stripe/react-stripe-js';\r\nimport {sprintf, __} from '@wordpress/i18n';\r\nimport {useBreakpointWidth} from \"../../hooks\";\r\n\r\nconst classes = {\r\n focus: 'focused',\r\n empty: 'empty',\r\n invalid: 'invalid'\r\n}\r\n\r\nconst CustomCardForm = (\r\n {\r\n getData,\r\n onChange: eventChange,\r\n ValidationInputError\r\n }) => {\r\n const [windowSize, setWindowSize] = useState(window.innerWidth);\r\n const [cardType, setCardType] = useState('');\r\n const elementOrder = useRef([]);\r\n const [container, setContainer] = useState(null);\r\n const elements = useElements();\r\n const id = getData('customForm');\r\n const {component: CardForm, breakpoint = 475} = getCreditCardForm(id);\r\n const postalCodeEnabled = getData('postalCodeEnabled');\r\n const options = {};\r\n ['cardNumber', 'cardExpiry', 'cardCvc'].forEach(type => {\r\n options[type] = {\r\n classes,\r\n ...getData('cardOptions'),\r\n ...getData('customFieldOptions')[type],\r\n }\r\n });\r\n const onChange = (element) => {\r\n setElementOrder(element);\r\n return (event) => {\r\n eventChange(event);\r\n if (event.elementType === 'cardNumber') {\r\n if (event.brand === 'unknown') {\r\n setCardType('');\r\n } else {\r\n setCardType(event.brand);\r\n }\r\n }\r\n if (event.complete) {\r\n const idx = elementOrder.current.indexOf(element);\r\n if (elementOrder.current[idx + 1]) {\r\n const nextElement = elementOrder.current[idx + 1];\r\n elements.getElement(nextElement).focus();\r\n }\r\n }\r\n }\r\n }\r\n const setElementOrder = useCallback((element) => {\r\n if (!elementOrder.current.includes(element)) {\r\n elementOrder.current.push(element);\r\n }\r\n }, []);\r\n\r\n useBreakpointWidth({name: 'creditCardForm', width: breakpoint, node: container, className: 'small-form'});\r\n\r\n const getCardIconSrc = useCallback((type) => {\r\n for (let icon of getData('icons')) {\r\n if (icon.id === type) {\r\n return icon.src;\r\n }\r\n }\r\n return '';\r\n }, []);\r\n\r\n if (!CardForm) {\r\n return (\r\n <div className='wc-stripe-custom-form-error'>\r\n <p>{sprintf(__('%s is not a valid blocks Stripe custom form. Please choose another custom form option in the Credit Card Settings.', 'woo-stripe-payment'), getData('customFormLabels')[id])}</p>\r\n </div>\r\n )\r\n }\r\n return (\r\n <div className={`wc-stripe-custom-form ${id}`} ref={setContainer}>\r\n {cloneElement(CardForm, {\r\n postalCodeEnabled,\r\n options,\r\n onChange,\r\n CardIcon: <CardIcon type={cardType} src={getCardIconSrc(cardType)}/>\r\n })}\r\n </div>\r\n )\r\n\r\n}\r\n\r\nconst CardIcon = ({type, src}) => {\r\n if (type) {\r\n return <img className={`wc-stripe-card ${type}`} src={src}/>\r\n }\r\n return null;\r\n}\r\n\r\nexport default CustomCardForm;\r\n","import './style.scss';\r\nimport {registerCreditCardForm} from \"@paymentplugins/stripe/util\";\r\nimport {CardNumberElement, CardExpiryElement, CardCvcElement} from '@stripe/react-stripe-js';\r\nimport {__} from \"@wordpress/i18n\";\r\nimport {useEffect, useCallback, useRef} from '@wordpress/element';\r\n\r\nconst SimpleForm = ({CardIcon, options, onChange}) => {\r\n useEffect(() => {\r\n }, []);\r\n return (\r\n <div className='wc-stripe-simple-form'>\r\n <div className=\"row\">\r\n <div className=\"field\">\r\n <div className='field-item'>\r\n <CardNumberElement id=\"stripe-card-number\" className=\"input empty\"\r\n options={options['cardNumber']}\r\n onChange={onChange(CardNumberElement)}/>\r\n <label htmlFor=\"stripe-card-number\"\r\n data-tid=\"\">{__('Card Number', 'woo-stripe-payment')}</label>\r\n <div className=\"baseline\"></div>\r\n {CardIcon}\r\n </div>\r\n </div>\r\n </div>\r\n <div className=\"row\">\r\n <div className=\"field half-width\">\r\n <div className='field-item'>\r\n <CardExpiryElement id=\"stripe-exp\" className=\"input empty\" options={options['cardExpiry']}\r\n onChange={onChange(CardExpiryElement)}/>\r\n <label htmlFor=\"stripe-exp\"\r\n data-tid=\"\">{__('Expiration', 'woo-stripe-payment')}</label>\r\n <div className=\"baseline\"></div>\r\n </div>\r\n </div>\r\n <div className=\"field half-width cvc\">\r\n <div className='field-item'>\r\n <CardCvcElement id=\"stripe-cvv\" className=\"input empty\" options={options['cardCvc']}\r\n onChange={onChange(CardCvcElement)}/>\r\n <label htmlFor=\"stripe-cvv\"\r\n data-tid=\"\">{__('CVV', 'woo-stripe-payment')}</label>\r\n <div className=\"baseline\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nregisterCreditCardForm({\r\n id: 'simple',\r\n component: <SimpleForm/>,\r\n breakpoint: 375\r\n})","import {CardElement} from \"@stripe/react-stripe-js\";\r\nimport {isFieldRequired} from \"../../util\";\r\nimport {useMemo} from '@wordpress/element';\r\n\r\nconst StripeCardForm = ({getData, billing, onChange}) => {\r\n const cardOptions = useMemo(() => {\r\n return {\r\n ...{\r\n value: {\r\n postalCode: billing?.billingData?.postcode\r\n },\r\n hidePostalCode: isFieldRequired('postcode'),\r\n iconStyle: 'default'\r\n }, ...getData('cardOptions')\r\n };\r\n }, [billing.billingData]);\r\n return (\r\n <div className='wc-stripe-inline-form'>\r\n <CardElement options={cardOptions} onChange={onChange}/>\r\n </div>\r\n )\r\n}\r\n\r\nexport default StripeCardForm;","import './style.scss';\r\n\r\nexport * from './payment-method';\r\n\r\nimport './components/bootstrap';\r\nimport './components/simple';\r\n","import {useEffect, useState, useCallback, useMemo} from '@wordpress/element';\r\nimport {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {\r\n initStripe as loadStripe,\r\n getSettings,\r\n isUserLoggedIn,\r\n cartContainsSubscription,\r\n cartContainsPreOrder\r\n} from '../util';\r\nimport {Elements, CardElement, useStripe, useElements, CardNumberElement} from '@stripe/react-stripe-js';\r\nimport {PaymentMethodLabel, PaymentMethod, SavePaymentMethod} from '../../components/checkout';\r\nimport SavedCardComponent from '../saved-card-component';\r\nimport CustomCardForm from './components/custom-card-form';\r\nimport StripeCardForm from \"./components/stripe-card-form\";\r\nimport {\r\n useProcessPaymentIntent,\r\n useAfterProcessingPayment,\r\n useSetupIntent,\r\n useStripeError\r\n} from \"../hooks\";\r\n\r\nconst getData = getSettings('stripe_cc_data');\r\n\r\nconst displaySaveCard = (customerId) => {\r\n return isUserLoggedIn(customerId) && getData('saveCardEnabled') &&\r\n !cartContainsSubscription() && !cartContainsPreOrder()\r\n}\r\n\r\nconst CreditCardContent = (props) => {\r\n const [error, setError] = useState(false);\r\n useEffect(() => {\r\n loadStripe.catch(error => {\r\n setError(error);\r\n })\r\n }, [setError]);\r\n if (error) {\r\n throw new Error(error);\r\n }\r\n return (\r\n <Elements stripe={loadStripe}>\r\n <CreditCardElement {...props}/>\r\n </Elements>\r\n );\r\n};\r\n\r\nconst CreditCardElement = (\r\n {\r\n getData,\r\n billing,\r\n shippingData,\r\n emitResponse,\r\n eventRegistration,\r\n activePaymentMethod\r\n }) => {\r\n const [error, setError] = useStripeError();\r\n const [savePaymentMethod, setSavePaymentMethod] = useState(false);\r\n const onSavePaymentMethod = (checked) => setSavePaymentMethod(checked);\r\n const {onPaymentProcessing} = eventRegistration;\r\n const stripe = useStripe();\r\n const elements = useElements();\r\n const getPaymentMethodArgs = useCallback(() => {\r\n const elType = getData('customFormActive') ? CardNumberElement : CardElement;\r\n return {card: elements.getElement(elType)};\r\n }, [stripe, elements]);\r\n\r\n const {setupIntent, removeSetupIntent} = useSetupIntent({\r\n getData,\r\n cartTotal: billing.cartTotal,\r\n setError\r\n })\r\n\r\n useProcessPaymentIntent({\r\n getData,\r\n billing,\r\n shippingData,\r\n emitResponse,\r\n error,\r\n onPaymentProcessing,\r\n savePaymentMethod,\r\n setupIntent,\r\n removeSetupIntent,\r\n getPaymentMethodArgs,\r\n activePaymentMethod\r\n });\r\n useAfterProcessingPayment({\r\n getData,\r\n eventRegistration,\r\n responseTypes: emitResponse.responseTypes,\r\n activePaymentMethod,\r\n savePaymentMethod\r\n });\r\n\r\n const onChange = (event) => {\r\n if (event.error) {\r\n setError(event.error);\r\n } else {\r\n setError(false);\r\n }\r\n }\r\n const Tag = getData('customFormActive') ? CustomCardForm : StripeCardForm;\r\n return (\r\n <div className='wc-stripe-card-container'>\r\n <Tag {...{getData, billing, onChange}}/>\r\n {displaySaveCard(billing.customerId) &&\r\n <SavePaymentMethod label={getData('savePaymentMethodLabel')}\r\n onChange={onSavePaymentMethod}\r\n checked={savePaymentMethod}/>}\r\n </div>\r\n );\r\n}\r\n\r\nregisterPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icons')}/>,\r\n ariaLabel: 'Credit Cards',\r\n canMakePayment: () => loadStripe,\r\n content: <PaymentMethod content={CreditCardContent} getData={getData}/>,\r\n savedTokenComponent: <SavedCardComponent getData={getData}/>,\r\n edit: <PaymentMethod content={CreditCardContent} getData={getData}/>,\r\n supports: {\r\n showSavedCards: getData('showSavedCards'),\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n})","import {Component} from '@wordpress/element';\r\n\r\nclass ErrorBoundary extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {hasError: false, error: null, errorInfo: null};\r\n }\r\n\r\n componentDidCatch(error, errorInfo) {\r\n this.setState({\r\n hasError: true,\r\n error,\r\n errorInfo\r\n })\r\n }\r\n\r\n render() {\r\n if (this.state.hasError) {\r\n return (\r\n <>\r\n {this.state.error && <div className='wc-stripe-block-error'>{this.state.error.toString()}</div>}\r\n {this.state.errorInfo &&\r\n <div className='wc-stripe-block-error'>{this.state.errorInfo.componentStack}</div>}\r\n </>\r\n )\r\n }\r\n return this.props.children;\r\n }\r\n}\r\n\r\nexport default ErrorBoundary;","import {useRef, useEffect} from '@wordpress/element';\r\nimport {usePaymentsClient, usePaymentRequest} from './hooks';\r\nimport {\r\n useProcessPaymentIntent,\r\n useStripeError,\r\n useExportedValues,\r\n useExpressBreakpointWidth\r\n} from '../hooks';\r\nimport {getSettings} from '@paymentplugins/stripe/util';\r\n\r\nconst {publishableKey} = getSettings('stripeGeneralData')();\r\n\r\nconst GooglePayButton = (\r\n {\r\n getData,\r\n setErrorMessage,\r\n billing,\r\n shippingData,\r\n canMakePayment,\r\n checkoutStatus,\r\n eventRegistration,\r\n activePaymentMethod,\r\n onClick,\r\n onClose,\r\n ...props\r\n }) => {\r\n const merchantInfo = {\r\n merchantId: getData('merchantId'),\r\n merchantName: getData('merchantName')\r\n };\r\n const [error, setError] = useStripeError();\r\n const buttonContainer = useRef();\r\n const {onSubmit, emitResponse} = props;\r\n const {onPaymentProcessing} = eventRegistration;\r\n const exportedValues = useExportedValues();\r\n const width = getData('buttonStyle').buttonType === 'long' ? 390 : 300;\r\n const {setPaymentMethod} = useProcessPaymentIntent({\r\n getData,\r\n billing,\r\n shippingData,\r\n onPaymentProcessing,\r\n emitResponse,\r\n error,\r\n exportedValues,\r\n onSubmit,\r\n checkoutStatus,\r\n activePaymentMethod\r\n });\r\n\r\n const paymentRequest = usePaymentRequest({\r\n getData,\r\n publishableKey,\r\n merchantInfo,\r\n billing,\r\n shippingData\r\n })\r\n\r\n const {button, removeButton} = usePaymentsClient({\r\n merchantInfo,\r\n paymentRequest,\r\n billing,\r\n shippingData,\r\n eventRegistration,\r\n canMakePayment,\r\n setErrorMessage,\r\n onSubmit,\r\n setPaymentMethod,\r\n exportedValues,\r\n onClick,\r\n onClose,\r\n getData\r\n });\r\n\r\n useExpressBreakpointWidth({payment_method: getData('name'), width});\r\n\r\n useEffect(() => {\r\n if (button) {\r\n // prevent button duplicates\r\n removeButton(buttonContainer.current);\r\n buttonContainer.current.append(button);\r\n }\r\n }, [button]);\r\n\r\n return (\r\n <div className='wc-stripe-gpay-button-container' ref={buttonContainer}></div>\r\n )\r\n}\r\n\r\nexport default GooglePayButton;","export const BASE_PAYMENT_METHOD = {\r\n type: 'CARD',\r\n parameters: {\r\n allowedAuthMethods: [\"PAN_ONLY\"],\r\n allowedCardNetworks: [\"AMEX\", \"DISCOVER\", \"INTERAC\", \"JCB\", \"MASTERCARD\", \"VISA\"],\r\n assuranceDetailsRequired: true\r\n }\r\n};\r\n\r\nexport const BASE_PAYMENT_REQUEST = {\r\n apiVersion: 2,\r\n apiVersionMinor: 0\r\n}","export * from './use-payments-client';\r\nexport * from './use-payment-request';\r\nexport * from './use-error-message';","import {useState} from '@wordpress/element';\r\n\r\nexport const useErrorMessage = () => {\r\n const [errorMessage, setErrorMessage] = useState(false);\r\n return {errorMessage, setErrorMessage};\r\n}","import {useState, useEffect, useMemo} from '@wordpress/element';\r\nimport {BASE_PAYMENT_REQUEST, BASE_PAYMENT_METHOD} from \"../constants\";\r\nimport {isEmpty, isFieldRequired} from \"../../util\";\r\nimport {getTransactionInfo, getShippingOptionParameters} from \"../util\";\r\n\r\nexport const usePaymentRequest = ({getData, publishableKey, merchantInfo, billing, shippingData}) => {\r\n const {billingData} = billing;\r\n const {shippingRates, shippingAddress} = shippingData;\r\n const {processingCountry, totalPriceLabel} = getData();\r\n\r\n const paymentRequest = useMemo(() => {\r\n let options = {\r\n ...{\r\n emailRequired: isEmpty(billingData.email),\r\n merchantInfo,\r\n allowedPaymentMethods: [{\r\n ...{\r\n type: 'CARD',\r\n tokenizationSpecification: {\r\n type: \"PAYMENT_GATEWAY\",\r\n parameters: {\r\n gateway: 'stripe',\r\n \"stripe:version\": \"2018-10-31\",\r\n \"stripe:publishableKey\": publishableKey\r\n }\r\n }\r\n }, ...BASE_PAYMENT_METHOD\r\n }],\r\n shippingAddressRequired: shippingData.needsShipping,\r\n transactionInfo: getTransactionInfo({\r\n billing,\r\n processingCountry,\r\n totalPriceLabel\r\n }),\r\n callbackIntents: ['PAYMENT_AUTHORIZATION']\r\n }, ...BASE_PAYMENT_REQUEST\r\n };\r\n options.allowedPaymentMethods[0].parameters.billingAddressRequired = true;\r\n options.allowedPaymentMethods[0].parameters.billingAddressParameters = {\r\n format: 'FULL',\r\n phoneNumberRequired: isFieldRequired('phone', billingData.country) && isEmpty(billingData.phone)\r\n };\r\n if (options.shippingAddressRequired) {\r\n options.callbackIntents = [...options.callbackIntents, ...['SHIPPING_ADDRESS', 'SHIPPING_OPTION']];\r\n options.shippingOptionRequired = true;\r\n const shippingOptionParameters = getShippingOptionParameters(shippingRates);\r\n if (shippingOptionParameters.shippingOptions.length > 0) {\r\n options = {...options, shippingOptionParameters};\r\n }\r\n }\r\n return options;\r\n }, [\r\n billing.cartTotal,\r\n billing.cartTotalItems,\r\n billingData,\r\n shippingData\r\n ]);\r\n return paymentRequest;\r\n}","import {useState, useEffect, useCallback, useMemo, useRef} from '@wordpress/element';\r\nimport isShallowEqual from \"@wordpress/is-shallow-equal\";\r\nimport {\r\n getErrorMessage,\r\n getSelectedShippingOption,\r\n getBillingDetailsFromAddress,\r\n isAddressValid,\r\n isEmpty,\r\n StripeError,\r\n getIntermediateAddress\r\n} from \"../../util\";\r\nimport {useStripe} from \"@stripe/react-stripe-js\";\r\nimport {getPaymentRequestUpdate, toCartAddress} from \"../util\";\r\nimport {__} from \"@wordpress/i18n\";\r\nimport {usePaymentEvents} from \"../../hooks\";\r\n\r\nexport const usePaymentsClient = (\r\n {\r\n merchantInfo,\r\n paymentRequest,\r\n billing,\r\n shippingData,\r\n eventRegistration,\r\n canMakePayment,\r\n setErrorMessage,\r\n setPaymentMethod,\r\n exportedValues,\r\n onClick,\r\n onClose,\r\n getData\r\n }) => {\r\n const {environment} = getData();\r\n const [paymentsClient, setPaymentsClient] = useState();\r\n const [button, setButton] = useState(null);\r\n const currentBilling = useRef(billing);\r\n const currentShipping = useRef(shippingData);\r\n const stripe = useStripe();\r\n const {addPaymentEvent} = usePaymentEvents({\r\n billing,\r\n shippingData,\r\n eventRegistration\r\n });\r\n useEffect(() => {\r\n currentBilling.current = billing;\r\n currentShipping.current = shippingData;\r\n });\r\n\r\n const setAddressData = useCallback((paymentData) => {\r\n if (paymentData?.paymentMethodData?.info?.billingAddress) {\r\n let billingAddress = paymentData.paymentMethodData.info.billingAddress;\r\n if (isAddressValid(currentBilling.current.billingData, ['phone', 'email']) && isEmpty(currentBilling.current.billingData?.phone)) {\r\n billingAddress = {phoneNumber: billingAddress.phoneNumber};\r\n }\r\n exportedValues.billingData = toCartAddress(billingAddress, {email: paymentData.email});\r\n }\r\n if (paymentData?.shippingAddress) {\r\n exportedValues.shippingAddress = toCartAddress(paymentData.shippingAddress);\r\n }\r\n }, [exportedValues, paymentRequest]);\r\n\r\n const removeButton = useCallback((parentElement) => {\r\n while (parentElement.firstChild) {\r\n parentElement.removeChild(parentElement.firstChild);\r\n }\r\n }, [button]);\r\n const handleClick = useCallback(async () => {\r\n onClick();\r\n try {\r\n let paymentData = await paymentsClient.loadPaymentData(paymentRequest);\r\n const {billingData} = currentBilling.current;\r\n\r\n // set the address data so it can be used during the checkout process\r\n setAddressData(paymentData);\r\n\r\n const data = JSON.parse(paymentData.paymentMethodData.tokenizationData.token);\r\n\r\n let result = await stripe.createPaymentMethod({\r\n type: 'card',\r\n card: {token: data.id},\r\n billing_details: getBillingDetailsFromAddress(billingData)\r\n });\r\n\r\n if (result.error) {\r\n throw new StripeError(result.error);\r\n }\r\n\r\n setPaymentMethod(result.paymentMethod.id);\r\n } catch (err) {\r\n if (err?.statusCode === \"CANCELED\") {\r\n onClose();\r\n } else {\r\n console.log(getErrorMessage(err));\r\n setErrorMessage(getErrorMessage(err));\r\n }\r\n }\r\n }, [\r\n stripe,\r\n paymentsClient,\r\n onClick\r\n ]);\r\n\r\n const createButton = useCallback(async () => {\r\n try {\r\n if (paymentsClient && !button && stripe) {\r\n await canMakePayment;\r\n setButton(paymentsClient.createButton({\r\n onClick: handleClick,\r\n ...getData('buttonStyle')\r\n }));\r\n }\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }, [\r\n stripe,\r\n button,\r\n paymentsClient\r\n ]);\r\n\r\n const paymentOptions = useMemo(() => {\r\n let options = {\r\n environment,\r\n merchantInfo,\r\n paymentDataCallbacks: {\r\n onPaymentAuthorized: () => Promise.resolve({transactionState: \"SUCCESS\"})\r\n }\r\n }\r\n if (paymentRequest.shippingAddressRequired) {\r\n options.paymentDataCallbacks.onPaymentDataChanged = (paymentData) => {\r\n return new Promise((resolve, reject) => {\r\n const shipping = currentShipping.current;\r\n const {shippingAddress: address, shippingOptionData} = paymentData;\r\n const intermediateAddress = toCartAddress(address);\r\n // pass the Promise resolve to a ref so it persists beyond the re-render\r\n const selectedRates = getSelectedShippingOption(shippingOptionData.id);\r\n const addressEqual = isShallowEqual(getIntermediateAddress(shipping.shippingAddress), intermediateAddress);\r\n const shippingEqual = isShallowEqual(shipping.selectedRates, {\r\n [selectedRates[1]]: selectedRates[0]\r\n });\r\n addPaymentEvent('onShippingChanged', (success, {billing, shipping}) => {\r\n if (success) {\r\n resolve(getPaymentRequestUpdate({\r\n billing,\r\n shippingData: {\r\n needsShipping: true,\r\n shippingRates: shipping.shippingRates\r\n },\r\n processingCountry: getData('processingCountry'),\r\n totalPriceLabel: getData('totalPriceLabel')\r\n }))\r\n } else {\r\n resolve({\r\n error: {\r\n reason: 'SHIPPING_ADDRESS_UNSERVICEABLE',\r\n message: __('Your shipping address is not serviceable.', 'woo-stripe-payment'),\r\n intent: 'SHIPPING_ADDRESS'\r\n }\r\n });\r\n }\r\n }, addressEqual && shippingEqual);\r\n currentShipping.current.setShippingAddress({...currentShipping.current.shippingAddress, ...intermediateAddress});\r\n if (shippingOptionData.id !== 'shipping_option_unselected') {\r\n currentShipping.current.setSelectedRates(...selectedRates);\r\n }\r\n })\r\n }\r\n }\r\n return options;\r\n }, [paymentRequest]);\r\n\r\n useEffect(() => {\r\n setPaymentsClient(new google.payments.api.PaymentsClient(paymentOptions));\r\n }, [paymentOptions]);\r\n\r\n useEffect(() => {\r\n createButton();\r\n }, [createButton])\r\n\r\n return {\r\n button,\r\n removeButton\r\n };\r\n}","import './style.scss';\r\n\r\nexport * from './payment-method';","import {registerExpressPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings, initStripe as loadStripe, isCartPage} from '../util';\r\nimport {useErrorMessage} from \"./hooks\";\r\nimport GooglePayButton from './button';\r\nimport {BASE_PAYMENT_METHOD, BASE_PAYMENT_REQUEST} from './constants';\r\nimport google from '@googlepay';\r\nimport {Elements} from \"@stripe/react-stripe-js\";\r\n\r\nconst getData = getSettings('stripe_googlepay_data');\r\n\r\nconst canMakePayment = (() => {\r\n const paymentsClient = new google.payments.api.PaymentsClient({\r\n environment: getData('environment'),\r\n merchantInfo: {\r\n merchantId: getData('merchantId'),\r\n merchantName: getData('merchantName')\r\n }\r\n });\r\n const isReadyToPayRequest = {...BASE_PAYMENT_REQUEST, allowedPaymentMethods: [BASE_PAYMENT_METHOD]};\r\n return paymentsClient.isReadyToPay(isReadyToPayRequest).then(() => {\r\n return true;\r\n }).catch(err => {\r\n console.log(err);\r\n return false;\r\n })\r\n})();\r\n\r\nconst GooglePayContent = ({getData, components, ...props}) => {\r\n const {ValidationInputError} = components;\r\n const {errorMessage, setErrorMessage} = useErrorMessage();\r\n return (\r\n <div className='wc-stripe-gpay-container'>\r\n <Elements stripe={loadStripe}>\r\n <GooglePayButton getData={getData}\r\n canMakePayment={canMakePayment}\r\n setErrorMessage={setErrorMessage}\r\n {...props}/>\r\n {errorMessage && <ValidationInputError errorMessage={errorMessage}/>}\r\n </Elements>\r\n </div>\r\n )\r\n}\r\n\r\nconst GooglePayEdit = ({getData, ...props}) => {\r\n const buttonType = getData('buttonStyle').buttonType;\r\n const src = getData('editorIcons')?.[buttonType] || 'long';\r\n return (\r\n <div className={`gpay-block-editor ${buttonType}`}>\r\n <img src={src}/>\r\n </div>\r\n )\r\n}\r\n\r\nregisterExpressPaymentMethod({\r\n name: getData('name'),\r\n canMakePayment: () => {\r\n if (getData('isAdmin')) {\r\n if (isCartPage()) {\r\n return getData('cartCheckoutEnabled');\r\n }\r\n return true;\r\n }\r\n if (isCartPage() && !getData('cartCheckoutEnabled')) {\r\n return false;\r\n }\r\n return loadStripe.then(stripe => {\r\n if (stripe.error) {\r\n return stripe;\r\n }\r\n return canMakePayment;\r\n });\r\n },\r\n content: <GooglePayContent getData={getData}/>,\r\n edit: <GooglePayEdit getData={getData}/>,\r\n supports: {\r\n showSavedCards: getData('showSavedCards'),\r\n showSaveOption: getData('showSaveOption'),\r\n features: getData('features')\r\n }\r\n})","import {getShippingOptionId, removeNumberPrecision, toCartAddress as mapAddressToCartAddress} from \"../util\";\r\nimport {formatPrice} from '../util';\r\n\r\nconst ADDRESS_MAPPINGS = {\r\n name: (address, name) => {\r\n address.first_name = name.split(' ').slice(0, -1).join(' ');\r\n address.last_name = name.split(' ').pop();\r\n return address;\r\n },\r\n countryCode: 'country',\r\n address1: 'address_1',\r\n address2: 'address_2',\r\n locality: 'city',\r\n administrativeArea: 'state',\r\n postalCode: 'postcode',\r\n email: 'email',\r\n phoneNumber: 'phone'\r\n}\r\n\r\nexport const getTransactionInfo = ({billing, processingCountry, totalPriceLabel}, status = 'ESTIMATED') => {\r\n const {cartTotal, cartTotalItems, currency} = billing;\r\n const transactionInfo = {\r\n countryCode: processingCountry,\r\n currencyCode: currency.code,\r\n totalPriceStatus: status,\r\n totalPrice: removeNumberPrecision(cartTotal.value, currency.minorUnit).toString(),\r\n displayItems: getDisplayItems(cartTotalItems, currency.minorUnit),\r\n totalPriceLabel\r\n }\r\n return transactionInfo;\r\n}\r\n\r\nexport const getPaymentRequestUpdate = ({billing, shippingData, processingCountry, totalPriceLabel}) => {\r\n const {needsShipping, shippingRates} = shippingData;\r\n let update = {\r\n newTransactionInfo: getTransactionInfo({\r\n billing, processingCountry, totalPriceLabel\r\n }, 'FINAL')\r\n }\r\n if (needsShipping) {\r\n update.newShippingOptionParameters = getShippingOptionParameters(shippingRates);\r\n }\r\n return update;\r\n}\r\n\r\n/**\r\n * Return an array of line item objects\r\n * @param cartTotalItems\r\n * @param unit\r\n * @returns {[]}\r\n */\r\nconst getDisplayItems = (cartTotalItems, unit = 2) => {\r\n let items = [];\r\n cartTotalItems.forEach(item => {\r\n /**\r\n * @todo when blocks provides the line item type, we can show\r\n * shipping when it's a $0. We currently filter because there's no\r\n * reason to show things like fees if they're $0 to keep the wallet clean.\r\n */\r\n if (0 < item.value) {\r\n items.push({\r\n label: item.label,\r\n type: 'LINE_ITEM',\r\n price: removeNumberPrecision(item.value, unit).toString()\r\n });\r\n }\r\n })\r\n return items;\r\n}\r\n\r\nexport const getShippingOptionParameters = (shippingRates) => {\r\n const shippingOptions = getShippingOptions(shippingRates);\r\n const shippingOptionIds = shippingOptions.map(option => option.id);\r\n let defaultSelectedOptionId = shippingOptionIds.slice(0, 1).shift();\r\n shippingRates.forEach((shippingPackage, idx) => {\r\n shippingPackage.shipping_rates.forEach(rate => {\r\n if (rate.selected) {\r\n defaultSelectedOptionId = getShippingOptionId(idx, rate.rate_id);\r\n }\r\n });\r\n });\r\n return {\r\n shippingOptions,\r\n defaultSelectedOptionId,\r\n }\r\n}\r\n\r\n//id label description\r\nexport const getShippingOptions = (shippingRates) => {\r\n let options = [];\r\n shippingRates.forEach((shippingPackage, idx) => {\r\n let rates = shippingPackage.shipping_rates.map(rate => {\r\n let txt = document.createElement('textarea');\r\n txt.innerHTML = rate.name;\r\n let price = formatPrice(rate.price, rate.currency_code);\r\n return {\r\n id: getShippingOptionId(idx, rate.rate_id),\r\n label: txt.value,\r\n description: `${price}`\r\n }\r\n });\r\n options = [...options, ...rates];\r\n });\r\n return options;\r\n}\r\n\r\nexport const toCartAddress = mapAddressToCartAddress(ADDRESS_MAPPINGS);\r\n","export * from './use-process-payment-intent';\r\nexport * from './use-after-process-payment';\r\nexport * from './use-setup-intent';\r\nexport * from './use-stripe-error';\r\nexport * from './use-exported-values';\r\nexport * from './use-payment-request';\r\nexport * from './use-payment-events';\r\nexport * from './use-breakpoint-width';\r\nexport * from './use-process-checkout-error'","import {useEffect} from '@wordpress/element'\r\nimport {useStripe} from \"@stripe/react-stripe-js\";\r\nimport {handleCardAction} from \"../util\";\r\nimport {useProcessCheckoutError} from \"./use-process-checkout-error\";\r\n\r\nexport const useAfterProcessingPayment = (\r\n {\r\n getData,\r\n eventRegistration,\r\n responseTypes,\r\n activePaymentMethod,\r\n savePaymentMethod = false,\r\n messageContext = null\r\n }) => {\r\n const stripe = useStripe();\r\n const {onCheckoutAfterProcessingWithSuccess, onCheckoutAfterProcessingWithError} = eventRegistration;\r\n useProcessCheckoutError({\r\n responseTypes,\r\n subscriber: onCheckoutAfterProcessingWithError,\r\n messageContext\r\n });\r\n useEffect(() => {\r\n let unsubscribeAfterProcessingWithSuccess = onCheckoutAfterProcessingWithSuccess(async ({redirectUrl}) => {\r\n if (getData('name') === activePaymentMethod) {\r\n //check if response is in redirect. If so, open modal\r\n return await handleCardAction({\r\n redirectUrl,\r\n responseTypes,\r\n stripe,\r\n getData,\r\n savePaymentMethod\r\n });\r\n }\r\n return null;\r\n })\r\n return () => unsubscribeAfterProcessingWithSuccess()\r\n }, [\r\n stripe,\r\n responseTypes,\r\n onCheckoutAfterProcessingWithSuccess,\r\n activePaymentMethod,\r\n savePaymentMethod\r\n ]);\r\n}","import {useState, useEffect, useCallback} from '@wordpress/element';\r\nimport {storeInCache, getFromCache} from \"../util\";\r\n\r\nexport const useBreakpointWidth = (\r\n {\r\n name,\r\n width,\r\n node,\r\n className\r\n }) => {\r\n const [windowWidth, setWindowWith] = useState(window.innerWidth);\r\n const getMaxWidth = useCallback((name) => {\r\n const maxWidth = getFromCache(name);\r\n return maxWidth ? parseInt(maxWidth) : 0;\r\n }, []);\r\n const setMaxWidth = useCallback((name, width) => storeInCache(name, width), []);\r\n\r\n useEffect(() => {\r\n const el = typeof node === 'function' ? node() : node;\r\n\r\n if (el) {\r\n const maxWidth = getMaxWidth(name);\r\n if (!maxWidth || width > maxWidth) {\r\n setMaxWidth(name, width);\r\n }\r\n if (el.clientWidth < width) {\r\n el.classList.add(className);\r\n } else {\r\n if (el.clientWidth > maxWidth) {\r\n el.classList.remove(className);\r\n }\r\n }\r\n }\r\n }, [windowWidth, node]);\r\n useEffect(() => {\r\n const handleResize = () => setWindowWith(window.innerWidth);\r\n window.addEventListener('resize', handleResize);\r\n return () => window.removeEventListener('resize', handleResize);\r\n });\r\n}\r\n\r\nexport const useExpressBreakpointWidth = (\r\n {\r\n payment_method,\r\n width\r\n }) => {\r\n const node = useCallback(() => {\r\n const el = document.getElementById(`express-payment-method-${payment_method}`);\r\n return el ? el.parentNode : null;\r\n }, []);\r\n useBreakpointWidth({\r\n name: 'expressMaxWidth',\r\n width,\r\n node,\r\n className: 'wc-stripe-express__sm'\r\n });\r\n\r\n}","import {useRef} from '@wordpress/element';\r\n\r\nexport const useExportedValues = () => {\r\n const exportedValues = useRef({});\r\n return exportedValues.current;\r\n}","import {useEffect, useCallback, useRef, useState} from '@wordpress/element';\r\nimport {hasShippingRates} from '../util';\r\n\r\nexport const usePaymentEvents = (\r\n {\r\n billing,\r\n shippingData,\r\n eventRegistration\r\n }) => {\r\n const {onShippingRateSuccess, onShippingRateFail, onShippingRateSelectSuccess} = eventRegistration;\r\n const currentBilling = useRef(billing);\r\n const currentShipping = useRef(shippingData);\r\n const [handler, setHandler] = useState(null);\r\n const [paymentEvents, setPaymentEvent] = useState({\r\n onShippingChanged: false\r\n });\r\n const addPaymentEvent = useCallback((name, handler, execute = false) => {\r\n if (execute) {\r\n setHandler({[name]: handler});\r\n } else {\r\n setPaymentEvent({...paymentEvents, [name]: handler});\r\n }\r\n }, [paymentEvents, setPaymentEvent]);\r\n const removePaymentEvent = useCallback((name) => {\r\n if (paymentEvents[name]) {\r\n delete paymentEvents[name];\r\n setPaymentEvent(paymentEvents);\r\n }\r\n }, [paymentEvents]);\r\n\r\n const onShippingChanged = useCallback(() => {\r\n const shipping = currentShipping.current;\r\n const billing = currentBilling.current;\r\n if (paymentEvents.onShippingChanged && !shipping.isSelectingRate && !shipping.shippingRatesLoading) {\r\n const handler = paymentEvents.onShippingChanged;\r\n let success = true;\r\n if (!hasShippingRates(shipping.shippingRates)) {\r\n success = false;\r\n }\r\n handler(success, {\r\n billing,\r\n shipping\r\n });\r\n removePaymentEvent('onShippingChanged');\r\n }\r\n }, [paymentEvents, removePaymentEvent]);\r\n\r\n useEffect(() => {\r\n currentBilling.current = billing;\r\n currentShipping.current = shippingData;\r\n });\r\n\r\n useEffect(() => {\r\n if (handler) {\r\n if (handler.onShippingChanged) {\r\n handler.onShippingChanged(true, {\r\n billing: currentBilling.current,\r\n shipping: currentShipping.current\r\n })\r\n setHandler(null);\r\n }\r\n }\r\n }, [handler]);\r\n\r\n useEffect(() => {\r\n const unsubscribeShippingRateSuccess = onShippingRateSuccess(onShippingChanged);\r\n const unsubscribeShippingRateSelectSuccess = onShippingRateSelectSuccess(onShippingChanged);\r\n const unsubscribeShippingRateFail = onShippingRateFail(({hasInvalidAddress, hasError}) => {\r\n if (paymentEvents.onShippingChanged) {\r\n const handler = paymentEvents.onShippingChanged;\r\n handler(false);\r\n removePaymentEvent('onShippingChanged');\r\n }\r\n });\r\n\r\n return () => {\r\n unsubscribeShippingRateSuccess();\r\n unsubscribeShippingRateFail();\r\n unsubscribeShippingRateSelectSuccess();\r\n }\r\n }, [\r\n paymentEvents,\r\n onShippingRateSuccess,\r\n onShippingRateFail,\r\n onShippingRateSelectSuccess\r\n ]);\r\n\r\n return {addPaymentEvent, removePaymentEvent};\r\n}","import {useState, useEffect, useRef, useCallback} from '@wordpress/element';\r\nimport {usePaymentEvents} from './use-payment-events';\r\nimport {getIntermediateAddress} from '../util';\r\nimport isShallowEqual from '@wordpress/is-shallow-equal';\r\nimport {\r\n getDisplayItems,\r\n getShippingOptions,\r\n getSelectedShippingOption,\r\n isFieldRequired,\r\n toCartAddress as mapToCartAddress\r\n} from \"../util\";\r\n\r\nconst toCartAddress = mapToCartAddress();\r\n\r\nexport const usePaymentRequest = (\r\n {\r\n getData,\r\n onClose,\r\n stripe,\r\n billing,\r\n shippingData,\r\n eventRegistration,\r\n setPaymentMethod,\r\n exportedValues,\r\n canPay\r\n }) => {\r\n const {addPaymentEvent} = usePaymentEvents({\r\n billing,\r\n shippingData,\r\n eventRegistration\r\n });\r\n const {needsShipping, shippingRates} = shippingData;\r\n const {billingData, cartTotalItems, currency, cartTotal} = billing;\r\n const [paymentRequest, setPaymentRequest] = useState(null);\r\n const paymentRequestOptions = useRef({});\r\n const currentShipping = useRef(shippingData)\r\n const currentBilling = useRef(billing);\r\n\r\n useEffect(() => {\r\n currentShipping.current = shippingData;\r\n currentBilling.current = billing;\r\n }, [shippingData]);\r\n\r\n useEffect(() => {\r\n if (stripe) {\r\n const options = {\r\n country: getData('countryCode'),\r\n currency: currency?.code.toLowerCase(),\r\n total: {\r\n amount: cartTotal.value,\r\n label: cartTotal.label,\r\n pending: true\r\n },\r\n requestPayerName: true,\r\n requestPayerEmail: isFieldRequired('email', billingData.country),\r\n requestPayerPhone: isFieldRequired('phone', billingData.country),\r\n requestShipping: needsShipping,\r\n displayItems: getDisplayItems(cartTotalItems, currency)\r\n }\r\n if (options.requestShipping) {\r\n options.shippingOptions = getShippingOptions(shippingRates);\r\n }\r\n paymentRequestOptions.current = options;\r\n const paymentRequest = stripe.paymentRequest(paymentRequestOptions.current);\r\n paymentRequest.canMakePayment().then(result => {\r\n if (canPay(result)) {\r\n setPaymentRequest(paymentRequest);\r\n } else {\r\n setPaymentRequest(null);\r\n }\r\n });\r\n }\r\n }, [stripe, billingData, shippingRates, needsShipping]);\r\n\r\n useEffect(() => {\r\n if (paymentRequest) {\r\n if (paymentRequestOptions.current.requestShipping) {\r\n paymentRequest.on('shippingaddresschange', onShippingAddressChange);\r\n paymentRequest.on('shippingoptionchange', onShippingOptionChange);\r\n }\r\n paymentRequest.on('cancel', onClose);\r\n paymentRequest.on('paymentmethod', onPaymentMethodReceived);\r\n }\r\n }, [paymentRequest]);\r\n\r\n const updatePaymentEvent = useCallback((event) => (success, {billing, shipping}) => {\r\n const {cartTotal, cartTotalItems, currency} = billing;\r\n const {shippingRates} = shipping;\r\n if (success) {\r\n event.updateWith({\r\n status: 'success',\r\n total: {\r\n amount: cartTotal.value,\r\n label: cartTotal.label,\r\n pending: false\r\n },\r\n displayItems: getDisplayItems(cartTotalItems, currency),\r\n shippingOptions: getShippingOptions(shippingRates)\r\n });\r\n } else {\r\n event.updateWith({status: 'invalid_shipping_address'});\r\n }\r\n }, []);\r\n\r\n const onShippingAddressChange = useCallback(event => {\r\n const {shippingAddress} = event;\r\n const shipping = currentShipping.current;\r\n const intermediateAddress = toCartAddress(shippingAddress);\r\n shipping.setShippingAddress({...shipping.shippingAddress, ...intermediateAddress});\r\n const addressEqual = isShallowEqual(getIntermediateAddress(shipping.shippingAddress), intermediateAddress);\r\n addPaymentEvent('onShippingChanged', updatePaymentEvent(event), addressEqual);\r\n }, [addPaymentEvent]);\r\n\r\n const onShippingOptionChange = useCallback(event => {\r\n const {shippingOption} = event;\r\n const shipping = currentShipping.current;\r\n shipping.setSelectedRates(...getSelectedShippingOption(shippingOption.id));\r\n addPaymentEvent('onShippingChanged', updatePaymentEvent(event));\r\n }, [addPaymentEvent]);\r\n\r\n const onPaymentMethodReceived = useCallback((paymentResponse) => {\r\n const {paymentMethod, payerName = null, payerEmail = null, payerPhone = null} = paymentResponse;\r\n // set address data\r\n let billingData = {payerName, payerEmail, payerPhone};\r\n if (paymentMethod?.billing_details.address) {\r\n billingData = toCartAddress(paymentMethod.billing_details.address, billingData);\r\n }\r\n exportedValues.billingData = billingData;\r\n\r\n if (paymentResponse.shippingAddress) {\r\n exportedValues.shippingAddress = toCartAddress(paymentResponse.shippingAddress);\r\n }\r\n\r\n // set payment method\r\n setPaymentMethod(paymentMethod.id);\r\n paymentResponse.complete(\"success\");\r\n }, [setPaymentMethod]);\r\n\r\n return {paymentRequest};\r\n}","import {useEffect} from '@wordpress/element';\r\n\r\nexport const useProcessCheckoutError = (\r\n {\r\n responseTypes,\r\n subscriber,\r\n messageContext = null\r\n }) => {\r\n useEffect(() => {\r\n const unsubscribe = subscriber((data) => {\r\n if (data?.processingResponse.paymentDetails?.stripeErrorMessage) {\r\n return {\r\n type: responseTypes.ERROR,\r\n message: data.processingResponse.paymentDetails.stripeErrorMessage,\r\n messageContext\r\n };\r\n }\r\n return null;\r\n });\r\n return () => unsubscribe();\r\n }, [responseTypes, subscriber]);\r\n}","import {useEffect, useState, useCallback, useRef} from '@wordpress/element';\r\nimport {useStripe} from '@stripe/react-stripe-js';\r\nimport {\r\n ensureSuccessResponse,\r\n ensureErrorResponse,\r\n getBillingDetailsFromAddress,\r\n StripeError\r\n} from '../util';\r\n\r\nexport const useProcessPaymentIntent = (\r\n {\r\n getData,\r\n billing,\r\n shippingData,\r\n onPaymentProcessing,\r\n emitResponse,\r\n error,\r\n onSubmit,\r\n activePaymentMethod,\r\n paymentType = 'card',\r\n setupIntent = null,\r\n removeSetupIntent = null,\r\n savePaymentMethod = false,\r\n exportedValues = {},\r\n getPaymentMethodArgs = () => ({})\r\n }) => {\r\n const {billingData} = billing;\r\n const {shippingAddress} = shippingData;\r\n const {responseTypes} = emitResponse;\r\n const [paymentMethod, setPaymentMethod] = useState(null);\r\n const stripe = useStripe();\r\n const currentPaymentMethodArgs = useRef(getPaymentMethodArgs);\r\n\r\n useEffect(() => {\r\n currentPaymentMethodArgs.current = getPaymentMethodArgs;\r\n }, [getPaymentMethodArgs]);\r\n\r\n const getCreatePaymentMethodArgs = useCallback(() => {\r\n const args = {\r\n type: paymentType,\r\n billing_details: getBillingDetailsFromAddress(exportedValues?.billingData ? exportedValues.billingData : billingData)\r\n }\r\n return {...args, ...currentPaymentMethodArgs.current()};\r\n }, [billingData, paymentType, getPaymentMethodArgs]);\r\n\r\n const getSuccessResponse = useCallback((paymentMethodId, savePaymentMethod) => {\r\n const response = {\r\n meta: {\r\n paymentMethodData: {\r\n [`${getData('name')}_token_key`]: paymentMethodId,\r\n [`${getData('name')}_save_source_key`]: savePaymentMethod\r\n }\r\n }\r\n }\r\n if (exportedValues?.billingData) {\r\n response.meta.billingData = exportedValues.billingData;\r\n }\r\n if (exportedValues?.shippingAddress) {\r\n response.meta.shippingData = {address: exportedValues.shippingAddress};\r\n }\r\n return response;\r\n }, [billingData, shippingAddress]);\r\n\r\n useEffect(() => {\r\n if (paymentMethod && typeof paymentMethod === 'string') {\r\n onSubmit();\r\n }\r\n }, [paymentMethod]);\r\n\r\n useEffect(() => {\r\n const unsubscribeProcessingPayment = onPaymentProcessing(async () => {\r\n if (activePaymentMethod !== getData('name')) {\r\n return null;\r\n }\r\n let [result, paymentMethodId] = [null, null];\r\n try {\r\n if (error) {\r\n throw new StripeError(error);\r\n }\r\n if (setupIntent) {\r\n result = await stripe.confirmCardSetup(setupIntent.client_secret, {\r\n payment_method: getCreatePaymentMethodArgs()\r\n });\r\n if (result.error) {\r\n throw new StripeError(result.error);\r\n }\r\n paymentMethodId = result.setupIntent.payment_method;\r\n removeSetupIntent();\r\n } else {\r\n // payment method has already been created.\r\n if (paymentMethod) {\r\n paymentMethodId = paymentMethod;\r\n } else {\r\n //create the payment method\r\n result = await stripe.createPaymentMethod(getCreatePaymentMethodArgs());\r\n if (result.error) {\r\n throw new StripeError(result.error);\r\n }\r\n paymentMethodId = result.paymentMethod.id;\r\n }\r\n }\r\n return ensureSuccessResponse(responseTypes, getSuccessResponse(paymentMethodId, savePaymentMethod));\r\n } catch (e) {\r\n console.log(e);\r\n setPaymentMethod(null);\r\n return ensureErrorResponse(responseTypes, e.error);\r\n }\r\n\r\n });\r\n return () => unsubscribeProcessingPayment();\r\n }, [\r\n paymentMethod,\r\n billingData,\r\n onPaymentProcessing,\r\n stripe,\r\n setupIntent,\r\n activePaymentMethod,\r\n savePaymentMethod\r\n ]);\r\n return {setPaymentMethod};\r\n}","import {useEffect, useState, useCallback} from '@wordpress/element';\r\nimport apiFetch from \"@wordpress/api-fetch\";\r\nimport {\r\n getSettings,\r\n getRoute,\r\n cartContainsPreOrder,\r\n cartContainsSubscription,\r\n getFromCache,\r\n storeInCache,\r\n deleteFromCache\r\n} from '../util';\r\n\r\nexport const useSetupIntent = (\r\n {\r\n cartTotal,\r\n setError\r\n }) => {\r\n const [setupIntent, setSetupIntent] = useState(getFromCache('setupIntent'));\r\n\r\n useEffect(() => {\r\n const createSetupIntent = async () => {\r\n if (setupIntent) {\r\n return;\r\n }\r\n // only create intent under certain conditions\r\n let result = await apiFetch({\r\n url: getRoute('create/setup_intent'),\r\n method: 'POST'\r\n });\r\n if (result.code) {\r\n setError(result.message);\r\n } else {\r\n storeInCache('setupIntent', result.intent);\r\n setSetupIntent(result.intent);\r\n }\r\n }\r\n if (cartContainsPreOrder() || (cartContainsSubscription() && cartTotal.value == 0)) {\r\n if (!setupIntent) {\r\n createSetupIntent();\r\n }\r\n } else {\r\n setSetupIntent(null);\r\n }\r\n }, [cartTotal.value]);\r\n const removeSetupIntent = useCallback(() => {\r\n deleteFromCache('setupIntent');\r\n }, [cartTotal.value]);\r\n return {setupIntent, removeSetupIntent};\r\n}","import {useState} from '@wordpress/element'\r\n\r\nexport const useStripeError = () => {\r\n const [error, setError] = useState(false);\r\n return [error, setError];\r\n}","import {useState, useEffect} from '@wordpress/element';\r\nimport {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings, initStripe} from \"../util\";\r\nimport {LocalPaymentIntentContent} from './local-payment-method';\r\nimport {PaymentMethod} from \"../../components/checkout\";\r\nimport {canMakePayment} from \"./local-payment-method\";\r\nimport {AfterpayClearpayMessageElement, Elements} from \"@stripe/react-stripe-js\";\r\nimport {sprintf, __} from '@wordpress/i18n';\r\n\r\nconst getData = getSettings('stripe_afterpay_data');\r\nlet variablesHandler;\r\nconst setVariablesHandler = (handler) => {\r\n variablesHandler = handler;\r\n}\r\nconst PaymentMethodLabel = ({getData}) => {\r\n const [variables, setVariables] = useState({\r\n amount: getData('cartTotal'),\r\n currency: getData('currency')\r\n });\r\n setVariablesHandler(setVariables);\r\n return (\r\n <Elements stripe={initStripe}>\r\n <div className='wc-stripe-blocks-afterpay__label'>\r\n <AfterpayClearpayMessageElement options={{\r\n ...getData('msgOptions'),\r\n ...{\r\n amount: variables.amount,\r\n currency: variables.currency,\r\n }\r\n }}/>\r\n </div>\r\n </Elements>\r\n );\r\n}\r\n\r\nconst PaymentMethodTest = ({content, billing, shippingData, ...props}) => {\r\n const Content = content;\r\n const {cartTotal, currency} = billing;\r\n const {needsShipping} = shippingData\r\n useEffect(() => {\r\n setVariablesHandler({\r\n amount: cartTotal.value,\r\n currency: currency.code,\r\n isEligible: needsShipping\r\n });\r\n }, [\r\n cartTotal.value,\r\n currency.code,\r\n needsShipping\r\n ]);\r\n return (\r\n <>\r\n {needsShipping &&\r\n <div className='wc-stripe-blocks-payment-method-content'>\r\n <div className=\"wc-stripe-blocks-afterpay-offsite__container\">\r\n <div className=\"wc-stripe-blocks-afterpay__offsite\">\r\n <img src={getData('offSiteSrc')}/>\r\n <p>{sprintf(__('After clicking \"%s\", you will be redirected to Afterpay to complete your purchase securely.', 'woo-stripe-payment'), getData('placeOrderButtonLabel'))}</p>\r\n </div>\r\n </div>\r\n <Content {...{...props, billing, shippingData}}/>\r\n </div>}\r\n </>\r\n );\r\n}\r\n\r\nif (getData()) {\r\n registerPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n getData={getData}/>,\r\n ariaLabel: 'Ideal',\r\n placeOrderButtonLabel: getData('placeOrderButtonLabel'),\r\n canMakePayment: canMakePayment(getData, ({settings, billingData, cartTotals}) => {\r\n const {country} = billingData;\r\n const {currency_code: currency} = cartTotals;\r\n const requiredParams = settings('requiredParams');\r\n const [countryCode] = requiredParams[currency];\r\n return country == countryCode;\r\n }),\r\n content: <PaymentMethodTest\r\n content={LocalPaymentIntentContent}\r\n getData={getData}\r\n confirmationMethod={'confirmAfterpayClearpayPayment'}/>,\r\n edit: <PaymentMethod content={LocalPaymentIntentContent} getData={getData}/>,\r\n supports: {\r\n showSavedCards: false,\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n })\r\n}","import {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings} from \"../util\";\r\nimport {LocalPaymentSourceContent} from './local-payment-method';\r\nimport {PaymentMethodLabel} from \"../../components/checkout/payment-method-label\";\r\nimport {canMakePayment} from \"./local-payment-method\";\r\nimport {PaymentMethod} from \"../../components/checkout\";\r\n\r\nconst getData = getSettings('stripe_alipay_data');\r\n\r\nif (getData()) {\r\n registerPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icon')}/>,\r\n ariaLabel: 'Alipay',\r\n placeOrderButtonLabel: getData('placeOrderButtonLabel'),\r\n canMakePayment: canMakePayment(getData),\r\n content: <PaymentMethod\r\n content={LocalPaymentSourceContent}\r\n getData={getData}/>,\r\n edit: <PaymentMethod\r\n content={LocalPaymentSourceContent}\r\n getData={getData}/>,\r\n supports: {\r\n showSavedCards: false,\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n })\r\n}\r\n","import {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings} from \"../util\";\r\nimport {LocalPaymentSourceContent} from './local-payment-method';\r\nimport {PaymentMethodLabel, PaymentMethod} from \"../../components/checkout\";\r\nimport {canMakePayment} from \"./local-payment-method\";\r\n\r\nconst getData = getSettings('stripe_bancontact_data');\r\n\r\nif (getData()) {\r\n registerPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icon')}/>,\r\n ariaLabel: 'Bancontact',\r\n placeOrderButtonLabel: getData('placeOrderButtonLabel'),\r\n canMakePayment: canMakePayment(getData),\r\n content: <PaymentMethod\r\n content={LocalPaymentSourceContent}\r\n getData={getData}/>,\r\n edit: <PaymentMethod\r\n content={LocalPaymentSourceContent}\r\n getData={getData}/>,\r\n supports: {\r\n showSavedCards: false,\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n })\r\n}","import {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings} from \"../util\";\r\nimport {LocalPaymentIntentContent} from './local-payment-method';\r\nimport {PaymentMethodLabel, PaymentMethod} from \"../../components/checkout\";\r\nimport {canMakePayment} from \"./local-payment-method\";\r\nimport {AuBankAccountElement} from \"@stripe/react-stripe-js\";\r\n\r\nconst getData = getSettings('stripe_becs_data');\r\n\r\nif (getData()) {\r\n registerPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icon')}/>,\r\n ariaLabel: 'BECS',\r\n placeOrderButtonLabel: getData('placeOrderButtonLabel'),\r\n canMakePayment: canMakePayment(getData),\r\n content: <PaymentMethod\r\n content={LocalPaymentIntentContent}\r\n getData={getData}\r\n confirmationMethod={'confirmAuBecsDebitPayment'}\r\n component={AuBankAccountElement}/>,\r\n edit: <PaymentMethod content={LocalPaymentIntentContent} getData={getData}/>,\r\n supports: {\r\n showSavedCards: false,\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n })\r\n}","import {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings} from \"../util\";\r\nimport {LocalPaymentSourceContent} from './local-payment-method';\r\nimport {PaymentMethodLabel, PaymentMethod} from \"../../components/checkout\";\r\nimport {canMakePayment} from \"./local-payment-method\";\r\n\r\nconst getData = getSettings('stripe_eps_data');\r\n\r\nif (getData()) {\r\n registerPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icon')}/>,\r\n ariaLabel: 'EPS',\r\n placeOrderButtonLabel: getData('placeOrderButtonLabel'),\r\n canMakePayment: canMakePayment(getData),\r\n content: <PaymentMethod content={LocalPaymentSourceContent} getData={getData}/>,\r\n edit: <PaymentMethod content={LocalPaymentSourceContent} getData={getData}/>,\r\n supports: {\r\n showSavedCards: false,\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n })\r\n}","import {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings} from \"../util\";\r\nimport {LocalPaymentIntentContent} from './local-payment-method';\r\nimport {PaymentMethodLabel, PaymentMethod} from \"../../components/checkout\";\r\nimport {canMakePayment} from \"./local-payment-method\";\r\nimport {FpxBankElement} from \"@stripe/react-stripe-js\";\r\n\r\nconst getData = getSettings('stripe_fpx_data');\r\n\r\nif (getData()) {\r\n registerPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icon')}/>,\r\n ariaLabel: 'FPX',\r\n placeOrderButtonLabel: getData('placeOrderButtonLabel'),\r\n canMakePayment: canMakePayment(getData),\r\n content: <PaymentMethod\r\n content={LocalPaymentIntentContent}\r\n getData={getData}\r\n confirmationMethod={'confirmIdealPayment'}\r\n component={FpxBankElement}/>,\r\n edit: <PaymentMethod content={LocalPaymentIntentContent} getData={getData}/>,\r\n supports: {\r\n showSavedCards: false,\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n })\r\n}","import {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings} from \"../util\";\r\nimport {LocalPaymentSourceContent} from './local-payment-method';\r\nimport {PaymentMethodLabel, PaymentMethod} from \"../../components/checkout\";\r\nimport {canMakePayment} from \"./local-payment-method\";\r\n\r\nconst getData = getSettings('stripe_giropay_data');\r\n\r\nif (getData()) {\r\n registerPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icon')}/>,\r\n ariaLabel: 'Giropay',\r\n placeOrderButtonLabel: getData('placeOrderButtonLabel'),\r\n canMakePayment: canMakePayment(getData),\r\n content: <PaymentMethod content={LocalPaymentSourceContent} getData={getData}/>,\r\n edit: <PaymentMethod content={LocalPaymentSourceContent} getData={getData}/>,\r\n supports: {\r\n showSavedCards: false,\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n })\r\n}","import {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings} from \"../util\";\r\nimport {LocalPaymentIntentContent} from './local-payment-method';\r\nimport {PaymentMethodLabel, PaymentMethod} from \"../../components/checkout\";\r\nimport {canMakePayment} from \"./local-payment-method\";\r\n\r\nconst getData = getSettings('stripe_grabpay_data');\r\n\r\nif (getData()) {\r\n registerPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icon')}/>,\r\n ariaLabel: 'GrabPay',\r\n placeOrderButtonLabel: getData('placeOrderButtonLabel'),\r\n canMakePayment: canMakePayment(getData),\r\n content: <PaymentMethod\r\n content={LocalPaymentIntentContent}\r\n getData={getData}\r\n confirmationMethod={'confirmGrabPayPayment'}/>,\r\n edit: <PaymentMethod content={LocalPaymentIntentContent} getData={getData}/>,\r\n supports: {\r\n showSavedCards: false,\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n })\r\n}","export * from './use-after-process-local-payment';\r\nexport * from './use-validate-checkout';\r\nexport * from './use-create-source';","import {useEffect, useRef} from '@wordpress/element';\r\nimport {useStripe} from \"@stripe/react-stripe-js\";\r\nimport {ensureErrorResponse, getBillingDetailsFromAddress, StripeError} from \"../../util\";\r\n\r\nexport const useAfterProcessLocalPayment = (\r\n {\r\n getData,\r\n billingData,\r\n eventRegistration,\r\n responseTypes,\r\n activePaymentMethod,\r\n confirmationMethod,\r\n getPaymentMethodArgs = () => ({})\r\n }\r\n) => {\r\n const stripe = useStripe();\r\n const {onCheckoutAfterProcessingWithSuccess, onCheckoutAfterProcessingWithError} = eventRegistration;\r\n const currentBillingData = useRef(billingData);\r\n const currentPaymentMethodArgs = useRef(getPaymentMethodArgs);\r\n useEffect(() => {\r\n currentBillingData.current = billingData;\r\n }, [billingData]);\r\n\r\n useEffect(() => {\r\n currentPaymentMethodArgs.current = getPaymentMethodArgs;\r\n }, [getPaymentMethodArgs]);\r\n\r\n useEffect(() => {\r\n const unsubscribeAfterProcessingWithSuccess = onCheckoutAfterProcessingWithSuccess(async ({redirectUrl}) => {\r\n if (getData('name') === activePaymentMethod) {\r\n try {\r\n let match = redirectUrl.match(/#response=(.+)/);\r\n if (match) {\r\n let {client_secret, return_url, ...order} = JSON.parse(window.atob(decodeURIComponent(match[1])));\r\n let result = await stripe[confirmationMethod](client_secret, {\r\n payment_method: {\r\n billing_details: getBillingDetailsFromAddress(currentBillingData.current),\r\n ...currentPaymentMethodArgs.current()\r\n },\r\n return_url\r\n });\r\n if (result.error) {\r\n throw new StripeError(result.error);\r\n }\r\n }\r\n } catch (e) {\r\n console.log(e);\r\n return ensureErrorResponse(responseTypes, e.error);\r\n }\r\n }\r\n })\r\n return () => unsubscribeAfterProcessingWithSuccess();\r\n }, [\r\n stripe,\r\n onCheckoutAfterProcessingWithSuccess,\r\n onCheckoutAfterProcessingWithError\r\n ]);\r\n}","import {useState, useEffect, useRef, useCallback} from '@wordpress/element';\r\nimport {\r\n getDefaultSourceArgs,\r\n ensureSuccessResponse,\r\n ensureErrorResponse,\r\n StripeError\r\n} from \"../../util\";\r\nimport {useStripe, useElements} from \"@stripe/react-stripe-js\";\r\nimport {__} from '@wordpress/i18n';\r\n\r\nexport const useCreateSource = (\r\n {\r\n getData,\r\n billing,\r\n shippingAddress,\r\n onPaymentProcessing,\r\n responseTypes,\r\n getSourceArgs = false,\r\n element = false\r\n }) => {\r\n const [source, setSource] = useState(false);\r\n const [isValid, setIsValid] = useState(false);\r\n const currentValues = useRef({\r\n billing,\r\n shippingAddress,\r\n });\r\n const stripe = useStripe();\r\n const elements = useElements();\r\n useEffect(() => {\r\n currentValues.current = {\r\n billing,\r\n shippingAddress\r\n }\r\n });\r\n\r\n const getSourceArgsInternal = useCallback(() => {\r\n const {billing} = currentValues.current;\r\n const {cartTotal, currency, billingData} = billing;\r\n let args = getDefaultSourceArgs({\r\n type: getData('paymentType'),\r\n amount: cartTotal.value,\r\n billingData,\r\n currency: currency.code,\r\n returnUrl: getData('returnUrl')\r\n });\r\n if (getSourceArgs) {\r\n args = getSourceArgs(args, {billingData});\r\n }\r\n return args;\r\n }, []);\r\n\r\n const getSuccessData = useCallback((sourceId) => {\r\n return {\r\n meta: {\r\n paymentMethodData: {\r\n [`${getData('name')}_token_key`]: sourceId\r\n }\r\n }\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n const unsubscribe = onPaymentProcessing(async () => {\r\n if (source) {\r\n return ensureSuccessResponse(responseTypes, getSuccessData(source.id));\r\n }\r\n // create the source\r\n try {\r\n let result;\r\n if (element) {\r\n // validate the element\r\n if (!isValid) {\r\n throw __('Please enter your payment info before proceeding.', 'woo-stripe-payment');\r\n }\r\n result = await stripe.createSource(elements.getElement(element), getSourceArgsInternal());\r\n } else {\r\n result = await stripe.createSource(getSourceArgsInternal());\r\n }\r\n if (result.error) {\r\n throw new StripeError(result.error);\r\n }\r\n setSource(result.source);\r\n return ensureSuccessResponse(responseTypes, getSuccessData(result.source.id));\r\n } catch (err) {\r\n console.log(err);\r\n return ensureErrorResponse(responseTypes, err.error || err);\r\n }\r\n });\r\n return () => unsubscribe();\r\n }, [\r\n source,\r\n onPaymentProcessing,\r\n stripe,\r\n responseTypes,\r\n element,\r\n isValid,\r\n setIsValid\r\n ]);\r\n return {setIsValid};\r\n}","import {useEffect, useRef, useState} from '@wordpress/element';\r\nimport {ensureErrorResponse} from \"../../util\";\r\nimport {__} from \"@wordpress/i18n\";\r\n\r\nexport const useValidateCheckout = (\r\n {\r\n subscriber,\r\n responseTypes,\r\n component = null,\r\n msg = __('Please enter your payment info before proceeding.', 'woo-stripe-payment')\r\n }) => {\r\n const [isValid, setIsValid] = useState(false);\r\n\r\n useEffect(() => {\r\n const unsubscribe = subscriber(() => {\r\n if (component && !isValid) {\r\n return ensureErrorResponse(responseTypes, msg);\r\n }\r\n return true;\r\n });\r\n return () => unsubscribe();\r\n }, [\r\n subscriber,\r\n isValid,\r\n setIsValid,\r\n responseTypes,\r\n component\r\n ]);\r\n return {isValid, setIsValid};\r\n}","import {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {getSettings} from \"../util\";\r\nimport {LocalPaymentIntentContent} from './local-payment-method';\r\nimport {PaymentMethodLabel, PaymentMethod} from \"../../components/checkout\";\r\nimport {canMakePayment} from \"./local-payment-method\";\r\nimport {IdealBankElement} from \"@stripe/react-stripe-js\";\r\n\r\nconst getData = getSettings('stripe_ideal_data');\r\n\r\nif (getData()) {\r\n registerPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icon')}/>,\r\n ariaLabel: 'Ideal',\r\n placeOrderButtonLabel: getData('placeOrderButtonLabel'),\r\n canMakePayment: canMakePayment(getData),\r\n content: <PaymentMethod\r\n content={LocalPaymentIntentContent}\r\n getData={getData}\r\n confirmationMethod={'confirmIdealPayment'}\r\n component={IdealBankElement}/>,\r\n edit: <PaymentMethod content={LocalPaymentIntentContent} getData={getData}/>,\r\n supports: {\r\n showSavedCards: false,\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n })\r\n}","import './klarna';\r\nimport './ideal';\r\nimport './p24';\r\nimport './bancontact';\r\nimport './giropay';\r\nimport './eps';\r\nimport './multibanco';\r\nimport './sepa';\r\nimport './sofort';\r\nimport './wechat';\r\nimport './fpx';\r\nimport './becs';\r\nimport './grabpay';\r\nimport './alipay'\r\nimport './afterpay';","import {useEffect} from '@wordpress/element';\r\nimport RadioControlAccordion from \"../../../components/checkout/radio-control-accordion\";\r\n\r\nexport const KlarnaPaymentCategories = ({categories, onChange, selected}) => {\r\n return (\r\n <div className={'wc-stripe-blocks-klarna-container'}>\r\n <ul>\r\n {categories.map(category => {\r\n return <KlarnaPaymentCategory\r\n key={category.type}\r\n category={category}\r\n onChange={onChange}\r\n selected={selected}/>\r\n })}\r\n </ul>\r\n </div>\r\n );\r\n}\r\n\r\nconst KlarnaPaymentCategory = ({category, selected, onChange}) => {\r\n const checked = category.type === selected;\r\n useEffect(() => {\r\n Klarna.Payments.load({\r\n container: `#klarna-category-${category.type}`,\r\n payment_method_category: category.type,\r\n //instance_id: `klarna-instance-${category.type}`\r\n });\r\n }, []);\r\n const option = {\r\n label: category.label,\r\n value: category.type,\r\n content: (<div id={`klarna-category-${category.type}`}></div>)\r\n }\r\n return (\r\n <li className='wc-stripe-blocks-klarna__category' key={category.type}>\r\n <RadioControlAccordion option={option} checked={checked} onChange={onChange}/>\r\n </li>\r\n )\r\n}","export * from './use-create-source';\r\nexport * from './use-process-payment';","import {useEffect, useState, useRef, useCallback} from '@wordpress/element';\r\nimport {useStripe} from \"@stripe/react-stripe-js\";\r\nimport {useStripeError} from \"../../../hooks\";\r\nimport {getDefaultSourceArgs, getRoute, isAddressValid, StripeError, storeInCache, getFromCache} from \"../../../util\";\r\nimport apiFetch from \"@wordpress/api-fetch\";\r\n\r\nlet klarnaSource = {};\r\n\r\nexport const useCreateSource = (\r\n {\r\n getData,\r\n billing,\r\n shippingData,\r\n }) => {\r\n const stripe = useStripe();\r\n const [error, setError] = useStripeError();\r\n const abortController = useRef(new AbortController());\r\n const currentSourceArgs = useRef({});\r\n const oldSourceArgs = useRef({});\r\n const [isLoading, setIsLoading] = useState(false);\r\n const [source, setSource] = useState(false);\r\n const {billingData, cartTotal, cartTotalItems, currency} = billing;\r\n const isCheckoutValid = useCallback(({billingData, shippingData}) => {\r\n const {needsShipping, shippingAddress} = shippingData;\r\n if (isAddressValid(billingData)) {\r\n if (needsShipping) {\r\n return isAddressValid(shippingAddress);\r\n }\r\n return true;\r\n }\r\n return false;\r\n }, []);\r\n const getLineItems = useCallback((cartTotalItems, currency) => {\r\n const items = [];\r\n cartTotalItems.forEach(item => {\r\n items.push({\r\n amount: item.value,\r\n currency,\r\n description: item.label,\r\n quantity: 1\r\n });\r\n });\r\n return items;\r\n }, []);\r\n\r\n const getSourceArgs = useCallback(({cartTotal, cartTotalItems, billingData, currency, shippingData}) => {\r\n const {first_name, last_name, country} = billingData;\r\n const {needsShipping, shippingAddress} = shippingData;\r\n let args = getDefaultSourceArgs({\r\n type: getData('paymentType'),\r\n amount: cartTotal.value,\r\n billingData,\r\n currency: currency.code,\r\n returnUrl: getData('returnUrl')\r\n });\r\n args = {\r\n ...args, ...{\r\n source_order: {\r\n items: getLineItems(cartTotalItems, currency.code)\r\n },\r\n klarna: {\r\n locale: getData('locale'),\r\n product: 'payment',\r\n purchase_country: country,\r\n first_name,\r\n last_name\r\n }\r\n }\r\n }\r\n if (country == 'US') {\r\n args.klarna.custom_payment_methods = 'payin4,installments';\r\n }\r\n if (needsShipping) {\r\n args.klarna = {\r\n ...args.klarna, ...{\r\n shipping_first_name: shippingAddress.first_name,\r\n shipping_last_name: shippingAddress.last_name\r\n }\r\n }\r\n args.source_order.shipping = {\r\n address: {\r\n city: shippingAddress.city || '',\r\n country: shippingAddress.country || '',\r\n line1: shippingAddress.address_1 || '',\r\n line2: shippingAddress.address_2 || '',\r\n postal_code: shippingAddress.postcode || '',\r\n state: shippingAddress.state || ''\r\n }\r\n }\r\n }\r\n oldSourceArgs.current = currentSourceArgs.current;\r\n currentSourceArgs.current = args;\r\n return args;\r\n }, []);\r\n const filterUpdateSourceArgs = (args) => {\r\n return ['type', 'currency', 'statement_descriptor', 'redirect', 'klarna.product', 'klarna.locale', 'klarna.custom_payment_methods'].reduce((obj, k) => {\r\n if (k.indexOf('.') > -1) {\r\n let keys = k.split('.');\r\n let obj2 = keys.slice(0, keys.length - 1).reduce(function (obj, k) {\r\n return obj[k];\r\n }, obj);\r\n k = keys[keys.length - 1];\r\n delete obj2[k];\r\n return obj;\r\n }\r\n delete obj[k];\r\n return obj;\r\n }, args);\r\n }\r\n\r\n const compareSourceArgs = useCallback((args, args2) => {\r\n const getArgs = (args1, args2) => {\r\n const newArgs = {};\r\n for (let key of Object.keys(args1)) {\r\n if (typeof args1[key] === 'object' && !Array.isArray(args1[key])) {\r\n newArgs[key] = getArgs(args1[key], args2[key]);\r\n } else {\r\n newArgs[key] = args2[key];\r\n }\r\n }\r\n return newArgs;\r\n }\r\n const newArgs = getArgs(args, args2);\r\n return JSON.stringify(args) == JSON.stringify(newArgs);\r\n }, []);\r\n const createSource = useCallback(async (\r\n {\r\n billingData,\r\n shippingData,\r\n cartTotal,\r\n cartTotalItems,\r\n currency,\r\n }) => {\r\n let args = getSourceArgs({\r\n cartTotal,\r\n cartTotalItems,\r\n billingData,\r\n currency,\r\n shippingData\r\n });\r\n try {\r\n let result = await stripe.createSource(args);\r\n if (result.error) {\r\n throw new StripeError(result.error);\r\n }\r\n storeInCache('klarna:source', {[currency.code]: {source: result.source, args: currentSourceArgs.current}});\r\n setSource(result.source);\r\n } catch (err) {\r\n console.log(err);\r\n setError(err.error);\r\n }\r\n }, [\r\n stripe,\r\n setSource\r\n ]);\r\n\r\n const updateSource = useCallback(async ({source, updates}) => {\r\n\r\n const data = {\r\n updates,\r\n source_id: source.id,\r\n client_secret: source.client_secret,\r\n payment_method: getData('name')\r\n };\r\n try {\r\n abortController.current.abort();\r\n abortController.current = new AbortController();\r\n let result = await apiFetch({\r\n url: getRoute('update/source'),\r\n method: 'POST',\r\n data,\r\n signal: abortController.current.signal\r\n });\r\n if (result.source) {\r\n storeInCache('klarna:source', {source, args: currentSourceArgs.current});\r\n setSource(source);\r\n }\r\n } catch (err) {\r\n console.log('update aborted');\r\n }\r\n }, [setSource]);\r\n\r\n // Create the source if the required data is available\r\n useEffect(() => {\r\n if (!source) {\r\n if (getFromCache('klarna:source')?.[currency.code]) {\r\n const {source, args} = getFromCache('klarna:source')[currency.code];\r\n currentSourceArgs.current = args;\r\n setSource(source);\r\n } else {\r\n if (stripe && isCheckoutValid({billingData, shippingData})) {\r\n setIsLoading(true);\r\n createSource({\r\n billingData,\r\n shippingData,\r\n cartTotal,\r\n cartTotalItems,\r\n currency\r\n }).then(() => setIsLoading(false));\r\n }\r\n }\r\n }\r\n }, [\r\n stripe,\r\n source?.id,\r\n createSource,\r\n billingData,\r\n cartTotal.value,\r\n shippingData,\r\n setIsLoading,\r\n cartTotalItems,\r\n currency.code\r\n ]);\r\n\r\n // update the source if data has changed and the source exists\r\n useEffect(() => {\r\n if (stripe && source) {\r\n // perform a comparison to see if the source needs to be updated\r\n const updates = filterUpdateSourceArgs(getSourceArgs({\r\n billingData,\r\n cartTotal,\r\n cartTotalItems,\r\n currency,\r\n shippingData\r\n }));\r\n if (!compareSourceArgs(updates, oldSourceArgs.current)) {\r\n updateSource({source, updates});\r\n }\r\n }\r\n }, [\r\n source?.id,\r\n billingData,\r\n cartTotal.value,\r\n cartTotalItems,\r\n shippingData,\r\n currency.code\r\n ]);\r\n\r\n return {source, setSource, isLoading};\r\n}","import {useEffect} from '@wordpress/element';\r\nimport {ensureErrorResponse, ensureSuccessResponse, deleteFromCache} from \"../../../util\";\r\nimport {__} from \"@wordpress/i18n\";\r\n\r\nexport const useProcessPayment = (\r\n {\r\n payment_method,\r\n source_id,\r\n paymentCategory,\r\n onPaymentProcessing,\r\n responseTypes\r\n }) => {\r\n useEffect(() => {\r\n const unsubscribe = onPaymentProcessing(() => {\r\n return new Promise(resolve => {\r\n // authorize the Klarna payment\r\n Klarna.Payments.authorize({\r\n payment_method_category: paymentCategory\r\n }, (response) => {\r\n if (response.approved) {\r\n deleteFromCache('klarna:source');\r\n // add the source to the response\r\n resolve(ensureSuccessResponse(responseTypes, {\r\n meta: {\r\n paymentMethodData: {\r\n [`${payment_method}_token_key`]: source_id\r\n }\r\n }\r\n }));\r\n } else {\r\n resolve(ensureErrorResponse(responseTypes, response.error || __('Your purchase is not approved.', 'woo-stripe-payment')));\r\n }\r\n });\r\n });\r\n });\r\n return () => unsubscribe();\r\n }, [\r\n source_id,\r\n paymentCategory,\r\n onPaymentProcessing\r\n ]\r\n );\r\n}","import {useEffect, useState} from '@wordpress/element';\r\nimport {registerPaymentMethod} from '@woocommerce/blocks-registry';\r\nimport {__} from '@wordpress/i18n';\r\nimport {useProcessCheckoutError} from '../../hooks';\r\nimport {\r\n getSettings,\r\n initStripe,\r\n} from \"../../util\";\r\nimport {PaymentMethodLabel, PaymentMethod} from \"../../../components/checkout\";\r\nimport {canMakePayment} from \"../local-payment-method\";\r\nimport {Elements} from \"@stripe/react-stripe-js\";\r\nimport {KlarnaPaymentCategories} from \"./categories\";\r\nimport {KlarnaLoader} from \"./loader\";\r\nimport {useCreateSource, useProcessPayment} from \"./hooks\";\r\nimport './styles.scss';\r\n\r\nconst getData = getSettings('stripe_klarna_data');\r\n\r\nconst KlarnaContainer = (props) => {\r\n return (\r\n <Elements stripe={initStripe}>\r\n <KlarnaPaymentMethod {...props}/>\r\n </Elements>\r\n );\r\n}\r\n\r\nconst KlarnaPaymentMethod = (\r\n {\r\n getData,\r\n billing,\r\n shippingData,\r\n emitResponse,\r\n eventRegistration\r\n }) => {\r\n const {responseTypes} = emitResponse;\r\n const {onPaymentProcessing, onCheckoutAfterProcessingWithError} = eventRegistration;\r\n const [selected, setSelected] = useState('');\r\n const getCategoriesFromSource = (source) => {\r\n const paymentMethodCategories = source.klarna.payment_method_categories.split(',');\r\n const categories = [];\r\n for (let type of Object.keys(getData('categories'))) {\r\n if (paymentMethodCategories.includes(type)) {\r\n categories.push({type, label: getData('categories')[type]});\r\n }\r\n }\r\n return categories;\r\n }\r\n\r\n const {source, isLoading} = useCreateSource({\r\n getData,\r\n billing,\r\n shippingData\r\n });\r\n\r\n useProcessPayment({\r\n payment_method: getData('name'),\r\n source_id: source.id,\r\n paymentCategory: selected,\r\n onPaymentProcessing,\r\n responseTypes\r\n });\r\n\r\n useProcessCheckoutError({responseTypes, subscriber: onCheckoutAfterProcessingWithError});\r\n\r\n useEffect(() => {\r\n if (!selected && source) {\r\n const categories = getCategoriesFromSource(source);\r\n if (categories.length) {\r\n setSelected(categories.shift().type);\r\n }\r\n\r\n }\r\n }, [source]);\r\n\r\n if (source) {\r\n Klarna.Payments.init({\r\n client_token: source.klarna.client_token\r\n });\r\n const categories = getCategoriesFromSource(source);\r\n return (\r\n <KlarnaPaymentCategories\r\n categories={categories}\r\n selected={!selected && categories.length > 0 ? categories[0].type : selected}\r\n onChange={setSelected}/>\r\n )\r\n } else {\r\n if (isLoading) {\r\n return <KlarnaLoader/>\r\n }\r\n }\r\n return (\r\n <div className='wc-stripe-blocks-klarna__notice'>\r\n {__('Please fill out all required fields before paying with Klarna.', 'woo-stripe-payment')}\r\n </div>\r\n );\r\n}\r\n\r\nif (getData()) {\r\n registerPaymentMethod({\r\n name: getData('name'),\r\n label: <PaymentMethodLabel\r\n title={getData('title')}\r\n paymentMethod={getData('name')}\r\n icons={getData('icon')}/>,\r\n ariaLabel: 'Klarna',\r\n placeOrderButtonLabel: getData('placeOrderButtonLabel'),\r\n canMakePayment: canMakePayment(getData, ({settings, billingData, cartTotals}) => {\r\n const {country} = billingData;\r\n const {currency_code: currency} = cartTotals;\r\n const requiredParams = settings('requiredParams');\r\n return [currency] in requiredParams && requiredParams[currency].includes(country);\r\n }),\r\n content: <PaymentMethod\r\n getData={getData}\r\n content={KlarnaContainer}/>,\r\n edit: <PaymentMethod\r\n getData={getData}\r\n content={KlarnaContainer}/>,\r\n supports: {\r\n showSavedCards: false,\r\n showSaveOption: false,\r\n features: getData('features')\r\n }\r\n })\r\n}\r\n","export const KlarnaLoader = () => {\r\n return (\r\n <div className=\"wc-stripe-klarna-loader\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n )\r\n}","import {useCallback} from '@wordpress/element';\r\nimport {useElements, Elements} from \"@stripe/react-stripe-js\";\r\nimport {initStripe as loadStripe, cartContainsSubscription, cartContainsPreOrder} from '../util'\r\nimport {useAfterProcessLocalPayment, useValidateCheckout, useCreateSource} from \"./hooks\";\r\nimport {useProcessCheckoutError} from \"../hooks\";\r\n\r\n/**\r\n * Return true if the local payment method can be used.\r\n * @param settings\r\n * @returns {function({billingData: *, [p: string]: *}): *}\r\n */\r\nexport const canMakePayment = (settings, callback = false) => ({billingData, cartTotals, ...props}) => {\r\n const {currency_code} = cartTotals;\r\n const {country} = billingData;\r\n const countries = settings('countries');\r\n const type = settings('allowedCountries');\r\n const supports = settings('features');\r\n let canMakePayment = false;\r\n if (settings('isAdmin')) {\r\n canMakePayment = true;\r\n } else {\r\n // Check if there are any subscriptions or pre-orders in the cart.\r\n if (cartContainsSubscription() && !supports.includes('subscriptions')) {\r\n return false;\r\n } else if (cartContainsPreOrder() && !supports.includes('pre-orders')) {\r\n return false;\r\n }\r\n if (settings('currencies').includes(currency_code)) {\r\n if (type === 'all_except') {\r\n canMakePayment = !settings('exceptCountries').includes(country);\r\n } else if (type === 'specific') {\r\n canMakePayment = settings('specificCountries').includes(country);\r\n } else {\r\n canMakePayment = countries.length > 0 ? countries.includes(country) : true;\r\n }\r\n }\r\n if (callback && canMakePayment) {\r\n canMakePayment = callback({settings, billingData, cartTotals, ...props});\r\n }\r\n }\r\n return canMakePayment;\r\n}\r\n\r\nexport const LocalPaymentIntentContent = (props) => {\r\n return (\r\n <Elements stripe={loadStripe}>\r\n <LocalPaymentIntentMethod {...props}/>\r\n </Elements>\r\n )\r\n}\r\n\r\nexport const LocalPaymentSourceContent = (props) => {\r\n return (\r\n <Elements stripe={loadStripe}>\r\n <LocalPaymentSourceMethod {...props}/>\r\n </Elements>\r\n )\r\n}\r\n\r\nconst LocalPaymentSourceMethod = (\r\n {\r\n getData,\r\n billing,\r\n shippingData,\r\n emitResponse,\r\n eventRegistration,\r\n getSourceArgs = false,\r\n element = false\r\n }) => {\r\n const {shippingAddress} = shippingData;\r\n const {onPaymentProcessing, onCheckoutAfterProcessingWithError} = eventRegistration;\r\n const {responseTypes, noticeContexts} = emitResponse;\r\n const onChange = (event) => {\r\n setIsValid(event.complete);\r\n }\r\n const {setIsValid} = useCreateSource({\r\n getData,\r\n billing,\r\n shippingAddress,\r\n onPaymentProcessing,\r\n responseTypes,\r\n getSourceArgs,\r\n element\r\n });\r\n\r\n if (element) {\r\n return (\r\n <LocalPaymentEleme
|