Version Description
- Fixed - SEPA payment flow
- Added - BECS payment method
- Updated - Stripe php lib version 7.40.0
- Updated - AliPay display logic
Download this release
Release Info
Developer | mr.clayton |
Plugin | Payment Plugins for Stripe WooCommerce |
Version | 3.1.7 |
Comparing to | |
See all releases |
Code changes from version 3.1.6 to 3.1.7
- assets/css/stripe.css +544 -402
- assets/js/frontend/local-payment.js +71 -26
- i18n/languages/woo-stripe-payment.pot +172 -147
- includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php +26 -6
- includes/abstract/abstract-wc-payment-gateway-stripe.php +1 -15
- includes/abstract/abstract-wc-stripe-payment.php +62 -7
- includes/admin/settings/class-wc-stripe-account-settings.php +42 -0
- includes/admin/settings/class-wc-stripe-api-settings.php +8 -5
- includes/class-stripe.php +14 -2
- includes/class-wc-stripe-field-manager.php +2 -0
- includes/class-wc-stripe-frontend-scripts.php +18 -14
- includes/class-wc-stripe-payment-charge-local.php +11 -2
- includes/class-wc-stripe-payment-charge.php +4 -0
- includes/class-wc-stripe-payment-intent.php +4 -0
- includes/class-wc-stripe-redirect-handler.php +3 -1
- includes/class-wc-stripe-rest-api.php +5 -1
- includes/class-wc-stripe-update.php +2 -1
- includes/controllers/class-wc-stripe-controller-checkout.php +36 -2
- includes/gateways/class-wc-payment-gateway-stripe-alipay.php +33 -3
- includes/gateways/class-wc-payment-gateway-stripe-becs.php +40 -0
- includes/gateways/class-wc-payment-gateway-stripe-googlepay.php +71 -62
- includes/gateways/class-wc-payment-gateway-stripe-ideal.php +0 -2
- includes/gateways/class-wc-payment-gateway-stripe-klarna.php +21 -38
- includes/updates/update-3.1.7.php +5 -0
- includes/wc-stripe-functions.php +4 -2
- includes/wc-stripe-hooks.php +1 -1
- includes/wc-stripe-webhook-functions.php +20 -6
- readme.txt +7 -1
- stripe-payments.php +1 -1
- templates/checkout/klarna.php +17 -17
- templates/checkout/local-payment.php +8 -8
- vendor/composer/installed.json +6 -6
- vendor/stripe/stripe-php/CHANGELOG.md +3 -0
- vendor/stripe/stripe-php/VERSION +1 -1
- vendor/stripe/stripe-php/init.php +1 -0
- vendor/stripe/stripe-php/lib/Service/CoreServiceFactory.php +2 -0
- vendor/stripe/stripe-php/lib/Service/OAuthService.php +150 -0
- vendor/stripe/stripe-php/lib/Stripe.php +1 -1
- vendor/stripe/stripe-php/lib/StripeClient.php +1 -0
assets/css/stripe.css
CHANGED
@@ -1,84 +1,101 @@
|
|
1 |
.wc-stripe-card-icons-container,
|
2 |
-
.wc-stripe-paymentRequest-icons-container{
|
3 |
-
|
4 |
-
|
5 |
}
|
6 |
-
|
7 |
-
|
8 |
-
|
|
|
9 |
}
|
10 |
-
|
11 |
-
|
|
|
12 |
}
|
13 |
-
|
14 |
-
|
|
|
15 |
}
|
|
|
16 |
.woocommerce-checkout #payment ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n + 2),
|
17 |
-
ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n + 2){
|
18 |
-
|
19 |
}
|
|
|
20 |
li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon,
|
21 |
-
li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img{
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
}
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
|
|
39 |
}
|
|
|
40 |
li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon:nth-child(2n+2) {
|
41 |
margin: 0px 2px;
|
42 |
}
|
43 |
-
|
44 |
-
|
|
|
45 |
}
|
46 |
-
|
47 |
-
|
|
|
48 |
}
|
49 |
-
|
50 |
-
|
|
|
51 |
}
|
|
|
52 |
.wc-stripe_cc-container .StripeElement {
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
}
|
|
|
61 |
input.wc-stripe-payment-type,
|
62 |
-
input.wc-stripe-klarna-category{
|
63 |
-
|
64 |
}
|
65 |
-
|
66 |
-
|
|
|
67 |
}
|
|
|
68 |
label.wc-stripe-label-payment-type,
|
69 |
input[type=radio] + label.wc-stripe-label-payment-type,
|
70 |
-
label.wc-stripe-label-klarna-category{
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
}
|
76 |
-
|
77 |
-
|
|
|
78 |
}
|
|
|
79 |
label.wc-stripe-label-payment-type:before,
|
80 |
-
label.wc-stripe-label-klarna-category:before{
|
81 |
-
|
82 |
display: inline-block;
|
83 |
width: 11px;
|
84 |
height: 11px;
|
@@ -92,24 +109,28 @@ label.wc-stripe-label-klarna-category:before{
|
|
92 |
-ms-transform: translateY(2px);
|
93 |
transform: translateY(2px);
|
94 |
}
|
95 |
-
|
96 |
-
input.wc-stripe-
|
97 |
-
|
|
|
98 |
}
|
99 |
-
|
100 |
-
|
101 |
-
|
|
|
102 |
}
|
103 |
-
|
104 |
-
.select2-
|
|
|
105 |
display: flex;
|
106 |
align-items: center;
|
107 |
line-height: 42px !important;
|
108 |
}
|
109 |
-
|
110 |
-
.select2-
|
111 |
-
|
112 |
-
|
|
|
113 |
background-size: 40px 24px;
|
114 |
width: 40px;
|
115 |
height: 42px;
|
@@ -117,87 +138,104 @@ label.wc-stripe-label-payment-type:after{
|
|
117 |
margin-right: 8px;
|
118 |
background-position: center;
|
119 |
}
|
120 |
-
|
121 |
-
.select2-
|
122 |
-
.select2-results__options li.wc-stripe-select2-container.visa:before
|
123 |
-
|
|
|
124 |
}
|
125 |
-
|
|
|
126 |
.select2-results__options li.wc-stripe-select2-container.mastercard:before,
|
127 |
-
.select2-results__options li.wc-stripe-select2-container.mastercard:before{
|
128 |
-
|
129 |
}
|
130 |
-
|
|
|
131 |
.select2-results__options li.wc-stripe-select2-container.americanexpress:before,
|
132 |
-
.select2-results__options li.wc-stripe-select2-container.americanexpress:before{
|
133 |
-
|
134 |
}
|
135 |
-
|
|
|
136 |
.select2-results__options li.wc-stripe-select2-container.amex:before,
|
137 |
-
.select2-results__options li.wc-stripe-select2-container.amex:before{
|
138 |
-
|
139 |
}
|
140 |
-
|
|
|
141 |
.select2-results__options li.wc-stripe-select2-container.discover:before,
|
142 |
-
.select2-results__options li.wc-stripe-select2-container.discover:before{
|
143 |
-
|
144 |
}
|
145 |
-
|
|
|
146 |
.select2-results__options li.wc-stripe-select2-container.mastercard:before,
|
147 |
-
.select2-results__options li.wc-stripe-select2-container.mastercard:before{
|
148 |
-
|
149 |
}
|
150 |
-
|
|
|
151 |
.select2-results__options li.wc-stripe-select2-container.dinersclub:before,
|
152 |
-
.select2-results__options li.wc-stripe-select2-container.dinersclub:before{
|
153 |
-
|
154 |
}
|
155 |
-
|
|
|
156 |
.select2-results__options li.wc-stripe-select2-container.diners:before,
|
157 |
-
.select2-results__options li.wc-stripe-select2-container.diners:before{
|
158 |
-
|
159 |
}
|
160 |
-
|
|
|
161 |
.select2-results__options li.wc-stripe-select2-container.jcb:before,
|
162 |
-
.select2-results__options li.wc-stripe-select2-container.jcb:before{
|
163 |
-
|
164 |
-
}
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
|
|
|
|
|
|
|
|
179 |
height: 20px;
|
180 |
}
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
|
|
|
|
|
|
|
|
201 |
top: 2px;
|
202 |
width: 7px;
|
203 |
height: 12px;
|
@@ -210,113 +248,138 @@ label.wc-stripe-label-payment-type:after{
|
|
210 |
-moz-box-sizing: border-box;
|
211 |
box-sizing: border-box
|
212 |
}
|
|
|
213 |
li.payment_method_stripe_googlepay,
|
214 |
li.payment_method_stripe_applepay,
|
215 |
-
li.payment_method_stripe_payment_request{
|
216 |
-
|
217 |
}
|
218 |
|
219 |
-
#place_order.wc-stripe-hide{
|
220 |
-
|
221 |
}
|
222 |
-
|
223 |
-
|
224 |
-
|
|
|
225 |
}
|
226 |
-
|
227 |
-
|
|
|
228 |
}
|
229 |
-
|
230 |
-
|
|
|
231 |
}
|
232 |
-
|
233 |
-
|
|
|
234 |
}
|
|
|
235 |
.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods,
|
236 |
-
.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods{
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
}
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
|
|
245 |
}
|
246 |
-
|
247 |
-
|
|
|
248 |
}
|
|
|
249 |
.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_],
|
250 |
-
.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_]{
|
251 |
-
|
252 |
}
|
|
|
253 |
.wc_stripe_product_payment_methods .gpay-button,
|
254 |
-
.wc_stripe_cart_payment_methods .gpay-button{
|
255 |
-
|
256 |
-
|
257 |
}
|
258 |
-
|
259 |
-
|
|
|
260 |
}
|
|
|
261 |
.woocommerce-cart .stripe_cart_gateway_active .wc-proceed-to-checkout .checkout-button,
|
262 |
-
.stripe_cart_gateway_active .checkout-button{
|
263 |
-
|
264 |
}
|
265 |
-
|
266 |
-
|
267 |
-
|
|
|
268 |
}
|
269 |
-
|
270 |
-
|
|
|
271 |
}
|
272 |
-
|
273 |
-
|
274 |
-
|
|
|
275 |
}
|
276 |
-
|
277 |
-
|
|
|
278 |
}
|
279 |
-
|
280 |
-
|
281 |
-
|
|
|
282 |
}
|
283 |
-
|
284 |
-
|
285 |
-
|
|
|
286 |
}
|
287 |
-
|
288 |
-
|
289 |
-
|
|
|
290 |
}
|
291 |
-
|
292 |
-
|
293 |
-
|
|
|
294 |
}
|
295 |
-
|
296 |
-
|
|
|
297 |
height: 32px;
|
298 |
min-width: 32px;
|
299 |
min-height: 32px;
|
300 |
}
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
|
|
|
|
|
|
|
|
320 |
.apple-pay-button {
|
321 |
display: inline-block;
|
322 |
-webkit-appearance: -apple-pay-button;
|
@@ -325,259 +388,317 @@ li.payment_method_stripe_ach label:first-of-type img{
|
|
325 |
height: 40px;
|
326 |
max-height: 40px;
|
327 |
}
|
|
|
328 |
.apple-pay-button-black {
|
329 |
-apple-pay-button-style: black;
|
330 |
}
|
|
|
331 |
.apple-pay-button-white {
|
332 |
-apple-pay-button-style: white;
|
333 |
}
|
|
|
334 |
.apple-pay-button-white-with-line {
|
335 |
-apple-pay-button-style: white-outline;
|
336 |
}
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
|
|
|
|
|
|
347 |
border: 1px solid #d1d1d1;
|
348 |
border-width: 0 0 1px;
|
349 |
position: relative;
|
350 |
margin: 1em 0;
|
351 |
-
|
352 |
-
}
|
353 |
-
.wc-stripe-banner-checkout.active{
|
354 |
-
display: block;
|
355 |
-
}
|
356 |
-
.wc-stripe-banner-checkout span.banner-title{
|
357 |
-
position: absolute;
|
358 |
-
display: flex;
|
359 |
-
align-items: center;
|
360 |
-
top: -13px;
|
361 |
-
right: 0;
|
362 |
-
left: 0;
|
363 |
-
background: transparent;
|
364 |
-
white-space: nowrap;
|
365 |
-
font-size: 16px;
|
366 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
367 |
.wc-stripe-banner-checkout span.banner-title:before,
|
368 |
-
.wc-stripe-banner-checkout span.banner-title:after{
|
369 |
-
|
370 |
height: 1px;
|
371 |
background: #d1d1d1;
|
372 |
display: block;
|
373 |
width: 50%;
|
374 |
}
|
375 |
-
|
376 |
-
|
|
|
377 |
}
|
378 |
-
|
379 |
-
|
|
|
380 |
}
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
|
|
385 |
}
|
386 |
-
|
387 |
-
|
388 |
-
|
|
|
389 |
}
|
390 |
-
|
391 |
-
|
|
|
392 |
}
|
393 |
-
|
394 |
-
|
|
|
395 |
}
|
396 |
|
397 |
.wc_stripe_product_payment_methods .payment_method_stripe_payment_request .StripeElement,
|
398 |
-
.wc_stripe_cart_payment_methods .payment_method_stripe_payment_request .StripeElement{
|
399 |
-
|
400 |
-
|
401 |
-
}
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
ul.payment_methods li.
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
}
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
max-height: 21px;
|
453 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
454 |
ul.payment_methods li.payment_method_stripe_bancontact img,
|
455 |
-
label[for=payment_method_braintree_bancontact] img{
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
}
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
|
|
465 |
}
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
|
|
471 |
}
|
472 |
-
|
473 |
-
|
|
|
474 |
}
|
475 |
-
|
476 |
-
|
|
|
477 |
}
|
|
|
478 |
.single-product .blockMsg {
|
479 |
-
|
480 |
-
|
481 |
}
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
|
|
491 |
}
|
492 |
-
|
493 |
-
|
494 |
-
|
|
|
495 |
}
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
|
|
501 |
}
|
502 |
-
|
503 |
-
|
504 |
-
|
|
|
505 |
}
|
506 |
-
|
507 |
-
|
508 |
-
|
|
|
509 |
}
|
510 |
-
|
511 |
-
|
|
|
512 |
}
|
513 |
-
|
514 |
-
|
515 |
-
|
|
|
516 |
}
|
517 |
-
|
518 |
-
|
|
|
519 |
}
|
520 |
-
|
521 |
-
|
|
|
522 |
}
|
523 |
-
|
524 |
-
|
|
|
525 |
}
|
|
|
526 |
ul.wc_stripe_cart_payment_methods li.wc-stripe-payment-method button,
|
527 |
ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_] button,
|
528 |
-
ul.wc_stripe_checkout_banner_gateways li button{
|
529 |
-
|
530 |
}
|
531 |
-
|
532 |
-
|
533 |
-
|
|
|
534 |
}
|
535 |
-
|
536 |
-
|
537 |
-
|
|
|
538 |
}
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
|
|
543 |
}
|
544 |
-
|
545 |
-
|
|
|
546 |
}
|
547 |
-
|
548 |
-
|
|
|
549 |
}
|
550 |
-
|
551 |
-
|
552 |
-
|
|
|
553 |
}
|
554 |
-
|
555 |
-
|
556 |
-
|
|
|
557 |
}
|
558 |
-
|
559 |
-
|
|
|
560 |
border-radius: 4px;
|
561 |
}
|
562 |
-
|
563 |
-
|
|
|
564 |
}
|
565 |
|
566 |
-
#wc_stripe_local_payment_stripe_sepa
|
567 |
-
|
568 |
-
|
|
|
569 |
}
|
570 |
-
|
571 |
-
|
|
|
|
|
572 |
}
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
|
|
577 |
}
|
578 |
-
|
579 |
-
|
|
|
580 |
}
|
|
|
581 |
div.payment_method_stripe_cc,
|
582 |
div.payment_method_stripe_sepa,
|
583 |
div.payment_method_stripe_ideal,
|
@@ -585,15 +706,36 @@ div.payment_method_stripe_fpx,
|
|
585 |
#wc_stripe_local_payment_stripe_klarna,
|
586 |
li[class*=payment_method_stripe_] div.wc-stripe_googlepay-container.has_tokens,
|
587 |
li[class*=payment_method_stripe_] div.wc-stripe_applepay-container.has_tokens,
|
588 |
-
li[class*=payment_method_stripe_] div.wc-stripe_payment_request-container.has_tokens{
|
589 |
-
|
590 |
}
|
591 |
-
|
592 |
-
|
|
|
593 |
}
|
594 |
-
|
595 |
-
|
|
|
596 |
}
|
597 |
-
|
598 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
599 |
}
|
1 |
.wc-stripe-card-icons-container,
|
2 |
+
.wc-stripe-paymentRequest-icons-container {
|
3 |
+
float: right;
|
4 |
+
display: inline-block;
|
5 |
}
|
6 |
+
|
7 |
+
ul.payment_methods li[class*=payment_method] {
|
8 |
+
margin: 0;
|
9 |
+
padding: 0;
|
10 |
}
|
11 |
+
|
12 |
+
li[class*=payment_method] input[type=radio] {
|
13 |
+
margin: 0 10px 0 5px;
|
14 |
}
|
15 |
+
|
16 |
+
li[class*=payment_method] input[type=radio] + label:not(.wc-stripe-label-payment-type) {
|
17 |
+
margin: 0;
|
18 |
}
|
19 |
+
|
20 |
.woocommerce-checkout #payment ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n + 2),
|
21 |
+
ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n + 2) {
|
22 |
+
margin: 0;
|
23 |
}
|
24 |
+
|
25 |
li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon,
|
26 |
+
li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img {
|
27 |
+
max-width: 44px;
|
28 |
+
max-height: 27px;
|
29 |
+
width: 44px;
|
30 |
+
height: 27px;
|
31 |
+
float: none;
|
32 |
+
display: inline;
|
33 |
+
}
|
34 |
+
|
35 |
+
li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img {
|
36 |
+
width: 25px;
|
37 |
+
height: 25px;
|
38 |
+
max-width: 25px;
|
39 |
+
max-height: 25px;
|
40 |
+
}
|
41 |
+
|
42 |
+
ul.payment_methods label[for*="payment_method_stripe"]:after {
|
43 |
+
clear: right;
|
44 |
+
content: "";
|
45 |
+
display: block;
|
46 |
}
|
47 |
+
|
48 |
li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon:nth-child(2n+2) {
|
49 |
margin: 0px 2px;
|
50 |
}
|
51 |
+
|
52 |
+
li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon.open.visa {
|
53 |
+
padding-top: 2px;
|
54 |
}
|
55 |
+
|
56 |
+
ul.payment_methods li[class*=payment_method_stripe_] label > img:first-of-type {
|
57 |
+
float: right !important;
|
58 |
}
|
59 |
+
|
60 |
+
.wc-stripe_cc-new-method-container {
|
61 |
+
margin-bottom: 1em;
|
62 |
}
|
63 |
+
|
64 |
.wc-stripe_cc-container .StripeElement {
|
65 |
+
box-sizing: border-box;
|
66 |
+
height: 40px;
|
67 |
+
padding: 10px 12px;
|
68 |
+
border-radius: 4px;
|
69 |
+
background-color: white;
|
70 |
+
-webkit-transition: box-shadow 150ms ease;
|
71 |
+
transition: box-shadow 150ms ease;
|
72 |
}
|
73 |
+
|
74 |
input.wc-stripe-payment-type,
|
75 |
+
input.wc-stripe-klarna-category {
|
76 |
+
display: none !important;
|
77 |
}
|
78 |
+
|
79 |
+
body .wfacp_main_form.woocommerce .wc-stripe-save-source label.checkbox {
|
80 |
+
padding: 0 !important;
|
81 |
}
|
82 |
+
|
83 |
label.wc-stripe-label-payment-type,
|
84 |
input[type=radio] + label.wc-stripe-label-payment-type,
|
85 |
+
label.wc-stripe-label-klarna-category {
|
86 |
+
margin-bottom: 1em;
|
87 |
+
display: block;
|
88 |
+
padding: 0 !important;
|
89 |
+
color: #000;
|
90 |
}
|
91 |
+
|
92 |
+
.theme-flatsome div.wc-stripe-saved-methods-container {
|
93 |
+
margin: 0 0 1em 0;
|
94 |
}
|
95 |
+
|
96 |
label.wc-stripe-label-payment-type:before,
|
97 |
+
label.wc-stripe-label-klarna-category:before {
|
98 |
+
content: "";
|
99 |
display: inline-block;
|
100 |
width: 11px;
|
101 |
height: 11px;
|
109 |
-ms-transform: translateY(2px);
|
110 |
transform: translateY(2px);
|
111 |
}
|
112 |
+
|
113 |
+
input.wc-stripe-payment-type:checked + label.wc-stripe-label-payment-type:before,
|
114 |
+
input.wc-stripe-klarna-category:checked + label.wc-stripe-label-klarna-category:before {
|
115 |
+
background: #000;
|
116 |
}
|
117 |
+
|
118 |
+
label.wc-stripe-label-payment-type:after {
|
119 |
+
content: none !important;
|
120 |
+
display: none !important;
|
121 |
}
|
122 |
+
|
123 |
+
.select2-container .select2-selection--single .wc-stripe-select2-container,
|
124 |
+
.select2-results__options li.wc-stripe-select2-container {
|
125 |
display: flex;
|
126 |
align-items: center;
|
127 |
line-height: 42px !important;
|
128 |
}
|
129 |
+
|
130 |
+
.select2-container .select2-selection--single .wc-stripe-select2-container:before,
|
131 |
+
.select2-results__options li.wc-stripe-select2-container:before {
|
132 |
+
content: '';
|
133 |
+
background-repeat: no-repeat;
|
134 |
background-size: 40px 24px;
|
135 |
width: 40px;
|
136 |
height: 42px;
|
138 |
margin-right: 8px;
|
139 |
background-position: center;
|
140 |
}
|
141 |
+
|
142 |
+
.select2-container .select2-selection--single .wc-stripe-select2-container.visa:before,
|
143 |
+
.select2-results__options li.wc-stripe-select2-container.visa:before,
|
144 |
+
.select2-results__options li.wc-stripe-select2-container.visa:before {
|
145 |
+
background-image: url(../img/cards/visa.svg);
|
146 |
}
|
147 |
+
|
148 |
+
.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,
|
149 |
.select2-results__options li.wc-stripe-select2-container.mastercard:before,
|
150 |
+
.select2-results__options li.wc-stripe-select2-container.mastercard:before {
|
151 |
+
background-image: url(../img/cards/mastercard.svg);
|
152 |
}
|
153 |
+
|
154 |
+
.select2-container .select2-selection--single .wc-stripe-select2-container.americanexpress:before,
|
155 |
.select2-results__options li.wc-stripe-select2-container.americanexpress:before,
|
156 |
+
.select2-results__options li.wc-stripe-select2-container.americanexpress:before {
|
157 |
+
background-image: url(../img/cards/amex.svg);
|
158 |
}
|
159 |
+
|
160 |
+
.select2-container .select2-selection--single .wc-stripe-select2-container.amex:before,
|
161 |
.select2-results__options li.wc-stripe-select2-container.amex:before,
|
162 |
+
.select2-results__options li.wc-stripe-select2-container.amex:before {
|
163 |
+
background-image: url(../img/cards/amex.svg);
|
164 |
}
|
165 |
+
|
166 |
+
.select2-container .select2-selection--single .wc-stripe-select2-container.discover:before,
|
167 |
.select2-results__options li.wc-stripe-select2-container.discover:before,
|
168 |
+
.select2-results__options li.wc-stripe-select2-container.discover:before {
|
169 |
+
background-image: url(../img/cards/discover.svg);
|
170 |
}
|
171 |
+
|
172 |
+
.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,
|
173 |
.select2-results__options li.wc-stripe-select2-container.mastercard:before,
|
174 |
+
.select2-results__options li.wc-stripe-select2-container.mastercard:before {
|
175 |
+
background-image: url(../img/cards/mastercard.svg);
|
176 |
}
|
177 |
+
|
178 |
+
.select2-container .select2-selection--single .wc-stripe-select2-container.dinersclub:before,
|
179 |
.select2-results__options li.wc-stripe-select2-container.dinersclub:before,
|
180 |
+
.select2-results__options li.wc-stripe-select2-container.dinersclub:before {
|
181 |
+
background-image: url(../img/cards/diners.svg);
|
182 |
}
|
183 |
+
|
184 |
+
.select2-container .select2-selection--single .wc-stripe-select2-container.diners:before,
|
185 |
.select2-results__options li.wc-stripe-select2-container.diners:before,
|
186 |
+
.select2-results__options li.wc-stripe-select2-container.diners:before {
|
187 |
+
background-image: url(../img/cards/diners.svg);
|
188 |
}
|
189 |
+
|
190 |
+
.select2-container .select2-selection--single .wc-stripe-select2-container.jcb:before,
|
191 |
.select2-results__options li.wc-stripe-select2-container.jcb:before,
|
192 |
+
.select2-results__options li.wc-stripe-select2-container.jcb:before {
|
193 |
+
background-image: url(../img/cards/jcb.svg);
|
194 |
+
}
|
195 |
+
|
196 |
+
.select2-results__options li.wc-stripe-select2-container.wc-stripe-ach:before {
|
197 |
+
display: none;
|
198 |
+
}
|
199 |
+
|
200 |
+
#wc-stripe-card-element {
|
201 |
+
margin-bottom: 1em;
|
202 |
+
}
|
203 |
+
|
204 |
+
.wc-stripe_cc-container .wc-stripe-save-source .save-source-label {
|
205 |
+
display: block;
|
206 |
+
margin-top: 10px;
|
207 |
+
}
|
208 |
+
|
209 |
+
.wc-stripe_cc-container .wc-stripe-save-source input[type="checkbox"] {
|
210 |
+
opacity: 0;
|
211 |
+
position: absolute;
|
212 |
+
width: 20px;
|
213 |
height: 20px;
|
214 |
}
|
215 |
+
|
216 |
+
.wc-stripe_cc-container .wc-stripe-save-source label.checkbox {
|
217 |
+
position: relative;
|
218 |
+
}
|
219 |
+
|
220 |
+
.wc-stripe_cc-container .save-source-checkbox {
|
221 |
+
height: 20px;
|
222 |
+
width: 20px;
|
223 |
+
position: relative;
|
224 |
+
background-color: white;
|
225 |
+
display: block;
|
226 |
+
border-radius: 3px;
|
227 |
+
border: 1px solid #bababa;
|
228 |
+
}
|
229 |
+
|
230 |
+
.wc-stripe_cc-container .save-source-checkbox:after {
|
231 |
+
content: "";
|
232 |
+
position: absolute;
|
233 |
+
top: 0;
|
234 |
+
left: 0;
|
235 |
+
}
|
236 |
+
|
237 |
+
.wc-stripe_cc-container .wc-stripe-save-source input[type="checkbox"]:checked + .save-source-checkbox:after {
|
238 |
+
left: 6px;
|
239 |
top: 2px;
|
240 |
width: 7px;
|
241 |
height: 12px;
|
248 |
-moz-box-sizing: border-box;
|
249 |
box-sizing: border-box
|
250 |
}
|
251 |
+
|
252 |
li.payment_method_stripe_googlepay,
|
253 |
li.payment_method_stripe_applepay,
|
254 |
+
li.payment_method_stripe_payment_request {
|
255 |
+
display: none;
|
256 |
}
|
257 |
|
258 |
+
#place_order.wc-stripe-hide {
|
259 |
+
display: none !important;
|
260 |
}
|
261 |
+
|
262 |
+
.wc-stripe-product-checkout-container {
|
263 |
+
display: none;
|
264 |
+
width: 100%;
|
265 |
}
|
266 |
+
|
267 |
+
.wc-stripe-product-checkout-container.bottom {
|
268 |
+
margin-top: 1em;
|
269 |
}
|
270 |
+
|
271 |
+
.wc-stripe-product-checkout-container.top {
|
272 |
+
margin-bottom: 1em;
|
273 |
}
|
274 |
+
|
275 |
+
.wc-stripe-product-checkout-container.active {
|
276 |
+
display: block;
|
277 |
}
|
278 |
+
|
279 |
.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods,
|
280 |
+
.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods {
|
281 |
+
list-style: none;
|
282 |
+
margin: 0px;
|
283 |
+
padding: 0px;
|
284 |
}
|
285 |
+
|
286 |
+
#wc-stripe-cart-form {
|
287 |
+
margin: 0;
|
288 |
+
padding: 0;
|
289 |
+
clear: both;
|
290 |
}
|
291 |
+
|
292 |
+
.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods {
|
293 |
+
margin-bottom: 1.5em;
|
294 |
}
|
295 |
+
|
296 |
.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_],
|
297 |
+
.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_] {
|
298 |
+
margin: 0 0 1em 0;
|
299 |
}
|
300 |
+
|
301 |
.wc_stripe_product_payment_methods .gpay-button,
|
302 |
+
.wc_stripe_cart_payment_methods .gpay-button {
|
303 |
+
width: 100% !important;
|
304 |
+
margin: 0;
|
305 |
}
|
306 |
+
|
307 |
+
.wc_stripe_product_payment_methods .disabled {
|
308 |
+
opacity: 0.45;
|
309 |
}
|
310 |
+
|
311 |
.woocommerce-cart .stripe_cart_gateway_active .wc-proceed-to-checkout .checkout-button,
|
312 |
+
.stripe_cart_gateway_active .checkout-button {
|
313 |
+
margin-bottom: 0px;
|
314 |
}
|
315 |
+
|
316 |
+
.wc-stripe-cart-or {
|
317 |
+
margin: 1em 0;
|
318 |
+
text-align: center;
|
319 |
}
|
320 |
+
|
321 |
+
li.wc-stripe-payment-method.or {
|
322 |
+
display: none;
|
323 |
}
|
324 |
+
|
325 |
+
.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or {
|
326 |
+
display: block;
|
327 |
+
margin: 15px 0;
|
328 |
}
|
329 |
+
|
330 |
+
.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or p {
|
331 |
+
margin: 0;
|
332 |
}
|
333 |
+
|
334 |
+
li[class*=payment_method_stripe_].active ~ li.wc-stripe-payment-method.or {
|
335 |
+
display: block;
|
336 |
+
margin: 0;
|
337 |
}
|
338 |
+
|
339 |
+
li.payment_method_stripe_applepay label:first-of-type img {
|
340 |
+
width: 49px;
|
341 |
+
max-height: 32px;
|
342 |
}
|
343 |
+
|
344 |
+
li.payment_method_stripe_googlepay label:first-of-type img {
|
345 |
+
width: 48px;
|
346 |
+
max-height: 35px;
|
347 |
}
|
348 |
+
|
349 |
+
li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_standard] {
|
350 |
+
width: 60px;
|
351 |
+
max-height: 35px;
|
352 |
}
|
353 |
+
|
354 |
+
li.payment_method_stripe_ach label:first-of-type img {
|
355 |
+
width: 32px;
|
356 |
height: 32px;
|
357 |
min-width: 32px;
|
358 |
min-height: 32px;
|
359 |
}
|
360 |
+
|
361 |
+
.gpay-button:hover {
|
362 |
+
background-origin: content-box;
|
363 |
+
background-position: center center;
|
364 |
+
background-repeat: no-repeat;
|
365 |
+
background-size: contain;
|
366 |
+
}
|
367 |
+
|
368 |
+
.gpay-button:active {
|
369 |
+
background-origin: content-box;
|
370 |
+
background-position: center center;
|
371 |
+
background-repeat: no-repeat;
|
372 |
+
background-size: contain;
|
373 |
+
}
|
374 |
+
|
375 |
+
.gpay-button:focus {
|
376 |
+
background-origin: content-box;
|
377 |
+
background-position: center center;
|
378 |
+
background-repeat: no-repeat;
|
379 |
+
background-size: contain;
|
380 |
+
}
|
381 |
+
|
382 |
+
@supports (-webkit-appearance: -apple-pay-button) {
|
383 |
.apple-pay-button {
|
384 |
display: inline-block;
|
385 |
-webkit-appearance: -apple-pay-button;
|
388 |
height: 40px;
|
389 |
max-height: 40px;
|
390 |
}
|
391 |
+
|
392 |
.apple-pay-button-black {
|
393 |
-apple-pay-button-style: black;
|
394 |
}
|
395 |
+
|
396 |
.apple-pay-button-white {
|
397 |
-apple-pay-button-style: white;
|
398 |
}
|
399 |
+
|
400 |
.apple-pay-button-white-with-line {
|
401 |
-apple-pay-button-style: white-outline;
|
402 |
}
|
403 |
+
|
404 |
+
.applepay-top-container .apple-pay-button {
|
405 |
+
max-width: 240px;
|
406 |
+
}
|
407 |
+
|
408 |
+
.woocommerce-checkout-payment .apple-pay-button {
|
409 |
+
max-width: 240px;
|
410 |
+
}
|
411 |
+
}
|
412 |
+
|
413 |
+
.wc-stripe-banner-checkout {
|
414 |
+
display: none;
|
415 |
+
padding: 20px 15px 0 15px;
|
416 |
border: 1px solid #d1d1d1;
|
417 |
border-width: 0 0 1px;
|
418 |
position: relative;
|
419 |
margin: 1em 0;
|
420 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
421 |
}
|
422 |
+
|
423 |
+
.wc-stripe-banner-checkout.active {
|
424 |
+
display: block;
|
425 |
+
}
|
426 |
+
|
427 |
+
.wc-stripe-banner-checkout span.banner-title {
|
428 |
+
position: absolute;
|
429 |
+
display: flex;
|
430 |
+
align-items: center;
|
431 |
+
top: -13px;
|
432 |
+
right: 0;
|
433 |
+
left: 0;
|
434 |
+
background: transparent;
|
435 |
+
white-space: nowrap;
|
436 |
+
font-size: 16px;
|
437 |
+
}
|
438 |
+
|
439 |
.wc-stripe-banner-checkout span.banner-title:before,
|
440 |
+
.wc-stripe-banner-checkout span.banner-title:after {
|
441 |
+
content: ' ';
|
442 |
height: 1px;
|
443 |
background: #d1d1d1;
|
444 |
display: block;
|
445 |
width: 50%;
|
446 |
}
|
447 |
+
|
448 |
+
.wc-stripe-banner-checkout span.banner-title:before {
|
449 |
+
margin-right: 8px;
|
450 |
}
|
451 |
+
|
452 |
+
.wc-stripe-banner-checkout span.banner-title:after {
|
453 |
+
margin-left: 8px;
|
454 |
}
|
455 |
+
|
456 |
+
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways {
|
457 |
+
list-style: none;
|
458 |
+
margin: 0;
|
459 |
+
padding: 0;
|
460 |
}
|
461 |
+
|
462 |
+
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway {
|
463 |
+
margin: 0 0 20px 0;
|
464 |
+
display: none;
|
465 |
}
|
466 |
+
|
467 |
+
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-button {
|
468 |
+
margin: 0;
|
469 |
}
|
470 |
+
|
471 |
+
.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-button {
|
472 |
+
width: 100%;
|
473 |
}
|
474 |
|
475 |
.wc_stripe_product_payment_methods .payment_method_stripe_payment_request .StripeElement,
|
476 |
+
.wc_stripe_cart_payment_methods .payment_method_stripe_payment_request .StripeElement {
|
477 |
+
padding: 0px;
|
478 |
+
width: 100%;
|
479 |
+
}
|
480 |
+
|
481 |
+
.woocommerce-checkout #wc-stripe-payment-request-container.StripeElement {
|
482 |
+
width: 240px;
|
483 |
+
padding: 0px;
|
484 |
+
}
|
485 |
+
|
486 |
+
.wc-stripe-checkout-banner-gateway #wc-stripe-payment-request-banner.StripeElement {
|
487 |
+
width: 100%;
|
488 |
+
}
|
489 |
+
|
490 |
+
ul.payment_methods li.payment_method_stripe_p24 img {
|
491 |
+
max-width: 90px;
|
492 |
+
width: 90px;
|
493 |
+
max-height: 45px;
|
494 |
+
}
|
495 |
+
|
496 |
+
ul.payment_methods li.payment_method_stripe_ideal img {
|
497 |
+
max-width: 38px;
|
498 |
+
width: 38px;
|
499 |
+
max-height: 35px;
|
500 |
+
}
|
501 |
+
|
502 |
+
ul.payment_methods li.payment_method_stripe_fpx img {
|
503 |
+
max-width: 75px;
|
504 |
+
width: 75px;
|
505 |
+
max-height: 25px;
|
506 |
+
}
|
507 |
+
|
508 |
+
ul.payment_methods li.payment_method_stripe_klarna img {
|
509 |
+
max-width: 72px;
|
510 |
+
width: 72px;
|
511 |
+
max-height: 20px;
|
512 |
+
}
|
513 |
+
|
514 |
+
ul.payment_methods li.payment_method_stripe_giropay img {
|
515 |
+
max-width: 65px;
|
516 |
+
width: 65px;
|
517 |
+
max-height: 28px;
|
518 |
+
}
|
519 |
+
|
520 |
+
ul.payment_methods li.payment_method_stripe_eps img {
|
521 |
+
max-width: 70px;
|
522 |
+
width: 70px;
|
523 |
+
max-height: 46px;
|
524 |
+
}
|
525 |
+
|
526 |
+
ul.payment_methods li.payment_method_stripe_multibanco img {
|
527 |
+
max-width: 48px;
|
528 |
+
width: 48px;
|
529 |
+
max-height: 48px;
|
|
|
530 |
}
|
531 |
+
|
532 |
+
ul.payment_methods li.payment_method_stripe_sepa img {
|
533 |
+
max-width: 67px;
|
534 |
+
width: 67px;
|
535 |
+
max-height: 18px;
|
536 |
+
}
|
537 |
+
|
538 |
+
ul.payment_methods li.payment_method_stripe_sofort img {
|
539 |
+
max-width: 70px;
|
540 |
+
width: 70px;
|
541 |
+
max-height: 21px;
|
542 |
+
}
|
543 |
+
|
544 |
ul.payment_methods li.payment_method_stripe_bancontact img,
|
545 |
+
label[for=payment_method_braintree_bancontact] img {
|
546 |
+
width: 60px;
|
547 |
+
height: 42px;
|
548 |
+
max-width: 60px;
|
549 |
+
max-height: 42px;
|
550 |
}
|
551 |
+
|
552 |
+
ul.payment_methods li.payment_method_stripe_wechat label img {
|
553 |
+
max-width: 82px;
|
554 |
+
width: 82px;
|
555 |
+
max-height: 23px;
|
556 |
}
|
557 |
+
|
558 |
+
ul.payment_methods li.payment_method_stripe_alipay img {
|
559 |
+
max-width: 72px;
|
560 |
+
width: 72px;
|
561 |
+
height: 36px;
|
562 |
+
max-height: 36px;
|
563 |
}
|
564 |
+
|
565 |
+
#wc-stripe-card-element {
|
566 |
+
width: 100%;
|
567 |
}
|
568 |
+
|
569 |
+
li.banner_payment_method_stripe_payment_request .StripeElement {
|
570 |
+
padding: 0px;
|
571 |
}
|
572 |
+
|
573 |
.single-product .blockMsg {
|
574 |
+
border: none !important;
|
575 |
+
background-color: transparent !important;
|
576 |
}
|
577 |
+
|
578 |
+
#wc-stripe-card {
|
579 |
+
position: absolute !important;
|
580 |
+
top: 50%;
|
581 |
+
right: 8px;
|
582 |
+
transform: translatey(-50%);
|
583 |
+
width: 23px;
|
584 |
+
height: 15px;
|
585 |
+
padding: 0px;
|
586 |
+
border: none;
|
587 |
}
|
588 |
+
|
589 |
+
#wc-stripe-card.active {
|
590 |
+
width: 32px;
|
591 |
+
height: 20px;
|
592 |
}
|
593 |
+
|
594 |
+
input[id=stripe-postal-code]:focus {
|
595 |
+
outline: none;
|
596 |
+
background: transparent;
|
597 |
+
border: none;
|
598 |
+
box-shadow: none;
|
599 |
}
|
600 |
+
|
601 |
+
div.postalCode:focus {
|
602 |
+
outline: none;
|
603 |
+
border: none;
|
604 |
}
|
605 |
+
|
606 |
+
li[class*="payment_method_stripe"] .select2-container .select2-selection--single {
|
607 |
+
height: 42px;
|
608 |
+
padding: 0 5px;
|
609 |
}
|
610 |
+
|
611 |
+
li[class*="payment_method_stripe"] .select2-container--default .select2-selection--single .select2-selection__arrow {
|
612 |
+
height: 42px;
|
613 |
}
|
614 |
+
|
615 |
+
.blockUI.blockMsg {
|
616 |
+
font-size: 20px;
|
617 |
+
white-space: nowrap;
|
618 |
}
|
619 |
+
|
620 |
+
#wc-stripe-payment-request-container.disabled {
|
621 |
+
opactity: 0.45;
|
622 |
}
|
623 |
+
|
624 |
+
.wc-stripe-paymentRequest-icons-container img {
|
625 |
+
float: none;
|
626 |
}
|
627 |
+
|
628 |
+
.select2-container .select2-selection--single .wc-stripe-select2-container.wc-stripe-ach:before {
|
629 |
+
display: none;
|
630 |
}
|
631 |
+
|
632 |
ul.wc_stripe_cart_payment_methods li.wc-stripe-payment-method button,
|
633 |
ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_] button,
|
634 |
+
ul.wc_stripe_checkout_banner_gateways li button {
|
635 |
+
margin: 0;
|
636 |
}
|
637 |
+
|
638 |
+
ul.payment_methods li[class*=payment_method] {
|
639 |
+
margin: 0;
|
640 |
+
padding: 10px 0;
|
641 |
}
|
642 |
+
|
643 |
+
ul.payment_methods li[class*=payment_method] input[name=payment_method] {
|
644 |
+
margin: 0 10px 0 5px;
|
645 |
+
float: none;
|
646 |
}
|
647 |
+
|
648 |
+
ul.payment_methods li[class*=payment_method] > input[name=payment_method] + label {
|
649 |
+
padding-top: 0;
|
650 |
+
padding-right: 0;
|
651 |
+
padding-bottom: 0;
|
652 |
}
|
653 |
+
|
654 |
+
ul.payment_methods {
|
655 |
+
list-style: none;
|
656 |
}
|
657 |
+
|
658 |
+
ul.payment_methods li[class*=payment_method_stripe_] .wc-stripe_cc-new-method-container label:before {
|
659 |
+
display: none;
|
660 |
}
|
661 |
+
|
662 |
+
.wc-stripe_cc-container .wc-stripe-save-source label.checkbox {
|
663 |
+
padding: 0 !important;
|
664 |
+
margin: 0px;
|
665 |
}
|
666 |
+
|
667 |
+
.wc-stripe_cc-container .wc-stripe-save-source .save-source-label {
|
668 |
+
padding: 0;
|
669 |
+
margin-bottom: 5px;
|
670 |
}
|
671 |
+
|
672 |
+
div[id*=wc_stripe_local_payment_stripe_].StripeElement {
|
673 |
+
border: 1px solid #eee;
|
674 |
border-radius: 4px;
|
675 |
}
|
676 |
+
|
677 |
+
.qrcode-message {
|
678 |
+
margin: 10px 0 0 0;
|
679 |
}
|
680 |
|
681 |
+
#wc_stripe_local_payment_stripe_sepa,
|
682 |
+
#wc_stripe_local_payment_stripe_becs {
|
683 |
+
padding: 10px 12px;
|
684 |
+
box-shadow: 0 1px 3px 0 #e6ebf1;
|
685 |
}
|
686 |
+
|
687 |
+
.wc-stripe-local-desc.stripe_sepa,
|
688 |
+
.wc-stripe-local-desc.stripe_becs {
|
689 |
+
margin: 10px 0;
|
690 |
}
|
691 |
+
|
692 |
+
.wc-stripe-clear {
|
693 |
+
clear: both;
|
694 |
+
height: 0;
|
695 |
+
visibility: hidden;
|
696 |
}
|
697 |
+
|
698 |
+
.wc-stripe-gateway-desc p {
|
699 |
+
margin: 0;
|
700 |
}
|
701 |
+
|
702 |
div.payment_method_stripe_cc,
|
703 |
div.payment_method_stripe_sepa,
|
704 |
div.payment_method_stripe_ideal,
|
706 |
#wc_stripe_local_payment_stripe_klarna,
|
707 |
li[class*=payment_method_stripe_] div.wc-stripe_googlepay-container.has_tokens,
|
708 |
li[class*=payment_method_stripe_] div.wc-stripe_applepay-container.has_tokens,
|
709 |
+
li[class*=payment_method_stripe_] div.wc-stripe_payment_request-container.has_tokens {
|
710 |
+
margin-top: 10px;
|
711 |
}
|
712 |
+
|
713 |
+
.wc-stripe-gateway-desc {
|
714 |
+
margin-top: 10px;
|
715 |
}
|
716 |
+
|
717 |
+
#wc-stripe-card-element.StripeElement--webkit-autofill {
|
718 |
+
background-color: transparent !important;
|
719 |
}
|
720 |
+
|
721 |
+
#wc_stripe_local_payment_stripe_klarna .stripe-klarna-categories {
|
722 |
+
list-style: none;
|
723 |
+
margin: 0;
|
724 |
+
padding: 10px;
|
725 |
+
}
|
726 |
+
|
727 |
+
li.payment_method_stripe_klarna,
|
728 |
+
li.payment_method_stripe_alipay,
|
729 |
+
li.payment_method_stripe_bancontact,
|
730 |
+
li.payment_method_stripe_becs,
|
731 |
+
li.payment_method_stripe_eps,
|
732 |
+
li.payment_method_stripe_fpx,
|
733 |
+
li.payment_method_stripe_giropay,
|
734 |
+
li.payment_method_stripe_ideal,
|
735 |
+
li.payment_method_stripe_multibanco,
|
736 |
+
li.payment_method_stripe_p24,
|
737 |
+
li.payment_method_stripe_sepa,
|
738 |
+
li.payment_method_stripe_sofort,
|
739 |
+
li.payment_method_stripe_wechat {
|
740 |
+
display: none;
|
741 |
}
|
assets/js/frontend/local-payment.js
CHANGED
@@ -20,6 +20,8 @@
|
|
20 |
if ($(document.body).is('.woocommerce-order-pay')) {
|
21 |
$('#order_review').on('submit', this.process_order_pay.bind(this));
|
22 |
}
|
|
|
|
|
23 |
}
|
24 |
|
25 |
LocalPayment.prototype = $.extend({}, wc_stripe.BaseGateway.prototype, wc_stripe.CheckoutGateway.prototype);
|
@@ -31,6 +33,14 @@
|
|
31 |
|
32 |
LocalPayment.prototype.elementType = null;
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
/**
|
35 |
* [createSource description]
|
36 |
* @return {[type]} [description]
|
@@ -43,7 +53,7 @@
|
|
43 |
} else {
|
44 |
this.payment_token_received = true;
|
45 |
$(this.token_selector).val(result.source.id);
|
46 |
-
|
47 |
}
|
48 |
resolve();
|
49 |
}.bind(this);
|
@@ -135,6 +145,7 @@
|
|
135 |
|
136 |
LocalPayment.prototype.updated_checkout = function() {
|
137 |
this.mount_button()
|
|
|
138 |
}
|
139 |
|
140 |
LocalPayment.prototype.mount_button = function() {
|
@@ -204,6 +215,23 @@
|
|
204 |
return true;
|
205 |
}
|
206 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
/*********** iDEAL ***********/
|
208 |
function IDEAL(params) {
|
209 |
this.elementType = 'idealBank';
|
@@ -237,6 +265,13 @@
|
|
237 |
window.addEventListener('hashchange', this.hashChange.bind(this));
|
238 |
}
|
239 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
Klarna.prototype.category_change = function(e) {
|
241 |
var $el = $(e.currentTarget);
|
242 |
if ($el.is(':checked')) {
|
@@ -246,29 +281,23 @@
|
|
246 |
}
|
247 |
}
|
248 |
|
249 |
-
Klarna.prototype.
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
}.bind(this));
|
264 |
-
this.payment_categories = source.klarna.payment_method_categories.split(",");
|
265 |
-
this.render_ui(true);
|
266 |
-
this.show_place_order();
|
267 |
-
}
|
268 |
-
}
|
269 |
}
|
270 |
|
271 |
Klarna.prototype.render_ui = function(trigger_change) {
|
|
|
272 |
if (this.payment_categories.length > 0) {
|
273 |
$('#wc_stripe_local_payment_stripe_klarna').show();
|
274 |
for (var i = 0; i < this.payment_categories.length; i++) {
|
@@ -281,7 +310,13 @@
|
|
281 |
payment_method_category: this.payment_categories[i], //source.klarna.payment_method_categories
|
282 |
instance_id: 'klarna-instance-' + this.payment_categories[i]
|
283 |
}, function(response) {
|
284 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
285 |
}.bind(this));
|
286 |
} catch (e) {
|
287 |
window.alert(e);
|
@@ -305,7 +340,7 @@
|
|
305 |
if (res.approved) {
|
306 |
this.block();
|
307 |
this.payment_token_received = true;
|
308 |
-
window.location = this.
|
309 |
} else {
|
310 |
if (res.error) {
|
311 |
this.submit_error(res.error);
|
@@ -316,8 +351,8 @@
|
|
316 |
}
|
317 |
}.bind(this));
|
318 |
} else {
|
319 |
-
// let checkout process so we can get back
|
320 |
-
|
321 |
}
|
322 |
}
|
323 |
}
|
@@ -334,6 +369,7 @@
|
|
334 |
if (this.payment_categories) {
|
335 |
this.render_ui(false);
|
336 |
}
|
|
|
337 |
}
|
338 |
|
339 |
WeChat.prototype.updated_checkout = function() {
|
@@ -372,6 +408,12 @@
|
|
372 |
}
|
373 |
}
|
374 |
|
|
|
|
|
|
|
|
|
|
|
|
|
375 |
IDEAL.prototype = $.extend({}, LocalPayment.prototype, IDEAL.prototype);
|
376 |
|
377 |
Sepa.prototype = $.extend({}, LocalPayment.prototype, Sepa.prototype);
|
@@ -382,6 +424,8 @@
|
|
382 |
|
383 |
WeChat.prototype = $.extend({}, LocalPayment.prototype, WeChat.prototype);
|
384 |
|
|
|
|
|
385 |
/**
|
386 |
* Local payment types that require JS integration
|
387 |
* @type {Object}
|
@@ -391,7 +435,8 @@
|
|
391 |
'sepa_debit': Sepa,
|
392 |
'klarna': Klarna,
|
393 |
'fpx': FPX,
|
394 |
-
'wechat': WeChat
|
|
|
395 |
}
|
396 |
|
397 |
for (var i in wc_stripe_local_payment_params.gateways) {
|
20 |
if ($(document.body).is('.woocommerce-order-pay')) {
|
21 |
$('#order_review').on('submit', this.process_order_pay.bind(this));
|
22 |
}
|
23 |
+
|
24 |
+
this.maybe_hide_gateway();
|
25 |
}
|
26 |
|
27 |
LocalPayment.prototype = $.extend({}, wc_stripe.BaseGateway.prototype, wc_stripe.CheckoutGateway.prototype);
|
33 |
|
34 |
LocalPayment.prototype.elementType = null;
|
35 |
|
36 |
+
LocalPayment.prototype.maybe_hide_gateway = function() {
|
37 |
+
if (!$('#wc_stripe_local_payment_' + this.gateway_id).data('active')) {
|
38 |
+
$(this.container).hide();
|
39 |
+
} else {
|
40 |
+
$(this.container).show();
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
/**
|
45 |
* [createSource description]
|
46 |
* @return {[type]} [description]
|
53 |
} else {
|
54 |
this.payment_token_received = true;
|
55 |
$(this.token_selector).val(result.source.id);
|
56 |
+
this.get_form().submit();
|
57 |
}
|
58 |
resolve();
|
59 |
}.bind(this);
|
145 |
|
146 |
LocalPayment.prototype.updated_checkout = function() {
|
147 |
this.mount_button()
|
148 |
+
this.maybe_hide_gateway();
|
149 |
}
|
150 |
|
151 |
LocalPayment.prototype.mount_button = function() {
|
215 |
return true;
|
216 |
}
|
217 |
|
218 |
+
LocalPayment.prototype.delete_order_source = function() {
|
219 |
+
return new Promise(function(resolve, reject) {
|
220 |
+
$.ajax({
|
221 |
+
url: this.params.routes.delete_source,
|
222 |
+
method: 'DELETE',
|
223 |
+
dataType: 'json',
|
224 |
+
beforeSend: function(xhr) {
|
225 |
+
xhr.setRequestHeader('X-WP-Nonce', this.params.rest_nonce);
|
226 |
+
}.bind(this)
|
227 |
+
}).done(function(response) {
|
228 |
+
resolve(response);
|
229 |
+
}.bind(this)).fail(function() {
|
230 |
+
reject(response);
|
231 |
+
}.bind(this))
|
232 |
+
}.bind(this))
|
233 |
+
}
|
234 |
+
|
235 |
/*********** iDEAL ***********/
|
236 |
function IDEAL(params) {
|
237 |
this.elementType = 'idealBank';
|
265 |
window.addEventListener('hashchange', this.hashChange.bind(this));
|
266 |
}
|
267 |
|
268 |
+
function BECS(params) {
|
269 |
+
this.elementType = 'auBankAccount';
|
270 |
+
this.confirmation_method = 'confirmAuBecsDebitPayment';
|
271 |
+
LocalPayment.call(this, params);
|
272 |
+
window.addEventListener('hashchange', this.hashChange.bind(this));
|
273 |
+
}
|
274 |
+
|
275 |
Klarna.prototype.category_change = function(e) {
|
276 |
var $el = $(e.currentTarget);
|
277 |
if ($el.is(':checked')) {
|
281 |
}
|
282 |
}
|
283 |
|
284 |
+
Klarna.prototype.processConfirmation = function(source) {
|
285 |
+
var $form = $(this.token_selector).closest('form');
|
286 |
+
$form.unblock().removeClass('processing');
|
287 |
+
// get the source
|
288 |
+
this.source = source;
|
289 |
+
window.Klarna.Payments.init({
|
290 |
+
client_token: source.klarna.client_token
|
291 |
+
}, function(response) {
|
292 |
+
|
293 |
+
}.bind(this));
|
294 |
+
this.payment_categories = source.klarna.payment_method_categories.split(",");
|
295 |
+
this.render_ui(true);
|
296 |
+
this.show_place_order();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
297 |
}
|
298 |
|
299 |
Klarna.prototype.render_ui = function(trigger_change) {
|
300 |
+
this.show_form_false = 0;
|
301 |
if (this.payment_categories.length > 0) {
|
302 |
$('#wc_stripe_local_payment_stripe_klarna').show();
|
303 |
for (var i = 0; i < this.payment_categories.length; i++) {
|
310 |
payment_method_category: this.payment_categories[i], //source.klarna.payment_method_categories
|
311 |
instance_id: 'klarna-instance-' + this.payment_categories[i]
|
312 |
}, function(response) {
|
313 |
+
if (!response.show_form) {
|
314 |
+
this.show_form_false++;
|
315 |
+
if (this.show_form_false == this.payment_categories.length) {
|
316 |
+
this.delete_order_source();
|
317 |
+
this.payment_categories = null;
|
318 |
+
}
|
319 |
+
}
|
320 |
}.bind(this));
|
321 |
} catch (e) {
|
322 |
window.alert(e);
|
340 |
if (res.approved) {
|
341 |
this.block();
|
342 |
this.payment_token_received = true;
|
343 |
+
window.location = this.source.redirect;
|
344 |
} else {
|
345 |
if (res.error) {
|
346 |
this.submit_error(res.error);
|
351 |
}
|
352 |
}.bind(this));
|
353 |
} else {
|
354 |
+
// let checkout process so we can get back a source object
|
355 |
+
this.get_form().submit();
|
356 |
}
|
357 |
}
|
358 |
}
|
369 |
if (this.payment_categories) {
|
370 |
this.render_ui(false);
|
371 |
}
|
372 |
+
LocalPayment.prototype.updated_checkout.apply(this, arguments);
|
373 |
}
|
374 |
|
375 |
WeChat.prototype.updated_checkout = function() {
|
408 |
}
|
409 |
}
|
410 |
|
411 |
+
BECS.prototype.get_confirmation_args = function(obj) {
|
412 |
+
var args = LocalPayment.prototype.get_confirmation_args.apply(this, arguments);
|
413 |
+
args.payment_method.billing_details.email = $('#billing_email').val();
|
414 |
+
return args;
|
415 |
+
}
|
416 |
+
|
417 |
IDEAL.prototype = $.extend({}, LocalPayment.prototype, IDEAL.prototype);
|
418 |
|
419 |
Sepa.prototype = $.extend({}, LocalPayment.prototype, Sepa.prototype);
|
424 |
|
425 |
WeChat.prototype = $.extend({}, LocalPayment.prototype, WeChat.prototype);
|
426 |
|
427 |
+
BECS.prototype = $.extend({}, LocalPayment.prototype, BECS.prototype);
|
428 |
+
|
429 |
/**
|
430 |
* Local payment types that require JS integration
|
431 |
* @type {Object}
|
435 |
'sepa_debit': Sepa,
|
436 |
'klarna': Klarna,
|
437 |
'fpx': FPX,
|
438 |
+
'wechat': WeChat,
|
439 |
+
'au_becs_debit': BECS
|
440 |
}
|
441 |
|
442 |
for (var i in wc_stripe_local_payment_params.gateways) {
|
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.1.
|
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: 2020-07-
|
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"
|
@@ -30,7 +30,7 @@ msgstr ""
|
|
30 |
msgid "Payment Plugins, support@paymentplugins.com"
|
31 |
msgstr ""
|
32 |
|
33 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:
|
34 |
#: includes/admin/meta-boxes/views/html-product-data.php:14
|
35 |
#: includes/gateways/settings/ach-settings-v2.php:9
|
36 |
#: includes/gateways/settings/ach-settings.php:9
|
@@ -41,11 +41,11 @@ msgstr ""
|
|
41 |
msgid "Enabled"
|
42 |
msgstr ""
|
43 |
|
44 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:
|
45 |
msgid "If enabled, your site can accept %s payments through Stripe."
|
46 |
msgstr ""
|
47 |
|
48 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:
|
49 |
#: includes/gateways/settings/ach-settings-v2.php:64
|
50 |
#: includes/gateways/settings/ach-settings.php:73
|
51 |
#: includes/gateways/settings/applepay-settings.php:20
|
@@ -55,7 +55,7 @@ msgstr ""
|
|
55 |
msgid "General Settings"
|
56 |
msgstr ""
|
57 |
|
58 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:
|
59 |
#: includes/admin/meta-boxes/views/html-charge-data-subview.php:47
|
60 |
#: includes/gateways/settings/ach-settings-v2.php:68
|
61 |
#: includes/gateways/settings/ach-settings.php:77
|
@@ -66,7 +66,7 @@ msgstr ""
|
|
66 |
msgid "Title"
|
67 |
msgstr ""
|
68 |
|
69 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:
|
70 |
#: includes/gateways/settings/ach-settings-v2.php:74
|
71 |
#: includes/gateways/settings/ach-settings.php:83
|
72 |
#: includes/gateways/settings/applepay-settings.php:30
|
@@ -76,7 +76,7 @@ msgstr ""
|
|
76 |
msgid "Description"
|
77 |
msgstr ""
|
78 |
|
79 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:
|
80 |
#: includes/gateways/settings/ach-settings-v2.php:77
|
81 |
#: includes/gateways/settings/ach-settings.php:86
|
82 |
#: includes/gateways/settings/applepay-settings.php:33
|
@@ -86,40 +86,19 @@ msgstr ""
|
|
86 |
msgid "Leave blank if you don't want a description to show for the gateway."
|
87 |
msgstr ""
|
88 |
|
89 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:
|
90 |
msgid "Order %s"
|
91 |
msgstr ""
|
92 |
|
93 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:
|
94 |
msgid "Gateway will appear when store currency is <strong>%s</strong>"
|
95 |
msgstr ""
|
96 |
|
97 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:
|
98 |
msgid " & billing country is <strong>%s</strong>"
|
99 |
msgstr ""
|
100 |
|
101 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
102 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-ach.php:115
|
103 |
-
msgid "Error processing payment. Reason: %s"
|
104 |
-
msgstr ""
|
105 |
-
|
106 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:352
|
107 |
-
msgid "Charge %1$s is pending. Payment Method: %2$s. Payment will be completed once charge.succeeded webhook received from Stripe."
|
108 |
-
msgstr ""
|
109 |
-
|
110 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:360
|
111 |
-
msgid "Order %1$s successful in Stripe. Charge: %2$s. Payment Method: %3$s"
|
112 |
-
msgstr ""
|
113 |
-
|
114 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:360
|
115 |
-
msgid "charge"
|
116 |
-
msgstr ""
|
117 |
-
|
118 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:360
|
119 |
-
msgid "authorization"
|
120 |
-
msgstr ""
|
121 |
-
|
122 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:404
|
123 |
#: includes/controllers/class-wc-stripe-controller-cart.php:128
|
124 |
#: includes/controllers/class-wc-stripe-controller-cart.php:187
|
125 |
#: includes/controllers/class-wc-stripe-controller-googlepay.php:135
|
@@ -127,118 +106,139 @@ msgstr ""
|
|
127 |
msgid "Total"
|
128 |
msgstr ""
|
129 |
|
130 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
131 |
msgid "User must be logged in."
|
132 |
msgstr ""
|
133 |
|
134 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
135 |
msgid "Error saving your payment method. Reason: %s"
|
136 |
msgstr ""
|
137 |
|
138 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
139 |
msgid "Error saving payment method. Reason: %s"
|
140 |
msgstr ""
|
141 |
|
142 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
143 |
msgid "Order refunded in Stripe. Amount: %s"
|
144 |
msgstr ""
|
145 |
|
146 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
147 |
msgid "Order amount captured in Stripe. Amount: %s"
|
148 |
msgstr ""
|
149 |
|
150 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
151 |
msgid "Error capturing charge in Stripe. Reason: %s"
|
152 |
msgstr ""
|
153 |
|
154 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
155 |
msgid "Error voiding charge. Reason: %s"
|
156 |
msgstr ""
|
157 |
|
158 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
159 |
msgid "Charge voided in Stripe."
|
160 |
msgstr ""
|
161 |
|
162 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
163 |
msgid "n/a"
|
164 |
msgstr ""
|
165 |
|
166 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
167 |
#: includes/admin/meta-boxes/views/html-order-pay.php:42
|
168 |
msgid "New Card"
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
172 |
#: includes/admin/meta-boxes/views/html-order-pay.php:30
|
173 |
msgid "Saved Cards"
|
174 |
msgstr ""
|
175 |
|
176 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
177 |
msgid "Attemp to save payment method failed. Reason: %s"
|
178 |
msgstr ""
|
179 |
|
180 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
181 |
msgid "We were not able to save your payment method. To prevent billing issues with your subscription, please add a payment method to the subscription."
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
185 |
msgid "We were not able to save your payment method. Reason: %s"
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
189 |
msgid "Payment Method Token"
|
190 |
msgstr ""
|
191 |
|
192 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
193 |
msgid "Recurring payment for order failed. Reason: %s"
|
194 |
msgstr ""
|
195 |
|
196 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
197 |
msgid "Recurring payment captured in Stripe. Payment method: %s"
|
198 |
msgstr ""
|
199 |
|
200 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
201 |
msgid "Recurring payment authorized in Stripe. Payment method: %s"
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
205 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
206 |
msgid "Customer must manually complete payment for payment method %s"
|
207 |
msgstr ""
|
208 |
|
209 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
210 |
msgid "Error saving payment method for subscription. Reason: %s"
|
211 |
msgstr ""
|
212 |
|
213 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
214 |
-
#: includes/abstract/abstract-wc-stripe-payment.php:
|
215 |
msgid "Order %1$s from %2$s"
|
216 |
msgstr ""
|
217 |
|
218 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
219 |
msgid "Pre-order payment for order failed. Reason: %s"
|
220 |
msgstr ""
|
221 |
|
222 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
223 |
msgid "Pre-order payment captured in Stripe. Payment method: %s"
|
224 |
msgstr ""
|
225 |
|
226 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
227 |
msgid "Pre-order payment authorized in Stripe. Payment method: %s"
|
228 |
msgstr ""
|
229 |
|
230 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
231 |
msgid "Cannot process payment"
|
232 |
msgstr ""
|
233 |
|
234 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
235 |
msgid "Increase your conversion rate by offering %1$s on your Product and Cart pages, or at the top of the checkout page. <br/><strong>Note:</strong> you can control which products display %s by going to the product edit page."
|
236 |
msgstr ""
|
237 |
|
238 |
#: includes/abstract/abstract-wc-stripe-payment.php:104
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
msgid "Transaction Id cannot be empty."
|
240 |
msgstr ""
|
241 |
|
|
|
|
|
|
|
|
|
|
|
242 |
#: includes/abstract/abstract-wc-stripe-rest-controller.php:58
|
243 |
msgid "You do not have permissions to access this resource."
|
244 |
msgstr ""
|
@@ -638,7 +638,7 @@ msgstr ""
|
|
638 |
msgid "Your payment is being processed and your order status will be updated once the funds are received."
|
639 |
msgstr ""
|
640 |
|
641 |
-
#: includes/class-wc-stripe-frontend-scripts.php:
|
642 |
msgid "No matches found"
|
643 |
msgstr ""
|
644 |
|
@@ -650,7 +650,7 @@ msgstr ""
|
|
650 |
msgid "Payment authorization failed. Please select another payment method."
|
651 |
msgstr ""
|
652 |
|
653 |
-
#: includes/class-wc-stripe-redirect-handler.php:
|
654 |
msgid "Payment authorization failed."
|
655 |
msgstr ""
|
656 |
|
@@ -658,7 +658,7 @@ msgstr ""
|
|
658 |
msgid "%1$s is an invalid controller name."
|
659 |
msgstr ""
|
660 |
|
661 |
-
#: includes/class-wc-stripe-update.php:
|
662 |
msgid "Thank you for updating Stripe for WooCommerce to version %1$s."
|
663 |
msgstr ""
|
664 |
|
@@ -666,11 +666,11 @@ msgstr ""
|
|
666 |
msgid "Quantity must be greater than zero."
|
667 |
msgstr ""
|
668 |
|
669 |
-
#: includes/controllers/class-wc-stripe-controller-checkout.php:
|
670 |
msgid "Some required fields were missing. Please click %1$shere%2$s to complete your payment."
|
671 |
msgstr ""
|
672 |
|
673 |
-
#: includes/controllers/class-wc-stripe-controller-checkout.php:
|
674 |
msgid "Please review your order details then click Place Order."
|
675 |
msgstr ""
|
676 |
|
@@ -773,16 +773,22 @@ msgstr ""
|
|
773 |
msgid "You must set the API mode to live in order to enable the Plaid development environment."
|
774 |
msgstr ""
|
775 |
|
776 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-alipay.php:
|
777 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-alipay.php:
|
778 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-alipay.php:
|
779 |
msgid "Alipay"
|
780 |
msgstr ""
|
781 |
|
782 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-alipay.php:
|
783 |
msgid "Alipay gateway that integrates with your Stripe account."
|
784 |
msgstr ""
|
785 |
|
|
|
|
|
|
|
|
|
|
|
|
|
786 |
#: includes/gateways/class-wc-payment-gateway-stripe-applepay.php:22
|
787 |
#: includes/gateways/settings/applepay-settings.php:25
|
788 |
msgid "Apple Pay"
|
@@ -815,6 +821,25 @@ msgstr ""
|
|
815 |
msgid "Bancontact gateway that integrates with your Stripe account."
|
816 |
msgstr ""
|
817 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
818 |
#: includes/gateways/class-wc-payment-gateway-stripe-cc.php:19
|
819 |
#: includes/gateways/settings/cc-settings.php:22
|
820 |
msgid "Credit Cards"
|
@@ -880,16 +905,16 @@ msgid "Subscription"
|
|
880 |
msgstr ""
|
881 |
|
882 |
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:147
|
883 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:
|
884 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
885 |
#: includes/wc-stripe-functions.php:401
|
886 |
#: includes/wc-stripe-functions.php:457
|
887 |
msgid "Shipping"
|
888 |
msgstr ""
|
889 |
|
890 |
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:155
|
891 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:
|
892 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
893 |
#: includes/wc-stripe-functions.php:418
|
894 |
#: includes/wc-stripe-functions.php:465
|
895 |
msgid "Discount"
|
@@ -900,27 +925,27 @@ msgstr ""
|
|
900 |
msgid "Fees"
|
901 |
msgstr ""
|
902 |
|
903 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:
|
904 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
905 |
#: includes/wc-stripe-functions.php:426
|
906 |
msgid "Tax"
|
907 |
msgstr ""
|
908 |
|
909 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:
|
910 |
msgid "Waiting..."
|
911 |
msgstr ""
|
912 |
|
913 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:
|
914 |
msgid "loading shipping methods..."
|
915 |
msgstr ""
|
916 |
|
917 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-ideal.php:
|
918 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-ideal.php:
|
919 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-ideal.php:
|
920 |
msgid "iDEAL"
|
921 |
msgstr ""
|
922 |
|
923 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-ideal.php:
|
924 |
msgid "Ideal gateway that integrates with your Stripe account."
|
925 |
msgstr ""
|
926 |
|
@@ -934,35 +959,35 @@ msgstr ""
|
|
934 |
msgid "Klarna gateway that integrates with your Stripe account."
|
935 |
msgstr ""
|
936 |
|
937 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
938 |
msgid "Payment Categories"
|
939 |
msgstr ""
|
940 |
|
941 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
942 |
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."
|
943 |
msgstr ""
|
944 |
|
945 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
946 |
msgid "Fee"
|
947 |
msgstr ""
|
948 |
|
949 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
950 |
msgid "Pay Now"
|
951 |
msgstr ""
|
952 |
|
953 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
954 |
msgid "Pay Later"
|
955 |
msgstr ""
|
956 |
|
957 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
958 |
msgid "Pay Over Time"
|
959 |
msgstr ""
|
960 |
|
961 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
962 |
msgid "Click %1$shere%2$s for Klarna test payment methods."
|
963 |
msgstr ""
|
964 |
|
965 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
966 |
msgid "Your purchase is not approved."
|
967 |
msgstr ""
|
968 |
|
@@ -1599,226 +1624,226 @@ msgstr ""
|
|
1599 |
msgid "Kind Regards,"
|
1600 |
msgstr ""
|
1601 |
|
1602 |
-
#: includes/wc-stripe-functions.php:
|
1603 |
msgid "Bootstrap form"
|
1604 |
msgstr ""
|
1605 |
|
1606 |
-
#: includes/wc-stripe-functions.php:
|
1607 |
msgid "Simple form"
|
1608 |
msgstr ""
|
1609 |
|
1610 |
-
#: includes/wc-stripe-functions.php:
|
1611 |
msgid "Minimalist form"
|
1612 |
msgstr ""
|
1613 |
|
1614 |
-
#: includes/wc-stripe-functions.php:
|
1615 |
msgid "Inline Form"
|
1616 |
msgstr ""
|
1617 |
|
1618 |
-
#: includes/wc-stripe-functions.php:
|
1619 |
msgid "Rounded Form"
|
1620 |
msgstr ""
|
1621 |
|
1622 |
-
#: includes/wc-stripe-functions.php:
|
1623 |
msgid "There was an error processing your credit card."
|
1624 |
msgstr ""
|
1625 |
|
1626 |
-
#: includes/wc-stripe-functions.php:
|
1627 |
msgid "Your card number is incomplete."
|
1628 |
msgstr ""
|
1629 |
|
1630 |
-
#: includes/wc-stripe-functions.php:
|
1631 |
msgid "The card number is incorrect. Check the card's number or use a different card."
|
1632 |
msgstr ""
|
1633 |
|
1634 |
-
#: includes/wc-stripe-functions.php:
|
1635 |
msgid "The card's security code is incorrect. Check the card's security code or use a different card."
|
1636 |
msgstr ""
|
1637 |
|
1638 |
-
#: includes/wc-stripe-functions.php:
|
1639 |
msgid "The card's ZIP code is incorrect. Check the card's ZIP code or use a different card."
|
1640 |
msgstr ""
|
1641 |
|
1642 |
-
#: includes/wc-stripe-functions.php:
|
1643 |
-
#: includes/wc-stripe-functions.php:
|
1644 |
msgid "The card number is invalid. Check the card details or use a different card."
|
1645 |
msgstr ""
|
1646 |
|
1647 |
-
#: includes/wc-stripe-functions.php:
|
1648 |
msgid "This value provided to the field contains characters that are unsupported by the field."
|
1649 |
msgstr ""
|
1650 |
|
1651 |
-
#: includes/wc-stripe-functions.php:
|
1652 |
msgid "The card's security code is invalid. Check the card's security code or use a different card."
|
1653 |
msgstr ""
|
1654 |
|
1655 |
-
#: includes/wc-stripe-functions.php:
|
1656 |
msgid "The card's expiration month is incorrect. Check the expiration date or use a different card."
|
1657 |
msgstr ""
|
1658 |
|
1659 |
-
#: includes/wc-stripe-functions.php:
|
1660 |
msgid "The card's expiration year is incorrect. Check the expiration date or use a different card."
|
1661 |
msgstr ""
|
1662 |
|
1663 |
-
#: includes/wc-stripe-functions.php:
|
1664 |
msgid "The card's address is incorrect. Check the card's address or use a different card."
|
1665 |
msgstr ""
|
1666 |
|
1667 |
-
#: includes/wc-stripe-functions.php:
|
1668 |
msgid "The card has expired. Check the expiration date or use a different card."
|
1669 |
msgstr ""
|
1670 |
|
1671 |
-
#: includes/wc-stripe-functions.php:
|
1672 |
msgid "The card has been declined."
|
1673 |
msgstr ""
|
1674 |
|
1675 |
-
#: includes/wc-stripe-functions.php:
|
1676 |
msgid "Your card's expiration year is in the past."
|
1677 |
msgstr ""
|
1678 |
|
1679 |
-
#: includes/wc-stripe-functions.php:
|
1680 |
msgid "The bank account number provided is invalid (e.g., missing digits). Bank account information varies from country to country. We recommend creating validations in your entry forms based on the bank account formats we provide."
|
1681 |
msgstr ""
|
1682 |
|
1683 |
-
#: includes/wc-stripe-functions.php:
|
1684 |
msgid "The specified amount is greater than the maximum amount allowed. Use a lower amount and try again."
|
1685 |
msgstr ""
|
1686 |
|
1687 |
-
#: includes/wc-stripe-functions.php:
|
1688 |
msgid "The specified amount is less than the minimum amount allowed. Use a higher amount and try again."
|
1689 |
msgstr ""
|
1690 |
|
1691 |
-
#: includes/wc-stripe-functions.php:
|
1692 |
msgid "The payment requires authentication to proceed. If your customer is off session, notify your customer to return to your application and complete the payment. If you provided the error_on_requires_action parameter, then your customer should try another card that does not require authentication."
|
1693 |
msgstr ""
|
1694 |
|
1695 |
-
#: includes/wc-stripe-functions.php:
|
1696 |
msgid "The transfer or payout could not be completed because the associated account does not have a sufficient balance available. Create a new transfer or payout using an amount less than or equal to the account's available balance."
|
1697 |
msgstr ""
|
1698 |
|
1699 |
-
#: includes/wc-stripe-functions.php:
|
1700 |
msgid "The bank account provided can not be used to charge, either because it is not verified yet or it is not supported."
|
1701 |
msgstr ""
|
1702 |
|
1703 |
-
#: includes/wc-stripe-functions.php:
|
1704 |
msgid "The bank account provided already exists on the specified Customer object. If the bank account should also be attached to a different customer, include the correct customer ID when making the request again."
|
1705 |
msgstr ""
|
1706 |
|
1707 |
-
#: includes/wc-stripe-functions.php:
|
1708 |
msgid "The bank account provided cannot be used for payouts. A different bank account must be used."
|
1709 |
msgstr ""
|
1710 |
|
1711 |
-
#: includes/wc-stripe-functions.php:
|
1712 |
msgid "Your Connect platform is attempting to share an unverified bank account with a connected account."
|
1713 |
msgstr ""
|
1714 |
|
1715 |
-
#: includes/wc-stripe-functions.php:
|
1716 |
msgid "The bank account cannot be verified, either because the microdeposit amounts provided do not match the actual amounts, or because verification has failed too many times."
|
1717 |
msgstr ""
|
1718 |
|
1719 |
-
#: includes/wc-stripe-functions.php:
|
1720 |
msgid "This card has been declined too many times. You can try to charge this card again after 24 hours. We suggest reaching out to your customer to make sure they have entered all of their information correctly and that there are no issues with their card."
|
1721 |
msgstr ""
|
1722 |
|
1723 |
-
#: includes/wc-stripe-functions.php:
|
1724 |
msgid "The charge you're attempting to capture has already been captured. Update the request with an uncaptured charge ID."
|
1725 |
msgstr ""
|
1726 |
|
1727 |
-
#: includes/wc-stripe-functions.php:
|
1728 |
msgid "The charge you're attempting to refund has already been refunded. Update the request to use the ID of a charge that has not been refunded."
|
1729 |
msgstr ""
|
1730 |
|
1731 |
-
#: includes/wc-stripe-functions.php:
|
1732 |
msgid "The charge you're attempting to refund has been charged back. Check the disputes documentation to learn how to respond to the dispute."
|
1733 |
msgstr ""
|
1734 |
|
1735 |
-
#: includes/wc-stripe-functions.php:
|
1736 |
msgid "This charge would cause you to exceed your rolling-window processing limit for this source type. Please retry the charge later, or contact us to request a higher processing limit."
|
1737 |
msgstr ""
|
1738 |
|
1739 |
-
#: includes/wc-stripe-functions.php:
|
1740 |
msgid "The charge cannot be captured as the authorization has expired. Auth and capture charges must be captured within seven days."
|
1741 |
msgstr ""
|
1742 |
|
1743 |
-
#: includes/wc-stripe-functions.php:
|
1744 |
msgid "One or more provided parameters was not allowed for the given operation on the Charge. Check our API reference or the returned error message to see which values were not correct for that Charge."
|
1745 |
msgstr ""
|
1746 |
|
1747 |
-
#: includes/wc-stripe-functions.php:
|
1748 |
msgid "The email address is invalid (e.g., not properly formatted). Check that the email address is properly formatted and only includes allowed characters."
|
1749 |
msgstr ""
|
1750 |
|
1751 |
-
#: includes/wc-stripe-functions.php:
|
1752 |
msgid "The idempotency key provided is currently being used in another request. This occurs if your integration is making duplicate requests simultaneously."
|
1753 |
msgstr ""
|
1754 |
|
1755 |
-
#: includes/wc-stripe-functions.php:
|
1756 |
msgid "The specified amount is invalid. The charge amount must be a positive integer in the smallest currency unit, and not exceed the minimum or maximum amount."
|
1757 |
msgstr ""
|
1758 |
|
1759 |
-
#: includes/wc-stripe-functions.php:
|
1760 |
msgid "The source cannot be used because it is not in the correct state (e.g., a charge request is trying to use a source with a pending, failed, or consumed source). Check the status of the source you are attempting to use."
|
1761 |
msgstr ""
|
1762 |
|
1763 |
-
#: includes/wc-stripe-functions.php:
|
1764 |
msgid "Both a customer and source ID have been provided, but the source has not been saved to the customer. To create a charge for a customer with a specified source, you must first save the card details."
|
1765 |
msgstr ""
|
1766 |
|
1767 |
-
#: includes/wc-stripe-functions.php:
|
1768 |
msgid "The ZIP code provided was incorrect."
|
1769 |
msgstr ""
|
1770 |
|
1771 |
-
#: includes/wc-stripe-functions.php:
|
1772 |
msgid "An error occurred while processing the card. Try again later or with a different payment method."
|
1773 |
msgstr ""
|
1774 |
|
1775 |
-
#: includes/wc-stripe-functions.php:
|
1776 |
msgid "The card does not support this type of purchase."
|
1777 |
msgstr ""
|
1778 |
|
1779 |
-
#: includes/wc-stripe-functions.php:
|
1780 |
-
#: includes/wc-stripe-functions.php:1163
|
1781 |
#: includes/wc-stripe-functions.php:1165
|
|
|
1782 |
msgid "The card has been declined for an unknown reason."
|
1783 |
msgstr ""
|
1784 |
|
1785 |
-
#: includes/wc-stripe-functions.php:
|
1786 |
msgid "The customer has exceeded the balance or credit limit available on their card."
|
1787 |
msgstr ""
|
1788 |
|
1789 |
-
#: includes/wc-stripe-functions.php:
|
1790 |
msgid "The card does not support the specified currency."
|
1791 |
msgstr ""
|
1792 |
|
1793 |
-
#: includes/wc-stripe-functions.php:
|
1794 |
msgid "The payment has been declined as Stripe suspects it is fraudulent."
|
1795 |
msgstr ""
|
1796 |
|
1797 |
-
#: includes/wc-stripe-functions.php:
|
1798 |
msgid "The PIN entered is incorrect. "
|
1799 |
msgstr ""
|
1800 |
|
1801 |
-
#: includes/wc-stripe-functions.php:
|
1802 |
msgid "The card has insufficient funds to complete the purchase."
|
1803 |
msgstr ""
|
1804 |
|
1805 |
-
#: includes/wc-stripe-functions.php:
|
1806 |
msgid "Please select a payment method before proceeding."
|
1807 |
msgstr ""
|
1808 |
|
1809 |
-
#: includes/wc-stripe-functions.php:
|
1810 |
msgid "Please enter your IBAN before proceeding."
|
1811 |
msgstr ""
|
1812 |
|
1813 |
-
#: includes/wc-stripe-functions.php:
|
1814 |
msgid "Please select a bank before proceeding"
|
1815 |
msgstr ""
|
1816 |
|
1817 |
-
#: includes/wc-stripe-webhook-functions.php:
|
1818 |
msgid "Charge.succeeded webhook received. Payment has been completed."
|
1819 |
msgstr ""
|
1820 |
|
1821 |
-
#: includes/wc-stripe-webhook-functions.php:
|
1822 |
msgid "payment_intent.succeeded webhook received. Payment has been completed."
|
1823 |
msgstr ""
|
1824 |
|
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.1.7\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: 2020-07-17T22:57:40+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"
|
30 |
msgid "Payment Plugins, support@paymentplugins.com"
|
31 |
msgstr ""
|
32 |
|
33 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:109
|
34 |
#: includes/admin/meta-boxes/views/html-product-data.php:14
|
35 |
#: includes/gateways/settings/ach-settings-v2.php:9
|
36 |
#: includes/gateways/settings/ach-settings.php:9
|
41 |
msgid "Enabled"
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:114
|
45 |
msgid "If enabled, your site can accept %s payments through Stripe."
|
46 |
msgstr ""
|
47 |
|
48 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:118
|
49 |
#: includes/gateways/settings/ach-settings-v2.php:64
|
50 |
#: includes/gateways/settings/ach-settings.php:73
|
51 |
#: includes/gateways/settings/applepay-settings.php:20
|
55 |
msgid "General Settings"
|
56 |
msgstr ""
|
57 |
|
58 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:122
|
59 |
#: includes/admin/meta-boxes/views/html-charge-data-subview.php:47
|
60 |
#: includes/gateways/settings/ach-settings-v2.php:68
|
61 |
#: includes/gateways/settings/ach-settings.php:77
|
66 |
msgid "Title"
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:128
|
70 |
#: includes/gateways/settings/ach-settings-v2.php:74
|
71 |
#: includes/gateways/settings/ach-settings.php:83
|
72 |
#: includes/gateways/settings/applepay-settings.php:30
|
76 |
msgid "Description"
|
77 |
msgstr ""
|
78 |
|
79 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:131
|
80 |
#: includes/gateways/settings/ach-settings-v2.php:77
|
81 |
#: includes/gateways/settings/ach-settings.php:86
|
82 |
#: includes/gateways/settings/applepay-settings.php:33
|
86 |
msgid "Leave blank if you don't want a description to show for the gateway."
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:183
|
90 |
msgid "Order %s"
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:259
|
94 |
msgid "Gateway will appear when store currency is <strong>%s</strong>"
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:262
|
98 |
msgid " & billing country is <strong>%s</strong>"
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:390
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
#: includes/controllers/class-wc-stripe-controller-cart.php:128
|
103 |
#: includes/controllers/class-wc-stripe-controller-cart.php:187
|
104 |
#: includes/controllers/class-wc-stripe-controller-googlepay.php:135
|
106 |
msgid "Total"
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:449
|
110 |
msgid "User must be logged in."
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:461
|
114 |
msgid "Error saving your payment method. Reason: %s"
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:476
|
118 |
msgid "Error saving payment method. Reason: %s"
|
119 |
msgstr ""
|
120 |
|
121 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:495
|
122 |
msgid "Order refunded in Stripe. Amount: %s"
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:533
|
126 |
msgid "Order amount captured in Stripe. Amount: %s"
|
127 |
msgstr ""
|
128 |
|
129 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:543
|
130 |
msgid "Error capturing charge in Stripe. Reason: %s"
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:564
|
134 |
msgid "Error voiding charge. Reason: %s"
|
135 |
msgstr ""
|
136 |
|
137 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:566
|
138 |
msgid "Charge voided in Stripe."
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:736
|
142 |
msgid "n/a"
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:764
|
146 |
#: includes/admin/meta-boxes/views/html-order-pay.php:42
|
147 |
msgid "New Card"
|
148 |
msgstr ""
|
149 |
|
150 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:768
|
151 |
#: includes/admin/meta-boxes/views/html-order-pay.php:30
|
152 |
msgid "Saved Cards"
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:941
|
156 |
msgid "Attemp to save payment method failed. Reason: %s"
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:963
|
160 |
msgid "We were not able to save your payment method. To prevent billing issues with your subscription, please add a payment method to the subscription."
|
161 |
msgstr ""
|
162 |
|
163 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:965
|
164 |
msgid "We were not able to save your payment method. Reason: %s"
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:999
|
168 |
msgid "Payment Method Token"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1019
|
172 |
msgid "Recurring payment for order failed. Reason: %s"
|
173 |
msgstr ""
|
174 |
|
175 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1032
|
176 |
msgid "Recurring payment captured in Stripe. Payment method: %s"
|
177 |
msgstr ""
|
178 |
|
179 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1034
|
180 |
msgid "Recurring payment authorized in Stripe. Payment method: %s"
|
181 |
msgstr ""
|
182 |
|
183 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1037
|
184 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1294
|
185 |
msgid "Customer must manually complete payment for payment method %s"
|
186 |
msgstr ""
|
187 |
|
188 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1053
|
189 |
msgid "Error saving payment method for subscription. Reason: %s"
|
190 |
msgstr ""
|
191 |
|
192 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1112
|
193 |
+
#: includes/abstract/abstract-wc-stripe-payment.php:219
|
194 |
msgid "Order %1$s from %2$s"
|
195 |
msgstr ""
|
196 |
|
197 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1281
|
198 |
msgid "Pre-order payment for order failed. Reason: %s"
|
199 |
msgstr ""
|
200 |
|
201 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1289
|
202 |
msgid "Pre-order payment captured in Stripe. Payment method: %s"
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1291
|
206 |
msgid "Pre-order payment authorized in Stripe. Payment method: %s"
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1363
|
210 |
msgid "Cannot process payment"
|
211 |
msgstr ""
|
212 |
|
213 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1371
|
214 |
msgid "Increase your conversion rate by offering %1$s on your Product and Cart pages, or at the top of the checkout page. <br/><strong>Note:</strong> you can control which products display %s by going to the product edit page."
|
215 |
msgstr ""
|
216 |
|
217 |
#: includes/abstract/abstract-wc-stripe-payment.php:104
|
218 |
+
msgid "Charge %1$s is pending. Payment Method: %2$s. Payment will be completed once charge.succeeded webhook received from Stripe."
|
219 |
+
msgstr ""
|
220 |
+
|
221 |
+
#: includes/abstract/abstract-wc-stripe-payment.php:112
|
222 |
+
msgid "Order %1$s successful in Stripe. Charge: %2$s. Payment Method: %3$s"
|
223 |
+
msgstr ""
|
224 |
+
|
225 |
+
#: includes/abstract/abstract-wc-stripe-payment.php:112
|
226 |
+
msgid "charge"
|
227 |
+
msgstr ""
|
228 |
+
|
229 |
+
#: includes/abstract/abstract-wc-stripe-payment.php:112
|
230 |
+
msgid "authorization"
|
231 |
+
msgstr ""
|
232 |
+
|
233 |
+
#: includes/abstract/abstract-wc-stripe-payment.php:127
|
234 |
msgid "Transaction Id cannot be empty."
|
235 |
msgstr ""
|
236 |
|
237 |
+
#: includes/abstract/abstract-wc-stripe-payment.php:283
|
238 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-ach.php:115
|
239 |
+
msgid "Error processing payment. Reason: %s"
|
240 |
+
msgstr ""
|
241 |
+
|
242 |
#: includes/abstract/abstract-wc-stripe-rest-controller.php:58
|
243 |
msgid "You do not have permissions to access this resource."
|
244 |
msgstr ""
|
638 |
msgid "Your payment is being processed and your order status will be updated once the funds are received."
|
639 |
msgstr ""
|
640 |
|
641 |
+
#: includes/class-wc-stripe-frontend-scripts.php:65
|
642 |
msgid "No matches found"
|
643 |
msgstr ""
|
644 |
|
650 |
msgid "Payment authorization failed. Please select another payment method."
|
651 |
msgstr ""
|
652 |
|
653 |
+
#: includes/class-wc-stripe-redirect-handler.php:57
|
654 |
msgid "Payment authorization failed."
|
655 |
msgstr ""
|
656 |
|
658 |
msgid "%1$s is an invalid controller name."
|
659 |
msgstr ""
|
660 |
|
661 |
+
#: includes/class-wc-stripe-update.php:47
|
662 |
msgid "Thank you for updating Stripe for WooCommerce to version %1$s."
|
663 |
msgstr ""
|
664 |
|
666 |
msgid "Quantity must be greater than zero."
|
667 |
msgstr ""
|
668 |
|
669 |
+
#: includes/controllers/class-wc-stripe-controller-checkout.php:233
|
670 |
msgid "Some required fields were missing. Please click %1$shere%2$s to complete your payment."
|
671 |
msgstr ""
|
672 |
|
673 |
+
#: includes/controllers/class-wc-stripe-controller-checkout.php:282
|
674 |
msgid "Please review your order details then click Place Order."
|
675 |
msgstr ""
|
676 |
|
773 |
msgid "You must set the API mode to live in order to enable the Plaid development environment."
|
774 |
msgstr ""
|
775 |
|
776 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-alipay.php:22
|
777 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-alipay.php:25
|
778 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-alipay.php:28
|
779 |
msgid "Alipay"
|
780 |
msgstr ""
|
781 |
|
782 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-alipay.php:26
|
783 |
msgid "Alipay gateway that integrates with your Stripe account."
|
784 |
msgstr ""
|
785 |
|
786 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-alipay.php:59
|
787 |
+
msgid ""
|
788 |
+
"Gateway will appear when store currency is CNY, or currency matches merchant's \n"
|
789 |
+
"\t\t\t\t\tdefault Stripe currency. For merchants located in DK, NO, SE, & CH, currency must be EUR."
|
790 |
+
msgstr ""
|
791 |
+
|
792 |
#: includes/gateways/class-wc-payment-gateway-stripe-applepay.php:22
|
793 |
#: includes/gateways/settings/applepay-settings.php:25
|
794 |
msgid "Apple Pay"
|
821 |
msgid "Bancontact gateway that integrates with your Stripe account."
|
822 |
msgstr ""
|
823 |
|
824 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-becs.php:22
|
825 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-becs.php:23
|
826 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-becs.php:26
|
827 |
+
msgid "BECS"
|
828 |
+
msgstr ""
|
829 |
+
|
830 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-becs.php:24
|
831 |
+
msgid "BECS direct debit gateway that integrates with your Stripe account."
|
832 |
+
msgstr ""
|
833 |
+
|
834 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-becs.php:30
|
835 |
+
msgid ""
|
836 |
+
"By providing your bank account details and confirming this payment, you agree to this \n"
|
837 |
+
"\t\tDirect Debit Request and the %sDirect Debit Request service agreement%s, and authorise Stripe Payments Australia Pty Ltd ACN 160 180 343 Direct \n"
|
838 |
+
"\t\tDebit User ID number 507156 (“Stripe”) to debit your account through the Bulk Electronic Clearing System (BECS) on behalf of Stripe Press \n"
|
839 |
+
"\t\t(the \"Merchant\") for any amounts separately communicated to you by the Merchant. You certify that you are either an account holder or an \n"
|
840 |
+
"\t\tauthorised signatory on the account listed above."
|
841 |
+
msgstr ""
|
842 |
+
|
843 |
#: includes/gateways/class-wc-payment-gateway-stripe-cc.php:19
|
844 |
#: includes/gateways/settings/cc-settings.php:22
|
845 |
msgid "Credit Cards"
|
905 |
msgstr ""
|
906 |
|
907 |
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:147
|
908 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:210
|
909 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:189
|
910 |
#: includes/wc-stripe-functions.php:401
|
911 |
#: includes/wc-stripe-functions.php:457
|
912 |
msgid "Shipping"
|
913 |
msgstr ""
|
914 |
|
915 |
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:155
|
916 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:232
|
917 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:199
|
918 |
#: includes/wc-stripe-functions.php:418
|
919 |
#: includes/wc-stripe-functions.php:465
|
920 |
msgid "Discount"
|
925 |
msgid "Fees"
|
926 |
msgstr ""
|
927 |
|
928 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:246
|
929 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:221
|
930 |
#: includes/wc-stripe-functions.php:426
|
931 |
msgid "Tax"
|
932 |
msgstr ""
|
933 |
|
934 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:283
|
935 |
msgid "Waiting..."
|
936 |
msgstr ""
|
937 |
|
938 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:284
|
939 |
msgid "loading shipping methods..."
|
940 |
msgstr ""
|
941 |
|
942 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-ideal.php:25
|
943 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-ideal.php:26
|
944 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-ideal.php:29
|
945 |
msgid "iDEAL"
|
946 |
msgstr ""
|
947 |
|
948 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-ideal.php:27
|
949 |
msgid "Ideal gateway that integrates with your Stripe account."
|
950 |
msgstr ""
|
951 |
|
959 |
msgid "Klarna gateway that integrates with your Stripe account."
|
960 |
msgstr ""
|
961 |
|
962 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:86
|
963 |
msgid "Payment Categories"
|
964 |
msgstr ""
|
965 |
|
966 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:92
|
967 |
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."
|
968 |
msgstr ""
|
969 |
|
970 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:213
|
971 |
msgid "Fee"
|
972 |
msgstr ""
|
973 |
|
974 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:253
|
975 |
msgid "Pay Now"
|
976 |
msgstr ""
|
977 |
|
978 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:254
|
979 |
msgid "Pay Later"
|
980 |
msgstr ""
|
981 |
|
982 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:255
|
983 |
msgid "Pay Over Time"
|
984 |
msgstr ""
|
985 |
|
986 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:271
|
987 |
msgid "Click %1$shere%2$s for Klarna test payment methods."
|
988 |
msgstr ""
|
989 |
|
990 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:277
|
991 |
msgid "Your purchase is not approved."
|
992 |
msgstr ""
|
993 |
|
1624 |
msgid "Kind Regards,"
|
1625 |
msgstr ""
|
1626 |
|
1627 |
+
#: includes/wc-stripe-functions.php:810
|
1628 |
msgid "Bootstrap form"
|
1629 |
msgstr ""
|
1630 |
|
1631 |
+
#: includes/wc-stripe-functions.php:836
|
1632 |
msgid "Simple form"
|
1633 |
msgstr ""
|
1634 |
|
1635 |
+
#: includes/wc-stripe-functions.php:859
|
1636 |
msgid "Minimalist form"
|
1637 |
msgstr ""
|
1638 |
|
1639 |
+
#: includes/wc-stripe-functions.php:885
|
1640 |
msgid "Inline Form"
|
1641 |
msgstr ""
|
1642 |
|
1643 |
+
#: includes/wc-stripe-functions.php:907
|
1644 |
msgid "Rounded Form"
|
1645 |
msgstr ""
|
1646 |
|
1647 |
+
#: includes/wc-stripe-functions.php:1122
|
1648 |
msgid "There was an error processing your credit card."
|
1649 |
msgstr ""
|
1650 |
|
1651 |
+
#: includes/wc-stripe-functions.php:1123
|
1652 |
msgid "Your card number is incomplete."
|
1653 |
msgstr ""
|
1654 |
|
1655 |
+
#: includes/wc-stripe-functions.php:1124
|
1656 |
msgid "The card number is incorrect. Check the card's number or use a different card."
|
1657 |
msgstr ""
|
1658 |
|
1659 |
+
#: includes/wc-stripe-functions.php:1125
|
1660 |
msgid "The card's security code is incorrect. Check the card's security code or use a different card."
|
1661 |
msgstr ""
|
1662 |
|
1663 |
+
#: includes/wc-stripe-functions.php:1126
|
1664 |
msgid "The card's ZIP code is incorrect. Check the card's ZIP code or use a different card."
|
1665 |
msgstr ""
|
1666 |
|
1667 |
+
#: includes/wc-stripe-functions.php:1127
|
1668 |
+
#: includes/wc-stripe-functions.php:1132
|
1669 |
msgid "The card number is invalid. Check the card details or use a different card."
|
1670 |
msgstr ""
|
1671 |
|
1672 |
+
#: includes/wc-stripe-functions.php:1128
|
1673 |
msgid "This value provided to the field contains characters that are unsupported by the field."
|
1674 |
msgstr ""
|
1675 |
|
1676 |
+
#: includes/wc-stripe-functions.php:1129
|
1677 |
msgid "The card's security code is invalid. Check the card's security code or use a different card."
|
1678 |
msgstr ""
|
1679 |
|
1680 |
+
#: includes/wc-stripe-functions.php:1130
|
1681 |
msgid "The card's expiration month is incorrect. Check the expiration date or use a different card."
|
1682 |
msgstr ""
|
1683 |
|
1684 |
+
#: includes/wc-stripe-functions.php:1131
|
1685 |
msgid "The card's expiration year is incorrect. Check the expiration date or use a different card."
|
1686 |
msgstr ""
|
1687 |
|
1688 |
+
#: includes/wc-stripe-functions.php:1133
|
1689 |
msgid "The card's address is incorrect. Check the card's address or use a different card."
|
1690 |
msgstr ""
|
1691 |
|
1692 |
+
#: includes/wc-stripe-functions.php:1134
|
1693 |
msgid "The card has expired. Check the expiration date or use a different card."
|
1694 |
msgstr ""
|
1695 |
|
1696 |
+
#: includes/wc-stripe-functions.php:1135
|
1697 |
msgid "The card has been declined."
|
1698 |
msgstr ""
|
1699 |
|
1700 |
+
#: includes/wc-stripe-functions.php:1136
|
1701 |
msgid "Your card's expiration year is in the past."
|
1702 |
msgstr ""
|
1703 |
|
1704 |
+
#: includes/wc-stripe-functions.php:1137
|
1705 |
msgid "The bank account number provided is invalid (e.g., missing digits). Bank account information varies from country to country. We recommend creating validations in your entry forms based on the bank account formats we provide."
|
1706 |
msgstr ""
|
1707 |
|
1708 |
+
#: includes/wc-stripe-functions.php:1138
|
1709 |
msgid "The specified amount is greater than the maximum amount allowed. Use a lower amount and try again."
|
1710 |
msgstr ""
|
1711 |
|
1712 |
+
#: includes/wc-stripe-functions.php:1139
|
1713 |
msgid "The specified amount is less than the minimum amount allowed. Use a higher amount and try again."
|
1714 |
msgstr ""
|
1715 |
|
1716 |
+
#: includes/wc-stripe-functions.php:1140
|
1717 |
msgid "The payment requires authentication to proceed. If your customer is off session, notify your customer to return to your application and complete the payment. If you provided the error_on_requires_action parameter, then your customer should try another card that does not require authentication."
|
1718 |
msgstr ""
|
1719 |
|
1720 |
+
#: includes/wc-stripe-functions.php:1141
|
1721 |
msgid "The transfer or payout could not be completed because the associated account does not have a sufficient balance available. Create a new transfer or payout using an amount less than or equal to the account's available balance."
|
1722 |
msgstr ""
|
1723 |
|
1724 |
+
#: includes/wc-stripe-functions.php:1142
|
1725 |
msgid "The bank account provided can not be used to charge, either because it is not verified yet or it is not supported."
|
1726 |
msgstr ""
|
1727 |
|
1728 |
+
#: includes/wc-stripe-functions.php:1143
|
1729 |
msgid "The bank account provided already exists on the specified Customer object. If the bank account should also be attached to a different customer, include the correct customer ID when making the request again."
|
1730 |
msgstr ""
|
1731 |
|
1732 |
+
#: includes/wc-stripe-functions.php:1144
|
1733 |
msgid "The bank account provided cannot be used for payouts. A different bank account must be used."
|
1734 |
msgstr ""
|
1735 |
|
1736 |
+
#: includes/wc-stripe-functions.php:1145
|
1737 |
msgid "Your Connect platform is attempting to share an unverified bank account with a connected account."
|
1738 |
msgstr ""
|
1739 |
|
1740 |
+
#: includes/wc-stripe-functions.php:1146
|
1741 |
msgid "The bank account cannot be verified, either because the microdeposit amounts provided do not match the actual amounts, or because verification has failed too many times."
|
1742 |
msgstr ""
|
1743 |
|
1744 |
+
#: includes/wc-stripe-functions.php:1147
|
1745 |
msgid "This card has been declined too many times. You can try to charge this card again after 24 hours. We suggest reaching out to your customer to make sure they have entered all of their information correctly and that there are no issues with their card."
|
1746 |
msgstr ""
|
1747 |
|
1748 |
+
#: includes/wc-stripe-functions.php:1148
|
1749 |
msgid "The charge you're attempting to capture has already been captured. Update the request with an uncaptured charge ID."
|
1750 |
msgstr ""
|
1751 |
|
1752 |
+
#: includes/wc-stripe-functions.php:1149
|
1753 |
msgid "The charge you're attempting to refund has already been refunded. Update the request to use the ID of a charge that has not been refunded."
|
1754 |
msgstr ""
|
1755 |
|
1756 |
+
#: includes/wc-stripe-functions.php:1150
|
1757 |
msgid "The charge you're attempting to refund has been charged back. Check the disputes documentation to learn how to respond to the dispute."
|
1758 |
msgstr ""
|
1759 |
|
1760 |
+
#: includes/wc-stripe-functions.php:1151
|
1761 |
msgid "This charge would cause you to exceed your rolling-window processing limit for this source type. Please retry the charge later, or contact us to request a higher processing limit."
|
1762 |
msgstr ""
|
1763 |
|
1764 |
+
#: includes/wc-stripe-functions.php:1152
|
1765 |
msgid "The charge cannot be captured as the authorization has expired. Auth and capture charges must be captured within seven days."
|
1766 |
msgstr ""
|
1767 |
|
1768 |
+
#: includes/wc-stripe-functions.php:1153
|
1769 |
msgid "One or more provided parameters was not allowed for the given operation on the Charge. Check our API reference or the returned error message to see which values were not correct for that Charge."
|
1770 |
msgstr ""
|
1771 |
|
1772 |
+
#: includes/wc-stripe-functions.php:1154
|
1773 |
msgid "The email address is invalid (e.g., not properly formatted). Check that the email address is properly formatted and only includes allowed characters."
|
1774 |
msgstr ""
|
1775 |
|
1776 |
+
#: includes/wc-stripe-functions.php:1155
|
1777 |
msgid "The idempotency key provided is currently being used in another request. This occurs if your integration is making duplicate requests simultaneously."
|
1778 |
msgstr ""
|
1779 |
|
1780 |
+
#: includes/wc-stripe-functions.php:1156
|
1781 |
msgid "The specified amount is invalid. The charge amount must be a positive integer in the smallest currency unit, and not exceed the minimum or maximum amount."
|
1782 |
msgstr ""
|
1783 |
|
1784 |
+
#: includes/wc-stripe-functions.php:1157
|
1785 |
msgid "The source cannot be used because it is not in the correct state (e.g., a charge request is trying to use a source with a pending, failed, or consumed source). Check the status of the source you are attempting to use."
|
1786 |
msgstr ""
|
1787 |
|
1788 |
+
#: includes/wc-stripe-functions.php:1158
|
1789 |
msgid "Both a customer and source ID have been provided, but the source has not been saved to the customer. To create a charge for a customer with a specified source, you must first save the card details."
|
1790 |
msgstr ""
|
1791 |
|
1792 |
+
#: includes/wc-stripe-functions.php:1159
|
1793 |
msgid "The ZIP code provided was incorrect."
|
1794 |
msgstr ""
|
1795 |
|
1796 |
+
#: includes/wc-stripe-functions.php:1160
|
1797 |
msgid "An error occurred while processing the card. Try again later or with a different payment method."
|
1798 |
msgstr ""
|
1799 |
|
1800 |
+
#: includes/wc-stripe-functions.php:1161
|
1801 |
msgid "The card does not support this type of purchase."
|
1802 |
msgstr ""
|
1803 |
|
1804 |
+
#: includes/wc-stripe-functions.php:1162
|
|
|
1805 |
#: includes/wc-stripe-functions.php:1165
|
1806 |
+
#: includes/wc-stripe-functions.php:1167
|
1807 |
msgid "The card has been declined for an unknown reason."
|
1808 |
msgstr ""
|
1809 |
|
1810 |
+
#: includes/wc-stripe-functions.php:1163
|
1811 |
msgid "The customer has exceeded the balance or credit limit available on their card."
|
1812 |
msgstr ""
|
1813 |
|
1814 |
+
#: includes/wc-stripe-functions.php:1164
|
1815 |
msgid "The card does not support the specified currency."
|
1816 |
msgstr ""
|
1817 |
|
1818 |
+
#: includes/wc-stripe-functions.php:1166
|
1819 |
msgid "The payment has been declined as Stripe suspects it is fraudulent."
|
1820 |
msgstr ""
|
1821 |
|
1822 |
+
#: includes/wc-stripe-functions.php:1168
|
1823 |
msgid "The PIN entered is incorrect. "
|
1824 |
msgstr ""
|
1825 |
|
1826 |
+
#: includes/wc-stripe-functions.php:1169
|
1827 |
msgid "The card has insufficient funds to complete the purchase."
|
1828 |
msgstr ""
|
1829 |
|
1830 |
+
#: includes/wc-stripe-functions.php:1170
|
1831 |
msgid "Please select a payment method before proceeding."
|
1832 |
msgstr ""
|
1833 |
|
1834 |
+
#: includes/wc-stripe-functions.php:1171
|
1835 |
msgid "Please enter your IBAN before proceeding."
|
1836 |
msgstr ""
|
1837 |
|
1838 |
+
#: includes/wc-stripe-functions.php:1172
|
1839 |
msgid "Please select a bank before proceeding"
|
1840 |
msgstr ""
|
1841 |
|
1842 |
+
#: includes/wc-stripe-webhook-functions.php:92
|
1843 |
msgid "Charge.succeeded webhook received. Payment has been completed."
|
1844 |
msgstr ""
|
1845 |
|
1846 |
+
#: includes/wc-stripe-webhook-functions.php:132
|
1847 |
msgid "payment_intent.succeeded webhook received. Payment has been completed."
|
1848 |
msgstr ""
|
1849 |
|
includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php
CHANGED
@@ -48,6 +48,13 @@ abstract class WC_Payment_Gateway_Stripe_Local_Payment extends WC_Payment_Gatewa
|
|
48 |
add_action( 'woocommerce_update_options_checkout_stripe_local_gateways_' . $this->id, array( $this, 'process_admin_options' ) );
|
49 |
}
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
/**
|
52 |
*
|
53 |
* @param \Stripe\Source $source
|
@@ -83,6 +90,7 @@ abstract class WC_Payment_Gateway_Stripe_Local_Payment extends WC_Payment_Gatewa
|
|
83 |
);
|
84 |
exit();
|
85 |
}
|
|
|
86 |
return $result;
|
87 |
}
|
88 |
|
@@ -139,7 +147,10 @@ abstract class WC_Payment_Gateway_Stripe_Local_Payment extends WC_Payment_Gatewa
|
|
139 |
wc_get_checkout_url()
|
140 |
),
|
141 |
'element_params' => $this->get_element_params(),
|
142 |
-
'routes' => array(
|
|
|
|
|
|
|
143 |
)
|
144 |
);
|
145 |
}
|
@@ -181,6 +192,7 @@ abstract class WC_Payment_Gateway_Stripe_Local_Payment extends WC_Payment_Gatewa
|
|
181 |
/**
|
182 |
*
|
183 |
* @param WC_Order $order
|
|
|
184 |
* @return string
|
185 |
*/
|
186 |
protected function get_local_payment_return_url( $order ) {
|
@@ -190,6 +202,7 @@ abstract class WC_Payment_Gateway_Stripe_Local_Payment extends WC_Payment_Gatewa
|
|
190 |
} else {
|
191 |
$url = wc_get_checkout_url();
|
192 |
}
|
|
|
193 |
return add_query_arg(
|
194 |
array(
|
195 |
'_payment_nonce' => wp_create_nonce( 'local-payment' ),
|
@@ -213,10 +226,14 @@ abstract class WC_Payment_Gateway_Stripe_Local_Payment extends WC_Payment_Gatewa
|
|
213 |
$billing_country = WC()->countries->get_base_country();
|
214 |
}
|
215 |
}
|
216 |
-
if (
|
217 |
-
return
|
218 |
} else {
|
219 |
-
|
|
|
|
|
|
|
|
|
220 |
}
|
221 |
}
|
222 |
|
@@ -227,6 +244,7 @@ abstract class WC_Payment_Gateway_Stripe_Local_Payment extends WC_Payment_Gatewa
|
|
227 |
*/
|
228 |
$token = parent::get_payment_token( $method_id, $method_details );
|
229 |
$token->set_gateway_title( $this->title );
|
|
|
230 |
return $token;
|
231 |
}
|
232 |
|
@@ -243,6 +261,7 @@ abstract class WC_Payment_Gateway_Stripe_Local_Payment extends WC_Payment_Gatewa
|
|
243 |
if ( $this->countries ) {
|
244 |
$desc .= sprintf( __( ' & billing country is <strong>%s</strong>', 'woo-stripe-payment' ), implode( ', ', $this->countries ) );
|
245 |
}
|
|
|
246 |
return $desc;
|
247 |
}
|
248 |
|
@@ -250,14 +269,15 @@ abstract class WC_Payment_Gateway_Stripe_Local_Payment extends WC_Payment_Gatewa
|
|
250 |
* Return a description of the payment method.
|
251 |
*/
|
252 |
public function get_local_payment_description() {
|
253 |
-
return apply_filters( 'wc_stripe_local_payment_description', $this->local_payment_description );
|
254 |
}
|
255 |
|
256 |
/**
|
257 |
*
|
258 |
-
* @since 3.1.3
|
259 |
* @param string $text
|
|
|
260 |
* @return string
|
|
|
261 |
*/
|
262 |
public function get_order_button_text( $text ) {
|
263 |
return apply_filters( 'wc_stripe_order_button_text', $text, $this );
|
48 |
add_action( 'woocommerce_update_options_checkout_stripe_local_gateways_' . $this->id, array( $this, 'process_admin_options' ) );
|
49 |
}
|
50 |
|
51 |
+
/**
|
52 |
+
* @param WC_Stripe_Frontend_Scripts $scripts
|
53 |
+
*/
|
54 |
+
public function enqueue_checkout_scripts( $scripts ) {
|
55 |
+
$scripts->enqueue_local_payment_scripts();
|
56 |
+
}
|
57 |
+
|
58 |
/**
|
59 |
*
|
60 |
* @param \Stripe\Source $source
|
90 |
);
|
91 |
exit();
|
92 |
}
|
93 |
+
|
94 |
return $result;
|
95 |
}
|
96 |
|
147 |
wc_get_checkout_url()
|
148 |
),
|
149 |
'element_params' => $this->get_element_params(),
|
150 |
+
'routes' => array(
|
151 |
+
'order_pay' => wc_stripe()->rest_api->checkout->rest_url( 'order-pay' ),
|
152 |
+
'delete_source' => wc_stripe()->rest_api->checkout->rest_url( 'source' )
|
153 |
+
)
|
154 |
)
|
155 |
);
|
156 |
}
|
192 |
/**
|
193 |
*
|
194 |
* @param WC_Order $order
|
195 |
+
*
|
196 |
* @return string
|
197 |
*/
|
198 |
protected function get_local_payment_return_url( $order ) {
|
202 |
} else {
|
203 |
$url = wc_get_checkout_url();
|
204 |
}
|
205 |
+
|
206 |
return add_query_arg(
|
207 |
array(
|
208 |
'_payment_nonce' => wp_create_nonce( 'local-payment' ),
|
226 |
$billing_country = WC()->countries->get_base_country();
|
227 |
}
|
228 |
}
|
229 |
+
if ( method_exists( $this, 'validate_local_payment_available' ) ) {
|
230 |
+
return $this->validate_local_payment_available( $currency, $billing_country );
|
231 |
} else {
|
232 |
+
if ( empty( $this->countries ) ) {
|
233 |
+
return in_array( $currency, $this->currencies );
|
234 |
+
} else {
|
235 |
+
return $billing_country && in_array( $currency, $this->currencies ) && in_array( $billing_country, $this->countries );
|
236 |
+
}
|
237 |
}
|
238 |
}
|
239 |
|
244 |
*/
|
245 |
$token = parent::get_payment_token( $method_id, $method_details );
|
246 |
$token->set_gateway_title( $this->title );
|
247 |
+
|
248 |
return $token;
|
249 |
}
|
250 |
|
261 |
if ( $this->countries ) {
|
262 |
$desc .= sprintf( __( ' & billing country is <strong>%s</strong>', 'woo-stripe-payment' ), implode( ', ', $this->countries ) );
|
263 |
}
|
264 |
+
|
265 |
return $desc;
|
266 |
}
|
267 |
|
269 |
* Return a description of the payment method.
|
270 |
*/
|
271 |
public function get_local_payment_description() {
|
272 |
+
return apply_filters( 'wc_stripe_local_payment_description', $this->local_payment_description, $this );
|
273 |
}
|
274 |
|
275 |
/**
|
276 |
*
|
|
|
277 |
* @param string $text
|
278 |
+
*
|
279 |
* @return string
|
280 |
+
* @since 3.1.3
|
281 |
*/
|
282 |
public function get_order_button_text( $text ) {
|
283 |
return apply_filters( 'wc_stripe_order_button_text', $text, $this );
|
includes/abstract/abstract-wc-payment-gateway-stripe.php
CHANGED
@@ -341,27 +341,13 @@ abstract class WC_Payment_Gateway_Stripe extends WC_Payment_Gateway {
|
|
341 |
|
342 |
if ( is_wp_error( $result ) ) {
|
343 |
wc_add_notice( $this->is_active( 'generic_error' ) ? $this->get_generic_error( $result ) : $result->get_error_message(), 'error' );
|
344 |
-
$order->update_status( 'failed', sprintf( __( 'Error processing payment. Reason: %s', 'woo-stripe-payment' ), $result->get_error_message() ) );
|
345 |
|
346 |
return $this->get_order_error();
|
347 |
}
|
348 |
|
349 |
if ( $result->complete_payment ) {
|
350 |
-
$this->
|
351 |
-
if ( 'pending' === $result->charge->status ) {
|
352 |
-
$order->update_status( apply_filters( 'wc_stripe_pending_charge_status', 'on-hold', $order, $this ), sprintf( __( 'Charge %1$s is pending. Payment Method: %2$s. Payment will be completed once charge.succeeded webhook received from Stripe.', 'woo-stripe-payment' ), $order->get_transaction_id(), $order->get_payment_method_title() ) );
|
353 |
-
} else {
|
354 |
-
if ( $result->charge->captured ) {
|
355 |
-
$order->payment_complete( $result->charge->id );
|
356 |
-
} else {
|
357 |
-
$order_status = $this->get_option( 'order_status' );
|
358 |
-
$order->update_status( apply_filters( 'wc_stripe_authorized_order_status', 'default' === $order_status ? 'on-hold' : $order_status, $order, $this ) );
|
359 |
-
}
|
360 |
-
$order->add_order_note( sprintf( __( 'Order %1$s successful in Stripe. Charge: %2$s. Payment Method: %3$s', 'woo-stripe-payment' ), $result->charge->captured ? __( 'charge', 'woo-stripe-payment' ) : __( 'authorization', 'woo-stripe-payment' ), $order->get_transaction_id(), $order->get_payment_method_title() ) );
|
361 |
-
}
|
362 |
-
|
363 |
$this->trigger_post_payment_processes( $order, $this );
|
364 |
-
|
365 |
WC()->cart->empty_cart();
|
366 |
|
367 |
return array(
|
341 |
|
342 |
if ( is_wp_error( $result ) ) {
|
343 |
wc_add_notice( $this->is_active( 'generic_error' ) ? $this->get_generic_error( $result ) : $result->get_error_message(), 'error' );
|
|
|
344 |
|
345 |
return $this->get_order_error();
|
346 |
}
|
347 |
|
348 |
if ( $result->complete_payment ) {
|
349 |
+
$this->payment_object->payment_complete( $order, $result->charge );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
350 |
$this->trigger_post_payment_processes( $order, $this );
|
|
|
351 |
WC()->cart->empty_cart();
|
352 |
|
353 |
return array(
|
includes/abstract/abstract-wc-stripe-payment.php
CHANGED
@@ -90,6 +90,29 @@ abstract class WC_Stripe_Payment {
|
|
90 |
*/
|
91 |
public abstract function can_void_order( $order );
|
92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
/**
|
94 |
*
|
95 |
* @param WC_Order $order
|
@@ -155,20 +178,34 @@ abstract class WC_Stripe_Payment {
|
|
155 |
public function add_order_metadata( &$args, $order ) {
|
156 |
$meta_data = array(
|
157 |
'gateway_id' => $this->payment_method->id,
|
158 |
-
'order_id' => $order->
|
159 |
'user_id' => $order->get_user_id(),
|
160 |
'customer_id' => wc_stripe_get_customer_id( $order->get_user_id() ),
|
161 |
'ip_address' => $order->get_customer_ip_address(),
|
162 |
'user_agent' => isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : 'unavailable',
|
163 |
'partner' => 'PaymentPlugins',
|
164 |
-
'created' => time()
|
165 |
);
|
|
|
|
|
|
|
|
|
|
|
166 |
foreach ( $order->get_items( 'line_item' ) as $item ) {
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
}
|
173 |
$args['metadata'] = apply_filters( 'wc_stripe_order_meta_data', $meta_data, $order );
|
174 |
}
|
@@ -235,4 +272,22 @@ abstract class WC_Stripe_Payment {
|
|
235 |
return sprintf( '%s %s', $order->get_shipping_first_name(), $order->get_shipping_last_name() );
|
236 |
}
|
237 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
}
|
90 |
*/
|
91 |
public abstract function can_void_order( $order );
|
92 |
|
93 |
+
/**
|
94 |
+
* Perform post payment processes
|
95 |
+
*
|
96 |
+
* @param WC_Order $order
|
97 |
+
* @param \Stripe\Charge $charge
|
98 |
+
*
|
99 |
+
* @since 3.1.7
|
100 |
+
*/
|
101 |
+
public function payment_complete( $order, $charge ) {
|
102 |
+
$this->payment_method->save_order_meta( $order, $charge );
|
103 |
+
if ( 'pending' === $charge->status ) {
|
104 |
+
$order->update_status( apply_filters( 'wc_stripe_pending_charge_status', 'on-hold', $order, $this->payment_method ), sprintf( __( 'Charge %1$s is pending. Payment Method: %2$s. Payment will be completed once charge.succeeded webhook received from Stripe.', 'woo-stripe-payment' ), $order->get_transaction_id(), $order->get_payment_method_title() ) );
|
105 |
+
} else {
|
106 |
+
if ( $charge->captured ) {
|
107 |
+
$order->payment_complete( $charge->id );
|
108 |
+
} else {
|
109 |
+
$order_status = $this->payment_method->get_option( 'order_status' );
|
110 |
+
$order->update_status( apply_filters( 'wc_stripe_authorized_order_status', 'default' === $order_status ? 'on-hold' : $order_status, $order, $this->payment_method ) );
|
111 |
+
}
|
112 |
+
$order->add_order_note( sprintf( __( 'Order %1$s successful in Stripe. Charge: %2$s. Payment Method: %3$s', 'woo-stripe-payment' ), $charge->captured ? __( 'charge', 'woo-stripe-payment' ) : __( 'authorization', 'woo-stripe-payment' ), $order->get_transaction_id(), $order->get_payment_method_title() ) );
|
113 |
+
}
|
114 |
+
}
|
115 |
+
|
116 |
/**
|
117 |
*
|
118 |
* @param WC_Order $order
|
178 |
public function add_order_metadata( &$args, $order ) {
|
179 |
$meta_data = array(
|
180 |
'gateway_id' => $this->payment_method->id,
|
181 |
+
'order_id' => $order->get_id(),
|
182 |
'user_id' => $order->get_user_id(),
|
183 |
'customer_id' => wc_stripe_get_customer_id( $order->get_user_id() ),
|
184 |
'ip_address' => $order->get_customer_ip_address(),
|
185 |
'user_agent' => isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : 'unavailable',
|
186 |
'partner' => 'PaymentPlugins',
|
187 |
+
'created' => time()
|
188 |
);
|
189 |
+
if ( has_action( 'woocommerce_order_number' ) ) {
|
190 |
+
$meta_data['order_number'] = $order->get_order_number();
|
191 |
+
}
|
192 |
+
$length = count( $meta_data );
|
193 |
+
|
194 |
foreach ( $order->get_items( 'line_item' ) as $item ) {
|
195 |
+
// Stripe limits metadata keys to 50 entries.
|
196 |
+
if ( $length < 50 ) {
|
197 |
+
/**
|
198 |
+
*
|
199 |
+
* @var WC_Order_Item_Product $item
|
200 |
+
*/
|
201 |
+
$key = 'product_' . $item->get_product_id();
|
202 |
+
$value = sprintf( '%s x %s', $item->get_name(), $item->get_quantity() );
|
203 |
+
// Stripe limits key names to 40 chars and values to 500 chars
|
204 |
+
if ( strlen( $key ) <= 40 && strlen( $value ) <= 500 ) {
|
205 |
+
$meta_data[ $key ] = $value;
|
206 |
+
$length ++;
|
207 |
+
}
|
208 |
+
}
|
209 |
}
|
210 |
$args['metadata'] = apply_filters( 'wc_stripe_order_meta_data', $meta_data, $order );
|
211 |
}
|
272 |
return sprintf( '%s %s', $order->get_shipping_first_name(), $order->get_shipping_last_name() );
|
273 |
}
|
274 |
}
|
275 |
+
|
276 |
+
/**
|
277 |
+
* @param WC_Order $order
|
278 |
+
* @param WP_Error $error
|
279 |
+
*
|
280 |
+
* @since 3.1.7
|
281 |
+
*/
|
282 |
+
public function add_payment_failed_note( $order, $error ) {
|
283 |
+
$note = sprintf( __( 'Error processing payment. Reason: %s', 'woo-stripe-payment' ), $error->get_error_message() );
|
284 |
+
|
285 |
+
/**
|
286 |
+
* @param string $note
|
287 |
+
* @param WP_Error $error
|
288 |
+
*
|
289 |
+
*/
|
290 |
+
$note = apply_filters( 'wc_stripe_order_failed_note', $note, $error, $this->payment_method );
|
291 |
+
$order->update_status( 'failed', $note );
|
292 |
+
}
|
293 |
}
|
includes/admin/settings/class-wc-stripe-account-settings.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) || exit();
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Class WC_Stripe_Account_Settings
|
6 |
+
*
|
7 |
+
* @author Payment Plugins
|
8 |
+
* @since 3.1.7
|
9 |
+
* @package Stripe/Classes
|
10 |
+
*/
|
11 |
+
class WC_Stripe_Account_Settings extends WC_Stripe_Settings_API {
|
12 |
+
|
13 |
+
public function __construct() {
|
14 |
+
$this->id = 'stripe_account';
|
15 |
+
parent::__construct();
|
16 |
+
}
|
17 |
+
|
18 |
+
public function hooks() {
|
19 |
+
add_action( 'wc_stripe_connect_settings', array( $this, 'connect_settings' ) );
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* @param object $response
|
24 |
+
*/
|
25 |
+
public function connect_settings( $response ) {
|
26 |
+
$this->save_account_settings( $response->live->stripe_user_id );
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* @param string $account_id
|
31 |
+
*/
|
32 |
+
public function save_account_settings( $account_id ) {
|
33 |
+
// fetch the account and store the account data.
|
34 |
+
$account = WC_Stripe_Gateway::load( 'live' )->accounts->retrieve( $account_id );
|
35 |
+
if ( ! is_wp_error( $account ) ) {
|
36 |
+
$this->settings['account_id'] = $account->id;
|
37 |
+
$this->settings['country'] = strtoupper( $account->country );
|
38 |
+
$this->settings['default_currency'] = strtoupper( $account->default_currency );
|
39 |
+
update_option( $this->get_option_key(), $this->settings, 'yes' );
|
40 |
+
}
|
41 |
+
}
|
42 |
+
}
|
includes/admin/settings/class-wc-stripe-api-settings.php
CHANGED
@@ -173,16 +173,19 @@ class WC_Stripe_API_Settings extends WC_Stripe_Settings_API {
|
|
173 |
}
|
174 |
|
175 |
public function get_connect_url() {
|
176 |
-
return
|
177 |
-
'
|
178 |
-
wc_stripe()->client_id,
|
179 |
-
|
|
|
|
|
|
|
180 |
wp_json_encode(
|
181 |
array(
|
182 |
'redirect' => add_query_arg( '_stripe_connect_nonce', wp_create_nonce( 'stripe-connect' ), admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=stripe_api' ) )
|
183 |
)
|
184 |
)
|
185 |
)
|
186 |
-
);
|
187 |
}
|
188 |
}
|
173 |
}
|
174 |
|
175 |
public function get_connect_url() {
|
176 |
+
return \Stripe\OAuth::authorizeUrl( array(
|
177 |
+
'response_type' => 'code',
|
178 |
+
'client_id' => wc_stripe()->client_id,
|
179 |
+
'stripe_landing' => 'login',
|
180 |
+
'always_prompt' => 'true',
|
181 |
+
'scope' => 'read_write',
|
182 |
+
'state' => base64_encode(
|
183 |
wp_json_encode(
|
184 |
array(
|
185 |
'redirect' => add_query_arg( '_stripe_connect_nonce', wp_create_nonce( 'stripe-connect' ), admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=stripe_api' ) )
|
186 |
)
|
187 |
)
|
188 |
)
|
189 |
+
) );
|
190 |
}
|
191 |
}
|
includes/class-stripe.php
CHANGED
@@ -25,7 +25,7 @@ class WC_Stripe_Manager {
|
|
25 |
*
|
26 |
* @var string
|
27 |
*/
|
28 |
-
public $version = '3.1.
|
29 |
|
30 |
/**
|
31 |
*
|
@@ -33,6 +33,12 @@ class WC_Stripe_Manager {
|
|
33 |
*/
|
34 |
public $api_settings;
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
/**
|
37 |
*
|
38 |
* @var WC_Stripe_Rest_API
|
@@ -170,6 +176,7 @@ class WC_Stripe_Manager {
|
|
170 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/gateways/class-wc-payment-gateway-stripe-bancontact.php';
|
171 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/gateways/class-wc-payment-gateway-stripe-fpx.php';
|
172 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/gateways/class-wc-payment-gateway-stripe-alipay.php';
|
|
|
173 |
|
174 |
// tokens
|
175 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/abstract/abstract-wc-payment-token-stripe.php';
|
@@ -193,6 +200,7 @@ class WC_Stripe_Manager {
|
|
193 |
// settings
|
194 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/abstract/abstract-wc-stripe-settings.php';
|
195 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/admin/settings/class-wc-stripe-api-settings.php';
|
|
|
196 |
|
197 |
if ( is_admin() ) {
|
198 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/admin/class-wc-stripe-admin-notices.php';
|
@@ -218,6 +226,7 @@ class WC_Stripe_Manager {
|
|
218 |
'WC_Payment_Gateway_Stripe_Sofort',
|
219 |
'WC_Payment_Gateway_Stripe_WeChat',
|
220 |
'WC_Payment_Gateway_Stripe_FPX',
|
|
|
221 |
'WC_Payment_Gateway_Stripe_Alipay',
|
222 |
)
|
223 |
);
|
@@ -227,7 +236,10 @@ class WC_Stripe_Manager {
|
|
227 |
$this->scripts = new WC_Stripe_Frontend_Scripts();
|
228 |
|
229 |
// allow other plugins to provide their own settings classes.
|
230 |
-
$setting_classes = apply_filters( 'wc_stripe_setting_classes', array(
|
|
|
|
|
|
|
231 |
foreach ( $setting_classes as $id => $class_name ) {
|
232 |
if ( class_exists( $class_name ) ) {
|
233 |
$this->{$id} = new $class_name();
|
25 |
*
|
26 |
* @var string
|
27 |
*/
|
28 |
+
public $version = '3.1.7';
|
29 |
|
30 |
/**
|
31 |
*
|
33 |
*/
|
34 |
public $api_settings;
|
35 |
|
36 |
+
/**
|
37 |
+
* @var WC_Stripe_Settings_API
|
38 |
+
* @since 3.1.7
|
39 |
+
*/
|
40 |
+
public $account_settings;
|
41 |
+
|
42 |
/**
|
43 |
*
|
44 |
* @var WC_Stripe_Rest_API
|
176 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/gateways/class-wc-payment-gateway-stripe-bancontact.php';
|
177 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/gateways/class-wc-payment-gateway-stripe-fpx.php';
|
178 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/gateways/class-wc-payment-gateway-stripe-alipay.php';
|
179 |
+
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/gateways/class-wc-payment-gateway-stripe-becs.php';
|
180 |
|
181 |
// tokens
|
182 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/abstract/abstract-wc-payment-token-stripe.php';
|
200 |
// settings
|
201 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/abstract/abstract-wc-stripe-settings.php';
|
202 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/admin/settings/class-wc-stripe-api-settings.php';
|
203 |
+
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/admin/settings/class-wc-stripe-account-settings.php';
|
204 |
|
205 |
if ( is_admin() ) {
|
206 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/admin/class-wc-stripe-admin-notices.php';
|
226 |
'WC_Payment_Gateway_Stripe_Sofort',
|
227 |
'WC_Payment_Gateway_Stripe_WeChat',
|
228 |
'WC_Payment_Gateway_Stripe_FPX',
|
229 |
+
'WC_Payment_Gateway_Stripe_BECS',
|
230 |
'WC_Payment_Gateway_Stripe_Alipay',
|
231 |
)
|
232 |
);
|
236 |
$this->scripts = new WC_Stripe_Frontend_Scripts();
|
237 |
|
238 |
// allow other plugins to provide their own settings classes.
|
239 |
+
$setting_classes = apply_filters( 'wc_stripe_setting_classes', array(
|
240 |
+
'api_settings' => 'WC_Stripe_API_Settings',
|
241 |
+
'account_settings' => 'WC_Stripe_Account_Settings'
|
242 |
+
) );
|
243 |
foreach ( $setting_classes as $id => $class_name ) {
|
244 |
if ( class_exists( $class_name ) ) {
|
245 |
$this->{$id} = new $class_name();
|
includes/class-wc-stripe-field-manager.php
CHANGED
@@ -14,6 +14,8 @@ class WC_Stripe_Field_Manager {
|
|
14 |
|
15 |
private static $_product_button_position;
|
16 |
|
|
|
|
|
17 |
public static function init() {
|
18 |
add_action( 'woocommerce_checkout_before_customer_details', array( __CLASS__, 'output_banner_checkout_fields' ) );
|
19 |
add_action( 'woocommerce_before_add_to_cart_form', array( __CLASS__, 'before_add_to_cart' ) );
|
14 |
|
15 |
private static $_product_button_position;
|
16 |
|
17 |
+
public static $_mini_cart_count = 0;
|
18 |
+
|
19 |
public static function init() {
|
20 |
add_action( 'woocommerce_checkout_before_customer_details', array( __CLASS__, 'output_banner_checkout_fields' ) );
|
21 |
add_action( 'woocommerce_before_add_to_cart_form', array( __CLASS__, 'before_add_to_cart' ) );
|
includes/class-wc-stripe-frontend-scripts.php
CHANGED
@@ -25,8 +25,6 @@ class WC_Stripe_Frontend_Scripts {
|
|
25 |
|
26 |
public function __construct() {
|
27 |
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
28 |
-
add_action( 'woocommerce_review_order_before_payment', array( $this, 'enqueue_checkout_scripts' ) );
|
29 |
-
add_action( 'woocommerce_pay_order_after_submit', array( $this, 'enqueue_checkout_scripts' ) );
|
30 |
}
|
31 |
|
32 |
/**
|
@@ -75,18 +73,24 @@ class WC_Stripe_Frontend_Scripts {
|
|
75 |
}
|
76 |
|
77 |
public function enqueue_checkout_scripts() {
|
78 |
-
$
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
}
|
91 |
}
|
92 |
|
25 |
|
26 |
public function __construct() {
|
27 |
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
|
|
|
|
28 |
}
|
29 |
|
30 |
/**
|
73 |
}
|
74 |
|
75 |
public function enqueue_checkout_scripts() {
|
76 |
+
$this->enqueue_local_payment_scripts();
|
77 |
+
}
|
78 |
+
|
79 |
+
public function enqueue_local_payment_scripts() {
|
80 |
+
if ( ! in_array( $this->get_handle( 'local-payment' ), $this->enqueued_scripts ) ) {
|
81 |
+
$data = wc_stripe_get_local_payment_params();
|
82 |
+
// only enqueue local payment script if there are local payment gateways that have been enabled.
|
83 |
+
if ( ! empty( $data['gateways'] ) ) {
|
84 |
+
$this->enqueue_script(
|
85 |
+
'local-payment',
|
86 |
+
$this->assets_url( 'js/frontend/local-payment.js' ),
|
87 |
+
array(
|
88 |
+
$this->get_handle( 'external' ),
|
89 |
+
$this->get_handle( 'wc-stripe' ),
|
90 |
+
)
|
91 |
+
);
|
92 |
+
$this->localize_script( 'local-payment', $data );
|
93 |
+
}
|
94 |
}
|
95 |
}
|
96 |
|
includes/class-wc-stripe-payment-charge-local.php
CHANGED
@@ -21,8 +21,7 @@ class WC_Stripe_Payment_Charge_Local extends WC_Stripe_Payment_Charge {
|
|
21 |
*/
|
22 |
if ( ! $this->payment_method->has_order_lock( $order ) ) {
|
23 |
try {
|
24 |
-
$source_id = $this->payment_method->get_new_source_token()
|
25 |
-
if ( ! empty( $source_id ) ) {
|
26 |
// source was created client side.
|
27 |
$source = $this->gateway->sources->mode( wc_stripe_order_mode( $order ) )->retrieve( $source_id );
|
28 |
|
@@ -57,6 +56,16 @@ class WC_Stripe_Payment_Charge_Local extends WC_Stripe_Payment_Charge {
|
|
57 |
|
58 |
$order->save();
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
return (object) array(
|
61 |
'complete_payment' => false,
|
62 |
'redirect' => $this->payment_method->get_source_redirect_url( $source, $order ),
|
21 |
*/
|
22 |
if ( ! $this->payment_method->has_order_lock( $order ) ) {
|
23 |
try {
|
24 |
+
if ( ( $source_id = $this->payment_method->get_new_source_token() ) ) {
|
|
|
25 |
// source was created client side.
|
26 |
$source = $this->gateway->sources->mode( wc_stripe_order_mode( $order ) )->retrieve( $source_id );
|
27 |
|
56 |
|
57 |
$order->save();
|
58 |
|
59 |
+
/**
|
60 |
+
* If source is chargeable, then proceed with processing it.
|
61 |
+
*/
|
62 |
+
if ( $source->status === 'chargeable' ) {
|
63 |
+
$this->payment_method->set_order_lock( $order );
|
64 |
+
$this->payment_method->set_new_source_token( $source->id );
|
65 |
+
|
66 |
+
return $this->process_payment( $order );
|
67 |
+
}
|
68 |
+
|
69 |
return (object) array(
|
70 |
'complete_payment' => false,
|
71 |
'redirect' => $this->payment_method->get_source_redirect_url( $source, $order ),
|
includes/class-wc-stripe-payment-charge.php
CHANGED
@@ -22,6 +22,8 @@ class WC_Stripe_Payment_Charge extends WC_Stripe_Payment {
|
|
22 |
if ( $this->payment_method->should_save_payment_method( $order ) ) {
|
23 |
$result = $this->payment_method->save_payment_method( $this->payment_method->get_new_source_token(), $order );
|
24 |
if ( is_wp_error( $result ) ) {
|
|
|
|
|
25 |
return $result;
|
26 |
}
|
27 |
}
|
@@ -33,6 +35,8 @@ class WC_Stripe_Payment_Charge extends WC_Stripe_Payment {
|
|
33 |
wc_stripe_log_info( 'Stripe charge: ' . print_r( $charge, true ) );
|
34 |
|
35 |
if ( is_wp_error( $charge ) ) {
|
|
|
|
|
36 |
return $charge;
|
37 |
}
|
38 |
|
22 |
if ( $this->payment_method->should_save_payment_method( $order ) ) {
|
23 |
$result = $this->payment_method->save_payment_method( $this->payment_method->get_new_source_token(), $order );
|
24 |
if ( is_wp_error( $result ) ) {
|
25 |
+
$this->add_payment_failed_note( $order, $result );
|
26 |
+
|
27 |
return $result;
|
28 |
}
|
29 |
}
|
35 |
wc_stripe_log_info( 'Stripe charge: ' . print_r( $charge, true ) );
|
36 |
|
37 |
if ( is_wp_error( $charge ) ) {
|
38 |
+
$this->add_payment_failed_note( $order, $charge );
|
39 |
+
|
40 |
return $charge;
|
41 |
}
|
42 |
|
includes/class-wc-stripe-payment-intent.php
CHANGED
@@ -32,6 +32,8 @@ class WC_Stripe_Payment_Intent extends WC_Stripe_Payment {
|
|
32 |
}
|
33 |
|
34 |
if ( is_wp_error( $intent ) ) {
|
|
|
|
|
35 |
return $intent;
|
36 |
}
|
37 |
|
@@ -47,6 +49,8 @@ class WC_Stripe_Payment_Intent extends WC_Stripe_Payment {
|
|
47 |
if ( $intent->status === 'requires_confirmation' ) {
|
48 |
$intent = $this->gateway->paymentIntents->confirm( $intent->id );
|
49 |
if ( is_wp_error( $intent ) ) {
|
|
|
|
|
50 |
return $intent;
|
51 |
}
|
52 |
}
|
32 |
}
|
33 |
|
34 |
if ( is_wp_error( $intent ) ) {
|
35 |
+
$this->add_payment_failed_note( $order, $intent );
|
36 |
+
|
37 |
return $intent;
|
38 |
}
|
39 |
|
49 |
if ( $intent->status === 'requires_confirmation' ) {
|
50 |
$intent = $this->gateway->paymentIntents->confirm( $intent->id );
|
51 |
if ( is_wp_error( $intent ) ) {
|
52 |
+
$this->add_payment_failed_note( $order, $intent );
|
53 |
+
|
54 |
return $intent;
|
55 |
}
|
56 |
}
|
includes/class-wc-stripe-redirect-handler.php
CHANGED
@@ -49,10 +49,12 @@ class WC_Stripe_Redirect_Handler {
|
|
49 |
|
50 |
if ( 'failed' === $result->status || 'requires_payment_method' === $result->status ) {
|
51 |
wc_add_notice( __( 'Payment authorization failed. Please select another payment method.', 'woo-stripe-payment' ), 'error' );
|
52 |
-
$order->update_status( 'failed', __( 'Payment authorization failed.', 'woo-stripe-payment' ) );
|
53 |
if ( $result instanceof \Stripe\PaymentIntent ) {
|
54 |
$order->update_meta_data( WC_Stripe_Constants::PAYMENT_INTENT, $result->jsonSerialize() );
|
|
|
|
|
55 |
}
|
|
|
56 |
|
57 |
return;
|
58 |
} elseif ( 'chargeable' === $result->status ) {
|
49 |
|
50 |
if ( 'failed' === $result->status || 'requires_payment_method' === $result->status ) {
|
51 |
wc_add_notice( __( 'Payment authorization failed. Please select another payment method.', 'woo-stripe-payment' ), 'error' );
|
|
|
52 |
if ( $result instanceof \Stripe\PaymentIntent ) {
|
53 |
$order->update_meta_data( WC_Stripe_Constants::PAYMENT_INTENT, $result->jsonSerialize() );
|
54 |
+
} else {
|
55 |
+
$order->delete_meta_data( WC_Stripe_Constants::SOURCE_ID );
|
56 |
}
|
57 |
+
$order->update_status( 'failed', __( 'Payment authorization failed.', 'woo-stripe-payment' ) );
|
58 |
|
59 |
return;
|
60 |
} elseif ( 'chargeable' === $result->status ) {
|
includes/class-wc-stripe-rest-api.php
CHANGED
@@ -40,6 +40,7 @@ class WC_Stripe_Rest_API {
|
|
40 |
if ( empty( $controller ) ) {
|
41 |
wc_doing_it_wrong( __FUNCTION__, sprintf( __( '%1$s is an invalid controller name.', 'woo-stripe-payment' ), $key ), wc_stripe()->version );
|
42 |
}
|
|
|
43 |
return $controller;
|
44 |
}
|
45 |
|
@@ -70,7 +71,7 @@ class WC_Stripe_Rest_API {
|
|
70 |
WC()->payment_gateways();
|
71 |
foreach ( $this->controllers as $key => $controller ) {
|
72 |
if ( is_callable( array( $controller, 'register_routes' ) ) ) {
|
73 |
-
$controller->{
|
74 |
}
|
75 |
}
|
76 |
}
|
@@ -87,6 +88,7 @@ class WC_Stripe_Rest_API {
|
|
87 |
'webhook' => 'WC_Stripe_Controller_Webhook',
|
88 |
'product_data' => 'WC_Stripe_Controller_Product_Data',
|
89 |
);
|
|
|
90 |
return apply_filters( 'wc_stripe_api_controllers', $controllers );
|
91 |
}
|
92 |
|
@@ -107,7 +109,9 @@ class WC_Stripe_Rest_API {
|
|
107 |
if ( ! empty( $_SERVER['REQUEST_URI'] ) && strpos( $_SERVER['REQUEST_URI'], wc_stripe()->rest_uri() ) !== false ) {
|
108 |
$bool = false;
|
109 |
}
|
|
|
110 |
return $bool;
|
111 |
}
|
112 |
}
|
|
|
113 |
WC_Stripe_Rest_API::init();
|
40 |
if ( empty( $controller ) ) {
|
41 |
wc_doing_it_wrong( __FUNCTION__, sprintf( __( '%1$s is an invalid controller name.', 'woo-stripe-payment' ), $key ), wc_stripe()->version );
|
42 |
}
|
43 |
+
|
44 |
return $controller;
|
45 |
}
|
46 |
|
71 |
WC()->payment_gateways();
|
72 |
foreach ( $this->controllers as $key => $controller ) {
|
73 |
if ( is_callable( array( $controller, 'register_routes' ) ) ) {
|
74 |
+
$controller->{'register_routes'}();
|
75 |
}
|
76 |
}
|
77 |
}
|
88 |
'webhook' => 'WC_Stripe_Controller_Webhook',
|
89 |
'product_data' => 'WC_Stripe_Controller_Product_Data',
|
90 |
);
|
91 |
+
|
92 |
return apply_filters( 'wc_stripe_api_controllers', $controllers );
|
93 |
}
|
94 |
|
109 |
if ( ! empty( $_SERVER['REQUEST_URI'] ) && strpos( $_SERVER['REQUEST_URI'], wc_stripe()->rest_uri() ) !== false ) {
|
110 |
$bool = false;
|
111 |
}
|
112 |
+
|
113 |
return $bool;
|
114 |
}
|
115 |
}
|
116 |
+
|
117 |
WC_Stripe_Rest_API::init();
|
includes/class-wc-stripe-update.php
CHANGED
@@ -13,7 +13,8 @@ class WC_Stripe_Update {
|
|
13 |
'3.0.7' => 'update-3.0.7.php',
|
14 |
'3.1.0' => 'update-3.1.0.php',
|
15 |
'3.1.1' => 'update-3.1.1.php',
|
16 |
-
'3.1.6' => 'update-3.1.6.php'
|
|
|
17 |
);
|
18 |
|
19 |
public static function init() {
|
13 |
'3.0.7' => 'update-3.0.7.php',
|
14 |
'3.1.0' => 'update-3.1.0.php',
|
15 |
'3.1.1' => 'update-3.1.1.php',
|
16 |
+
'3.1.6' => 'update-3.1.6.php',
|
17 |
+
'3.1.7' => 'update-3.1.7.php'
|
18 |
);
|
19 |
|
20 |
public static function init() {
|
includes/controllers/class-wc-stripe-controller-checkout.php
CHANGED
@@ -10,7 +10,6 @@ if ( ! class_exists( 'WC_Stripe_Rest_Controller' ) ) {
|
|
10 |
* @author PaymentPlugins
|
11 |
* @since 3.0.0
|
12 |
* @package Stripe/Controllers
|
13 |
-
*
|
14 |
*/
|
15 |
class WC_Stripe_Controller_Checkout extends WC_Stripe_Rest_Controller {
|
16 |
|
@@ -47,12 +46,22 @@ class WC_Stripe_Controller_Checkout extends WC_Stripe_Rest_Controller {
|
|
47 |
),
|
48 |
)
|
49 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
|
52 |
/**
|
53 |
* Process the WC Order
|
54 |
*
|
55 |
* @param WP_REST_Request $request
|
|
|
|
|
56 |
*/
|
57 |
public function process_checkout( $request ) {
|
58 |
wc_maybe_define_constant( 'DOING_AJAX', true );
|
@@ -99,13 +108,16 @@ class WC_Stripe_Controller_Checkout extends WC_Stripe_Rest_Controller {
|
|
99 |
if ( wc_notice_count( 'error' ) > 0 ) {
|
100 |
return $this->send_response( false );
|
101 |
}
|
|
|
102 |
return $this->send_response( true );
|
103 |
}
|
104 |
|
105 |
/**
|
106 |
*
|
107 |
-
* @since 3.1.8
|
108 |
* @param WP_REST_Request $request
|
|
|
|
|
|
|
109 |
*/
|
110 |
public function process_order_pay( $request ) {
|
111 |
global $wp;
|
@@ -126,6 +138,26 @@ class WC_Stripe_Controller_Checkout extends WC_Stripe_Rest_Controller {
|
|
126 |
}
|
127 |
}
|
128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
/**
|
130 |
*
|
131 |
* @param WP_REST_Request $request
|
@@ -163,11 +195,13 @@ class WC_Stripe_Controller_Checkout extends WC_Stripe_Rest_Controller {
|
|
163 |
'reload' => $reload,
|
164 |
);
|
165 |
unset( WC()->session->reload_checkout );
|
|
|
166 |
return rest_ensure_response( $data );
|
167 |
}
|
168 |
|
169 |
public function validate_payment_method( $payment_method ) {
|
170 |
$gateways = WC()->payment_gateways()->payment_gateways();
|
|
|
171 |
return isset( $gateways[ $payment_method ] ) ? true : new WP_Error( 'validation-error', 'Please choose a valid payment method.' );
|
172 |
}
|
173 |
|
10 |
* @author PaymentPlugins
|
11 |
* @since 3.0.0
|
12 |
* @package Stripe/Controllers
|
|
|
13 |
*/
|
14 |
class WC_Stripe_Controller_Checkout extends WC_Stripe_Rest_Controller {
|
15 |
|
46 |
),
|
47 |
)
|
48 |
);
|
49 |
+
register_rest_route(
|
50 |
+
$this->rest_uri(),
|
51 |
+
'source',
|
52 |
+
array(
|
53 |
+
'methods' => WP_REST_Server::DELETABLE,
|
54 |
+
'callback' => array( $this, 'delete_source' ),
|
55 |
+
)
|
56 |
+
);
|
57 |
}
|
58 |
|
59 |
/**
|
60 |
* Process the WC Order
|
61 |
*
|
62 |
* @param WP_REST_Request $request
|
63 |
+
*
|
64 |
+
* @return WP_REST_Response
|
65 |
*/
|
66 |
public function process_checkout( $request ) {
|
67 |
wc_maybe_define_constant( 'DOING_AJAX', true );
|
108 |
if ( wc_notice_count( 'error' ) > 0 ) {
|
109 |
return $this->send_response( false );
|
110 |
}
|
111 |
+
|
112 |
return $this->send_response( true );
|
113 |
}
|
114 |
|
115 |
/**
|
116 |
*
|
|
|
117 |
* @param WP_REST_Request $request
|
118 |
+
*
|
119 |
+
* @return WP_REST_Response
|
120 |
+
* @since 3.1.8
|
121 |
*/
|
122 |
public function process_order_pay( $request ) {
|
123 |
global $wp;
|
138 |
}
|
139 |
}
|
140 |
|
141 |
+
/**
|
142 |
+
* Deletes a source from an order if the order exists.
|
143 |
+
*
|
144 |
+
* @param WP_REST_Request $request
|
145 |
+
*
|
146 |
+
* @return WP_REST_Response
|
147 |
+
* @since 3.1.7
|
148 |
+
*/
|
149 |
+
public function delete_source( $request ) {
|
150 |
+
$order_id = WC()->session->get( 'order_awaiting_payment', null );
|
151 |
+
if ( $order_id ) {
|
152 |
+
$order = wc_get_order( $order_id );
|
153 |
+
$order->delete_meta_data( WC_Stripe_Constants::SOURCE_ID );
|
154 |
+
$order->save();
|
155 |
+
}
|
156 |
+
|
157 |
+
return rest_ensure_response( array( 'success' => true ) );
|
158 |
+
}
|
159 |
+
|
160 |
+
|
161 |
/**
|
162 |
*
|
163 |
* @param WP_REST_Request $request
|
195 |
'reload' => $reload,
|
196 |
);
|
197 |
unset( WC()->session->reload_checkout );
|
198 |
+
|
199 |
return rest_ensure_response( $data );
|
200 |
}
|
201 |
|
202 |
public function validate_payment_method( $payment_method ) {
|
203 |
$gateways = WC()->payment_gateways()->payment_gateways();
|
204 |
+
|
205 |
return isset( $gateways[ $payment_method ] ) ? true : new WP_Error( 'validation-error', 'Please choose a valid payment method.' );
|
206 |
}
|
207 |
|
includes/gateways/class-wc-payment-gateway-stripe-alipay.php
CHANGED
@@ -17,9 +17,7 @@ class WC_Payment_Gateway_Stripe_Alipay extends WC_Payment_Gateway_Stripe_Local_P
|
|
17 |
|
18 |
public function __construct() {
|
19 |
$this->local_payment_type = 'alipay';
|
20 |
-
$this->currencies = array( 'AUD', 'CAD', 'EUR', 'GBP', 'HKD', 'JPY', 'SGD', 'USD' );
|
21 |
-
// $this->countries = [ 'CN'
|
22 |
-
// ];
|
23 |
$this->id = 'stripe_alipay';
|
24 |
$this->tab_title = __( 'Alipay', 'woo-stripe-payment' );
|
25 |
$this->template_name = 'local-payment.php';
|
@@ -30,4 +28,36 @@ class WC_Payment_Gateway_Stripe_Alipay extends WC_Payment_Gateway_Stripe_Local_P
|
|
30 |
$this->order_button_text = $this->get_order_button_text( __( 'Alipay', 'woo-stripe-payment' ) );
|
31 |
parent::__construct();
|
32 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
}
|
|
17 |
|
18 |
public function __construct() {
|
19 |
$this->local_payment_type = 'alipay';
|
20 |
+
$this->currencies = array( 'AUD', 'CAD', 'EUR', 'GBP', 'HKD', 'JPY', 'SGD', 'USD', 'CNY', 'NZD', 'MYR' );
|
|
|
|
|
21 |
$this->id = 'stripe_alipay';
|
22 |
$this->tab_title = __( 'Alipay', 'woo-stripe-payment' );
|
23 |
$this->template_name = 'local-payment.php';
|
28 |
$this->order_button_text = $this->get_order_button_text( __( 'Alipay', 'woo-stripe-payment' ) );
|
29 |
parent::__construct();
|
30 |
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* @param string $currency
|
34 |
+
* @param string $billing_country
|
35 |
+
*
|
36 |
+
* @return bool
|
37 |
+
*/
|
38 |
+
public function validate_local_payment_available( $currency, $billing_country ) {
|
39 |
+
$country = wc_stripe()->account_settings->get_option( 'country' );
|
40 |
+
$default_currency = wc_stripe()->account_settings->get_option( 'default_currency' );
|
41 |
+
|
42 |
+
// https://stripe.com/docs/sources/alipay#create-source
|
43 |
+
// Currency must be one of the allowed values
|
44 |
+
if ( in_array( $currency, $this->currencies ) ) {
|
45 |
+
// If merchant's country is DK, NO, SE, or CH, currency must be EUR.
|
46 |
+
if ( in_array( $country, array( 'DK', 'NO', 'SE', 'CH' ) ) ) {
|
47 |
+
return $currency === 'EUR';
|
48 |
+
} else {
|
49 |
+
// For all other countries, Ali pay is available if currency is CNY or
|
50 |
+
// currency matches merchant's default currency
|
51 |
+
return $currency === 'CNY' || $currency === $default_currency;
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
return false;
|
56 |
+
}
|
57 |
+
|
58 |
+
protected function get_payment_description() {
|
59 |
+
return __( 'Gateway will appear when store currency is CNY, or currency matches merchant\'s
|
60 |
+
default Stripe currency. For merchants located in DK, NO, SE, & CH, currency must be EUR.', 'woo-stripe-payment' );
|
61 |
+
}
|
62 |
}
|
63 |
+
|
includes/gateways/class-wc-payment-gateway-stripe-becs.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) || exit();
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Class WC_Payment_Gateway_Stripe_Becs
|
6 |
+
*
|
7 |
+
* @since 3.1.7
|
8 |
+
* @package Stripe/Gateways
|
9 |
+
* @author PaymentPlugins
|
10 |
+
*/
|
11 |
+
class WC_Payment_Gateway_Stripe_BECS extends WC_Payment_Gateway_Stripe_Local_Payment {
|
12 |
+
|
13 |
+
use WC_Stripe_Local_Payment_Intent_Trait;
|
14 |
+
|
15 |
+
protected $payment_method_type = 'au_becs_debit';
|
16 |
+
|
17 |
+
public function __construct() {
|
18 |
+
$this->local_payment_type = 'au_becs_debit';
|
19 |
+
$this->currencies = array( 'AUD' );
|
20 |
+
$this->countries = array( 'AU' );
|
21 |
+
$this->id = 'stripe_becs';
|
22 |
+
$this->tab_title = __( 'BECS', 'woo-stripe-payment' );
|
23 |
+
$this->method_title = __( 'BECS', 'woo-stripe-payment' );
|
24 |
+
$this->method_description = __( 'BECS direct debit gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
|
25 |
+
$this->icon = ''; //wc_stripe()->assets_url( 'img/becs.svg' );
|
26 |
+
$this->order_button_text = $this->get_order_button_text( __( 'BECS', 'woo-stripe-payment' ) );
|
27 |
+
parent::__construct();
|
28 |
+
|
29 |
+
$this->local_payment_description = sprintf(
|
30 |
+
__(
|
31 |
+
'By providing your bank account details and confirming this payment, you agree to this
|
32 |
+
Direct Debit Request and the %sDirect Debit Request service agreement%s, and authorise Stripe Payments Australia Pty Ltd ACN 160 180 343 Direct
|
33 |
+
Debit User ID number 507156 (“Stripe”) to debit your account through the Bulk Electronic Clearing System (BECS) on behalf of Stripe Press
|
34 |
+
(the "Merchant") for any amounts separately communicated to you by the Merchant. You certify that you are either an account holder or an
|
35 |
+
authorised signatory on the account listed above.',
|
36 |
+
'woo-stripe-payment'
|
37 |
+
)
|
38 |
+
, '<a href="https://stripe.com/au-becs-dd-service-agreement/legal" target="_blank">', '</a>' );
|
39 |
+
}
|
40 |
+
}
|
includes/gateways/class-wc-payment-gateway-stripe-googlepay.php
CHANGED
@@ -177,75 +177,84 @@ class WC_Payment_Gateway_Stripe_GooglePay extends WC_Payment_Gateway_Stripe {
|
|
177 |
);
|
178 |
}
|
179 |
} else {
|
180 |
-
$
|
181 |
-
|
182 |
-
foreach ( WC()->cart->get_cart() as $cart_item ) {
|
183 |
-
/**
|
184 |
-
*
|
185 |
-
* @var WC_Product $product
|
186 |
-
*/
|
187 |
-
$product = $cart_item['data'];
|
188 |
-
$qty = $cart_item['quantity'];
|
189 |
-
$args = array( 'qty' => $qty );
|
190 |
-
$items[] = array(
|
191 |
-
'label' => $qty > 1 ? sprintf( '%s X %s', $product->get_name(), $qty ) : $product->get_name(),
|
192 |
-
'type' => 'LINE_ITEM',
|
193 |
-
'price' => strval( round( $incl_tax ? wc_get_price_including_tax( $product, $args ) : wc_get_price_excluding_tax( $product, $args ), $decimals ) ),
|
194 |
-
);
|
195 |
-
}
|
196 |
-
if ( WC()->cart->needs_shipping() ) {
|
197 |
-
$items[] = array(
|
198 |
-
'label' => __( 'Shipping', 'woo-stripe-payment' ),
|
199 |
-
'type' => 'LINE_ITEM',
|
200 |
-
'price' => strval( round( $incl_tax ? WC()->cart->shipping_total + WC()->cart->shipping_tax_total : WC()->cart->shipping_total, $decimals ) ),
|
201 |
-
);
|
202 |
-
}
|
203 |
|
204 |
-
|
205 |
-
|
206 |
-
/**
|
207 |
-
*
|
208 |
-
* @var WC_Order_I
|
209 |
-
*/
|
210 |
-
$items[] = array(
|
211 |
-
'label' => $fee_item->name,
|
212 |
-
'type' => 'LINE_ITEM',
|
213 |
-
'price' => strval( round( $incl_tax ? $fee_item->total + $fee_item->tax : $fee_item->total, $decimals ) ),
|
214 |
-
);
|
215 |
-
}
|
216 |
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
$items[] = $item;
|
244 |
}
|
|
|
|
|
245 |
}
|
246 |
}
|
247 |
-
|
248 |
-
return $encode ? htmlspecialchars( json_encode( $items ) ) : $items;
|
249 |
}
|
250 |
|
251 |
public function get_shipping_methods( $encode = false ) {
|
177 |
);
|
178 |
}
|
179 |
} else {
|
180 |
+
$this->get_cart_display_items( $items );
|
181 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
|
183 |
+
return $encode ? htmlspecialchars( json_encode( $items ) ) : $items;
|
184 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
|
186 |
+
/**
|
187 |
+
* @param array $items
|
188 |
+
*
|
189 |
+
* @since 3.1.7
|
190 |
+
*/
|
191 |
+
private function get_cart_display_items( &$items = array() ) {
|
192 |
+
$incl_tax = wc_stripe_display_prices_including_tax();
|
193 |
+
$decimals = ( ( $decimals = wc_get_price_decimals() ) < 2 ? $decimals : 2 );
|
194 |
+
foreach ( WC()->cart->get_cart() as $cart_item ) {
|
195 |
+
/**
|
196 |
+
*
|
197 |
+
* @var WC_Product $product
|
198 |
+
*/
|
199 |
+
$product = $cart_item['data'];
|
200 |
+
$qty = $cart_item['quantity'];
|
201 |
+
$args = array( 'qty' => $qty );
|
202 |
+
$items[] = array(
|
203 |
+
'label' => $qty > 1 ? sprintf( '%s X %s', $product->get_name(), $qty ) : $product->get_name(),
|
204 |
+
'type' => 'LINE_ITEM',
|
205 |
+
'price' => strval( round( $incl_tax ? wc_get_price_including_tax( $product, $args ) : wc_get_price_excluding_tax( $product, $args ), $decimals ) ),
|
206 |
+
);
|
207 |
+
}
|
208 |
+
if ( WC()->cart->needs_shipping() ) {
|
209 |
+
$items[] = array(
|
210 |
+
'label' => __( 'Shipping', 'woo-stripe-payment' ),
|
211 |
+
'type' => 'LINE_ITEM',
|
212 |
+
'price' => strval( round( $incl_tax ? WC()->cart->shipping_total + WC()->cart->shipping_tax_total : WC()->cart->shipping_total, $decimals ) ),
|
213 |
+
);
|
214 |
+
}
|
215 |
|
216 |
+
// fees
|
217 |
+
foreach ( WC()->cart->get_fees() as $fee_item ) {
|
218 |
+
/**
|
219 |
+
*
|
220 |
+
* @var WC_Order_I
|
221 |
+
*/
|
222 |
+
$items[] = array(
|
223 |
+
'label' => $fee_item->name,
|
224 |
+
'type' => 'LINE_ITEM',
|
225 |
+
'price' => strval( round( $incl_tax ? $fee_item->total + $fee_item->tax : $fee_item->total, $decimals ) ),
|
226 |
+
);
|
227 |
+
}
|
228 |
+
|
229 |
+
// coupons
|
230 |
+
if ( WC()->cart->discount_cart != 0 ) {
|
231 |
+
$items[] = array(
|
232 |
+
'label' => __( 'Discount', 'woo-stripe-payment' ),
|
233 |
+
'type' => 'LINE_ITEM',
|
234 |
+
'price' => strval(
|
235 |
+
round(
|
236 |
+
- 1 *
|
237 |
+
abs( $incl_tax ? WC()->cart->discount_cart + WC()->cart->discount_cart_tax : WC()->cart->discount_cart ),
|
238 |
+
$decimals
|
239 |
+
)
|
240 |
+
),
|
241 |
+
);
|
242 |
+
}
|
243 |
+
|
244 |
+
if ( ! $incl_tax && wc_tax_enabled() ) {
|
245 |
+
$item = array(
|
246 |
+
'label' => __( 'Tax', 'woo-stripe-payment' ),
|
247 |
+
'type' => 'TAX',
|
248 |
+
'price' => strval( round( WC()->cart->get_taxes_total(), $decimals ) ),
|
249 |
+
);
|
250 |
+
if ( 'itemized' === get_option( 'woocommerce_tax_total_display' ) ) {
|
251 |
+
if ( 0 < WC()->cart->get_taxes_total() ) {
|
252 |
$items[] = $item;
|
253 |
}
|
254 |
+
} else {
|
255 |
+
$items[] = $item;
|
256 |
}
|
257 |
}
|
|
|
|
|
258 |
}
|
259 |
|
260 |
public function get_shipping_methods( $encode = false ) {
|
includes/gateways/class-wc-payment-gateway-stripe-ideal.php
CHANGED
@@ -15,8 +15,6 @@ class WC_Payment_Gateway_Stripe_Ideal extends WC_Payment_Gateway_Stripe_Local_Pa
|
|
15 |
|
16 |
protected $payment_method_type = 'ideal';
|
17 |
|
18 |
-
// use WC_Stripe_Local_Payment_Charge_Trait;
|
19 |
-
|
20 |
use WC_Stripe_Local_Payment_Intent_Trait;
|
21 |
|
22 |
public function __construct() {
|
15 |
|
16 |
protected $payment_method_type = 'ideal';
|
17 |
|
|
|
|
|
18 |
use WC_Stripe_Local_Payment_Intent_Trait;
|
19 |
|
20 |
public function __construct() {
|
includes/gateways/class-wc-payment-gateway-stripe-klarna.php
CHANGED
@@ -30,21 +30,6 @@ class WC_Payment_Gateway_Stripe_Klarna extends WC_Payment_Gateway_Stripe_Local_P
|
|
30 |
$this->template_name = 'klarna.php';
|
31 |
}
|
32 |
|
33 |
-
public function hooks() {
|
34 |
-
parent::hooks();
|
35 |
-
add_action( 'woocommerce_review_order_before_payment', array( $this, 'enqueue_klarna' ) );
|
36 |
-
add_action( 'woocommerce_pay_order_after_submit', array( $this, 'enqueue_klarna' ) );
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Enqueue Klarna based on whether it's available or not.
|
41 |
-
*/
|
42 |
-
public function enqueue_klarna() {
|
43 |
-
if ( $this->is_available() ) {
|
44 |
-
wc_stripe()->scripts()->enqueue_script( 'klarna', 'https://x.klarnacdn.net/kp/lib/v1/api.js', array(), wc_stripe()->version(), true );
|
45 |
-
}
|
46 |
-
}
|
47 |
-
|
48 |
public function get_required_parameters() {
|
49 |
return array(
|
50 |
'USD' => array( 'US' ),
|
@@ -56,23 +41,17 @@ class WC_Payment_Gateway_Stripe_Klarna extends WC_Payment_Gateway_Stripe_Local_P
|
|
56 |
);
|
57 |
}
|
58 |
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
$country = WC()->customer ? WC()->customer->get_billing_country() : null;
|
68 |
-
if ( ! $country ) {
|
69 |
-
$country = WC()->countries->get_base_country();
|
70 |
-
}
|
71 |
-
}
|
72 |
-
if ( $country ) {
|
73 |
$params = $this->get_required_parameters();
|
74 |
|
75 |
-
return isset( $params[ $currency ] ) && array_search( $
|
76 |
}
|
77 |
|
78 |
return false;
|
@@ -95,6 +74,11 @@ class WC_Payment_Gateway_Stripe_Klarna extends WC_Payment_Gateway_Stripe_Local_P
|
|
95 |
parent::payment_fields();
|
96 |
}
|
97 |
|
|
|
|
|
|
|
|
|
|
|
98 |
public function get_local_payment_settings() {
|
99 |
return wp_parse_args(
|
100 |
array(
|
@@ -117,7 +101,7 @@ class WC_Payment_Gateway_Stripe_Klarna extends WC_Payment_Gateway_Stripe_Local_P
|
|
117 |
|
118 |
private function get_update_source_args( $order ) {
|
119 |
$args = $this->get_source_args( $order, true );
|
120 |
-
unset( $args['type'], $args['currency'], $args['statement_descriptor'], $args['redirect'], $args['klarna']['product'], $args['klarna']['locale'] );
|
121 |
|
122 |
return $args;
|
123 |
}
|
@@ -139,7 +123,7 @@ class WC_Payment_Gateway_Stripe_Klarna extends WC_Payment_Gateway_Stripe_Local_P
|
|
139 |
$object = $order;
|
140 |
}
|
141 |
|
142 |
-
$args
|
143 |
parent::get_source_args( $order ),
|
144 |
array(
|
145 |
'klarna' => array(
|
@@ -160,6 +144,9 @@ class WC_Payment_Gateway_Stripe_Klarna extends WC_Payment_Gateway_Stripe_Local_P
|
|
160 |
),
|
161 |
)
|
162 |
);
|
|
|
|
|
|
|
163 |
$args['source_order'] = array();
|
164 |
|
165 |
if ( ( $locale = get_locale() ) ) {
|
@@ -250,13 +237,9 @@ class WC_Payment_Gateway_Stripe_Klarna extends WC_Payment_Gateway_Stripe_Local_P
|
|
250 |
$klarna_categories = explode( ',', $source['klarna']['payment_method_categories'] );
|
251 |
$klarna_categories = array_intersect( $klarna_categories, $this->get_option( 'payment_categories' ) );
|
252 |
$source['klarna']['payment_method_categories'] = implode( $klarna_categories, ',' );
|
|
|
253 |
|
254 |
-
return '#
|
255 |
-
base64_encode( wp_json_encode( $source ) );
|
256 |
-
}
|
257 |
-
|
258 |
-
protected function get_local_payment_return_url( $order ) {
|
259 |
-
return add_query_arg( 'source', $order->get_meta( '_stripe_source_id', true ), parent::get_local_payment_return_url( $order ) );
|
260 |
}
|
261 |
|
262 |
/**
|
30 |
$this->template_name = 'klarna.php';
|
31 |
}
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
public function get_required_parameters() {
|
34 |
return array(
|
35 |
'USD' => array( 'US' ),
|
41 |
);
|
42 |
}
|
43 |
|
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 |
|
54 |
+
return isset( $params[ $currency ] ) && array_search( $billing_country, $params[ $currency ] ) !== false;
|
55 |
}
|
56 |
|
57 |
return false;
|
74 |
parent::payment_fields();
|
75 |
}
|
76 |
|
77 |
+
public function enqueue_checkout_scripts( $scripts ) {
|
78 |
+
wc_stripe()->scripts()->enqueue_script( 'klarna', 'https://x.klarnacdn.net/kp/lib/v1/api.js', array(), wc_stripe()->version(), true );
|
79 |
+
parent::enqueue_checkout_scripts( $scripts );
|
80 |
+
}
|
81 |
+
|
82 |
public function get_local_payment_settings() {
|
83 |
return wp_parse_args(
|
84 |
array(
|
101 |
|
102 |
private function get_update_source_args( $order ) {
|
103 |
$args = $this->get_source_args( $order, true );
|
104 |
+
unset( $args['type'], $args['currency'], $args['statement_descriptor'], $args['redirect'], $args['klarna']['product'], $args['klarna']['locale'], $args['klarna']['custom_payment_methods'] );
|
105 |
|
106 |
return $args;
|
107 |
}
|
123 |
$object = $order;
|
124 |
}
|
125 |
|
126 |
+
$args = array_merge_recursive(
|
127 |
parent::get_source_args( $order ),
|
128 |
array(
|
129 |
'klarna' => array(
|
144 |
),
|
145 |
)
|
146 |
);
|
147 |
+
if ( 'US' === $object->get_billing_country() ) {
|
148 |
+
$args['klarna']['custom_payment_methods'] = 'payin4,installments';
|
149 |
+
}
|
150 |
$args['source_order'] = array();
|
151 |
|
152 |
if ( ( $locale = get_locale() ) ) {
|
237 |
$klarna_categories = explode( ',', $source['klarna']['payment_method_categories'] );
|
238 |
$klarna_categories = array_intersect( $klarna_categories, $this->get_option( 'payment_categories' ) );
|
239 |
$source['klarna']['payment_method_categories'] = implode( $klarna_categories, ',' );
|
240 |
+
$source['redirect'] = add_query_arg( 'source', $order->get_meta( WC_Stripe_Constants::SOURCE_ID ), $this->get_local_payment_return_url( $order ) );
|
241 |
|
242 |
+
return '#response=' . base64_encode( wp_json_encode( $source ) );
|
|
|
|
|
|
|
|
|
|
|
243 |
}
|
244 |
|
245 |
/**
|
includes/updates/update-3.1.7.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$account_id = wc_stripe()->api_settings->get_option( 'account_id' );
|
3 |
+
if ( $account_id ) {
|
4 |
+
wc_stripe()->account_settings->save_account_settings( $account_id );
|
5 |
+
}
|
includes/wc-stripe-functions.php
CHANGED
@@ -749,9 +749,11 @@ function wc_stripe_api_options( $options ) {
|
|
749 |
*
|
750 |
* @package Stripe/Functions
|
751 |
* @since 3.0.0
|
|
|
|
|
752 |
*/
|
753 |
-
function wc_stripe_payment_complete_order_status( $order_status, $order_id, $order ) {
|
754 |
-
if ( is_checkout() && $order->get_payment_method() ) {
|
755 |
$gateway = WC()->payment_gateways()->payment_gateways()[ $order->get_payment_method() ];
|
756 |
if ( $gateway instanceof WC_Payment_Gateway_Stripe && 'default' !== $gateway->get_option( 'order_status' ) ) {
|
757 |
$order_status = $gateway->get_option( 'order_status' );
|
749 |
*
|
750 |
* @package Stripe/Functions
|
751 |
* @since 3.0.0
|
752 |
+
* <br/><strong>3.1.7</strong> - default $order argument of null added to prevent errors when 3rd party plugins trigger
|
753 |
+
* action woocommerce_payment_complete_order_status and don't pass three arguments.
|
754 |
*/
|
755 |
+
function wc_stripe_payment_complete_order_status( $order_status, $order_id, $order = null ) {
|
756 |
+
if ( is_checkout() && $order && $order->get_payment_method() ) {
|
757 |
$gateway = WC()->payment_gateways()->payment_gateways()[ $order->get_payment_method() ];
|
758 |
if ( $gateway instanceof WC_Payment_Gateway_Stripe && 'default' !== $gateway->get_option( 'order_status' ) ) {
|
759 |
$order_status = $gateway->get_option( 'order_status' );
|
includes/wc-stripe-hooks.php
CHANGED
@@ -23,7 +23,7 @@ add_filter( 'wc_stripe_api_options', 'wc_stripe_api_options' );
|
|
23 |
add_filter( 'woocommerce_payment_gateways', 'wc_stripe_payment_gateways' );
|
24 |
add_filter( 'woocommerce_available_payment_gateways', 'wc_stripe_available_payment_gateways' );
|
25 |
add_action( 'woocommerce_process_shop_subscription_meta', 'wc_stripe_process_shop_subscription_meta', 10, 2 );
|
26 |
-
add_filter( 'woocommerce_available_payment_gateways', 'wc_stripe_get_available_local_gateways' );
|
27 |
add_filter( 'woocommerce_payment_complete_order_status', 'wc_stripe_payment_complete_order_status', 10, 3 );
|
28 |
add_filter( 'woocommerce_get_customer_payment_tokens', 'wc_stripe_get_customer_payment_tokens', 10, 3 );
|
29 |
add_filter( 'woocommerce_credit_card_type_labels', 'wc_stripe_credit_card_labels' );
|
23 |
add_filter( 'woocommerce_payment_gateways', 'wc_stripe_payment_gateways' );
|
24 |
add_filter( 'woocommerce_available_payment_gateways', 'wc_stripe_available_payment_gateways' );
|
25 |
add_action( 'woocommerce_process_shop_subscription_meta', 'wc_stripe_process_shop_subscription_meta', 10, 2 );
|
26 |
+
//add_filter( 'woocommerce_available_payment_gateways', 'wc_stripe_get_available_local_gateways' );
|
27 |
add_filter( 'woocommerce_payment_complete_order_status', 'wc_stripe_payment_complete_order_status', 10, 3 );
|
28 |
add_filter( 'woocommerce_get_customer_payment_tokens', 'wc_stripe_get_customer_payment_tokens', 10, 3 );
|
29 |
add_filter( 'woocommerce_credit_card_type_labels', 'wc_stripe_credit_card_labels' );
|
includes/wc-stripe-webhook-functions.php
CHANGED
@@ -11,6 +11,14 @@ defined( 'ABSPATH' ) || exit();
|
|
11 |
* @package Stripe/Functions
|
12 |
*/
|
13 |
function wc_stripe_process_source_chargeable( $source, $request ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
$order = wc_get_order( wc_stripe_filter_order_id( $source->metadata['order_id'], $source ) );
|
15 |
if ( ! $order ) {
|
16 |
wc_stripe_log_error( sprintf( 'Could not create a charge for source %s. No order ID was found in your WordPress database.', $source->id ) );
|
@@ -32,7 +40,11 @@ function wc_stripe_process_source_chargeable( $source, $request ) {
|
|
32 |
}
|
33 |
$payment_method->set_order_lock( $order );
|
34 |
$payment_method->set_new_source_token( $source->id );
|
35 |
-
$payment_method->process_payment( $order
|
|
|
|
|
|
|
|
|
36 |
}
|
37 |
|
38 |
/**
|
@@ -76,10 +88,8 @@ function wc_stripe_process_charge_succeeded( $charge, $request ) {
|
|
76 |
remove_action( 'woocommerce_order_status_completed', 'wc_stripe_order_status_completed' );
|
77 |
|
78 |
// call payment complete so shipping, emails, etc are triggered.
|
79 |
-
$payment_method->
|
80 |
-
$order->payment_complete();
|
81 |
$order->add_order_note( __( 'Charge.succeeded webhook received. Payment has been completed.', 'woo-stripe-payment' ) );
|
82 |
-
$payment_method->release_order_lock( $order );
|
83 |
}
|
84 |
}
|
85 |
}
|
@@ -115,8 +125,12 @@ function wc_stripe_process_payment_intent_succeeded( $intent, $request ) {
|
|
115 |
}
|
116 |
|
117 |
$payment_method->set_order_lock( $order );
|
118 |
-
$payment_method->process_payment( $order
|
119 |
-
|
|
|
|
|
|
|
|
|
120 |
}
|
121 |
}
|
122 |
|
11 |
* @package Stripe/Functions
|
12 |
*/
|
13 |
function wc_stripe_process_source_chargeable( $source, $request ) {
|
14 |
+
/*
|
15 |
+
* There is no order ID in the metadata which means this source was created
|
16 |
+
* client side using stripe.createsource()
|
17 |
+
* It will be processed via the checkout page.
|
18 |
+
*/
|
19 |
+
if ( $source->flow === 'none' && ! $source->metadata['order_id'] ) {
|
20 |
+
return;
|
21 |
+
}
|
22 |
$order = wc_get_order( wc_stripe_filter_order_id( $source->metadata['order_id'], $source ) );
|
23 |
if ( ! $order ) {
|
24 |
wc_stripe_log_error( sprintf( 'Could not create a charge for source %s. No order ID was found in your WordPress database.', $source->id ) );
|
40 |
}
|
41 |
$payment_method->set_order_lock( $order );
|
42 |
$payment_method->set_new_source_token( $source->id );
|
43 |
+
$result = $payment_method->payment_object->process_payment( $order );
|
44 |
+
|
45 |
+
if ( ! is_wp_error( $result ) && $result->complete_payment ) {
|
46 |
+
$payment_method->payment_object->payment_complete( $order, $result->charge );
|
47 |
+
}
|
48 |
}
|
49 |
|
50 |
/**
|
88 |
remove_action( 'woocommerce_order_status_completed', 'wc_stripe_order_status_completed' );
|
89 |
|
90 |
// call payment complete so shipping, emails, etc are triggered.
|
91 |
+
$payment_method->payment_object->payment_complete( $order, $charge );
|
|
|
92 |
$order->add_order_note( __( 'Charge.succeeded webhook received. Payment has been completed.', 'woo-stripe-payment' ) );
|
|
|
93 |
}
|
94 |
}
|
95 |
}
|
125 |
}
|
126 |
|
127 |
$payment_method->set_order_lock( $order );
|
128 |
+
$result = $payment_method->payment_object->process_payment( $order );
|
129 |
+
|
130 |
+
if ( ! is_wp_error( $result ) && $result->complete_payment ) {
|
131 |
+
$payment_method->payment_object->payment_complete( $order, $result->charge );
|
132 |
+
$order->add_order_note( __( 'payment_intent.succeeded webhook received. Payment has been completed.', 'woo-stripe-payment' ) );
|
133 |
+
}
|
134 |
}
|
135 |
}
|
136 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: stripe, ach, klarna, credit card, apple pay, google pay, ideal, sepa, sofo
|
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 5.4
|
6 |
Requires PHP: 5.6
|
7 |
-
Stable tag: 3.1.
|
8 |
Copyright: Payment Plugins
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -32,6 +32,7 @@ To see Apple Pay, visit the site using an iOS device. Google Pay will display fo
|
|
32 |
- 3DS 2.0
|
33 |
- Local Payment Methods
|
34 |
- WooCommerce Subscriptions
|
|
|
35 |
|
36 |
== Frequently Asked Questions ==
|
37 |
= How do I test this plugin? =
|
@@ -57,6 +58,11 @@ If you're site is not loading over https, then Stripe won't render the Payment R
|
|
57 |
8. Edit payment gateways on the product page
|
58 |
|
59 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
60 |
= 3.1.6 =
|
61 |
* Updated - WC tested to 4.3.0
|
62 |
* Updated - Bumped PHP min version to 5.6
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 5.4
|
6 |
Requires PHP: 5.6
|
7 |
+
Stable tag: 3.1.7
|
8 |
Copyright: Payment Plugins
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
32 |
- 3DS 2.0
|
33 |
- Local Payment Methods
|
34 |
- WooCommerce Subscriptions
|
35 |
+
- WooCommerce Pre-Orders
|
36 |
|
37 |
== Frequently Asked Questions ==
|
38 |
= How do I test this plugin? =
|
58 |
8. Edit payment gateways on the product page
|
59 |
|
60 |
== Changelog ==
|
61 |
+
= 3.1.7 =
|
62 |
+
* Fixed - SEPA payment flow
|
63 |
+
* Added - BECS payment method
|
64 |
+
* Updated - Stripe php lib version 7.40.0
|
65 |
+
* Updated - AliPay display logic
|
66 |
= 3.1.6 =
|
67 |
* Updated - WC tested to 4.3.0
|
68 |
* Updated - Bumped PHP min version to 5.6
|
stripe-payments.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Stripe For WooCommerce
|
4 |
* Plugin URI: https://docs.paymentplugins.com/wc-stripe/config/
|
5 |
* Description: Accept credit cards, Google Pay, Apple Pay, ACH, Klarna and more using Stripe.
|
6 |
-
* Version: 3.1.
|
7 |
* Author: Payment Plugins, support@paymentplugins.com
|
8 |
* Text Domain: woo-stripe-payment
|
9 |
* Domain Path: /i18n/languages/
|
3 |
* Plugin Name: Stripe For WooCommerce
|
4 |
* Plugin URI: https://docs.paymentplugins.com/wc-stripe/config/
|
5 |
* Description: Accept credit cards, Google Pay, Apple Pay, ACH, Klarna and more using Stripe.
|
6 |
+
* Version: 3.1.7
|
7 |
* Author: Payment Plugins, support@paymentplugins.com
|
8 |
* Text Domain: woo-stripe-payment
|
9 |
* Domain Path: /i18n/languages/
|
templates/checkout/klarna.php
CHANGED
@@ -1,23 +1,23 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* @version 3.
|
4 |
-
*
|
5 |
* @var WC_Payment_Gateway_Stripe_Klarna $gateway
|
6 |
*/
|
7 |
-
$payment_options = $gateway->get_option('payment_categories');
|
8 |
?>
|
9 |
-
<div id="wc_stripe_local_payment_<?php echo $gateway->id?>" style="display: none">
|
10 |
-
|
11 |
-
<?php foreach ($gateway->get_payment_categories() as $category => $label)
|
12 |
-
<?php if(in_array($category, $payment_options))
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
<?php endif
|
21 |
-
<?php endforeach
|
22 |
-
|
23 |
</div>
|
1 |
<?php
|
2 |
/**
|
3 |
+
* @version 3.1.7
|
4 |
+
*
|
5 |
* @var WC_Payment_Gateway_Stripe_Klarna $gateway
|
6 |
*/
|
7 |
+
$payment_options = $gateway->get_option( 'payment_categories' );
|
8 |
?>
|
9 |
+
<div id="wc_stripe_local_payment_<?php echo $gateway->id ?>" style="display: none" data-active="<?php echo $gateway->is_local_payment_available() ?>">
|
10 |
+
<ul class="stripe-klarna-categories">
|
11 |
+
<?php foreach ( $gateway->get_payment_categories() as $category => $label ): ?>
|
12 |
+
<?php if ( in_array( $category, $payment_options ) ): ?>
|
13 |
+
<li id="klarna-category-<?php echo $category ?>" style="display:none">
|
14 |
+
<input type="radio" id="klarna_<?php echo $category ?>"
|
15 |
+
class="wc-stripe-klarna-category" name="klarna_category"
|
16 |
+
value="<?php echo $category ?>"/>
|
17 |
+
<label for="klarna_<?php echo $category ?>" class="wc-stripe-label-klarna-category"><?php echo $label ?></label>
|
18 |
+
<div id="klarna-instance-<?php echo $category ?>" class="klarna-instance-<?php echo $category ?>" style="display: none"></div>
|
19 |
+
</li>
|
20 |
+
<?php endif; ?>
|
21 |
+
<?php endforeach; ?>
|
22 |
+
</ul>
|
23 |
</div>
|
templates/checkout/local-payment.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* @version 3.
|
4 |
-
*
|
5 |
* @var WC_Payment_Gateway_Stripe_Local_Payment $gateway
|
6 |
*/
|
7 |
?>
|
8 |
-
<div id="wc_stripe_local_payment_<?php echo $gateway->id?>">
|
9 |
-
|
10 |
-
</div>
|
11 |
-
<?php if(($desc = $gateway->get_local_payment_description()))
|
12 |
-
|
13 |
-
<?php endif
|
1 |
<?php
|
2 |
/**
|
3 |
+
* @version 3.1.7
|
4 |
+
*
|
5 |
* @var WC_Payment_Gateway_Stripe_Local_Payment $gateway
|
6 |
*/
|
7 |
?>
|
8 |
+
<div id="wc_stripe_local_payment_<?php echo $gateway->id ?>" data-active="<?php echo $gateway->is_local_payment_available()?>">
|
9 |
+
|
10 |
+
</div>
|
11 |
+
<?php if ( ( $desc = $gateway->get_local_payment_description() ) ): ?>
|
12 |
+
<p class="wc-stripe-local-desc <?php echo $gateway->id ?>"><?php echo $desc ?></p>
|
13 |
+
<?php endif; ?>
|
vendor/composer/installed.json
CHANGED
@@ -1,17 +1,17 @@
|
|
1 |
[
|
2 |
{
|
3 |
"name": "stripe/stripe-php",
|
4 |
-
"version": "v7.
|
5 |
-
"version_normalized": "7.
|
6 |
"source": {
|
7 |
"type": "git",
|
8 |
"url": "https://github.com/stripe/stripe-php.git",
|
9 |
-
"reference": "
|
10 |
},
|
11 |
"dist": {
|
12 |
"type": "zip",
|
13 |
-
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/
|
14 |
-
"reference": "
|
15 |
"shasum": ""
|
16 |
},
|
17 |
"require": {
|
@@ -27,7 +27,7 @@
|
|
27 |
"squizlabs/php_codesniffer": "^3.3",
|
28 |
"symfony/process": "~3.4"
|
29 |
},
|
30 |
-
"time": "2020-
|
31 |
"type": "library",
|
32 |
"extra": {
|
33 |
"branch-alias": {
|
1 |
[
|
2 |
{
|
3 |
"name": "stripe/stripe-php",
|
4 |
+
"version": "v7.40.0",
|
5 |
+
"version_normalized": "7.40.0.0",
|
6 |
"source": {
|
7 |
"type": "git",
|
8 |
"url": "https://github.com/stripe/stripe-php.git",
|
9 |
+
"reference": "04aedea5ad95b9722aa394a41787751b2b478310"
|
10 |
},
|
11 |
"dist": {
|
12 |
"type": "zip",
|
13 |
+
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/04aedea5ad95b9722aa394a41787751b2b478310",
|
14 |
+
"reference": "04aedea5ad95b9722aa394a41787751b2b478310",
|
15 |
"shasum": ""
|
16 |
},
|
17 |
"require": {
|
27 |
"squizlabs/php_codesniffer": "^3.3",
|
28 |
"symfony/process": "~3.4"
|
29 |
},
|
30 |
+
"time": "2020-07-06T17:51:30+00:00",
|
31 |
"type": "library",
|
32 |
"extra": {
|
33 |
"branch-alias": {
|
vendor/stripe/stripe-php/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1 |
# Changelog
|
2 |
|
|
|
|
|
|
|
3 |
## 7.39.0 - 2020-06-25
|
4 |
* [#960](https://github.com/stripe/stripe-php/pull/960) Add constants for `payment_behavior` on `Subscription`
|
5 |
|
1 |
# Changelog
|
2 |
|
3 |
+
## 7.40.0 - 2020-07-06
|
4 |
+
* [#964](https://github.com/stripe/stripe-php/pull/964) Add OAuthService
|
5 |
+
|
6 |
## 7.39.0 - 2020-06-25
|
7 |
* [#960](https://github.com/stripe/stripe-php/pull/960) Add constants for `payment_behavior` on `Subscription`
|
8 |
|
vendor/stripe/stripe-php/VERSION
CHANGED
@@ -1 +1 @@
|
|
1 |
-
7.
|
1 |
+
7.40.0
|
vendor/stripe/stripe-php/init.php
CHANGED
@@ -225,6 +225,7 @@ require __DIR__ . '/lib/Service/Terminal/TerminalServiceFactory.php';
|
|
225 |
// OAuth
|
226 |
require __DIR__ . '/lib/OAuth.php';
|
227 |
require __DIR__ . '/lib/OAuthErrorObject.php';
|
|
|
228 |
|
229 |
// Webhooks
|
230 |
require __DIR__ . '/lib/Webhook.php';
|
225 |
// OAuth
|
226 |
require __DIR__ . '/lib/OAuth.php';
|
227 |
require __DIR__ . '/lib/OAuthErrorObject.php';
|
228 |
+
require __DIR__ . '/lib/Service/OAuthService.php';
|
229 |
|
230 |
// Webhooks
|
231 |
require __DIR__ . '/lib/Webhook.php';
|
vendor/stripe/stripe-php/lib/Service/CoreServiceFactory.php
CHANGED
@@ -28,6 +28,7 @@ namespace Stripe\Service;
|
|
28 |
* @property InvoiceService $invoices
|
29 |
* @property Issuing\IssuingServiceFactory $issuing
|
30 |
* @property MandateService $mandates
|
|
|
31 |
* @property OrderReturnService $orderReturns
|
32 |
* @property OrderService $orders
|
33 |
* @property PaymentIntentService $paymentIntents
|
@@ -83,6 +84,7 @@ class CoreServiceFactory extends \Stripe\Service\AbstractServiceFactory
|
|
83 |
'invoices' => InvoiceService::class,
|
84 |
'issuing' => Issuing\IssuingServiceFactory::class,
|
85 |
'mandates' => MandateService::class,
|
|
|
86 |
'orderReturns' => OrderReturnService::class,
|
87 |
'orders' => OrderService::class,
|
88 |
'paymentIntents' => PaymentIntentService::class,
|
28 |
* @property InvoiceService $invoices
|
29 |
* @property Issuing\IssuingServiceFactory $issuing
|
30 |
* @property MandateService $mandates
|
31 |
+
* @property OAuthService $oauth
|
32 |
* @property OrderReturnService $orderReturns
|
33 |
* @property OrderService $orders
|
34 |
* @property PaymentIntentService $paymentIntents
|
84 |
'invoices' => InvoiceService::class,
|
85 |
'issuing' => Issuing\IssuingServiceFactory::class,
|
86 |
'mandates' => MandateService::class,
|
87 |
+
'oauth' => OAuthService::class,
|
88 |
'orderReturns' => OrderReturnService::class,
|
89 |
'orders' => OrderService::class,
|
90 |
'paymentIntents' => PaymentIntentService::class,
|
vendor/stripe/stripe-php/lib/Service/OAuthService.php
ADDED
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Stripe\Service;
|
4 |
+
|
5 |
+
class OAuthService extends \Stripe\Service\AbstractService
|
6 |
+
{
|
7 |
+
/**
|
8 |
+
* Sends a request to Stripe's Connect API.
|
9 |
+
*
|
10 |
+
* @param string $method the HTTP method
|
11 |
+
* @param string $path the path of the request
|
12 |
+
* @param array $params the parameters of the request
|
13 |
+
* @param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request
|
14 |
+
*
|
15 |
+
* @return \Stripe\StripeObject the object returned by Stripe's Connect API
|
16 |
+
*/
|
17 |
+
protected function requestConnect($method, $path, $params, $opts)
|
18 |
+
{
|
19 |
+
$opts = $this->_parseOpts($opts);
|
20 |
+
$opts->apiBase = $this->_getBase($opts);
|
21 |
+
|
22 |
+
return $this->request($method, $path, $params, $opts);
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Generates a URL to Stripe's OAuth form.
|
27 |
+
*
|
28 |
+
* @param null|array $params
|
29 |
+
* @param null|array $opts
|
30 |
+
*
|
31 |
+
* @return string the URL to Stripe's OAuth form
|
32 |
+
*/
|
33 |
+
public function authorizeUrl($params = null, $opts = null)
|
34 |
+
{
|
35 |
+
$params = $params ?: [];
|
36 |
+
|
37 |
+
$opts = $this->_parseOpts($opts);
|
38 |
+
$base = $this->_getBase($opts);
|
39 |
+
|
40 |
+
$params['client_id'] = $this->_getClientId($params);
|
41 |
+
if (!\array_key_exists('response_type', $params)) {
|
42 |
+
$params['response_type'] = 'code';
|
43 |
+
}
|
44 |
+
$query = \Stripe\Util\Util::encodeParameters($params);
|
45 |
+
|
46 |
+
return $base . '/oauth/authorize?' . $query;
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Use an authoriztion code to connect an account to your platform and
|
51 |
+
* fetch the user's credentials.
|
52 |
+
*
|
53 |
+
* @param null|array $params
|
54 |
+
* @param null|array $opts
|
55 |
+
*
|
56 |
+
* @throws \Stripe\Exception\OAuth\OAuthErrorException if the request fails
|
57 |
+
*
|
58 |
+
* @return StripeObject object containing the response from the API
|
59 |
+
*/
|
60 |
+
public function token($params = null, $opts = null)
|
61 |
+
{
|
62 |
+
$params = $params ?: [];
|
63 |
+
$params['client_secret'] = $this->_getClientSecret($params);
|
64 |
+
|
65 |
+
return $this->requestConnect('post', '/oauth/token', $params, $opts);
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Disconnects an account from your platform.
|
70 |
+
*
|
71 |
+
* @param null|array $params
|
72 |
+
* @param null|array $opts
|
73 |
+
*
|
74 |
+
* @throws \Stripe\Exception\OAuth\OAuthErrorException if the request fails
|
75 |
+
*
|
76 |
+
* @return StripeObject object containing the response from the API
|
77 |
+
*/
|
78 |
+
public function deauthorize($params = null, $opts = null)
|
79 |
+
{
|
80 |
+
$params = $params ?: [];
|
81 |
+
$params['client_id'] = $this->_getClientId($params);
|
82 |
+
|
83 |
+
return $this->requestConnect('post', '/oauth/deauthorize', $params, $opts);
|
84 |
+
}
|
85 |
+
|
86 |
+
private function _getClientId($params = null)
|
87 |
+
{
|
88 |
+
$clientId = ($params && \array_key_exists('client_id', $params)) ? $params['client_id'] : null;
|
89 |
+
|
90 |
+
if (null === $clientId) {
|
91 |
+
$clientId = $this->client->getClientId();
|
92 |
+
}
|
93 |
+
if (null === $clientId) {
|
94 |
+
$msg = 'No client_id provided. (HINT: set your client_id using '
|
95 |
+
. '`new \Stripe\StripeClient([clientId => <CLIENT-ID>
|
96 |
+
])`)". You can find your client_ids '
|
97 |
+
. 'in your Stripe dashboard at '
|
98 |
+
. 'https://dashboard.stripe.com/account/applications/settings, '
|
99 |
+
. 'after registering your account as a platform. See '
|
100 |
+
. 'https://stripe.com/docs/connect/standard-accounts for details, '
|
101 |
+
. 'or email support@stripe.com if you have any questions.';
|
102 |
+
|
103 |
+
throw new \Stripe\Exception\AuthenticationException($msg);
|
104 |
+
}
|
105 |
+
|
106 |
+
return $clientId;
|
107 |
+
}
|
108 |
+
|
109 |
+
private function _getClientSecret($params = null)
|
110 |
+
{
|
111 |
+
if (\array_key_exists('client_secret', $params)) {
|
112 |
+
return $params['client_secret'];
|
113 |
+
}
|
114 |
+
|
115 |
+
return $this->client->getApiKey();
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* @param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request
|
120 |
+
*
|
121 |
+
* @throws \Stripe\Exception\InvalidArgumentException
|
122 |
+
*
|
123 |
+
* @return \Stripe\Util\RequestOptions
|
124 |
+
*/
|
125 |
+
private function _parseOpts($opts)
|
126 |
+
{
|
127 |
+
if (\is_array($opts)) {
|
128 |
+
if (\array_key_exists('connect_base', $opts)) {
|
129 |
+
// Throw an exception for the convenience of anybody migrating to
|
130 |
+
// \Stripe\Service\OAuthService from \Stripe\OAuth, where `connect_base`
|
131 |
+
// was the name of the parameter that behaves as `api_base` does here.
|
132 |
+
throw new \Stripe\Exception\InvalidArgumentException('Use `api_base`, not `connect_base`');
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
+
return \Stripe\Util\RequestOptions::parse($opts);
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* @param \Stripe\Util\RequestOptions $opts
|
141 |
+
*
|
142 |
+
* @return string
|
143 |
+
*/
|
144 |
+
private function _getBase($opts)
|
145 |
+
{
|
146 |
+
return isset($opts->apiBase) ?
|
147 |
+
$opts->apiBase :
|
148 |
+
$this->client->getConnectBase();
|
149 |
+
}
|
150 |
+
}
|
vendor/stripe/stripe-php/lib/Stripe.php
CHANGED
@@ -58,7 +58,7 @@ class Stripe
|
|
58 |
/** @var float Initial delay between retries, in seconds */
|
59 |
private static $initialNetworkRetryDelay = 0.5;
|
60 |
|
61 |
-
const VERSION = '7.
|
62 |
|
63 |
/**
|
64 |
* @return string the API key used for requests
|
58 |
/** @var float Initial delay between retries, in seconds */
|
59 |
private static $initialNetworkRetryDelay = 0.5;
|
60 |
|
61 |
+
const VERSION = '7.40.0';
|
62 |
|
63 |
/**
|
64 |
* @return string the API key used for requests
|
vendor/stripe/stripe-php/lib/StripeClient.php
CHANGED
@@ -28,6 +28,7 @@ namespace Stripe;
|
|
28 |
* @property \Stripe\Service\InvoiceService $invoices
|
29 |
* @property \Stripe\Service\Issuing\IssuingServiceFactory $issuing
|
30 |
* @property \Stripe\Service\MandateService $mandates
|
|
|
31 |
* @property \Stripe\Service\OrderReturnService $orderReturns
|
32 |
* @property \Stripe\Service\OrderService $orders
|
33 |
* @property \Stripe\Service\PaymentIntentService $paymentIntents
|
28 |
* @property \Stripe\Service\InvoiceService $invoices
|
29 |
* @property \Stripe\Service\Issuing\IssuingServiceFactory $issuing
|
30 |
* @property \Stripe\Service\MandateService $mandates
|
31 |
+
* @property \Stripe\Service\OAuthService $oauth
|
32 |
* @property \Stripe\Service\OrderReturnService $orderReturns
|
33 |
* @property \Stripe\Service\OrderService $orders
|
34 |
* @property \Stripe\Service\PaymentIntentService $paymentIntents
|