Payment Plugins for Stripe WooCommerce - Version 3.2.9

Version Description

  • Updated - WP tested to 5.6
  • Updated - Tested with PHP 8
  • Added - GrabPay gateway
  • Added - Promise polyfill for older browsers
  • Added - GPay added SCA required fields (https://developers.google.com/pay/api/web/guides/resources/sca)
  • Added - Order button text option for local payment methods
  • Added - new filter wc_stripe_force_save_payment_method
Download this release

Release Info

Developer mr.clayton
Plugin Icon wp plugin Payment Plugins for Stripe WooCommerce
Version 3.2.9
Comparing to
See all releases

Code changes from version 3.2.8 to 3.2.9

Files changed (39) hide show
  1. assets/css/stripe-rtl.css +16 -3
  2. assets/css/stripe.css +16 -3
  3. assets/css/stripe.min-rtl.css +1 -1
  4. assets/css/stripe.min.css +1 -1
  5. assets/js/frontend/local-payment.js +4 -1
  6. assets/js/frontend/local-payment.min.js +1 -1
  7. assets/js/frontend/promise-polyfill.js +1 -0
  8. assets/js/frontend/wc-stripe.js +52 -9
  9. assets/js/frontend/wc-stripe.min.js +1 -1
  10. i18n/languages/woo-stripe-payment.pot +150 -159
  11. includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php +13 -5
  12. includes/abstract/abstract-wc-payment-gateway-stripe.php +2 -1
  13. includes/class-stripe.php +2 -2
  14. includes/class-wc-stripe-frontend-scripts.php +10 -0
  15. includes/class-wc-stripe-gateway-conversions.php +1 -1
  16. includes/class-wc-stripe-gateway.php +5 -1
  17. includes/class-wc-stripe-payment-charge.php +183 -183
  18. includes/class-wc-stripe-payment-intent.php +346 -346
  19. includes/controllers/class-wc-stripe-controller-googlepay.php +1 -0
  20. includes/gateways/class-wc-payment-gateway-stripe-ach.php +1 -1
  21. includes/gateways/class-wc-payment-gateway-stripe-alipay.php +0 -1
  22. includes/gateways/class-wc-payment-gateway-stripe-bancontact.php +0 -3
  23. includes/gateways/class-wc-payment-gateway-stripe-becs.php +0 -1
  24. includes/gateways/class-wc-payment-gateway-stripe-eps.php +0 -1
  25. includes/gateways/class-wc-payment-gateway-stripe-fpx.php +0 -1
  26. includes/gateways/class-wc-payment-gateway-stripe-giropay.php +0 -1
  27. includes/gateways/class-wc-payment-gateway-stripe-googlepay.php +9 -8
  28. includes/gateways/class-wc-payment-gateway-stripe-grabpay.php +1 -2
  29. includes/gateways/class-wc-payment-gateway-stripe-ideal.php +0 -1
  30. includes/gateways/class-wc-payment-gateway-stripe-klarna.php +0 -1
  31. includes/gateways/class-wc-payment-gateway-stripe-multibanco.php +0 -1
  32. includes/gateways/class-wc-payment-gateway-stripe-p24.php +0 -1
  33. includes/gateways/class-wc-payment-gateway-stripe-sepa.php +2 -3
  34. includes/gateways/class-wc-payment-gateway-stripe-sofort.php +0 -1
  35. includes/gateways/class-wc-payment-gateway-stripe-wechat.php +1 -3
  36. includes/gateways/settings/ach-settings.php +7 -0
  37. includes/gateways/settings/googlepay-settings.php +1 -0
  38. readme.txt +10 -2
  39. stripe-payments.php +3 -3
assets/css/stripe-rtl.css CHANGED
@@ -407,12 +407,10 @@ li.payment_method_stripe_ach label:first-of-type img {
407
 
408
  .apple-pay-button-black {
409
  -apple-pay-button-style: black;
410
- background-color: black !important;
411
  }
412
 
413
  .apple-pay-button-white {
414
  -apple-pay-button-style: white;
415
- background-color: white !important;
416
  }
417
 
418
  .apple-pay-button-white-with-line {
@@ -650,7 +648,7 @@ li[class*="payment_method_stripe"] .select2-container--default .select2-selectio
650
  }
651
 
652
  #wc-stripe-payment-request-container.disabled {
653
- opactity: 0.45;
654
  }
655
 
656
  .wc-stripe-paymentRequest-icons-container img {
@@ -856,4 +854,19 @@ a.wc-stripe-applepay-mini-cart .apple-pay-button{
856
  }
857
  }
858
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
859
 
407
 
408
  .apple-pay-button-black {
409
  -apple-pay-button-style: black;
 
410
  }
411
 
412
  .apple-pay-button-white {
413
  -apple-pay-button-style: white;
 
414
  }
415
 
416
  .apple-pay-button-white-with-line {
648
  }
649
 
650
  #wc-stripe-payment-request-container.disabled {
651
+ opacity: 0.45;
652
  }
653
 
654
  .wc-stripe-paymentRequest-icons-container img {
854
  }
855
  }
856
 
857
+ li.payment_method_stripe_googlepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
858
+ li.payment_method_stripe_applepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
859
+ li.payment_method_stripe_payment_request.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
860
+ li.payment_method_stripe_alipay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
861
+ li.payment_method_stripe_bancontact.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
862
+ li.payment_method_stripe_eps.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
863
+ li.payment_method_stripe_giropay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
864
+ li.payment_method_stripe_grabpay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
865
+ li.payment_method_stripe_multibanco.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
866
+ li.payment_method_stripe_p24.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
867
+ li.payment_method_stripe_sofort.wc-stripe-no-desc .payment_box.wc-stripe-no-methods{
868
+ padding: 0;
869
+ margin: 0;
870
+ }
871
+
872
 
assets/css/stripe.css CHANGED
@@ -407,12 +407,10 @@ li.payment_method_stripe_ach label:first-of-type img {
407
 
408
  .apple-pay-button-black {
409
  -apple-pay-button-style: black;
410
- background-color: black !important;
411
  }
412
 
413
  .apple-pay-button-white {
414
  -apple-pay-button-style: white;
415
- background-color: white !important;
416
  }
417
 
418
  .apple-pay-button-white-with-line {
@@ -650,7 +648,7 @@ li[class*="payment_method_stripe"] .select2-container--default .select2-selectio
650
  }
651
 
652
  #wc-stripe-payment-request-container.disabled {
653
- opactity: 0.45;
654
  }
655
 
656
  .wc-stripe-paymentRequest-icons-container img {
@@ -856,4 +854,19 @@ a.wc-stripe-applepay-mini-cart .apple-pay-button{
856
  }
857
  }
858
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
859
 
407
 
408
  .apple-pay-button-black {
409
  -apple-pay-button-style: black;
 
410
  }
411
 
412
  .apple-pay-button-white {
413
  -apple-pay-button-style: white;
 
414
  }
415
 
416
  .apple-pay-button-white-with-line {
648
  }
649
 
650
  #wc-stripe-payment-request-container.disabled {
651
+ opacity: 0.45;
652
  }
653
 
654
  .wc-stripe-paymentRequest-icons-container img {
854
  }
855
  }
856
 
857
+ li.payment_method_stripe_googlepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
858
+ li.payment_method_stripe_applepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
859
+ li.payment_method_stripe_payment_request.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
860
+ li.payment_method_stripe_alipay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
861
+ li.payment_method_stripe_bancontact.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
862
+ li.payment_method_stripe_eps.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
863
+ li.payment_method_stripe_giropay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
864
+ li.payment_method_stripe_grabpay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
865
+ li.payment_method_stripe_multibanco.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
866
+ li.payment_method_stripe_p24.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,
867
+ li.payment_method_stripe_sofort.wc-stripe-no-desc .payment_box.wc-stripe-no-methods{
868
+ padding: 0;
869
+ margin: 0;
870
+ }
871
+
872
 
assets/css/stripe.min-rtl.css CHANGED
@@ -1 +1 @@
1
- .wc-stripe-card-icons-container,.wc-stripe-paymentRequest-icons-container{float:left;display:inline-block}ul.payment_methods li[class*=payment_method]{margin:0;padding:0}li[class*=payment_method] input[type=radio]{margin:0 5px 0 10px}li[class*=payment_method] input[type=radio]+label:not(.wc-stripe-label-payment-type){margin:0}.woocommerce-checkout #payment ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n+2),ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n+2){margin:0}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon,li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img{max-width:44px;max-height:27px;width:44px;height:27px;float:none;display:inline}li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img{width:25px;height:25px;max-width:25px;max-height:25px}ul.payment_methods label[for*=payment_method_stripe]:after{clear:left;content:"";display:block}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon:nth-child(2n+2){margin:0 2px}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon.open.visa{padding-top:2px}ul.payment_methods li[class*=payment_method_stripe_] label>img:first-of-type{float:left!important}.wc-stripe_cc-new-method-container{margin-bottom:1em}.wc-stripe_cc-container .StripeElement{box-sizing:border-box;height:40px;padding:10px 12px;border-radius:4px;background-color:#fff;-webkit-transition:box-shadow 150ms ease;transition:box-shadow 150ms ease}input.wc-stripe-klarna-category,input.wc-stripe-payment-type{display:none!important}body .wfacp_main_form.woocommerce .wc-stripe-save-source label.checkbox{padding:0!important}input[type=radio]+label.wc-stripe-label-payment-type,label.wc-stripe-label-klarna-category,label.wc-stripe-label-payment-type{margin-bottom:1em;display:block;padding:0!important;color:#000}.theme-flatsome div.wc-stripe-saved-methods-container{margin:0 0 1em 0}label.wc-stripe-label-klarna-category:before,label.wc-stripe-label-payment-type:before{content:"";display:inline-block;width:11px;height:11px;border:2px solid #fff;box-shadow:0 0 0 2px #000;background:#fff;margin-right:4px;margin-left:.5em;border-radius:100%;-webkit-transform:translateY(2px);-ms-transform:translateY(2px);transform:translateY(2px)}input.wc-stripe-klarna-category:checked+label.wc-stripe-label-klarna-category:before,input.wc-stripe-payment-type:checked+label.wc-stripe-label-payment-type:before{background:#000}label.wc-stripe-label-payment-type:after{content:none!important;display:none!important}.select2-results__options li.wc-stripe-select2-container,.wc-stripe-saved-methods-container .select2-container .select2-selection--single .wc-stripe-select2-container{display:flex;align-items:center;height:42px;line-height:42px!important}.select2-container .select2-selection--single .wc-stripe-select2-container:before,.select2-results__options li.wc-stripe-select2-container:before{content:'';background-repeat:no-repeat;background-size:40px 24px;width:40px;height:42px;display:inline-block;margin-left:8px;background-position:center}.select2-container .select2-selection--single .wc-stripe-select2-container.visa:before,.select2-results__options li.wc-stripe-select2-container.visa:before{background-image:url(../img/cards/visa.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,.select2-results__options li.wc-stripe-select2-container.mastercard:before{background-image:url(../img/cards/mastercard.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.americanexpress:before,.select2-results__options li.wc-stripe-select2-container.americanexpress:before{background-image:url(../img/cards/amex.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.amex:before,.select2-results__options li.wc-stripe-select2-container.amex:before{background-image:url(../img/cards/amex.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.discover:before,.select2-results__options li.wc-stripe-select2-container.discover:before{background-image:url(../img/cards/discover.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,.select2-results__options li.wc-stripe-select2-container.mastercard:before{background-image:url(../img/cards/mastercard.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.dinersclub:before,.select2-results__options li.wc-stripe-select2-container.dinersclub:before{background-image:url(../img/cards/diners.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.diners:before,.select2-results__options li.wc-stripe-select2-container.diners:before{background-image:url(../img/cards/diners.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.jcb:before,.select2-results__options li.wc-stripe-select2-container.jcb:before{background-image:url(../img/cards/jcb.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.stripe_sepa:before,.select2-results__options li.wc-stripe-select2-container.stripe_sepa:before{background-image:url(../img/sepa.svg)}.select2-results__options li.wc-stripe-select2-container.wc-stripe-ach:before{display:none}#wc-stripe-card-element{margin-bottom:1em}.wc-stripe_cc-container .wc-stripe-save-source .save-source-label{display:block;margin-top:10px}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]{opacity:0;position:absolute;width:20px;height:20px}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{position:relative}.wc-stripe_cc-container .save-source-checkbox{height:20px;width:20px;position:relative;background-color:#fff;display:block;border-radius:3px;border:1px solid #bababa}.wc-stripe_cc-container .save-source-checkbox:after{content:"";position:absolute;top:0;right:0}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]:checked+.save-source-checkbox:after{right:6px;top:2px;width:7px;height:12px;border:solid #2196f3;border-width:0 0 3px 3px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}li.payment_method_stripe_applepay,li.payment_method_stripe_googlepay,li.payment_method_stripe_payment_request{display:none}#payment #place_order.wc-stripe-hide,#place_order.wc-stripe-hide,.woocommerce-checkout-review-order #payment #place_order.wc-stripe-hide{position:absolute!important;z-index:-1000!important;height:0!important;padding:0!important;opacity:0!important}.wc-stripe-product-checkout-container{display:none;width:100%}.wc-stripe-product-checkout-container.bottom{margin-top:1em}.wc-stripe-product-checkout-container.top{margin-bottom:1em}.wc-stripe-product-checkout-container.active{display:block}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods,.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods{list-style:none;margin:0;padding:0}.wc-stripe-cart-checkout-container{margin:0;padding:0;clear:both}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods{margin-bottom:1.5em}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_],.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]{margin:0 0 1em 0}.wc_stripe_cart_payment_methods .gpay-button,.wc_stripe_cart_payment_methods .gpay-card-info-container,.wc_stripe_product_payment_methods .gpay-button,.wc_stripe_product_payment_methods .gpay-card-info-container{width:100%!important;margin:0}.wc_stripe_product_payment_methods .disabled{opacity:.45}.stripe_cart_gateway_active .checkout-button,.woocommerce-cart .stripe_cart_gateway_active .wc-proceed-to-checkout .checkout-button{margin-bottom:0}.wc-stripe-cart-or{margin:1em 0;text-align:center}li.wc-stripe-payment-method.or{display:none}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or{display:block;margin:15px 0}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or p{margin:0}li[class*=payment_method_stripe_].active~li.wc-stripe-payment-method.or{display:block;margin:0}li.payment_method_stripe_applepay label:first-of-type img{width:49px;max-height:32px}li.payment_method_stripe_googlepay label:first-of-type img{width:48px;max-height:35px}li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_standard]{width:60px;max-height:35px}li.payment_method_stripe_ach label:first-of-type img{width:32px;height:32px;min-width:32px;min-height:32px}.gpay-button:hover{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:active{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:focus{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}@supports (-webkit-appearance:-apple-pay-button){.apple-pay-button{display:block;-webkit-appearance:-apple-pay-button;width:100%;max-width:100%;min-width:200px;height:40px;max-height:40px}.apple-pay-button-black{-apple-pay-button-style:#000;background-color:#000!important}.apple-pay-button-white{-apple-pay-button-style:#fff;background-color:#fff!important}.apple-pay-button-white-with-line{-apple-pay-button-style:white-outline}.applepay-top-container .apple-pay-button{max-width:240px}.woocommerce-checkout-payment .apple-pay-button{max-width:240px}body.single-product div.product form.cart .wc_stripe_product_payment_methods .apple-pay-button{max-width:100%}}.wc-stripe-banner-checkout{display:none;padding:20px 15px 0 15px;border:1px solid #d1d1d1;border-width:0 0 1px;position:relative;margin:1em 0}.wc-stripe-banner-checkout.active{display:block}.wc-stripe-banner-checkout span.banner-title{position:absolute;display:flex;align-items:center;top:-13px;left:0;right:0;background:0 0;white-space:nowrap;font-size:16px}.wc-stripe-banner-checkout span.banner-title:after,.wc-stripe-banner-checkout span.banner-title:before{content:' ';height:1px;background:#d1d1d1;display:block;width:50%}.wc-stripe-banner-checkout span.banner-title:before{margin-left:8px}.wc-stripe-banner-checkout span.banner-title:after{margin-right:8px}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways{list-style:none;margin:0;padding:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway{margin:0 0 20px 0;display:none}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-card-info-container{margin:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-card-info-container{width:100%}.wc_stripe_cart_payment_methods .payment_method_stripe_payment_request .StripeElement,.wc_stripe_product_payment_methods .payment_method_stripe_payment_request .StripeElement{padding:0;width:100%}.woocommerce-checkout #wc-stripe-payment-request-container.StripeElement{width:240px;padding:0}.wc-stripe-checkout-banner-gateway #wc-stripe-payment-request-banner.StripeElement{width:100%}ul.payment_methods li.payment_method_stripe_p24 img{max-width:90px;width:90px;max-height:45px}ul.payment_methods li.payment_method_stripe_ideal img{max-width:38px;width:38px;max-height:35px}ul.payment_methods li.payment_method_stripe_fpx img{max-width:75px;width:75px;max-height:25px}ul.payment_methods li.payment_method_stripe_klarna img{max-width:72px;width:72px;max-height:20px}ul.payment_methods li.payment_method_stripe_giropay img{max-width:65px;width:65px;max-height:28px}ul.payment_methods li.payment_method_stripe_eps img{max-width:70px;width:70px;max-height:46px}ul.payment_methods li.payment_method_stripe_multibanco img{max-width:48px;width:48px;max-height:48px}ul.payment_methods li.payment_method_stripe_sepa img{max-width:67px;width:67px;max-height:18px}ul.payment_methods li.payment_method_stripe_sofort img{max-width:70px;width:70px;max-height:21px}label[for=payment_method_stripe_bancontact] img,ul.payment_methods li.payment_method_stripe_bancontact img{width:60px;height:42px;max-width:60px;max-height:42px}ul.payment_methods li.payment_method_stripe_wechat label img{max-width:82px;width:82px;max-height:23px}ul.payment_methods li.payment_method_stripe_alipay img{max-width:72px;width:72px;height:36px;max-height:36px}ul.payment_methods li.payment_method_stripe_grabpay img{max-width:95px;width:95px;max-height:28px}#wc-stripe-card-element{width:100%}li.banner_payment_method_stripe_payment_request .StripeElement{padding:0}.single-product .blockMsg{border:none!important;background-color:transparent!important}#wc-stripe-card{position:absolute!important;top:50%;left:8px;transform:translatey(-50%);width:23px;height:15px;padding:0;border:none}#wc-stripe-card.active{width:32px;height:20px}input[id=stripe-postal-code]:focus{outline:0;background:0 0;border:none;box-shadow:none}div.postalCode:focus{outline:0;border:none}li[class*=payment_method_stripe] .select2-container .select2-selection--single{height:42px;padding:0 5px}li[class*=payment_method_stripe] .select2-container--default .select2-selection--single .select2-selection__arrow{height:42px;top:1px;left:1px}.blockUI.blockMsg{font-size:20px;white-space:nowrap}#wc-stripe-payment-request-container.disabled{opactity:.45}.wc-stripe-paymentRequest-icons-container img{float:none}.select2-container .select2-selection--single .wc-stripe-select2-container.wc-stripe-ach:before{display:none}ul.wc_stripe_cart_payment_methods li.wc-stripe-payment-method button,ul.wc_stripe_checkout_banner_gateways li button,ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_] button{margin:0}ul.payment_methods li[class*=payment_method]{margin:0;padding:10px 0}ul.payment_methods li[class*=payment_method] input[name=payment_method]{margin:0 5px 0 10px;float:none}ul.payment_methods li[class*=payment_method]>input[name=payment_method]+label{padding-top:0;padding-left:0;padding-bottom:0}ul.payment_methods{list-style:none}ul.payment_methods li[class*=payment_method_stripe_] .wc-stripe_cc-new-method-container label:before{display:none}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{padding:0!important;margin:0}.wc-stripe_cc-container .wc-stripe-save-source .save-source-label{padding:0;margin-bottom:5px}div[id*=wc_stripe_local_payment_stripe_].StripeElement{border:1px solid #eee;border-radius:4px}.qrcode-message{margin:10px 0 0 0}#wc_stripe_local_payment_stripe_becs,#wc_stripe_local_payment_stripe_sepa{padding:10px 12px;box-shadow:0 1px 3px 0 #e6ebf1}.wc-stripe-local-desc.stripe_becs,.wc-stripe-local-desc.stripe_sepa{margin:10px 0}.wc-stripe-clear{clear:both;height:0;visibility:hidden}.wc-stripe-gateway-desc p{margin:0}#wc_stripe_local_payment_stripe_klarna,div.payment_method_stripe_cc,div.payment_method_stripe_fpx,div.payment_method_stripe_ideal,div.payment_method_stripe_sepa,li[class*=payment_method_stripe_] div.wc-stripe_applepay-container.has_tokens,li[class*=payment_method_stripe_] div.wc-stripe_googlepay-container.has_tokens,li[class*=payment_method_stripe_] div.wc-stripe_payment_request-container.has_tokens{margin-top:10px}.wc-stripe-gateway-desc{margin-top:10px}#wc-stripe-card-element.StripeElement--webkit-autofill{background-color:transparent!important}#wc_stripe_local_payment_stripe_klarna .stripe-klarna-categories{list-style:none;margin:0;padding:10px}li.payment_method_stripe_alipay,li.payment_method_stripe_bancontact,li.payment_method_stripe_becs,li.payment_method_stripe_eps,li.payment_method_stripe_fpx,li.payment_method_stripe_giropay,li.payment_method_stripe_ideal,li.payment_method_stripe_klarna,li.payment_method_stripe_multibanco,li.payment_method_stripe_p24,li.payment_method_stripe_sepa,li.payment_method_stripe_sofort,li.payment_method_stripe_wechat{display:none}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods{list-style:none;margin:0;padding:0}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods li{margin:0}.widget_shopping_cart_content a.wc-stripe-applepay-mini-cart,.widget_shopping_cart_content a.wc-stripe-gpay-mini-cart,.widget_shopping_cart_content a.wc-stripe-payment-request-mini-cart{background:0 0;padding:0;border:none}a.wc-stripe-gpay-mini-cart .gpay-button,a.wc-stripe-gpay-mini-cart .gpay-card-info-container a.wc-stripe-applepay-mini-cart .apple-pay-button{width:100%;margin:0}.wc-stripe-payment-request-mini-cart.StripeElement{padding:0;background:0 0;border:none;width:100%}.wc-stripe-payment-request-mini-cart.StripeElement .__PrivateStripeElement{width:100%}.widget_shopping_cart_content .wc-stripe-overlay{display:none!important;position:absolute;background:rgba(255,255,255,.75);height:100%;width:100%;z-index:-1}.widget_shopping_cart_content .wc-stripe-overlay.active{display:block!important;z-index:9999}.wc-stripe-klarna-loader{display:flex;justify-content:center;position:relative;width:100%;height:30px;box-sizing:border-box;transform:scale(.65)}.wc-stripe-klarna-loader div{box-sizing:border-box;display:block;position:absolute;box-sizing:border-box;width:30px;height:30px;border:3px solid #000;border-radius:50%;animation:klarna-payments-loader 1.3s cubic-bezier(.5,0,.5,1) infinite;border-color:#000 transparent transparent transparent}.wc-stripe-klarna-loader div:nth-child(1){animation-delay:-.45s}.wc-stripe-klarna-loader div:nth-child(2){animation-delay:-.3s}.wc-stripe-klarna-loader div:nth-child(3){animation-delay:-.15s}@keyframes klarna-payments-loader{0%{transform:rotate(0)}100%{transform:rotate(-360deg)}}
1
+ .wc-stripe-card-icons-container,.wc-stripe-paymentRequest-icons-container{float:left;display:inline-block}ul.payment_methods li[class*=payment_method]{margin:0;padding:0}li[class*=payment_method] input[type=radio]{margin:0 5px 0 10px}li[class*=payment_method] input[type=radio]+label:not(.wc-stripe-label-payment-type){margin:0}.woocommerce-checkout #payment ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n+2),ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n+2){margin:0}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon,li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img{max-width:44px;max-height:27px;width:44px;height:27px;float:none;display:inline}li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img{width:25px;height:25px;max-width:25px;max-height:25px}ul.payment_methods label[for*=payment_method_stripe]:after{clear:left;content:"";display:block}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon:nth-child(2n+2){margin:0 2px}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon.open.visa{padding-top:2px}ul.payment_methods li[class*=payment_method_stripe_] label>img:first-of-type{float:left!important}.wc-stripe_cc-new-method-container{margin-bottom:1em}.wc-stripe_cc-container .StripeElement{box-sizing:border-box;height:40px;padding:10px 12px;border-radius:4px;background-color:#fff;-webkit-transition:box-shadow 150ms ease;transition:box-shadow 150ms ease}input.wc-stripe-klarna-category,input.wc-stripe-payment-type{display:none!important}body .wfacp_main_form.woocommerce .wc-stripe-save-source label.checkbox{padding:0!important}input[type=radio]+label.wc-stripe-label-payment-type,label.wc-stripe-label-klarna-category,label.wc-stripe-label-payment-type{margin-bottom:1em;display:block;padding:0!important;color:#000}.theme-flatsome div.wc-stripe-saved-methods-container{margin:0 0 1em 0}label.wc-stripe-label-klarna-category:before,label.wc-stripe-label-payment-type:before{content:"";display:inline-block;width:11px;height:11px;border:2px solid #fff;box-shadow:0 0 0 2px #000;background:#fff;margin-right:4px;margin-left:.5em;border-radius:100%;-webkit-transform:translateY(2px);-ms-transform:translateY(2px);transform:translateY(2px)}input.wc-stripe-klarna-category:checked+label.wc-stripe-label-klarna-category:before,input.wc-stripe-payment-type:checked+label.wc-stripe-label-payment-type:before{background:#000}label.wc-stripe-label-payment-type:after{content:none!important;display:none!important}.select2-results__options li.wc-stripe-select2-container,.wc-stripe-saved-methods-container .select2-container .select2-selection--single .wc-stripe-select2-container{display:flex;align-items:center;height:42px;line-height:42px!important}.select2-container .select2-selection--single .wc-stripe-select2-container:before,.select2-results__options li.wc-stripe-select2-container:before{content:'';background-repeat:no-repeat;background-size:40px 24px;width:40px;height:42px;display:inline-block;margin-left:8px;background-position:center}.select2-container .select2-selection--single .wc-stripe-select2-container.visa:before,.select2-results__options li.wc-stripe-select2-container.visa:before{background-image:url(../img/cards/visa.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,.select2-results__options li.wc-stripe-select2-container.mastercard:before{background-image:url(../img/cards/mastercard.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.americanexpress:before,.select2-results__options li.wc-stripe-select2-container.americanexpress:before{background-image:url(../img/cards/amex.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.amex:before,.select2-results__options li.wc-stripe-select2-container.amex:before{background-image:url(../img/cards/amex.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.discover:before,.select2-results__options li.wc-stripe-select2-container.discover:before{background-image:url(../img/cards/discover.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,.select2-results__options li.wc-stripe-select2-container.mastercard:before{background-image:url(../img/cards/mastercard.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.dinersclub:before,.select2-results__options li.wc-stripe-select2-container.dinersclub:before{background-image:url(../img/cards/diners.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.diners:before,.select2-results__options li.wc-stripe-select2-container.diners:before{background-image:url(../img/cards/diners.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.jcb:before,.select2-results__options li.wc-stripe-select2-container.jcb:before{background-image:url(../img/cards/jcb.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.stripe_sepa:before,.select2-results__options li.wc-stripe-select2-container.stripe_sepa:before{background-image:url(../img/sepa.svg)}.select2-results__options li.wc-stripe-select2-container.wc-stripe-ach:before{display:none}#wc-stripe-card-element{margin-bottom:1em}.wc-stripe_cc-container .wc-stripe-save-source .save-source-label{display:block;margin-top:10px}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]{opacity:0;position:absolute;width:20px;height:20px}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{position:relative}.wc-stripe_cc-container .save-source-checkbox{height:20px;width:20px;position:relative;background-color:#fff;display:block;border-radius:3px;border:1px solid #bababa}.wc-stripe_cc-container .save-source-checkbox:after{content:"";position:absolute;top:0;right:0}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]:checked+.save-source-checkbox:after{right:6px;top:2px;width:7px;height:12px;border:solid #2196f3;border-width:0 0 3px 3px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}li.payment_method_stripe_applepay,li.payment_method_stripe_googlepay,li.payment_method_stripe_payment_request{display:none}#payment #place_order.wc-stripe-hide,#place_order.wc-stripe-hide,.woocommerce-checkout-review-order #payment #place_order.wc-stripe-hide{position:absolute!important;z-index:-1000!important;height:0!important;padding:0!important;opacity:0!important}.wc-stripe-product-checkout-container{display:none;width:100%}.wc-stripe-product-checkout-container.bottom{margin-top:1em}.wc-stripe-product-checkout-container.top{margin-bottom:1em}.wc-stripe-product-checkout-container.active{display:block}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods,.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods{list-style:none;margin:0;padding:0}.wc-stripe-cart-checkout-container{margin:0;padding:0;clear:both}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods{margin-bottom:1.5em}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_],.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]{margin:0 0 1em 0}.wc_stripe_cart_payment_methods .gpay-button,.wc_stripe_cart_payment_methods .gpay-card-info-container,.wc_stripe_product_payment_methods .gpay-button,.wc_stripe_product_payment_methods .gpay-card-info-container{width:100%!important;margin:0}.wc_stripe_product_payment_methods .disabled{opacity:.45}.stripe_cart_gateway_active .checkout-button,.woocommerce-cart .stripe_cart_gateway_active .wc-proceed-to-checkout .checkout-button{margin-bottom:0}.wc-stripe-cart-or{margin:1em 0;text-align:center}li.wc-stripe-payment-method.or{display:none}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or{display:block;margin:15px 0}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or p{margin:0}li[class*=payment_method_stripe_].active~li.wc-stripe-payment-method.or{display:block;margin:0}li.payment_method_stripe_applepay label:first-of-type img{width:49px;max-height:32px}li.payment_method_stripe_googlepay label:first-of-type img{width:48px;max-height:35px}li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_standard]{width:60px;max-height:35px}li.payment_method_stripe_ach label:first-of-type img{width:32px;height:32px;min-width:32px;min-height:32px}.gpay-button:hover{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:active{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:focus{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}@supports (-webkit-appearance:-apple-pay-button){.apple-pay-button{display:block;-webkit-appearance:-apple-pay-button;width:100%;max-width:100%;min-width:200px;height:40px;max-height:40px}.apple-pay-button-black{-apple-pay-button-style:#000}.apple-pay-button-white{-apple-pay-button-style:#fff}.apple-pay-button-white-with-line{-apple-pay-button-style:white-outline}.applepay-top-container .apple-pay-button{max-width:240px}.woocommerce-checkout-payment .apple-pay-button{max-width:240px}body.single-product div.product form.cart .wc_stripe_product_payment_methods .apple-pay-button{max-width:100%}}.wc-stripe-banner-checkout{display:none;padding:20px 15px 0 15px;border:1px solid #d1d1d1;border-width:0 0 1px;position:relative;margin:1em 0}.wc-stripe-banner-checkout.active{display:block}.wc-stripe-banner-checkout span.banner-title{position:absolute;display:flex;align-items:center;top:-13px;left:0;right:0;background:0 0;white-space:nowrap;font-size:16px}.wc-stripe-banner-checkout span.banner-title:after,.wc-stripe-banner-checkout span.banner-title:before{content:' ';height:1px;background:#d1d1d1;display:block;width:50%}.wc-stripe-banner-checkout span.banner-title:before{margin-left:8px}.wc-stripe-banner-checkout span.banner-title:after{margin-right:8px}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways{list-style:none;margin:0;padding:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway{margin:0 0 20px 0;display:none}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-card-info-container{margin:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-card-info-container{width:100%}.wc_stripe_cart_payment_methods .payment_method_stripe_payment_request .StripeElement,.wc_stripe_product_payment_methods .payment_method_stripe_payment_request .StripeElement{padding:0;width:100%}.woocommerce-checkout #wc-stripe-payment-request-container.StripeElement{width:240px;padding:0}.wc-stripe-checkout-banner-gateway #wc-stripe-payment-request-banner.StripeElement{width:100%}ul.payment_methods li.payment_method_stripe_p24 img{max-width:90px;width:90px;max-height:45px}ul.payment_methods li.payment_method_stripe_ideal img{max-width:38px;width:38px;max-height:35px}ul.payment_methods li.payment_method_stripe_fpx img{max-width:75px;width:75px;max-height:25px}ul.payment_methods li.payment_method_stripe_klarna img{max-width:72px;width:72px;max-height:20px}ul.payment_methods li.payment_method_stripe_giropay img{max-width:65px;width:65px;max-height:28px}ul.payment_methods li.payment_method_stripe_eps img{max-width:70px;width:70px;max-height:46px}ul.payment_methods li.payment_method_stripe_multibanco img{max-width:48px;width:48px;max-height:48px}ul.payment_methods li.payment_method_stripe_sepa img{max-width:67px;width:67px;max-height:18px}ul.payment_methods li.payment_method_stripe_sofort img{max-width:70px;width:70px;max-height:21px}label[for=payment_method_stripe_bancontact] img,ul.payment_methods li.payment_method_stripe_bancontact img{width:60px;height:42px;max-width:60px;max-height:42px}ul.payment_methods li.payment_method_stripe_wechat label img{max-width:82px;width:82px;max-height:23px}ul.payment_methods li.payment_method_stripe_alipay img{max-width:72px;width:72px;height:36px;max-height:36px}ul.payment_methods li.payment_method_stripe_grabpay img{max-width:95px;width:95px;max-height:28px}#wc-stripe-card-element{width:100%}li.banner_payment_method_stripe_payment_request .StripeElement{padding:0}.single-product .blockMsg{border:none!important;background-color:transparent!important}#wc-stripe-card{position:absolute!important;top:50%;left:8px;transform:translatey(-50%);width:23px;height:15px;padding:0;border:none}#wc-stripe-card.active{width:32px;height:20px}input[id=stripe-postal-code]:focus{outline:0;background:0 0;border:none;box-shadow:none}div.postalCode:focus{outline:0;border:none}li[class*=payment_method_stripe] .select2-container .select2-selection--single{height:42px;padding:0 5px}li[class*=payment_method_stripe] .select2-container--default .select2-selection--single .select2-selection__arrow{height:42px;top:1px;left:1px}.blockUI.blockMsg{font-size:20px;white-space:nowrap}#wc-stripe-payment-request-container.disabled{opacity:.45}.wc-stripe-paymentRequest-icons-container img{float:none}.select2-container .select2-selection--single .wc-stripe-select2-container.wc-stripe-ach:before{display:none}ul.wc_stripe_cart_payment_methods li.wc-stripe-payment-method button,ul.wc_stripe_checkout_banner_gateways li button,ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_] button{margin:0}ul.payment_methods li[class*=payment_method]{margin:0;padding:10px 0}ul.payment_methods li[class*=payment_method] input[name=payment_method]{margin:0 5px 0 10px;float:none}ul.payment_methods li[class*=payment_method]>input[name=payment_method]+label{padding-top:0;padding-left:0;padding-bottom:0}ul.payment_methods{list-style:none}ul.payment_methods li[class*=payment_method_stripe_] .wc-stripe_cc-new-method-container label:before{display:none}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{padding:0!important;margin:0}.wc-stripe_cc-container .wc-stripe-save-source .save-source-label{padding:0;margin-bottom:5px}div[id*=wc_stripe_local_payment_stripe_].StripeElement{border:1px solid #eee;border-radius:4px}.qrcode-message{margin:10px 0 0 0}#wc_stripe_local_payment_stripe_becs,#wc_stripe_local_payment_stripe_sepa{padding:10px 12px;box-shadow:0 1px 3px 0 #e6ebf1}.wc-stripe-local-desc.stripe_becs,.wc-stripe-local-desc.stripe_sepa{margin:10px 0}.wc-stripe-clear{clear:both;height:0;visibility:hidden}.wc-stripe-gateway-desc p{margin:0}#wc_stripe_local_payment_stripe_klarna,div.payment_method_stripe_cc,div.payment_method_stripe_fpx,div.payment_method_stripe_ideal,div.payment_method_stripe_sepa,li[class*=payment_method_stripe_] div.wc-stripe_applepay-container.has_tokens,li[class*=payment_method_stripe_] div.wc-stripe_googlepay-container.has_tokens,li[class*=payment_method_stripe_] div.wc-stripe_payment_request-container.has_tokens{margin-top:10px}.wc-stripe-gateway-desc{margin-top:10px}#wc-stripe-card-element.StripeElement--webkit-autofill{background-color:transparent!important}#wc_stripe_local_payment_stripe_klarna .stripe-klarna-categories{list-style:none;margin:0;padding:10px}li.payment_method_stripe_alipay,li.payment_method_stripe_bancontact,li.payment_method_stripe_becs,li.payment_method_stripe_eps,li.payment_method_stripe_fpx,li.payment_method_stripe_giropay,li.payment_method_stripe_ideal,li.payment_method_stripe_klarna,li.payment_method_stripe_multibanco,li.payment_method_stripe_p24,li.payment_method_stripe_sepa,li.payment_method_stripe_sofort,li.payment_method_stripe_wechat{display:none}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods{list-style:none;margin:0;padding:0}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods li{margin:0}.widget_shopping_cart_content a.wc-stripe-applepay-mini-cart,.widget_shopping_cart_content a.wc-stripe-gpay-mini-cart,.widget_shopping_cart_content a.wc-stripe-payment-request-mini-cart{background:0 0;padding:0;border:none}a.wc-stripe-gpay-mini-cart .gpay-button,a.wc-stripe-gpay-mini-cart .gpay-card-info-container a.wc-stripe-applepay-mini-cart .apple-pay-button{width:100%;margin:0}.wc-stripe-payment-request-mini-cart.StripeElement{padding:0;background:0 0;border:none;width:100%}.wc-stripe-payment-request-mini-cart.StripeElement .__PrivateStripeElement{width:100%}.widget_shopping_cart_content .wc-stripe-overlay{display:none!important;position:absolute;background:rgba(255,255,255,.75);height:100%;width:100%;z-index:-1}.widget_shopping_cart_content .wc-stripe-overlay.active{display:block!important;z-index:9999}.wc-stripe-klarna-loader{display:flex;justify-content:center;position:relative;width:100%;height:30px;box-sizing:border-box;transform:scale(.65)}.wc-stripe-klarna-loader div{box-sizing:border-box;display:block;position:absolute;box-sizing:border-box;width:30px;height:30px;border:3px solid #000;border-radius:50%;animation:klarna-payments-loader 1.3s cubic-bezier(.5,0,.5,1) infinite;border-color:#000 transparent transparent transparent}.wc-stripe-klarna-loader div:nth-child(1){animation-delay:-.45s}.wc-stripe-klarna-loader div:nth-child(2){animation-delay:-.3s}.wc-stripe-klarna-loader div:nth-child(3){animation-delay:-.15s}@keyframes klarna-payments-loader{0%{transform:rotate(0)}100%{transform:rotate(-360deg)}}li.payment_method_stripe_alipay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_applepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_bancontact.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_eps.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_giropay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_googlepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_grabpay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_multibanco.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_p24.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_payment_request.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_sofort.wc-stripe-no-desc .payment_box.wc-stripe-no-methods{padding:0;margin:0}
assets/css/stripe.min.css CHANGED
@@ -1 +1 @@
1
- .wc-stripe-card-icons-container,.wc-stripe-paymentRequest-icons-container{float:right;display:inline-block}ul.payment_methods li[class*=payment_method]{margin:0;padding:0}li[class*=payment_method] input[type=radio]{margin:0 10px 0 5px}li[class*=payment_method] input[type=radio]+label:not(.wc-stripe-label-payment-type){margin:0}.woocommerce-checkout #payment ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n+2),ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n+2){margin:0}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon,li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img{max-width:44px;max-height:27px;width:44px;height:27px;float:none;display:inline}li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img{width:25px;height:25px;max-width:25px;max-height:25px}ul.payment_methods label[for*=payment_method_stripe]:after{clear:right;content:"";display:block}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon:nth-child(2n+2){margin:0 2px}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon.open.visa{padding-top:2px}ul.payment_methods li[class*=payment_method_stripe_] label>img:first-of-type{float:right!important}.wc-stripe_cc-new-method-container{margin-bottom:1em}.wc-stripe_cc-container .StripeElement{box-sizing:border-box;height:40px;padding:10px 12px;border-radius:4px;background-color:#fff;-webkit-transition:box-shadow 150ms ease;transition:box-shadow 150ms ease}input.wc-stripe-klarna-category,input.wc-stripe-payment-type{display:none!important}body .wfacp_main_form.woocommerce .wc-stripe-save-source label.checkbox{padding:0!important}input[type=radio]+label.wc-stripe-label-payment-type,label.wc-stripe-label-klarna-category,label.wc-stripe-label-payment-type{margin-bottom:1em;display:block;padding:0!important;color:#000}.theme-flatsome div.wc-stripe-saved-methods-container{margin:0 0 1em 0}label.wc-stripe-label-klarna-category:before,label.wc-stripe-label-payment-type:before{content:"";display:inline-block;width:11px;height:11px;border:2px solid #fff;box-shadow:0 0 0 2px #000;background:#fff;margin-left:4px;margin-right:.5em;border-radius:100%;-webkit-transform:translateY(2px);-ms-transform:translateY(2px);transform:translateY(2px)}input.wc-stripe-klarna-category:checked+label.wc-stripe-label-klarna-category:before,input.wc-stripe-payment-type:checked+label.wc-stripe-label-payment-type:before{background:#000}label.wc-stripe-label-payment-type:after{content:none!important;display:none!important}.select2-results__options li.wc-stripe-select2-container,.wc-stripe-saved-methods-container .select2-container .select2-selection--single .wc-stripe-select2-container{display:flex;align-items:center;height:42px;line-height:42px!important}.select2-container .select2-selection--single .wc-stripe-select2-container:before,.select2-results__options li.wc-stripe-select2-container:before{content:'';background-repeat:no-repeat;background-size:40px 24px;width:40px;height:42px;display:inline-block;margin-right:8px;background-position:center}.select2-container .select2-selection--single .wc-stripe-select2-container.visa:before,.select2-results__options li.wc-stripe-select2-container.visa:before{background-image:url(../img/cards/visa.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,.select2-results__options li.wc-stripe-select2-container.mastercard:before{background-image:url(../img/cards/mastercard.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.americanexpress:before,.select2-results__options li.wc-stripe-select2-container.americanexpress:before{background-image:url(../img/cards/amex.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.amex:before,.select2-results__options li.wc-stripe-select2-container.amex:before{background-image:url(../img/cards/amex.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.discover:before,.select2-results__options li.wc-stripe-select2-container.discover:before{background-image:url(../img/cards/discover.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,.select2-results__options li.wc-stripe-select2-container.mastercard:before{background-image:url(../img/cards/mastercard.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.dinersclub:before,.select2-results__options li.wc-stripe-select2-container.dinersclub:before{background-image:url(../img/cards/diners.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.diners:before,.select2-results__options li.wc-stripe-select2-container.diners:before{background-image:url(../img/cards/diners.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.jcb:before,.select2-results__options li.wc-stripe-select2-container.jcb:before{background-image:url(../img/cards/jcb.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.stripe_sepa:before,.select2-results__options li.wc-stripe-select2-container.stripe_sepa:before{background-image:url(../img/sepa.svg)}.select2-results__options li.wc-stripe-select2-container.wc-stripe-ach:before{display:none}#wc-stripe-card-element{margin-bottom:1em}.wc-stripe_cc-container .wc-stripe-save-source .save-source-label{display:block;margin-top:10px}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]{opacity:0;position:absolute;width:20px;height:20px}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{position:relative}.wc-stripe_cc-container .save-source-checkbox{height:20px;width:20px;position:relative;background-color:#fff;display:block;border-radius:3px;border:1px solid #bababa}.wc-stripe_cc-container .save-source-checkbox:after{content:"";position:absolute;top:0;left:0}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]:checked+.save-source-checkbox:after{left:6px;top:2px;width:7px;height:12px;border:solid #2196f3;border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}li.payment_method_stripe_applepay,li.payment_method_stripe_googlepay,li.payment_method_stripe_payment_request{display:none}#payment #place_order.wc-stripe-hide,#place_order.wc-stripe-hide,.woocommerce-checkout-review-order #payment #place_order.wc-stripe-hide{position:absolute!important;z-index:-1000!important;height:0!important;padding:0!important;opacity:0!important}.wc-stripe-product-checkout-container{display:none;width:100%}.wc-stripe-product-checkout-container.bottom{margin-top:1em}.wc-stripe-product-checkout-container.top{margin-bottom:1em}.wc-stripe-product-checkout-container.active{display:block}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods,.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods{list-style:none;margin:0;padding:0}.wc-stripe-cart-checkout-container{margin:0;padding:0;clear:both}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods{margin-bottom:1.5em}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_],.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]{margin:0 0 1em 0}.wc_stripe_cart_payment_methods .gpay-button,.wc_stripe_cart_payment_methods .gpay-card-info-container,.wc_stripe_product_payment_methods .gpay-button,.wc_stripe_product_payment_methods .gpay-card-info-container{width:100%!important;margin:0}.wc_stripe_product_payment_methods .disabled{opacity:.45}.stripe_cart_gateway_active .checkout-button,.woocommerce-cart .stripe_cart_gateway_active .wc-proceed-to-checkout .checkout-button{margin-bottom:0}.wc-stripe-cart-or{margin:1em 0;text-align:center}li.wc-stripe-payment-method.or{display:none}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or{display:block;margin:15px 0}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or p{margin:0}li[class*=payment_method_stripe_].active~li.wc-stripe-payment-method.or{display:block;margin:0}li.payment_method_stripe_applepay label:first-of-type img{width:49px;max-height:32px}li.payment_method_stripe_googlepay label:first-of-type img{width:48px;max-height:35px}li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_standard]{width:60px;max-height:35px}li.payment_method_stripe_ach label:first-of-type img{width:32px;height:32px;min-width:32px;min-height:32px}.gpay-button:hover{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:active{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:focus{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}@supports (-webkit-appearance:-apple-pay-button){.apple-pay-button{display:block;-webkit-appearance:-apple-pay-button;width:100%;max-width:100%;min-width:200px;height:40px;max-height:40px}.apple-pay-button-black{-apple-pay-button-style:#000;background-color:#000!important}.apple-pay-button-white{-apple-pay-button-style:#fff;background-color:#fff!important}.apple-pay-button-white-with-line{-apple-pay-button-style:white-outline}.applepay-top-container .apple-pay-button{max-width:240px}.woocommerce-checkout-payment .apple-pay-button{max-width:240px}body.single-product div.product form.cart .wc_stripe_product_payment_methods .apple-pay-button{max-width:100%}}.wc-stripe-banner-checkout{display:none;padding:20px 15px 0 15px;border:1px solid #d1d1d1;border-width:0 0 1px;position:relative;margin:1em 0}.wc-stripe-banner-checkout.active{display:block}.wc-stripe-banner-checkout span.banner-title{position:absolute;display:flex;align-items:center;top:-13px;right:0;left:0;background:0 0;white-space:nowrap;font-size:16px}.wc-stripe-banner-checkout span.banner-title:after,.wc-stripe-banner-checkout span.banner-title:before{content:' ';height:1px;background:#d1d1d1;display:block;width:50%}.wc-stripe-banner-checkout span.banner-title:before{margin-right:8px}.wc-stripe-banner-checkout span.banner-title:after{margin-left:8px}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways{list-style:none;margin:0;padding:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway{margin:0 0 20px 0;display:none}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-card-info-container{margin:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-card-info-container{width:100%}.wc_stripe_cart_payment_methods .payment_method_stripe_payment_request .StripeElement,.wc_stripe_product_payment_methods .payment_method_stripe_payment_request .StripeElement{padding:0;width:100%}.woocommerce-checkout #wc-stripe-payment-request-container.StripeElement{width:240px;padding:0}.wc-stripe-checkout-banner-gateway #wc-stripe-payment-request-banner.StripeElement{width:100%}ul.payment_methods li.payment_method_stripe_p24 img{max-width:90px;width:90px;max-height:45px}ul.payment_methods li.payment_method_stripe_ideal img{max-width:38px;width:38px;max-height:35px}ul.payment_methods li.payment_method_stripe_fpx img{max-width:75px;width:75px;max-height:25px}ul.payment_methods li.payment_method_stripe_klarna img{max-width:72px;width:72px;max-height:20px}ul.payment_methods li.payment_method_stripe_giropay img{max-width:65px;width:65px;max-height:28px}ul.payment_methods li.payment_method_stripe_eps img{max-width:70px;width:70px;max-height:46px}ul.payment_methods li.payment_method_stripe_multibanco img{max-width:48px;width:48px;max-height:48px}ul.payment_methods li.payment_method_stripe_sepa img{max-width:67px;width:67px;max-height:18px}ul.payment_methods li.payment_method_stripe_sofort img{max-width:70px;width:70px;max-height:21px}label[for=payment_method_stripe_bancontact] img,ul.payment_methods li.payment_method_stripe_bancontact img{width:60px;height:42px;max-width:60px;max-height:42px}ul.payment_methods li.payment_method_stripe_wechat label img{max-width:82px;width:82px;max-height:23px}ul.payment_methods li.payment_method_stripe_alipay img{max-width:72px;width:72px;height:36px;max-height:36px}ul.payment_methods li.payment_method_stripe_grabpay img{max-width:95px;width:95px;max-height:28px}#wc-stripe-card-element{width:100%}li.banner_payment_method_stripe_payment_request .StripeElement{padding:0}.single-product .blockMsg{border:none!important;background-color:transparent!important}#wc-stripe-card{position:absolute!important;top:50%;right:8px;transform:translatey(-50%);width:23px;height:15px;padding:0;border:none}#wc-stripe-card.active{width:32px;height:20px}input[id=stripe-postal-code]:focus{outline:0;background:0 0;border:none;box-shadow:none}div.postalCode:focus{outline:0;border:none}li[class*=payment_method_stripe] .select2-container .select2-selection--single{height:42px;padding:0 5px}li[class*=payment_method_stripe] .select2-container--default .select2-selection--single .select2-selection__arrow{height:42px;top:1px;right:1px}.blockUI.blockMsg{font-size:20px;white-space:nowrap}#wc-stripe-payment-request-container.disabled{opactity:.45}.wc-stripe-paymentRequest-icons-container img{float:none}.select2-container .select2-selection--single .wc-stripe-select2-container.wc-stripe-ach:before{display:none}ul.wc_stripe_cart_payment_methods li.wc-stripe-payment-method button,ul.wc_stripe_checkout_banner_gateways li button,ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_] button{margin:0}ul.payment_methods li[class*=payment_method]{margin:0;padding:10px 0}ul.payment_methods li[class*=payment_method] input[name=payment_method]{margin:0 10px 0 5px;float:none}ul.payment_methods li[class*=payment_method]>input[name=payment_method]+label{padding-top:0;padding-right:0;padding-bottom:0}ul.payment_methods{list-style:none}ul.payment_methods li[class*=payment_method_stripe_] .wc-stripe_cc-new-method-container label:before{display:none}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{padding:0!important;margin:0}.wc-stripe_cc-container .wc-stripe-save-source .save-source-label{padding:0;margin-bottom:5px}div[id*=wc_stripe_local_payment_stripe_].StripeElement{border:1px solid #eee;border-radius:4px}.qrcode-message{margin:10px 0 0 0}#wc_stripe_local_payment_stripe_becs,#wc_stripe_local_payment_stripe_sepa{padding:10px 12px;box-shadow:0 1px 3px 0 #e6ebf1}.wc-stripe-local-desc.stripe_becs,.wc-stripe-local-desc.stripe_sepa{margin:10px 0}.wc-stripe-clear{clear:both;height:0;visibility:hidden}.wc-stripe-gateway-desc p{margin:0}#wc_stripe_local_payment_stripe_klarna,div.payment_method_stripe_cc,div.payment_method_stripe_fpx,div.payment_method_stripe_ideal,div.payment_method_stripe_sepa,li[class*=payment_method_stripe_] div.wc-stripe_applepay-container.has_tokens,li[class*=payment_method_stripe_] div.wc-stripe_googlepay-container.has_tokens,li[class*=payment_method_stripe_] div.wc-stripe_payment_request-container.has_tokens{margin-top:10px}.wc-stripe-gateway-desc{margin-top:10px}#wc-stripe-card-element.StripeElement--webkit-autofill{background-color:transparent!important}#wc_stripe_local_payment_stripe_klarna .stripe-klarna-categories{list-style:none;margin:0;padding:10px}li.payment_method_stripe_alipay,li.payment_method_stripe_bancontact,li.payment_method_stripe_becs,li.payment_method_stripe_eps,li.payment_method_stripe_fpx,li.payment_method_stripe_giropay,li.payment_method_stripe_ideal,li.payment_method_stripe_klarna,li.payment_method_stripe_multibanco,li.payment_method_stripe_p24,li.payment_method_stripe_sepa,li.payment_method_stripe_sofort,li.payment_method_stripe_wechat{display:none}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods{list-style:none;margin:0;padding:0}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods li{margin:0}.widget_shopping_cart_content a.wc-stripe-applepay-mini-cart,.widget_shopping_cart_content a.wc-stripe-gpay-mini-cart,.widget_shopping_cart_content a.wc-stripe-payment-request-mini-cart{background:0 0;padding:0;border:none}a.wc-stripe-gpay-mini-cart .gpay-button,a.wc-stripe-gpay-mini-cart .gpay-card-info-container a.wc-stripe-applepay-mini-cart .apple-pay-button{width:100%;margin:0}.wc-stripe-payment-request-mini-cart.StripeElement{padding:0;background:0 0;border:none;width:100%}.wc-stripe-payment-request-mini-cart.StripeElement .__PrivateStripeElement{width:100%}.widget_shopping_cart_content .wc-stripe-overlay{display:none!important;position:absolute;background:rgba(255,255,255,.75);height:100%;width:100%;z-index:-1}.widget_shopping_cart_content .wc-stripe-overlay.active{display:block!important;z-index:9999}.wc-stripe-klarna-loader{display:flex;justify-content:center;position:relative;width:100%;height:30px;box-sizing:border-box;transform:scale(.65)}.wc-stripe-klarna-loader div{box-sizing:border-box;display:block;position:absolute;box-sizing:border-box;width:30px;height:30px;border:3px solid #000;border-radius:50%;animation:klarna-payments-loader 1.3s cubic-bezier(.5,0,.5,1) infinite;border-color:#000 transparent transparent transparent}.wc-stripe-klarna-loader div:nth-child(1){animation-delay:-.45s}.wc-stripe-klarna-loader div:nth-child(2){animation-delay:-.3s}.wc-stripe-klarna-loader div:nth-child(3){animation-delay:-.15s}@keyframes klarna-payments-loader{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}
1
+ .wc-stripe-card-icons-container,.wc-stripe-paymentRequest-icons-container{float:right;display:inline-block}ul.payment_methods li[class*=payment_method]{margin:0;padding:0}li[class*=payment_method] input[type=radio]{margin:0 10px 0 5px}li[class*=payment_method] input[type=radio]+label:not(.wc-stripe-label-payment-type){margin:0}.woocommerce-checkout #payment ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n+2),ul.payment_methods li[class*=payment_method_stripe_]:nth-child(n+2){margin:0}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon,li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img{max-width:44px;max-height:27px;width:44px;height:27px;float:none;display:inline}li.payment_method_stripe_payment_request .wc-stripe-paymentRequest-icons-container img{width:25px;height:25px;max-width:25px;max-height:25px}ul.payment_methods label[for*=payment_method_stripe]:after{clear:right;content:"";display:block}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon:nth-child(2n+2){margin:0 2px}li.payment_method_stripe_cc .wc-stripe-card-icons-container img.wc-stripe-card-icon.open.visa{padding-top:2px}ul.payment_methods li[class*=payment_method_stripe_] label>img:first-of-type{float:right!important}.wc-stripe_cc-new-method-container{margin-bottom:1em}.wc-stripe_cc-container .StripeElement{box-sizing:border-box;height:40px;padding:10px 12px;border-radius:4px;background-color:#fff;-webkit-transition:box-shadow 150ms ease;transition:box-shadow 150ms ease}input.wc-stripe-klarna-category,input.wc-stripe-payment-type{display:none!important}body .wfacp_main_form.woocommerce .wc-stripe-save-source label.checkbox{padding:0!important}input[type=radio]+label.wc-stripe-label-payment-type,label.wc-stripe-label-klarna-category,label.wc-stripe-label-payment-type{margin-bottom:1em;display:block;padding:0!important;color:#000}.theme-flatsome div.wc-stripe-saved-methods-container{margin:0 0 1em 0}label.wc-stripe-label-klarna-category:before,label.wc-stripe-label-payment-type:before{content:"";display:inline-block;width:11px;height:11px;border:2px solid #fff;box-shadow:0 0 0 2px #000;background:#fff;margin-left:4px;margin-right:.5em;border-radius:100%;-webkit-transform:translateY(2px);-ms-transform:translateY(2px);transform:translateY(2px)}input.wc-stripe-klarna-category:checked+label.wc-stripe-label-klarna-category:before,input.wc-stripe-payment-type:checked+label.wc-stripe-label-payment-type:before{background:#000}label.wc-stripe-label-payment-type:after{content:none!important;display:none!important}.select2-results__options li.wc-stripe-select2-container,.wc-stripe-saved-methods-container .select2-container .select2-selection--single .wc-stripe-select2-container{display:flex;align-items:center;height:42px;line-height:42px!important}.select2-container .select2-selection--single .wc-stripe-select2-container:before,.select2-results__options li.wc-stripe-select2-container:before{content:'';background-repeat:no-repeat;background-size:40px 24px;width:40px;height:42px;display:inline-block;margin-right:8px;background-position:center}.select2-container .select2-selection--single .wc-stripe-select2-container.visa:before,.select2-results__options li.wc-stripe-select2-container.visa:before{background-image:url(../img/cards/visa.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,.select2-results__options li.wc-stripe-select2-container.mastercard:before{background-image:url(../img/cards/mastercard.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.americanexpress:before,.select2-results__options li.wc-stripe-select2-container.americanexpress:before{background-image:url(../img/cards/amex.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.amex:before,.select2-results__options li.wc-stripe-select2-container.amex:before{background-image:url(../img/cards/amex.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.discover:before,.select2-results__options li.wc-stripe-select2-container.discover:before{background-image:url(../img/cards/discover.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.mastercard:before,.select2-results__options li.wc-stripe-select2-container.mastercard:before{background-image:url(../img/cards/mastercard.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.dinersclub:before,.select2-results__options li.wc-stripe-select2-container.dinersclub:before{background-image:url(../img/cards/diners.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.diners:before,.select2-results__options li.wc-stripe-select2-container.diners:before{background-image:url(../img/cards/diners.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.jcb:before,.select2-results__options li.wc-stripe-select2-container.jcb:before{background-image:url(../img/cards/jcb.svg)}.select2-container .select2-selection--single .wc-stripe-select2-container.stripe_sepa:before,.select2-results__options li.wc-stripe-select2-container.stripe_sepa:before{background-image:url(../img/sepa.svg)}.select2-results__options li.wc-stripe-select2-container.wc-stripe-ach:before{display:none}#wc-stripe-card-element{margin-bottom:1em}.wc-stripe_cc-container .wc-stripe-save-source .save-source-label{display:block;margin-top:10px}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]{opacity:0;position:absolute;width:20px;height:20px}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{position:relative}.wc-stripe_cc-container .save-source-checkbox{height:20px;width:20px;position:relative;background-color:#fff;display:block;border-radius:3px;border:1px solid #bababa}.wc-stripe_cc-container .save-source-checkbox:after{content:"";position:absolute;top:0;left:0}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]:checked+.save-source-checkbox:after{left:6px;top:2px;width:7px;height:12px;border:solid #2196f3;border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}li.payment_method_stripe_applepay,li.payment_method_stripe_googlepay,li.payment_method_stripe_payment_request{display:none}#payment #place_order.wc-stripe-hide,#place_order.wc-stripe-hide,.woocommerce-checkout-review-order #payment #place_order.wc-stripe-hide{position:absolute!important;z-index:-1000!important;height:0!important;padding:0!important;opacity:0!important}.wc-stripe-product-checkout-container{display:none;width:100%}.wc-stripe-product-checkout-container.bottom{margin-top:1em}.wc-stripe-product-checkout-container.top{margin-bottom:1em}.wc-stripe-product-checkout-container.active{display:block}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods,.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods{list-style:none;margin:0;padding:0}.wc-stripe-cart-checkout-container{margin:0;padding:0;clear:both}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods{margin-bottom:1.5em}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_],.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]{margin:0 0 1em 0}.wc_stripe_cart_payment_methods .gpay-button,.wc_stripe_cart_payment_methods .gpay-card-info-container,.wc_stripe_product_payment_methods .gpay-button,.wc_stripe_product_payment_methods .gpay-card-info-container{width:100%!important;margin:0}.wc_stripe_product_payment_methods .disabled{opacity:.45}.stripe_cart_gateway_active .checkout-button,.woocommerce-cart .stripe_cart_gateway_active .wc-proceed-to-checkout .checkout-button{margin-bottom:0}.wc-stripe-cart-or{margin:1em 0;text-align:center}li.wc-stripe-payment-method.or{display:none}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or{display:block;margin:15px 0}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or p{margin:0}li[class*=payment_method_stripe_].active~li.wc-stripe-payment-method.or{display:block;margin:0}li.payment_method_stripe_applepay label:first-of-type img{width:49px;max-height:32px}li.payment_method_stripe_googlepay label:first-of-type img{width:48px;max-height:35px}li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_standard]{width:60px;max-height:35px}li.payment_method_stripe_ach label:first-of-type img{width:32px;height:32px;min-width:32px;min-height:32px}.gpay-button:hover{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:active{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:focus{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}@supports (-webkit-appearance:-apple-pay-button){.apple-pay-button{display:block;-webkit-appearance:-apple-pay-button;width:100%;max-width:100%;min-width:200px;height:40px;max-height:40px}.apple-pay-button-black{-apple-pay-button-style:#000}.apple-pay-button-white{-apple-pay-button-style:#fff}.apple-pay-button-white-with-line{-apple-pay-button-style:white-outline}.applepay-top-container .apple-pay-button{max-width:240px}.woocommerce-checkout-payment .apple-pay-button{max-width:240px}body.single-product div.product form.cart .wc_stripe_product_payment_methods .apple-pay-button{max-width:100%}}.wc-stripe-banner-checkout{display:none;padding:20px 15px 0 15px;border:1px solid #d1d1d1;border-width:0 0 1px;position:relative;margin:1em 0}.wc-stripe-banner-checkout.active{display:block}.wc-stripe-banner-checkout span.banner-title{position:absolute;display:flex;align-items:center;top:-13px;right:0;left:0;background:0 0;white-space:nowrap;font-size:16px}.wc-stripe-banner-checkout span.banner-title:after,.wc-stripe-banner-checkout span.banner-title:before{content:' ';height:1px;background:#d1d1d1;display:block;width:50%}.wc-stripe-banner-checkout span.banner-title:before{margin-right:8px}.wc-stripe-banner-checkout span.banner-title:after{margin-left:8px}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways{list-style:none;margin:0;padding:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway{margin:0 0 20px 0;display:none}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-card-info-container{margin:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-card-info-container{width:100%}.wc_stripe_cart_payment_methods .payment_method_stripe_payment_request .StripeElement,.wc_stripe_product_payment_methods .payment_method_stripe_payment_request .StripeElement{padding:0;width:100%}.woocommerce-checkout #wc-stripe-payment-request-container.StripeElement{width:240px;padding:0}.wc-stripe-checkout-banner-gateway #wc-stripe-payment-request-banner.StripeElement{width:100%}ul.payment_methods li.payment_method_stripe_p24 img{max-width:90px;width:90px;max-height:45px}ul.payment_methods li.payment_method_stripe_ideal img{max-width:38px;width:38px;max-height:35px}ul.payment_methods li.payment_method_stripe_fpx img{max-width:75px;width:75px;max-height:25px}ul.payment_methods li.payment_method_stripe_klarna img{max-width:72px;width:72px;max-height:20px}ul.payment_methods li.payment_method_stripe_giropay img{max-width:65px;width:65px;max-height:28px}ul.payment_methods li.payment_method_stripe_eps img{max-width:70px;width:70px;max-height:46px}ul.payment_methods li.payment_method_stripe_multibanco img{max-width:48px;width:48px;max-height:48px}ul.payment_methods li.payment_method_stripe_sepa img{max-width:67px;width:67px;max-height:18px}ul.payment_methods li.payment_method_stripe_sofort img{max-width:70px;width:70px;max-height:21px}label[for=payment_method_stripe_bancontact] img,ul.payment_methods li.payment_method_stripe_bancontact img{width:60px;height:42px;max-width:60px;max-height:42px}ul.payment_methods li.payment_method_stripe_wechat label img{max-width:82px;width:82px;max-height:23px}ul.payment_methods li.payment_method_stripe_alipay img{max-width:72px;width:72px;height:36px;max-height:36px}ul.payment_methods li.payment_method_stripe_grabpay img{max-width:95px;width:95px;max-height:28px}#wc-stripe-card-element{width:100%}li.banner_payment_method_stripe_payment_request .StripeElement{padding:0}.single-product .blockMsg{border:none!important;background-color:transparent!important}#wc-stripe-card{position:absolute!important;top:50%;right:8px;transform:translatey(-50%);width:23px;height:15px;padding:0;border:none}#wc-stripe-card.active{width:32px;height:20px}input[id=stripe-postal-code]:focus{outline:0;background:0 0;border:none;box-shadow:none}div.postalCode:focus{outline:0;border:none}li[class*=payment_method_stripe] .select2-container .select2-selection--single{height:42px;padding:0 5px}li[class*=payment_method_stripe] .select2-container--default .select2-selection--single .select2-selection__arrow{height:42px;top:1px;right:1px}.blockUI.blockMsg{font-size:20px;white-space:nowrap}#wc-stripe-payment-request-container.disabled{opacity:.45}.wc-stripe-paymentRequest-icons-container img{float:none}.select2-container .select2-selection--single .wc-stripe-select2-container.wc-stripe-ach:before{display:none}ul.wc_stripe_cart_payment_methods li.wc-stripe-payment-method button,ul.wc_stripe_checkout_banner_gateways li button,ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_] button{margin:0}ul.payment_methods li[class*=payment_method]{margin:0;padding:10px 0}ul.payment_methods li[class*=payment_method] input[name=payment_method]{margin:0 10px 0 5px;float:none}ul.payment_methods li[class*=payment_method]>input[name=payment_method]+label{padding-top:0;padding-right:0;padding-bottom:0}ul.payment_methods{list-style:none}ul.payment_methods li[class*=payment_method_stripe_] .wc-stripe_cc-new-method-container label:before{display:none}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{padding:0!important;margin:0}.wc-stripe_cc-container .wc-stripe-save-source .save-source-label{padding:0;margin-bottom:5px}div[id*=wc_stripe_local_payment_stripe_].StripeElement{border:1px solid #eee;border-radius:4px}.qrcode-message{margin:10px 0 0 0}#wc_stripe_local_payment_stripe_becs,#wc_stripe_local_payment_stripe_sepa{padding:10px 12px;box-shadow:0 1px 3px 0 #e6ebf1}.wc-stripe-local-desc.stripe_becs,.wc-stripe-local-desc.stripe_sepa{margin:10px 0}.wc-stripe-clear{clear:both;height:0;visibility:hidden}.wc-stripe-gateway-desc p{margin:0}#wc_stripe_local_payment_stripe_klarna,div.payment_method_stripe_cc,div.payment_method_stripe_fpx,div.payment_method_stripe_ideal,div.payment_method_stripe_sepa,li[class*=payment_method_stripe_] div.wc-stripe_applepay-container.has_tokens,li[class*=payment_method_stripe_] div.wc-stripe_googlepay-container.has_tokens,li[class*=payment_method_stripe_] div.wc-stripe_payment_request-container.has_tokens{margin-top:10px}.wc-stripe-gateway-desc{margin-top:10px}#wc-stripe-card-element.StripeElement--webkit-autofill{background-color:transparent!important}#wc_stripe_local_payment_stripe_klarna .stripe-klarna-categories{list-style:none;margin:0;padding:10px}li.payment_method_stripe_alipay,li.payment_method_stripe_bancontact,li.payment_method_stripe_becs,li.payment_method_stripe_eps,li.payment_method_stripe_fpx,li.payment_method_stripe_giropay,li.payment_method_stripe_ideal,li.payment_method_stripe_klarna,li.payment_method_stripe_multibanco,li.payment_method_stripe_p24,li.payment_method_stripe_sepa,li.payment_method_stripe_sofort,li.payment_method_stripe_wechat{display:none}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods{list-style:none;margin:0;padding:0}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods li{margin:0}.widget_shopping_cart_content a.wc-stripe-applepay-mini-cart,.widget_shopping_cart_content a.wc-stripe-gpay-mini-cart,.widget_shopping_cart_content a.wc-stripe-payment-request-mini-cart{background:0 0;padding:0;border:none}a.wc-stripe-gpay-mini-cart .gpay-button,a.wc-stripe-gpay-mini-cart .gpay-card-info-container a.wc-stripe-applepay-mini-cart .apple-pay-button{width:100%;margin:0}.wc-stripe-payment-request-mini-cart.StripeElement{padding:0;background:0 0;border:none;width:100%}.wc-stripe-payment-request-mini-cart.StripeElement .__PrivateStripeElement{width:100%}.widget_shopping_cart_content .wc-stripe-overlay{display:none!important;position:absolute;background:rgba(255,255,255,.75);height:100%;width:100%;z-index:-1}.widget_shopping_cart_content .wc-stripe-overlay.active{display:block!important;z-index:9999}.wc-stripe-klarna-loader{display:flex;justify-content:center;position:relative;width:100%;height:30px;box-sizing:border-box;transform:scale(.65)}.wc-stripe-klarna-loader div{box-sizing:border-box;display:block;position:absolute;box-sizing:border-box;width:30px;height:30px;border:3px solid #000;border-radius:50%;animation:klarna-payments-loader 1.3s cubic-bezier(.5,0,.5,1) infinite;border-color:#000 transparent transparent transparent}.wc-stripe-klarna-loader div:nth-child(1){animation-delay:-.45s}.wc-stripe-klarna-loader div:nth-child(2){animation-delay:-.3s}.wc-stripe-klarna-loader div:nth-child(3){animation-delay:-.15s}@keyframes klarna-payments-loader{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}li.payment_method_stripe_alipay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_applepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_bancontact.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_eps.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_giropay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_googlepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_grabpay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_multibanco.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_p24.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_payment_request.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_sofort.wc-stripe-no-desc .payment_box.wc-stripe-no-methods{padding:0;margin:0}
assets/js/frontend/local-payment.js CHANGED
@@ -639,6 +639,8 @@
639
 
640
  BECS.prototype = $.extend({}, LocalPayment.prototype, BECS.prototype);
641
 
 
 
642
  /**
643
  * Local payment types that require JS integration
644
  * @type {Object}
@@ -649,7 +651,8 @@
649
  'klarna': Klarna,
650
  'fpx': FPX,
651
  'wechat': WeChat,
652
- 'au_becs_debit': BECS
 
653
  }
654
 
655
  for (var i in wc_stripe_local_payment_params.gateways) {
639
 
640
  BECS.prototype = $.extend({}, LocalPayment.prototype, BECS.prototype);
641
 
642
+ GrabPay.prototype = $.extend({}, LocalPayment.prototype, GrabPay.prototype);
643
+
644
  /**
645
  * Local payment types that require JS integration
646
  * @type {Object}
651
  'klarna': Klarna,
652
  'fpx': FPX,
653
  'wechat': WeChat,
654
+ 'au_becs_debit': BECS,
655
+ 'grabpay': GrabPay
656
  }
657
 
658
  for (var i in wc_stripe_local_payment_params.gateways) {
assets/js/frontend/local-payment.min.js CHANGED
@@ -1 +1 @@
1
- !function(r,i){var e=r("#place_order").css("width");function s(e){i.BaseGateway.call(this,e),i.CheckoutGateway.call(this),r(document.body).on("click","#place_order",this.place_order.bind(this)),"order_pay"===this.get_page()&&r("#order_review").on("submit",this.process_order_pay.bind(this)),this.maybe_hide_gateway()}function t(e){this.elementType="idealBank",this.confirmation_method="confirmIdealPayment",s.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}function n(e){this.elementType="iban",s.call(this,e)}function o(e){s.call(this,e),r(document.body).on("change",".wc-stripe-klarna-category",this.category_change.bind(this)),window.addEventListener("hashchange",this.hashchange.bind(this)),r("form.checkout").on("change",".form-row:not(.address-field) .input-text, .form-row:not(.address-field) select",this.input_change.bind(this))}function a(e){this.elementType="fpxBank",this.confirmation_method="confirmFpxPayment",s.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}function h(e){s.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}function c(e){this.elementType="auBankAccount",this.confirmation_method="confirmAuBecsDebitPayment",s.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}r(document.body).on("updated_checkout",function(){r("#place_order").css("min-width",e)}),(s.prototype=r.extend({},i.BaseGateway.prototype,i.CheckoutGateway.prototype)).initialize=function(){this.mount_button()},s.prototype.elementType=null,s.prototype.is_active=function(){return r("#wc_stripe_local_payment_"+this.gateway_id).data("active")},s.prototype.maybe_hide_gateway=function(){this.is_active()?r(this.container).show():r(this.container).hide()},s.prototype.createSource=function(){return new Promise(function(t,e){var i=function(e){e.error?this.submit_error(e.error.message):(this.payment_token_received=!0,r(this.token_selector).val(e.source.id),this.get_form().submit()),t()}.bind(this);if(null!=this.elementType)if(this.confirmation_method){if(!this.isValidElement())return this.submit_error({code:"empty_element_"+this.params.local_payment_type,message:wc_stripe_messages.empty_element});this.payment_token_received=!0,this.get_form().submit()}else this.stripe.createSource(this.element,this.getSourceArgs()).then(i)["catch"](function(e){this.submit_error(e.message)}.bind(this));else this.payment_token_received=!0,this.get_form().submit()}.bind(this))},s.prototype.place_order=function(e){this.is_gateway_selected()&&(this.payment_token_received||(e.preventDefault(),this.createSource()))},s.prototype.process_order_pay=function(e){this.is_gateway_selected()&&(e.preventDefault(),(e=this.get_form().serializeArray()).push({name:"_wpnonce",value:this.params.rest_nonce}),e.push({name:"order_id",value:this.params.order_id}),r.ajax({url:this.params.routes.order_pay+window.location.search,method:"POST",dataType:"json",data:r.param(e)}).done(function(e){e.success?window.location.href=e.redirect:this.submit_error(e.message)}.bind(this)).fail(function(e,t,i){this.submit_error(i)}.bind(this)))},s.prototype.show_payment_button=function(){this.show_place_order()},s.prototype.hide_place_order=function(){},s.prototype.show_place_order=function(){i.CheckoutGateway.prototype.show_place_order.apply(this,arguments),this.payment_token_received&&r("#place_order").text(r("#place_order").data("value"))},s.prototype.getSourceArgs=function(){return{type:this.params.local_payment_type,amount:this.get_total_price_cents(),currency:this.get_currency(),owner:{name:this.get_customer_name("billing"),email:this.fields.get("billing_email",null)},redirect:{return_url:this.params.return_url}}},s.prototype.updated_checkout=function(){this.mount_button(),this.maybe_hide_gateway()},s.prototype.mount_button=function(){var e="#wc_stripe_local_payment_"+this.gateway_id;r(e).length&&null!=this.elementType&&(r(e).empty(),this.element||(this.element=this.elements.create(this.elementType,this.params.element_params),this.element.on("change",this.handleElementChange.bind(this))),this.elementEmpty=!0,this.element.mount(e))},s.prototype.handleElementChange=function(e){this.elementEmpty=e.empty},s.prototype.load_external_script=function(e){var t=document.createElement("script");t.type="text/javascript",t.src=e,t.onload=function(){this.script_loaded=!0}.bind(this),document.body.appendChild(t)},s.prototype.hashChange=function(e){!this.is_gateway_selected()||(e=e.newURL.match(/response=(.*)/))&&(history.pushState({},"",window.location.pathname),e=JSON.parse(window.atob(e[1])),this.processConfirmation(e))},s.prototype.processConfirmation=function(e){this.stripe[this.confirmation_method](e.client_secret,this.get_confirmation_args(e)).then(function(e){if(e.error)return this.submit_error(e.error.message);this.get_form().submit()}.bind(this))},s.prototype.get_confirmation_args=function(e){e={payment_method:{billing_details:{name:this.get_first_name("billing")+" "+this.get_last_name("billing")}},return_url:e.return_url};return this.elementType&&(e.payment_method[this.params.local_payment_type]=this.element),e},s.prototype.isValidElement=function(){return!this.element||!this.elementEmpty},s.prototype.delete_order_source=function(){return new Promise(function(t,e){r.ajax({url:this.params.routes.delete_order_source,method:"DELETE",dataType:"json",beforeSend:this.ajax_before_send.bind(this)}).done(function(e){t(e)}.bind(this)).fail(function(){e(response)}.bind(this))}.bind(this))},s.prototype.update_source=function(i){return new Promise(function(t,e){r.ajax({url:this.params.routes.update_source,method:"POST",dataType:"json",data:{_wpnonce:this.params.rest_nonce,updates:i,source_id:this.source.id,client_secret:this.source.client_secret,payment_method:this.gateway_id}}).done(function(e){t(e.source)}.bind(this)).fail(function(){e()})}.bind(this))},o.prototype.category_change=function(e){var t=function(){r('[id^="klarna-instance-"]').slideUp();var e=r('[name="klarna_category"]:checked').val();r("#klarna-instance-"+e).slideDown()}.bind(this);e.originalEvent?t():(clearTimeout(this.categoryChangeTimer),this.categoryChangeTimer=setTimeout(t,500))},o.prototype.processConfirmation=function(e){window.Klarna.Payments.init({client_token:e.klarna.client_token},function(e){}.bind(this)),this.payment_categories=e.klarna.payment_method_categories.split(","),this.render_ui(!0)},o.prototype.hashchange=function(){this.is_gateway_selected()&&(history.pushState({},"",window.location.pathname),this.get_form().submit())},o.prototype.render_ui=function(e){if((this.show_form_false=0)<this.payment_categories.length){r("#wc_stripe_local_payment_stripe_klarna").show();for(var t=0;t<this.payment_categories.length;t++){var i,s="#klarna-instance-"+this.payment_categories[t];if(r(s).empty(),r("#klarna-category-"+this.payment_categories[t]).length){this.params.translate&&(i=this.source.klarna[this.payment_categories[t]+"_name"],r('label[for="klarna_'+this.payment_categories[t]+'"').text(i)),r("#klarna-category-"+this.payment_categories[t]).show();try{window.Klarna.Payments.load({container:s,payment_method_category:this.payment_categories[t],instance_id:"klarna-instance-"+this.payment_categories[t]},function(e){e.show_form||(this.source=null)}.bind(this))}catch(n){window.alert(n)}}}e&&r('[id^="klarna-category-"]:visible [name="klarna_category"]').first().prop("checked",!0).trigger("change")}},o.prototype.place_order=function(e){this.is_gateway_selected()&&(e.preventDefault(),this.checkout_fields_valid()&&window.Klarna.Payments.authorize({instance_id:"klarna-instance-"+r('[name="klarna_category"]:checked').val()},function(e){e.approved?(this.set_nonce(this.source.id),this.payment_token_received=!0,this.get_form().submit()):e.error?this.submit_error(e.error):this.submit_error(this.params.messages.klarna_error)}.bind(this)))},o.prototype.klarna_fields_valid=function(){if(this.fields.validateFields("billing"))return!this.needs_shipping()||(!!("billing"===this.get_shipping_prefix()||"shipping"===this.get_shipping_prefix()&&this.fields.validateFields("shipping"))||void 0)},o.prototype.initialize=function(){this.is_gateway_selected()&&this.is_active()&&!this.source&&this.klarna_fields_valid()&&this.createSource()},o.prototype.createSource=function(){clearTimeout(this.createSourceTimer),this.createSourceTimer=setTimeout(function(){this.show_loader(),this.stripe.createSource(this.getSourceArgs()).then(function(e){if(this.hide_loader(),e.error)return this.submit_error(e.error.message);this.source=e.source,this.set_nonce(this.source.id),this.filter_payment_method_categories(),this.processConfirmation(this.source)}.bind(this))["catch"](function(e){this.hide_loader(),this.submit_error(e.message)}.bind(this))}.bind(this),100)},o.prototype.getSourceArgs=function(){return r.extend(!0,{},this.get_gateway_data().source_args,function(){var e,t={owner:{name:this.fields.get("billing_first_name")+" "+this.fields.get("billing_last_name"),email:this.fields.get("billing_email"),address:{city:this.fields.get("billing_city"),country:this.fields.get("billing_country"),line1:this.fields.get("billing_address_1"),line2:this.fields.get("billing_address_2"),postal_code:this.fields.get("billing_postcode"),state:this.fields.get("billing_state")}},klarna:{purchase_country:this.fields.get("billing_country"),first_name:this.fields.get("billing_first_name"),last_name:this.fields.get("billing_last_name")}};return this.needs_shipping()&&(e=this.get_shipping_prefix(),t.klarna.shipping_first_name=this.fields.get("first_name",e),t.klarna.shipping_last_name=this.fields.get("last_name",e),t.source_order={shipping:{address:{city:this.fields.get("city",e),country:this.fields.get("country",e),line1:this.fields.get("address_1",e),line2:this.fields.get("address_2",e),postal_code:this.fields.get("postcode",e),state:this.fields.get("state",e)}}}),t}.bind(this)())},o.prototype.updated_checkout=function(){this.source?this.update_source():this.is_gateway_selected()&&this.is_active()&&this.klarna_fields_valid()&&this.createSource(),s.prototype.updated_checkout.apply(this,arguments)},o.prototype.update_source=function(){var e=this.get_source_update_args(this.getSourceArgs());this.show_loader(),s.prototype.update_source.call(this,e).then(function(e){this.source=e,this.filter_payment_method_categories(),this.hide_loader(),this.render_ui()}.bind(this))},o.prototype.checkout_error=function(){s.prototype.checkout_error.apply(this,arguments),this.is_gateway_selected()&&this.createSource()},o.prototype.show_loader=function(){r(this.container).find(".wc-stripe-klarna-loader").remove(),r(this.container).find('label[for="payment_method_'+this.gateway_id+'" ]').after(this.params.klarna_loader)},o.prototype.hide_loader=function(){r(this.container).find(".wc-stripe-klarna-loader").remove()},o.prototype.filter_payment_method_categories=function(){var e=this.source.klarna.payment_method_categories.split(",");this.source.klarna.payment_method_categories=e.filter(function(e){return-1<this.get_gateway_data().payment_sections.indexOf(e)}.bind(this)).join(",")},o.prototype.get_source_update_args=function(e){return["type","currency","statement_descriptor","redirect","klarna.product","klarna.locale","klarna.custom_payment_methods"].reduce(function(e,t){if(-1<t.indexOf(".")){var i=t.split(".");return delete i.slice(0,i.length-1).reduce(function(e,t){return e[t]},e)[t=i[i.length-1]],e}return delete e[t],e},e)},o.prototype.on_payment_method_selected=function(e,t){t===this.gateway_id&&(this.source||(this.klarna_fields_valid()?this.createSource():this.submit_error(this.params.messages.required_field)),i.CheckoutGateway.prototype.on_payment_method_selected.apply(this,arguments))},o.prototype.input_change=function(){this.is_gateway_selected()&&(this.source?this.update_source():this.klarna_fields_valid()&&this.createSource())},h.prototype.updated_checkout=function(){!this.script_loaded&&r(this.container).length&&this.load_external_script(this.params.qr_script),s.prototype.updated_checkout.apply(this,arguments)},h.prototype.hashChange=function(e){!this.is_gateway_selected()||(e=e.newURL.match(/qrcode=(.*)/))&&(history.pushState({},"",window.location.pathname),this.qrcode=JSON.parse(window.atob(e[1])),this.get_form().unblock().removeClass("processing").addClass("wechat"),new QRCode("wc_stripe_local_payment_stripe_wechat",{text:this.qrcode.code,width:128,height:128,colorDark:"#424770",colorLight:"#f8fbfd",correctLevel:QRCode.CorrectLevel.H}),r("#wc_stripe_local_payment_stripe_wechat").append('<p class="qrcode-message">'+this.params.qr_message+"</p>"),this.payment_token_received=!0,this.show_place_order())},h.prototype.place_order=function(){this.get_form().is(".wechat")?window.location=this.qrcode.redirect:s.prototype.place_order.apply(this,arguments)},c.prototype.get_confirmation_args=function(e){var t=s.prototype.get_confirmation_args.apply(this,arguments);return t.payment_method.billing_details.email=this.fields.get("billing_email"),t},n.prototype.getSourceArgs=function(){return r.extend({},s.prototype.getSourceArgs.apply(this,arguments),{mandate:{notification_method:"email",interval:this.cart_contains_subscription()?"scheduled":"one_time"}})},t.prototype=r.extend({},s.prototype,t.prototype),n.prototype=r.extend({},s.prototype,n.prototype),o.prototype=r.extend({},s.prototype,o.prototype),a.prototype=r.extend({},s.prototype,a.prototype),h.prototype=r.extend({},s.prototype,h.prototype),c.prototype=r.extend({},s.prototype,c.prototype);var p,l={ideal:t,sepa_debit:n,klarna:o,fpx:a,wechat:h,au_becs_debit:c};for(p in wc_stripe_local_payment_params.gateways){var _=wc_stripe_local_payment_params.gateways[p];new(l[_.local_payment_type]||s)(_)}}(jQuery,window.wc_stripe);
1
+ !function(r,i){var e=r("#place_order").css("width");function s(e){i.BaseGateway.call(this,e),i.CheckoutGateway.call(this),r(document.body).on("click","#place_order",this.place_order.bind(this)),"order_pay"===this.get_page()&&r("#order_review").on("submit",this.process_order_pay.bind(this)),this.maybe_hide_gateway()}function t(e){this.elementType="idealBank",this.confirmation_method="confirmIdealPayment",s.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}function n(e){this.elementType="iban",s.call(this,e)}function o(e){s.call(this,e),r(document.body).on("change",".wc-stripe-klarna-category",this.category_change.bind(this)),window.addEventListener("hashchange",this.hashchange.bind(this)),r("form.checkout").on("change",".form-row:not(.address-field) .input-text, .form-row:not(.address-field) select",this.input_change.bind(this))}function a(e){this.elementType="fpxBank",this.confirmation_method="confirmFpxPayment",s.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}function h(e){s.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}function c(e){this.elementType="auBankAccount",this.confirmation_method="confirmAuBecsDebitPayment",s.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}function p(e){this.confirmation_method="confirmGrabPayPayment",s.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}r(document.body).on("updated_checkout",function(){r("#place_order").css("min-width",e)}),(s.prototype=r.extend({},i.BaseGateway.prototype,i.CheckoutGateway.prototype)).initialize=function(){this.mount_button()},s.prototype.elementType=null,s.prototype.is_active=function(){return r("#wc_stripe_local_payment_"+this.gateway_id).data("active")},s.prototype.maybe_hide_gateway=function(){this.is_active()?r(this.container).show():r(this.container).hide()},s.prototype.createSource=function(){return new Promise(function(t,e){var i=function(e){e.error?this.submit_error(e.error.message):(this.payment_token_received=!0,r(this.token_selector).val(e.source.id),this.get_form().submit()),t()}.bind(this);if(null!=this.elementType)if(this.confirmation_method){if(!this.isValidElement())return this.submit_error({code:"empty_element_"+this.params.local_payment_type,message:wc_stripe_messages.empty_element});this.payment_token_received=!0,this.get_form().submit()}else this.stripe.createSource(this.element,this.getSourceArgs()).then(i)["catch"](function(e){this.submit_error(e.message)}.bind(this));else this.payment_token_received=!0,this.get_form().submit()}.bind(this))},s.prototype.place_order=function(e){this.is_gateway_selected()&&(this.payment_token_received||(e.preventDefault(),this.createSource()))},s.prototype.process_order_pay=function(e){this.is_gateway_selected()&&(e.preventDefault(),(e=this.get_form().serializeArray()).push({name:"_wpnonce",value:this.params.rest_nonce}),e.push({name:"order_id",value:this.params.order_id}),r.ajax({url:this.params.routes.order_pay+window.location.search,method:"POST",dataType:"json",data:r.param(e)}).done(function(e){e.success?window.location.href=e.redirect:this.submit_error(e.message)}.bind(this)).fail(function(e,t,i){this.submit_error(i)}.bind(this)))},s.prototype.show_payment_button=function(){this.show_place_order()},s.prototype.hide_place_order=function(){},s.prototype.show_place_order=function(){i.CheckoutGateway.prototype.show_place_order.apply(this,arguments),this.payment_token_received&&r("#place_order").text(r("#place_order").data("value"))},s.prototype.getSourceArgs=function(){return{type:this.params.local_payment_type,amount:this.get_total_price_cents(),currency:this.get_currency(),owner:{name:this.get_customer_name("billing"),email:this.fields.get("billing_email",null)},redirect:{return_url:this.params.return_url}}},s.prototype.updated_checkout=function(){this.mount_button(),this.maybe_hide_gateway()},s.prototype.mount_button=function(){var e="#wc_stripe_local_payment_"+this.gateway_id;r(e).length&&null!=this.elementType&&(r(e).empty(),this.element||(this.element=this.elements.create(this.elementType,this.params.element_params),this.element.on("change",this.handleElementChange.bind(this))),this.elementEmpty=!0,this.element.mount(e))},s.prototype.handleElementChange=function(e){this.elementEmpty=e.empty},s.prototype.load_external_script=function(e){var t=document.createElement("script");t.type="text/javascript",t.src=e,t.onload=function(){this.script_loaded=!0}.bind(this),document.body.appendChild(t)},s.prototype.hashChange=function(e){!this.is_gateway_selected()||(e=e.newURL.match(/response=(.*)/))&&(history.pushState({},"",window.location.pathname),e=JSON.parse(window.atob(e[1])),this.processConfirmation(e))},s.prototype.processConfirmation=function(e){this.stripe[this.confirmation_method](e.client_secret,this.get_confirmation_args(e)).then(function(e){if(e.error)return this.submit_error(e.error.message);this.get_form().submit()}.bind(this))},s.prototype.get_confirmation_args=function(e){e={payment_method:{billing_details:{name:this.get_first_name("billing")+" "+this.get_last_name("billing")}},return_url:e.return_url};return this.elementType&&(e.payment_method[this.params.local_payment_type]=this.element),e},s.prototype.isValidElement=function(){return!this.element||!this.elementEmpty},s.prototype.delete_order_source=function(){return new Promise(function(t,e){r.ajax({url:this.params.routes.delete_order_source,method:"DELETE",dataType:"json",beforeSend:this.ajax_before_send.bind(this)}).done(function(e){t(e)}.bind(this)).fail(function(){e(response)}.bind(this))}.bind(this))},s.prototype.update_source=function(i){return new Promise(function(t,e){r.ajax({url:this.params.routes.update_source,method:"POST",dataType:"json",data:{_wpnonce:this.params.rest_nonce,updates:i,source_id:this.source.id,client_secret:this.source.client_secret,payment_method:this.gateway_id}}).done(function(e){t(e.source)}.bind(this)).fail(function(){e()})}.bind(this))},o.prototype.category_change=function(e){var t=function(){r('[id^="klarna-instance-"]').slideUp();var e=r('[name="klarna_category"]:checked').val();r("#klarna-instance-"+e).slideDown()}.bind(this);e.originalEvent?t():(clearTimeout(this.categoryChangeTimer),this.categoryChangeTimer=setTimeout(t,500))},o.prototype.processConfirmation=function(e){window.Klarna.Payments.init({client_token:e.klarna.client_token},function(e){}.bind(this)),this.payment_categories=e.klarna.payment_method_categories.split(","),this.render_ui(!0)},o.prototype.hashchange=function(){this.is_gateway_selected()&&(history.pushState({},"",window.location.pathname),this.get_form().submit())},o.prototype.render_ui=function(e){if((this.show_form_false=0)<this.payment_categories.length){r("#wc_stripe_local_payment_stripe_klarna").show();for(var t=0;t<this.payment_categories.length;t++){var i,s="#klarna-instance-"+this.payment_categories[t];if(r(s).empty(),r("#klarna-category-"+this.payment_categories[t]).length){this.params.translate&&(i=this.source.klarna[this.payment_categories[t]+"_name"],r('label[for="klarna_'+this.payment_categories[t]+'"').text(i)),r("#klarna-category-"+this.payment_categories[t]).show();try{window.Klarna.Payments.load({container:s,payment_method_category:this.payment_categories[t],instance_id:"klarna-instance-"+this.payment_categories[t]},function(e){e.show_form||(this.source=null)}.bind(this))}catch(n){window.alert(n)}}}e&&r('[id^="klarna-category-"]:visible [name="klarna_category"]').first().prop("checked",!0).trigger("change")}},o.prototype.place_order=function(e){this.is_gateway_selected()&&(e.preventDefault(),this.checkout_fields_valid()&&window.Klarna.Payments.authorize({instance_id:"klarna-instance-"+r('[name="klarna_category"]:checked').val()},function(e){e.approved?(this.set_nonce(this.source.id),this.payment_token_received=!0,this.get_form().submit()):e.error?this.submit_error(e.error):this.submit_error(this.params.messages.klarna_error)}.bind(this)))},o.prototype.klarna_fields_valid=function(){if(this.fields.validateFields("billing"))return!this.needs_shipping()||(!!("billing"===this.get_shipping_prefix()||"shipping"===this.get_shipping_prefix()&&this.fields.validateFields("shipping"))||void 0)},o.prototype.initialize=function(){this.is_gateway_selected()&&this.is_active()&&!this.source&&this.klarna_fields_valid()&&this.createSource()},o.prototype.createSource=function(){clearTimeout(this.createSourceTimer),this.createSourceTimer=setTimeout(function(){this.show_loader(),this.stripe.createSource(this.getSourceArgs()).then(function(e){if(this.hide_loader(),e.error)return this.submit_error(e.error.message);this.source=e.source,this.set_nonce(this.source.id),this.filter_payment_method_categories(),this.processConfirmation(this.source)}.bind(this))["catch"](function(e){this.hide_loader(),this.submit_error(e.message)}.bind(this))}.bind(this),100)},o.prototype.getSourceArgs=function(){return r.extend(!0,{},this.get_gateway_data().source_args,function(){var e,t={owner:{name:this.fields.get("billing_first_name")+" "+this.fields.get("billing_last_name"),email:this.fields.get("billing_email"),address:{city:this.fields.get("billing_city"),country:this.fields.get("billing_country"),line1:this.fields.get("billing_address_1"),line2:this.fields.get("billing_address_2"),postal_code:this.fields.get("billing_postcode"),state:this.fields.get("billing_state")}},klarna:{purchase_country:this.fields.get("billing_country"),first_name:this.fields.get("billing_first_name"),last_name:this.fields.get("billing_last_name")}};return this.needs_shipping()&&(e=this.get_shipping_prefix(),t.klarna.shipping_first_name=this.fields.get("first_name",e),t.klarna.shipping_last_name=this.fields.get("last_name",e),t.source_order={shipping:{address:{city:this.fields.get("city",e),country:this.fields.get("country",e),line1:this.fields.get("address_1",e),line2:this.fields.get("address_2",e),postal_code:this.fields.get("postcode",e),state:this.fields.get("state",e)}}}),t}.bind(this)())},o.prototype.updated_checkout=function(){this.source?this.update_source():this.is_gateway_selected()&&this.is_active()&&this.klarna_fields_valid()&&this.createSource(),s.prototype.updated_checkout.apply(this,arguments)},o.prototype.update_source=function(){var e=this.get_source_update_args(this.getSourceArgs());this.show_loader(),s.prototype.update_source.call(this,e).then(function(e){this.source=e,this.filter_payment_method_categories(),this.hide_loader(),this.render_ui()}.bind(this))},o.prototype.checkout_error=function(){s.prototype.checkout_error.apply(this,arguments),this.is_gateway_selected()&&this.createSource()},o.prototype.show_loader=function(){r(this.container).find(".wc-stripe-klarna-loader").remove(),r(this.container).find('label[for="payment_method_'+this.gateway_id+'" ]').after(this.params.klarna_loader)},o.prototype.hide_loader=function(){r(this.container).find(".wc-stripe-klarna-loader").remove()},o.prototype.filter_payment_method_categories=function(){var e=this.source.klarna.payment_method_categories.split(",");this.source.klarna.payment_method_categories=e.filter(function(e){return-1<this.get_gateway_data().payment_sections.indexOf(e)}.bind(this)).join(",")},o.prototype.get_source_update_args=function(e){return["type","currency","statement_descriptor","redirect","klarna.product","klarna.locale","klarna.custom_payment_methods"].reduce(function(e,t){if(-1<t.indexOf(".")){var i=t.split(".");return delete i.slice(0,i.length-1).reduce(function(e,t){return e[t]},e)[t=i[i.length-1]],e}return delete e[t],e},e)},o.prototype.on_payment_method_selected=function(e,t){t===this.gateway_id&&(this.source||(this.klarna_fields_valid()?this.createSource():this.submit_error(this.params.messages.required_field)),i.CheckoutGateway.prototype.on_payment_method_selected.apply(this,arguments))},o.prototype.input_change=function(){this.is_gateway_selected()&&(this.source?this.update_source():this.klarna_fields_valid()&&this.createSource())},h.prototype.updated_checkout=function(){!this.script_loaded&&r(this.container).length&&this.load_external_script(this.params.qr_script),s.prototype.updated_checkout.apply(this,arguments)},h.prototype.hashChange=function(e){!this.is_gateway_selected()||(e=e.newURL.match(/qrcode=(.*)/))&&(history.pushState({},"",window.location.pathname),this.qrcode=JSON.parse(window.atob(e[1])),this.get_form().unblock().removeClass("processing").addClass("wechat"),new QRCode("wc_stripe_local_payment_stripe_wechat",{text:this.qrcode.code,width:128,height:128,colorDark:"#424770",colorLight:"#f8fbfd",correctLevel:QRCode.CorrectLevel.H}),r("#wc_stripe_local_payment_stripe_wechat").append('<p class="qrcode-message">'+this.params.qr_message+"</p>"),this.payment_token_received=!0,this.show_place_order())},h.prototype.place_order=function(){this.get_form().is(".wechat")?window.location=this.qrcode.redirect:s.prototype.place_order.apply(this,arguments)},c.prototype.get_confirmation_args=function(e){var t=s.prototype.get_confirmation_args.apply(this,arguments);return t.payment_method.billing_details.email=this.fields.get("billing_email"),t},n.prototype.getSourceArgs=function(){return r.extend({},s.prototype.getSourceArgs.apply(this,arguments),{mandate:{notification_method:"email",interval:this.cart_contains_subscription()?"scheduled":"one_time"}})},t.prototype=r.extend({},s.prototype,t.prototype),n.prototype=r.extend({},s.prototype,n.prototype),o.prototype=r.extend({},s.prototype,o.prototype),a.prototype=r.extend({},s.prototype,a.prototype),h.prototype=r.extend({},s.prototype,h.prototype),c.prototype=r.extend({},s.prototype,c.prototype),p.prototype=r.extend({},s.prototype,p.prototype);var l,_={ideal:t,sepa_debit:n,klarna:o,fpx:a,wechat:h,au_becs_debit:c,grabpay:p};for(l in wc_stripe_local_payment_params.gateways){var d=wc_stripe_local_payment_params.gateways[l];new(_[d.local_payment_type]||s)(d)}}(jQuery,window.wc_stripe);
assets/js/frontend/promise-polyfill.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";function e(e){var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){return t.reject(n)})})}function t(e){return new this(function(t,n){function o(e,n){if(n&&("object"==typeof n||"function"==typeof n)){var f=n.then;if("function"==typeof f)return void f.call(n,function(t){o(e,t)},function(n){r[e]={status:"rejected",reason:n},0==--i&&t(r)})}r[e]={status:"fulfilled",value:n},0==--i&&t(r)}if(!e||"undefined"==typeof e.length)return n(new TypeError(typeof e+" "+e+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var r=Array.prototype.slice.call(e);if(0===r.length)return t([]);for(var i=r.length,f=0;r.length>f;f++)o(f,r[f])})}function n(e){return!(!e||"undefined"==typeof e.length)}function o(){}function r(e){if(!(this instanceof r))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],l(e,this)}function i(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,r._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var o;try{o=n(e._value)}catch(r){return void u(t.promise,r)}f(t.promise,o)}else(1===e._state?f:u)(t.promise,e._value)})):e._deferreds.push(t)}function f(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof r)return e._state=3,e._value=t,void c(e);if("function"==typeof n)return void l(function(e,t){return function(){e.apply(t,arguments)}}(n,t),e)}e._state=1,e._value=t,c(e)}catch(o){u(e,o)}}function u(e,t){e._state=2,e._value=t,c(e)}function c(e){2===e._state&&0===e._deferreds.length&&r._immediateFn(function(){e._handled||r._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;n>t;t++)i(e,e._deferreds[t]);e._deferreds=null}function l(e,t){var n=!1;try{e(function(e){n||(n=!0,f(t,e))},function(e){n||(n=!0,u(t,e))})}catch(o){if(n)return;n=!0,u(t,o)}}var a=setTimeout;r.prototype["catch"]=function(e){return this.then(null,e)},r.prototype.then=function(e,t){var n=new this.constructor(o);return i(this,new function(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}(e,t,n)),n},r.prototype["finally"]=e,r.all=function(e){return new r(function(t,o){function r(e,n){try{if(n&&("object"==typeof n||"function"==typeof n)){var u=n.then;if("function"==typeof u)return void u.call(n,function(t){r(e,t)},o)}i[e]=n,0==--f&&t(i)}catch(c){o(c)}}if(!n(e))return o(new TypeError("Promise.all accepts an array"));var i=Array.prototype.slice.call(e);if(0===i.length)return t([]);for(var f=i.length,u=0;i.length>u;u++)r(u,i[u])})},r.allSettled=t,r.resolve=function(e){return e&&"object"==typeof e&&e.constructor===r?e:new r(function(t){t(e)})},r.reject=function(e){return new r(function(t,n){n(e)})},r.race=function(e){return new r(function(t,o){if(!n(e))return o(new TypeError("Promise.race accepts an array"));for(var i=0,f=e.length;f>i;i++)r.resolve(e[i]).then(t,o)})},r._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){a(e,0)},r._unhandledRejectionFn=function(e){void 0!==console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var s=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw Error("unable to locate global object")}();"function"!=typeof s.Promise?s.Promise=r:s.Promise.prototype["finally"]?s.Promise.allSettled||(s.Promise.allSettled=t):s.Promise.prototype["finally"]=e});
assets/js/frontend/wc-stripe.js CHANGED
@@ -756,6 +756,7 @@
756
  this.banner_container = 'li.banner_payment_method_' + this.gateway_id;
757
  $(document.body).on('update_checkout', this.update_checkout.bind(this));
758
  $(document.body).on('updated_checkout', this.updated_checkout.bind(this));
 
759
  $(document.body).on('cfw_updated_checkout', this.updated_checkout.bind(this));
760
  $(document.body).on('checkout_error', this.checkout_error.bind(this));
761
  $(this.token_selector).closest('form').on('checkout_place_order_' + this.gateway_id, this.checkout_place_order.bind(this)); // events for showing gateway payment buttons
@@ -770,9 +771,20 @@
770
  }
771
  }
772
 
 
 
773
  this.order_review();
774
  };
775
 
 
 
 
 
 
 
 
 
 
776
  wc_stripe.CheckoutGateway.prototype.order_review = function () {
777
  var url = window.location.href;
778
  var matches = url.match(/order_review.+payment_method=([\w]+).+payment_nonce=(.+)/);
@@ -1266,7 +1278,13 @@
1266
  */
1267
 
1268
  wc_stripe.GooglePay.prototype.update_addresses = function (paymentData) {
1269
- this.populate_billing_fields(paymentData.paymentMethodData.info.billingAddress);
 
 
 
 
 
 
1270
 
1271
  if (paymentData.shippingAddress) {
1272
  this.populate_shipping_fields(paymentData.shippingAddress);
@@ -1390,6 +1408,7 @@
1390
  return false;
1391
  }.bind(this))(),
1392
  transactionInfo: {
 
1393
  currencyCode: this.get_currency(),
1394
  totalPriceStatus: "ESTIMATED",
1395
  totalPrice: this.get_total_price().toString(),
@@ -1397,16 +1416,23 @@
1397
  totalPriceLabel: this.params.total_price_label
1398
  }
1399
  });
1400
- request.allowedPaymentMethods[0].parameters['billingAddressRequired'] = (function () {
1401
  if (this.is_current_page('checkout')) {
1402
- return !this.is_valid_address(this.get_address_object('billing'), 'billing', ['email', 'phone']);
 
 
 
 
 
1403
  }
1404
  return true;
1405
  }.bind(this)());
1406
- request.allowedPaymentMethods[0].parameters['billingAddressParameters'] = {
1407
- format: "FULL",
1408
- phoneNumberRequired: this.fields.requestFieldInWallet('billing_phone')
1409
- };
 
 
1410
 
1411
  if (request.shippingAddressRequired) {
1412
  request.shippingAddressParameters = {};
@@ -1480,7 +1506,7 @@
1480
  if (err.statusMessage && err.statusMessage.indexOf("paymentDataRequest.callbackIntent") > -1) {
1481
  this.submit_error_code("DEVELOPER_ERROR_WHITELIST");
1482
  } else {
1483
- this.submit_error(err.message);
1484
  }
1485
  }.bind(this));
1486
  };
@@ -1576,9 +1602,14 @@
1576
  wc_stripe.CheckoutFields = function (params, page) {
1577
  this.params = params;
1578
  this.page = page;
 
1579
  this.fields = new Map(Object.keys(this.params).map(function (k) {
1580
  if (this.params[k].value === null) {
1581
- this.params[k].value = "";
 
 
 
 
1582
  }
1583
  return [k, this.params[k].value];
1584
  }.bind(this)));
@@ -1595,6 +1626,15 @@
1595
  }
1596
  };
1597
 
 
 
 
 
 
 
 
 
 
1598
  wc_stripe.CheckoutFields.prototype.init_i18n = function () {
1599
  if (typeof wc_address_i18n_params !== 'undefined') {
1600
  this.locales = $.parseJSON(wc_address_i18n_params.locale.replace(/&quot;/g, '"'));
@@ -1612,6 +1652,9 @@
1612
  if (name === 'billing_country' || name === 'shipping_country') {
1613
  this.update_required_fields(value, name);
1614
  }
 
 
 
1615
  } catch (err) {
1616
  console.log(err);
1617
  }
756
  this.banner_container = 'li.banner_payment_method_' + this.gateway_id;
757
  $(document.body).on('update_checkout', this.update_checkout.bind(this));
758
  $(document.body).on('updated_checkout', this.updated_checkout.bind(this));
759
+ $(document.body).on('updated_checkout', this.container_styles.bind(this));
760
  $(document.body).on('cfw_updated_checkout', this.updated_checkout.bind(this));
761
  $(document.body).on('checkout_error', this.checkout_error.bind(this));
762
  $(this.token_selector).closest('form').on('checkout_place_order_' + this.gateway_id, this.checkout_place_order.bind(this)); // events for showing gateway payment buttons
771
  }
772
  }
773
 
774
+ this.container_styles();
775
+
776
  this.order_review();
777
  };
778
 
779
+ wc_stripe.CheckoutGateway.prototype.container_styles = function () {
780
+ if (!this.params.description) {
781
+ $(this.container).addClass('wc-stripe-no-desc');
782
+ }
783
+ if (!$(this.container).find('.wc-stripe-saved-methods').length) {
784
+ $(this.container).find('.payment_box').addClass('wc-stripe-no-methods');
785
+ }
786
+ }
787
+
788
  wc_stripe.CheckoutGateway.prototype.order_review = function () {
789
  var url = window.location.href;
790
  var matches = url.match(/order_review.+payment_method=([\w]+).+payment_nonce=(.+)/);
1278
  */
1279
 
1280
  wc_stripe.GooglePay.prototype.update_addresses = function (paymentData) {
1281
+ if (paymentData.paymentMethodData.info.billingAddress) {
1282
+ var billing_address = paymentData.paymentMethodData.info.billingAddress;
1283
+ if (this.is_current_page('checkout') && this.is_valid_address(this.billing_address_object, 'billing', ['phone', 'email'])) {
1284
+ billing_address = {phoneNumber: billing_address.phoneNumber};
1285
+ }
1286
+ this.populate_billing_fields(billing_address);
1287
+ }
1288
 
1289
  if (paymentData.shippingAddress) {
1290
  this.populate_shipping_fields(paymentData.shippingAddress);
1408
  return false;
1409
  }.bind(this))(),
1410
  transactionInfo: {
1411
+ countryCode: this.params.processing_country,
1412
  currencyCode: this.get_currency(),
1413
  totalPriceStatus: "ESTIMATED",
1414
  totalPrice: this.get_total_price().toString(),
1416
  totalPriceLabel: this.params.total_price_label
1417
  }
1418
  });
1419
+ request.allowedPaymentMethods[0].parameters.billingAddressRequired = (function () {
1420
  if (this.is_current_page('checkout')) {
1421
+ var address = this.billing_address_object = this.get_address_object('billing');
1422
+ // phone is in address object, so if phone is required and empty, request address. If address is not filled out, then request it.
1423
+ if (this.fields.requestFieldInWallet('billing_phone') || !this.is_valid_address(address, 'billing', ['email'])) {
1424
+ return true;
1425
+ }
1426
+ return false;
1427
  }
1428
  return true;
1429
  }.bind(this)());
1430
+ if (request.allowedPaymentMethods[0].parameters.billingAddressRequired) {
1431
+ request.allowedPaymentMethods[0].parameters.billingAddressParameters = {
1432
+ format: "FULL",
1433
+ phoneNumberRequired: this.fields.requestFieldInWallet('billing_phone')
1434
+ };
1435
+ }
1436
 
1437
  if (request.shippingAddressRequired) {
1438
  request.shippingAddressParameters = {};
1506
  if (err.statusMessage && err.statusMessage.indexOf("paymentDataRequest.callbackIntent") > -1) {
1507
  this.submit_error_code("DEVELOPER_ERROR_WHITELIST");
1508
  } else {
1509
+ this.submit_error(err.statusMessage);
1510
  }
1511
  }.bind(this));
1512
  };
1602
  wc_stripe.CheckoutFields = function (params, page) {
1603
  this.params = params;
1604
  this.page = page;
1605
+ this.session_values = this.supportSessionStorage() && sessionStorage.getItem('wc_stripe_checkout_fields') ? JSON.parse(sessionStorage.getItem('wc_stripe_checkout_fields')) : {};
1606
  this.fields = new Map(Object.keys(this.params).map(function (k) {
1607
  if (this.params[k].value === null) {
1608
+ if (k in this.session_values && this.session_values[k] !== null) {
1609
+ this.params[k].value = this.session_values[k];
1610
+ } else {
1611
+ this.params[k].value = "";
1612
+ }
1613
  }
1614
  return [k, this.params[k].value];
1615
  }.bind(this)));
1626
  }
1627
  };
1628
 
1629
+ wc_stripe.CheckoutFields.prototype.supportSessionStorage = function () {
1630
+ if ('sessionStorage' in window && window.sessionStorage !== null) {
1631
+ return ['getItem', 'setItem'].reduce(function (exists, method) {
1632
+ return !exists ? exists : method in sessionStorage;
1633
+ }.bind(this), true);
1634
+ }
1635
+ return false;
1636
+ }
1637
+
1638
  wc_stripe.CheckoutFields.prototype.init_i18n = function () {
1639
  if (typeof wc_address_i18n_params !== 'undefined') {
1640
  this.locales = $.parseJSON(wc_address_i18n_params.locale.replace(/&quot;/g, '"'));
1652
  if (name === 'billing_country' || name === 'shipping_country') {
1653
  this.update_required_fields(value, name);
1654
  }
1655
+ if (this.supportSessionStorage()) {
1656
+ sessionStorage.setItem('wc_stripe_checkout_fields', JSON.stringify(this.toJson()));
1657
+ }
1658
  } catch (err) {
1659
  console.log(err);
1660
  }
assets/js/frontend/wc-stripe.min.js CHANGED
@@ -1 +1 @@
1
- !function(i,o){i.wc_stripe={};var s=null;"undefined"==typeof wc_stripe_checkout_fields&&(i.wc_stripe_checkout_fields=[]),wc_stripe.BaseGateway=function(t,e){this.params=t,this.gateway_id=this.params.gateway_id,this.container=void 0===e?"li.payment_method_".concat(this.gateway_id):e,o(this.container).length||(this.container=".payment_method_".concat(this.gateway_id)),this.token_selector=this.params.token_selector,this.saved_method_selector=this.params.saved_method_selector,this.payment_token_received=!1,this.stripe=s,this.elements=s.elements(o.extend({},{locale:"auto"},this.get_element_options())),this.fields=r,this.initialize()},wc_stripe.BaseGateway.prototype.get_page=function(){var t=wc_stripe_params_v3.page;return"cart"===t&&o(document.body).is(".woocommerce-checkout")&&(t="checkout"),t},wc_stripe.BaseGateway.prototype.set_nonce=function(t){this.fields.set(this.gateway_id+"_token_key",t),o(this.token_selector).val(t)},wc_stripe.BaseGateway.prototype.get_element_options=function(){return{}},wc_stripe.BaseGateway.prototype.initialize=function(){},wc_stripe.BaseGateway.prototype.create_button=function(){},wc_stripe.BaseGateway.prototype.is_gateway_selected=function(){return o('[name="payment_method"]:checked').val()===this.gateway_id},wc_stripe.BaseGateway.prototype.is_saved_method_selected=function(){return this.is_gateway_selected()&&"saved"===o('[name="'+this.gateway_id+'_payment_type_key"]:checked').val()},wc_stripe.BaseGateway.prototype.has_checkout_error=function(){return 0<o("#wc_stripe_checkout_error").length&&this.is_gateway_selected()},wc_stripe.BaseGateway.prototype.submit_error=function(t){-1==(t=this.get_error_message(t)).indexOf("</ul>")&&(t='<div class="woocommerce-error">'+t+"</div>"),this.submit_message(t)},wc_stripe.BaseGateway.prototype.submit_error_code=function(t){console.log(t)},wc_stripe.BaseGateway.prototype.get_error_message=function(t){return"object"==typeof t&&t.code&&(t=wc_stripe_messages[t.code]||t.message),t},wc_stripe.BaseGateway.prototype.submit_message=function(t){o(".woocommerce-error, .woocommerce-message, .woocommerce-info").remove();var e=o(this.message_container);e.closest("form").length&&(e=e.closest("form")),e.prepend(t),e.removeClass("processing").unblock(),e.find(".input-text, select, input:checkbox").blur(),o.scroll_to_notices?o.scroll_to_notices(e):o("html, body").animate({scrollTop:e.offset().top-100},1e3)},wc_stripe.BaseGateway.prototype.get_first_name=function(t){return o("#"+t+"_first_name").val()},wc_stripe.BaseGateway.prototype.get_last_name=function(t){return o("#"+t+"_last_name").val()},wc_stripe.BaseGateway.prototype.get_shipping_prefix=function(){return this.needs_shipping()&&0<o('[name="ship_to_different_address"]').length&&o('[name="ship_to_different_address"]').is(":checked")?"shipping":"billing"},wc_stripe.BaseGateway.prototype.should_save_method=function(){return o("#"+this.gateway_id+"_save_source_key").is(":checked")},wc_stripe.BaseGateway.prototype.is_add_payment_method_page=function(){return"add_payment_method"===this.get_page()||o(document.body).hasClass("woocommerce-add-payment-method")},wc_stripe.BaseGateway.prototype.is_change_payment_method=function(){return"change_payment_method"===this.get_page()},wc_stripe.BaseGateway.prototype.get_selected_payment_method=function(){return o(this.saved_method_selector).val()},wc_stripe.BaseGateway.prototype.needs_shipping=function(){return this.get_gateway_data().needs_shipping},wc_stripe.BaseGateway.prototype.get_currency=function(){return this.get_gateway_data().currency},wc_stripe.BaseGateway.prototype.get_gateway_data=function(){var t=o(this.container).find(".woocommerce_".concat(this.gateway_id,"_gateway_data")).data("gateway");return void 0===t&&this.is_current_page("checkout")&&(t=o("form.checkout").find(".woocommerce_".concat(this.gateway_id,"_gateway_data")).data("gateway")),t},wc_stripe.BaseGateway.prototype.set_gateway_data=function(t){o(this.container).find(".woocommerce_".concat(this.gateway_id,"_gateway_data")).data("gateway",t)},wc_stripe.BaseGateway.prototype.get_customer_name=function(t){return this.fields.get(t+"_first_name")+" "+this.fields.get(t+"_last_name")},wc_stripe.BaseGateway.prototype.get_customer_email=function(){return this.fields.get("billing_email")},wc_stripe.BaseGateway.prototype.get_address_field_hash=function(t){for(var e=["_first_name","_last_name","_address_1","_address_2","_postcode","_city","_state","_country"],i="",s=0;s<e.length;s++)i+=this.fields.get(t+e[s])+"_";return i},wc_stripe.BaseGateway.prototype.block=function(){o().block&&o.blockUI({message:null,overlayCSS:{background:"#fff",opacity:.6}})},wc_stripe.BaseGateway.prototype.unblock=function(){o().block&&o.unblockUI()},wc_stripe.BaseGateway.prototype.get_form=function(){return o(this.token_selector).closest("form")},wc_stripe.BaseGateway.prototype.get_total_price=function(){return this.get_gateway_data().total},wc_stripe.BaseGateway.prototype.get_total_price_cents=function(){return this.get_gateway_data().total_cents},wc_stripe.BaseGateway.prototype.set_total_price=function(t){var e=this.get_gateway_data();e.total=t,this.set_gateway_data(e)},wc_stripe.BaseGateway.prototype.set_total_price_cents=function(t){var e=this.get_gateway_data();e.total_cents=t,this.set_gateway_data(e)},wc_stripe.BaseGateway.prototype.set_payment_method=function(t){o('[name="payment_method"][value="'+t+'"]').prop("checked",!0).trigger("click")},wc_stripe.BaseGateway.prototype.set_selected_shipping_methods=function(t){if(this.fields.set("shipping_method",t),t&&o('[name^="shipping_method"]').length)for(var e in t){var i=t[e];o('[name="shipping_method['+e+']"][value="'+i+'"]').prop("checked",!0).trigger("change")}},wc_stripe.BaseGateway.prototype.on_token_received=function(t){this.payment_token_received=!0,this.set_nonce(t.id),this.process_checkout()},wc_stripe.BaseGateway.prototype.createPaymentRequest=function(){try{this.payment_request_options=this.get_payment_request_options(),this.paymentRequest=s.paymentRequest(this.payment_request_options),this.payment_request_options.requestShipping&&(this.paymentRequest.on("shippingaddresschange",this.update_shipping_address.bind(this)),this.paymentRequest.on("shippingoptionchange",this.update_shipping_method.bind(this))),this.paymentRequest.on("paymentmethod",this.on_payment_method_received.bind(this))}catch(t){return void this.submit_error(t.message)}},wc_stripe.BaseGateway.prototype.get_payment_request_options=function(){var t={country:this.params.country_code,currency:this.get_currency().toLowerCase(),total:{amount:this.get_total_price_cents(),label:this.params.total_label,pending:!0},requestPayerName:function(){return!this.is_current_page("checkout")||!this.is_valid_address(this.get_address_object("billing"),"billing",["email","phone"])}.bind(this)(),requestPayerEmail:this.fields.requestFieldInWallet("billing_email"),requestPayerPhone:this.fields.requestFieldInWallet("billing_phone"),requestShipping:function(){if(this.needs_shipping()){var t=this.get_shipping_prefix();if(this.is_current_page("checkout")&&!this.is_valid_address(this.get_address_object(t),t,["email","phone"])||!this.is_current_page("checkout"))return!0}return!1}.bind(this)()},e=this.get_display_items(),i=this.get_shipping_options();return e&&(t.displayItems=e),t.requestShipping&&i&&(t.shippingOptions=i),t},wc_stripe.BaseGateway.prototype.get_payment_request_update=function(t){var e={currency:this.get_currency().toLowerCase(),total:{amount:parseInt(this.get_total_price_cents()),label:this.params.total_label,pending:!0}},i=this.get_display_items(),s=this.get_shipping_options();return i&&(e.displayItems=i),this.payment_request_options.requestShipping&&s&&(e.shippingOptions=s),t&&(e=o.extend(!0,{},e,t)),e},wc_stripe.BaseGateway.prototype.get_display_items=function(){return this.get_gateway_data().items},wc_stripe.BaseGateway.prototype.set_display_items=function(t){var e=this.get_gateway_data();e.items=t,this.set_gateway_data(e)},wc_stripe.BaseGateway.prototype.get_shipping_options=function(){return this.get_gateway_data().shipping_options},wc_stripe.BaseGateway.prototype.set_shipping_options=function(t){var e=this.get_gateway_data();e.shipping_options=t,this.set_gateway_data(e)},wc_stripe.BaseGateway.prototype.map_address=function(t){return{city:t.city,postcode:t.postalCode,state:t.region,country:t.country}},wc_stripe.BaseGateway.prototype.on_payment_method_received=function(t){try{this.payment_response=t,this.populate_checkout_fields(t),t.complete("success"),this.on_token_received(t.paymentMethod)}catch(e){i.alert(e)}},wc_stripe.BaseGateway.prototype.populate_checkout_fields=function(t){this.set_nonce(t.paymentMethod.id),this.update_addresses(t)},wc_stripe.BaseGateway.prototype.update_addresses=function(t){t.payerName&&this.fields.set("name",t.payerName,"billing"),t.payerEmail&&this.fields.set("email",t.payerEmail,"billing"),t.payerPhone&&this.fields.set("phone",t.payerPhone,"billing"),t.shippingAddress&&this.populate_shipping_fields(t.shippingAddress),t.paymentMethod.billing_details.address&&this.populate_billing_fields(t.paymentMethod.billing_details.address)},wc_stripe.BaseGateway.prototype.populate_address_fields=function(t,e){for(var i in t)null!==t[i]&&this.fields.set(i,t[i],e)},wc_stripe.BaseGateway.prototype.populate_billing_fields=function(t){this.populate_address_fields(t,"billing")},wc_stripe.BaseGateway.prototype.populate_shipping_fields=function(t){this.populate_address_fields(t,"shipping")},wc_stripe.BaseGateway.prototype.get_address_fields=function(){return["first_name","last_name","country","address_1","address_2","city","state","postcode","phone","email"]},wc_stripe.BaseGateway.prototype.get_address_object=function(e){var i={};return this.get_address_fields().forEach(function(t){i[t]=this.fields.get(t,e)}.bind(this)),i},wc_stripe.BaseGateway.prototype.is_current_page=function(t){return this.get_page()===t},wc_stripe.BaseGateway.prototype.is_valid_address=function(t,e,i){if(o.isEmptyObject(t))return!1;var s=this.get_address_fields();void 0!==i&&i.forEach(function(t){-1<s.indexOf(t)&&s.splice(s.indexOf(t),1)});for(var a=0;a<s.length;a++){var n=s[a];if(this.fields.required(e+"_"+n)&&(!t[n]||"undefined"==typeof t[n]||!this.fields.isValid(n,t[n],t)))return!1}return!0},wc_stripe.BaseGateway.prototype.ajax_before_send=function(t){0<this.params.user_id&&t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)},wc_stripe.BaseGateway.prototype.process_checkout=function(){return new Promise(function(){this.block(),o.ajax({url:this.params.routes.checkout,method:"POST",dataType:"json",data:o.extend({},this.serialize_fields(),{payment_method:this.gateway_id,page_id:this.get_page(),currency:this.get_currency()}),beforeSend:this.ajax_before_send.bind(this)}).done(function(t){t.reload?i.location.reload():"success"===t.result?i.location=t.redirect:(t.messages&&this.submit_error(t.messages),this.unblock())}.bind(this)).fail(function(t,e,i){this.unblock(),this.submit_error(i)}.bind(this))}.bind(this))},wc_stripe.BaseGateway.prototype.serialize_form=function(t){var e,i=t.find("input").filter(function(t,e){return!o(e).is('[name^="add-to-cart"]')}.bind(this)).serializeArray(),s={};for(e in i){var a=i[e];s[a.name]=a.value}return s.payment_method=this.gateway_id,s},wc_stripe.BaseGateway.prototype.serialize_fields=function(){return o.extend({},this.fields.toJson(),o(document.body).triggerHandler("wc_stripe_process_checkout_data",[this,this.fields]))},wc_stripe.BaseGateway.prototype.map_shipping_methods=function(t){var e={};return"default"===t||1<(t=t.match(/^([\w+]):(.+)$/)).length&&(e[t[1]]=t[2]),e},wc_stripe.BaseGateway.prototype.maybe_set_ship_to_different=function(){o('[name="ship_to_different_address"]').length&&o('[name="ship_to_different_address"]').prop("checked",this.get_address_field_hash("billing")!==this.get_address_field_hash("shipping")).trigger("change")},wc_stripe.BaseGateway.prototype.update_shipping_address=function(s){return new Promise(function(e,i){o.ajax({url:this.params.routes.shipping_address,method:"POST",dataType:"json",data:{address:this.map_address(s.shippingAddress),payment_method:this.gateway_id,page_id:this.get_page(),currency:this.get_currency()},beforeSend:this.ajax_before_send.bind(this)}).done(function(t){t.code?(s.updateWith(t.data.newData),i(t.data)):(s.updateWith(t.data.newData),this.fields.set("shipping_method",t.data.shipping_method),e(t.data))}.bind(this)).fail(function(){}.bind(this))}.bind(this))},wc_stripe.BaseGateway.prototype.update_shipping_method=function(s){return new Promise(function(e,i){o.ajax({url:this.params.routes.shipping_method,method:"POST",dataType:"json",data:{shipping_method:s.shippingOption.id,payment_method:this.gateway_id,currency:this.get_currency(),page_id:this.get_page()},beforeSend:this.ajax_before_send.bind(this)}).done(function(t){t.code?(s.updateWith(t.data.newData),i(t.data)):(this.set_selected_shipping_methods(t.data.shipping_methods),s.updateWith(t.data.newData),e(t.data))}.bind(this)).fail(function(t,e,i){this.submit_error(i)}.bind(this))}.bind(this))},wc_stripe.CheckoutGateway=function(){this.message_container="li.payment_method_"+this.gateway_id,this.banner_container="li.banner_payment_method_"+this.gateway_id,o(document.body).on("update_checkout",this.update_checkout.bind(this)),o(document.body).on("updated_checkout",this.updated_checkout.bind(this)),o(document.body).on("cfw_updated_checkout",this.updated_checkout.bind(this)),o(document.body).on("checkout_error",this.checkout_error.bind(this)),o(this.token_selector).closest("form").on("checkout_place_order_"+this.gateway_id,this.checkout_place_order.bind(this)),o(document.body).on("wc_stripe_new_method_"+this.gateway_id,this.on_show_new_methods.bind(this)),o(document.body).on("wc_stripe_saved_method_"+this.gateway_id,this.on_show_saved_methods.bind(this)),o(document.body).on("wc_stripe_payment_method_selected",this.on_payment_method_selected.bind(this)),this.banner_enabled()&&o(".woocommerce-billing-fields").length&&o(".wc-stripe-banner-checkout").css("max-width",o(".woocommerce-billing-fields").outerWidth(!0)),this.order_review()},wc_stripe.CheckoutGateway.prototype.order_review=function(){var t,e=i.location.href.match(/order_review.+payment_method=([\w]+).+payment_nonce=(.+)/);e&&1<e.length&&(t=e[1],e=e[2],this.gateway_id===t&&(this.payment_token_received=!0,this.set_nonce(e),this.set_use_new_option(!0)))},wc_stripe.CheckoutGateway.prototype.update_shipping_address=function(){return wc_stripe.BaseGateway.prototype.update_shipping_address.apply(this,arguments).then(function(t){this.populate_address_fields(t.address,this.get_shipping_prefix()),this.fields.toFormFields({update_shipping_method:!1})}.bind(this))},wc_stripe.CheckoutGateway.prototype.updated_checkout=function(){},wc_stripe.CheckoutGateway.prototype.update_checkout=function(){},wc_stripe.CheckoutGateway.prototype.checkout_error=function(){this.has_checkout_error()&&(this.payment_token_received=!1,this.payment_response=null,this.show_payment_button(),this.hide_place_order())},wc_stripe.CheckoutGateway.prototype.is_valid_checkout=function(){return!(o('[name="terms"]').length&&!o('[name="terms"]').is(":checked"))},wc_stripe.CheckoutGateway.prototype.get_payment_method=function(){return o('[name="payment_method"]:checked').val()},wc_stripe.CheckoutGateway.prototype.set_use_new_option=function(t){o("#"+this.gateway_id+"_use_new").prop("checked",t).trigger("change")},wc_stripe.CheckoutGateway.prototype.checkout_place_order=function(){return this.is_valid_checkout()?!!this.is_saved_method_selected()||this.payment_token_received:(this.submit_error(this.params.messages.terms),!1)},wc_stripe.CheckoutGateway.prototype.on_token_received=function(t){this.payment_token_received=!0,this.set_nonce(t.id),this.hide_payment_button(),this.show_place_order()},wc_stripe.CheckoutGateway.prototype.block=function(){o().block&&o("form.checkout").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},wc_stripe.CheckoutGateway.prototype.unblock=function(){o().block&&o("form.checkout").unblock()},wc_stripe.CheckoutGateway.prototype.hide_place_order=function(){o("#place_order").addClass("wc-stripe-hide")},wc_stripe.CheckoutGateway.prototype.show_place_order=function(){o("#place_order").removeClass("wc-stripe-hide")},wc_stripe.CheckoutGateway.prototype.on_show_new_methods=function(){this.payment_token_received?(this.show_place_order(),this.hide_payment_button()):(this.hide_place_order(),this.show_payment_button())},wc_stripe.CheckoutGateway.prototype.on_show_saved_methods=function(){this.hide_payment_button(),this.show_place_order()},wc_stripe.CheckoutGateway.prototype.show_payment_button=function(){this.$button&&this.$button.show()},wc_stripe.CheckoutGateway.prototype.hide_payment_button=function(){this.$button&&this.$button.hide()},wc_stripe.CheckoutGateway.prototype.trigger_payment_method_selected=function(){this.on_payment_method_selected(null,o('[name="payment_method"]:checked').val())},wc_stripe.CheckoutGateway.prototype.on_payment_method_selected=function(t,e){e===this.gateway_id?this.payment_token_received||this.is_saved_method_selected()?(this.hide_payment_button(),this.show_place_order()):(this.show_payment_button(),this.hide_place_order()):(this.hide_payment_button(),e.indexOf("stripe_")<0&&this.show_place_order())},wc_stripe.CheckoutGateway.prototype.banner_enabled=function(){return"1"===this.params.banner_enabled},wc_stripe.CheckoutGateway.prototype.checkout_fields_valid=function(){if(["checkout","order_pay"].indexOf(this.get_page())<0)return!0;var t=!0;return(t=this.fields.validateFields("billing"))?this.needs_shipping()&&o("#ship-to-different-address-checkbox").is(":checked")?(t=this.fields.validateFields("shipping"))||this.submit_error(this.params.messages.required_field):(t=this.is_valid_checkout())||this.submit_error(this.params.messages.terms):this.submit_error(this.params.messages.required_field),t},wc_stripe.CheckoutGateway.prototype.cart_contains_subscription=function(){return"undefined"!=typeof wc_stripe_cart_contains_subscription&&!0===wc_stripe_cart_contains_subscription},wc_stripe.ProductGateway=function(){this.message_container="div.product",o("form.cart").on("found_variation",this.found_variation.bind(this)),o("form.cart").on("reset_data",this.reset_variation_data.bind(this)),this.buttonWidth=o("form.cart div.quantity").outerWidth(!0)+o(".single_add_to_cart_button").outerWidth();var t=o(".single_add_to_cart_button").css("marginLeft");t&&(this.buttonWidth+=parseInt(t.replace("px",""))),o(this.container).css("max-width",this.buttonWidth+"px")},wc_stripe.ProductGateway.prototype.get_quantity=function(){return parseInt(o('[name="quantity"]').val())},wc_stripe.ProductGateway.prototype.set_rest_nonce=function(t,e){this.params.rest_nonce=e},wc_stripe.ProductGateway.prototype.found_variation=function(t,e){var i=this.get_gateway_data();i.product.price=e.display_price,i.needs_shipping=!e.is_virtual,i.product.variation=e,this.set_gateway_data(i)},wc_stripe.ProductGateway.prototype.reset_variation_data=function(){var t=this.get_product_data();t.variation=!1,this.set_product_data(t),this.disable_payment_button()},wc_stripe.ProductGateway.prototype.disable_payment_button=function(){this.$button&&this.get_button().prop("disabled",!0).addClass("disabled")},wc_stripe.ProductGateway.prototype.enable_payment_button=function(){this.$button&&this.get_button().prop("disabled",!1).removeClass("disabled")},wc_stripe.ProductGateway.prototype.get_button=function(){return this.$button},wc_stripe.ProductGateway.prototype.is_variable_product=function(){return 0<o('[name="variation_id"]').length},wc_stripe.ProductGateway.prototype.variable_product_selected=function(){return!1!==this.get_product_data().variation},wc_stripe.ProductGateway.prototype.get_product_data=function(){return this.get_gateway_data().product},wc_stripe.ProductGateway.prototype.set_product_data=function(t){var e=this.get_gateway_data();e.product=t,this.set_gateway_data(e)},wc_stripe.ProductGateway.prototype.add_to_cart=function(){return new Promise(function(e,i){this.block(),o.ajax({url:this.params.routes.add_to_cart,method:"POST",dataType:"json",data:{product_id:this.get_product_data().id,variation_id:this.is_variable_product()?o('[name="variation_id"]').val():0,qty:o('[name="quantity"]').val(),payment_method:this.gateway_id,currency:this.get_currency(),page_id:this.get_page()},beforeSend:this.ajax_before_send.bind(this)}).done(function(t){this.unblock(),t.code?(this.submit_error(t.message),i(t)):(this.set_total_price(t.data.total),this.set_total_price_cents(t.data.totalCents),this.set_display_items(t.data.displayItems),e(t.data))}.bind(this)).fail(function(t,e,i){this.unblock(),this.submit_error(i)}.bind(this))}.bind(this))},wc_stripe.ProductGateway.prototype.cart_calculation=function(t){return new Promise(function(e,i){o.ajax({url:this.params.routes.cart_calculation,method:"POST",dataType:"json",data:{product_id:this.get_product_data().id,variation_id:this.is_variable_product()&&t?t:0,qty:o('[name="quantity"]').val(),currency:this.get_currency(),payment_method:this.gateway_id},beforeSend:this.ajax_before_send.bind(this)}).done(function(t){t.code?(this.cart_calculation_error=!0,i(t)):(this.set_total_price(t.data.total),this.set_total_price_cents(t.data.totalCents),this.set_display_items(t.data.displayItems),e(t.data))}.bind(this)).fail(function(){}.bind(this))}.bind(this))},wc_stripe.CartGateway=function(){this.message_container="div.woocommerce",o(document.body).on("updated_wc_div",this.updated_html.bind(this)),o(document.body).on("updated_cart_totals",this.updated_html.bind(this)),o(document.body).on("wc_cart_emptied",this.cart_emptied.bind(this))},wc_stripe.CartGateway.prototype.submit_error=function(t){this.submit_message(this.get_error_message(t))},wc_stripe.CartGateway.prototype.updated_html=function(t){},wc_stripe.CartGateway.prototype.cart_emptied=function(t){},wc_stripe.CartGateway.prototype.add_cart_totals_class=function(){o(".cart_totals").addClass("stripe_cart_gateway_active")},wc_stripe.GooglePay=function(){};var a={apiVersion:2,apiVersionMinor:0},n={type:"CARD",parameters:{allowedAuthMethods:["PAN_ONLY"],allowedCardNetworks:["AMEX","DISCOVER","INTERAC","JCB","MASTERCARD","VISA"]}};wc_stripe.GooglePay.prototype.update_addresses=function(t){this.populate_billing_fields(t.paymentMethodData.info.billingAddress),t.shippingAddress&&this.populate_shipping_fields(t.shippingAddress),t.email&&this.fields.set("email",t.email,"billing")},wc_stripe.GooglePay.prototype.map_address=function(t){return{city:t.locality,postcode:t.postalCode,state:t.administrativeArea,country:t.countryCode}},wc_stripe.GooglePay.prototype.update_payment_data=function(s){return new Promise(function(e,i){var t="default"==s.shippingOptionData.id?null:s.shippingOptionData.id;o.when(o.ajax({url:this.params.routes.payment_data,dataType:"json",method:"POST",data:{address:this.map_address(s.shippingAddress),shipping_method:t,page_id:this.get_page(),currency:this.get_currency()},beforeSend:this.ajax_before_send.bind(this)})).done(function(t){t.code?i(t.data.data):e(t.data)}.bind(this)).fail(function(){i()}.bind(this))}.bind(this))},wc_stripe.GooglePay.prototype.on_payment_data_changed=function(i){return new Promise(function(e){this.update_payment_data(i).then(function(t){e(t.paymentRequestUpdate),this.set_selected_shipping_methods(t.shipping_methods),this.payment_data_updated(t,i)}.bind(this))["catch"](function(t){e(t)}.bind(this))}.bind(this))},wc_stripe.GooglePay.prototype.payment_data_updated=function(t){},wc_stripe.GooglePay.prototype.get_merchant_info=function(){var t={merchantId:this.params.merchant_id,merchantName:this.params.merchant_name};return"TEST"===this.params.environment&&delete t.merchantId,t},wc_stripe.GooglePay.prototype.get_payment_options=function(){var t,e={environment:this.params.environment,merchantInfo:this.get_merchant_info(),paymentDataCallbacks:{onPaymentAuthorized:function(){return new Promise(function(t){t({transactionState:"SUCCESS"})}.bind(this))}}};return this.needs_shipping()&&(t=this.get_shipping_prefix(),(!this.is_current_page("checkout")||this.is_valid_address(this.get_address_object(t),t,["email","phone"]))&&this.is_current_page("checkout")||(e.paymentDataCallbacks.onPaymentDataChanged=this.on_payment_data_changed.bind(this))),e},wc_stripe.GooglePay.prototype.build_payment_request=function(){var t=o.extend({},a,{emailRequired:this.fields.requestFieldInWallet("billing_email"),merchantInfo:this.get_merchant_info(),allowedPaymentMethods:[o.extend({type:"CARD",tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{gateway:"stripe","stripe:version":"2018-10-31","stripe:publishableKey":this.params.api_key}}},n)],shippingAddressRequired:function(){if(this.needs_shipping()){var t=this.get_shipping_prefix();if(this.is_current_page("checkout")&&!this.is_valid_address(this.get_address_object(t),t,["email","phone"])||!this.is_current_page("checkout"))return!0}return!1}.bind(this)(),transactionInfo:{currencyCode:this.get_currency(),totalPriceStatus:"ESTIMATED",totalPrice:this.get_total_price().toString(),displayItems:this.get_display_items(),totalPriceLabel:this.params.total_price_label}});return t.allowedPaymentMethods[0].parameters.billingAddressRequired=function(){return!this.is_current_page("checkout")||!this.is_valid_address(this.get_address_object("billing"),"billing",["email","phone"])}.bind(this)(),t.allowedPaymentMethods[0].parameters.billingAddressParameters={format:"FULL",phoneNumberRequired:this.fields.requestFieldInWallet("billing_phone")},t.shippingAddressRequired?(t.shippingAddressParameters={},t.shippingOptionRequired=!0,t.shippingOptionParameters={shippingOptions:this.get_shipping_options()},t.callbackIntents=["SHIPPING_ADDRESS","SHIPPING_OPTION","PAYMENT_AUTHORIZATION"]):t.callbackIntents=["PAYMENT_AUTHORIZATION"],this.payment_request_options=t},wc_stripe.GooglePay.prototype.createPaymentsClient=function(){this.paymentsClient=new google.payments.api.PaymentsClient(this.get_payment_options())},wc_stripe.GooglePay.prototype.isReadyToPay=function(){return new Promise(function(t){var e=o.extend({},a);e.allowedPaymentMethods=[n],this.paymentsClient.isReadyToPay(e).then(function(){this.can_pay=!0,this.create_button(),t()}.bind(this))["catch"](function(t){this.submit_error(t)}.bind(this))}.bind(this))},wc_stripe.GooglePay.prototype.create_button=function(){this.$button&&this.$button.remove(),this.$button=o(this.paymentsClient.createButton({onClick:this.start.bind(this),buttonColor:this.params.button_color,buttonType:this.params.button_style})),this.$button.addClass("gpay-button-container")},wc_stripe.GooglePay.prototype.start=function(){this.createPaymentsClient(),this.paymentsClient.loadPaymentData(this.build_payment_request()).then(function(t){var e=JSON.parse(t.paymentMethodData.tokenizationData.token);this.update_addresses(t),this.on_token_received(e)}.bind(this))["catch"](function(t){"CANCELED"!==t.statusCode&&(t.statusMessage&&-1<t.statusMessage.indexOf("paymentDataRequest.callbackIntent")?this.submit_error_code("DEVELOPER_ERROR_WHITELIST"):this.submit_error(t.message))}.bind(this))},wc_stripe.ApplePay=function(){},wc_stripe.ApplePay.prototype.initialize=function(){this.createPaymentRequest(),this.canMakePayment()},wc_stripe.ApplePay.prototype.create_button=function(){this.$button&&this.$button.remove(),this.$button=o(this.params.button),this.$button.on("click",this.start.bind(this)),this.append_button()},wc_stripe.ApplePay.prototype.canMakePayment=function(){return new Promise(function(e){this.paymentRequest.canMakePayment().then(function(t){t&&t.applePay&&(this.can_pay=!0,this.create_button(),o(this.container).show(),e(t))}.bind(this))}.bind(this))},wc_stripe.ApplePay.prototype.start=function(t){t.preventDefault(),this.paymentRequest.update(this.get_payment_request_update({total:{pending:!1}})),this.paymentRequest.show()},wc_stripe.PaymentRequest=function(){},wc_stripe.PaymentRequest.prototype.initialize=function(){this.createPaymentRequest(),this.createPaymentRequestButton(),this.canMakePayment(),this.paymentRequestButton.on("click",this.button_click.bind(this))},wc_stripe.PaymentRequest.prototype.button_click=function(t){},wc_stripe.PaymentRequest.prototype.createPaymentRequestButton=function(){this.paymentRequestButton&&this.paymentRequestButton.destroy(),this.paymentRequestButton=this.elements.create("paymentRequestButton",{paymentRequest:this.paymentRequest,style:{paymentRequestButton:{type:this.params.button.type,theme:this.params.button.theme,height:this.params.button.height}}})},wc_stripe.PaymentRequest.prototype.canMakePayment=function(){return new Promise(function(e){this.paymentRequest.canMakePayment().then(function(t){t&&!t.applePay&&(this.can_pay=!0,this.create_button(),o(this.container).show(),e(t))}.bind(this))}.bind(this))},wc_stripe.PaymentRequest.prototype.create_button=function(){this.paymentRequestButton.mount("#wc-stripe-payment-request-container")},wc_stripe.CheckoutFields=function(t,e){this.params=t,this.page=e,this.fields=new Map(Object.keys(this.params).map(function(t){return null===this.params[t].value&&(this.params[t].value=""),[t,this.params[t].value]}.bind(this))),("checkout"===e||"cart"===e&&o(document.body).is(".woocommerce-checkout"))&&(o("form.checkout").on("change",".input-text, select",this.onChange.bind(this)),o("form.checkout").on("change",'[name="ship_to_different_address"]',this.on_ship_to_address_change.bind(this)),this.init_i18n(),o('[name="ship_to_different_address"]').is(":checked")?this.update_required_fields(o("#shipping_country").val(),"shipping_country"):this.update_required_fields(o("#billing_country").val(),"billing_country"))},wc_stripe.CheckoutFields.prototype.init_i18n=function(){"undefined"!=typeof wc_address_i18n_params?this.locales=o.parseJSON(wc_address_i18n_params.locale.replace(/&quot;/g,'"')):this.locales=null},wc_stripe.CheckoutFields.prototype.onChange=function(t){try{var e=t.currentTarget.name,i=t.currentTarget.value;this.fields.set(e,i),"billing_country"!==e&&"shipping_country"!==e||this.update_required_fields(i,e)}catch(s){console.log(s)}},wc_stripe.CheckoutFields.prototype.update_required_fields=function(t,e){if(this.locales){var i,s=-1<e.indexOf("billing_")?"billing_":"shipping_",t="undefined"!=typeof this.locales[t]?this.locales[t]:this.locales["default"],a=o.extend(!0,{},this.locales["default"],t);for(i in a){var n=s+i;this.params[n]&&(this.params[n]=o.extend(!0,{},this.params[n],a[i]))}}},wc_stripe.CheckoutFields.prototype.on_ship_to_address_change=function(t){o(t.currentTarget).is(":checked")&&this.update_required_fields(o("#shipping_country").val(),"shipping_country")},wc_stripe.CheckoutFields.prototype.requestFieldInWallet=function(t){return"checkout"===this.page?this.required(t)&&this.isEmpty(t):"order_pay"!==this.page&&this.required(t)},wc_stripe.CheckoutFields.prototype.set=function(t,e,i){this[t]&&"function"==typeof this[t]?this[t]().set.call(this,e,i):this.fields.set(t,e)},wc_stripe.CheckoutFields.prototype.get=function(t,e){var i;return this[t]&&"function"==typeof this[t]?i=this[t]().get.call(this,e):null!=(i=this.fields.get(t))&&""!==i||void 0!==e&&(i=e),void 0===i?"":i},wc_stripe.CheckoutFields.prototype.required=function(t){return!(!this.params[t]||"undefined"==typeof this.params[t].required)&&this.params[t].required},wc_stripe.CheckoutFields.prototype.isEmpty=function(t){if(this.fields.has(t)){t=this.fields.get(t);return null==t||"string"==typeof t&&0===t.trim().length}return!0},wc_stripe.CheckoutFields.prototype.isValid=function(t){if(this[t]&&"function"==typeof this[t])return this[t]().isValid.apply(this,Array.prototype.slice.call(arguments,1))},wc_stripe.CheckoutFields.prototype.first_name=function(){return{set:function(t,e){this.fields.set(e+"_first_name",t)},get:function(t){return this.fields.get(t+"_first_name")},isValid:function(t){return"string"==typeof t&&0<t.length}}},wc_stripe.CheckoutFields.prototype.last_name=function(){return{set:function(t,e){this.fields.set(e+"_last_name",t)},get:function(t){return this.fields.get(t+"_last_name")},isValid:function(t){return"string"==typeof t&&0<t.length}}},wc_stripe.CheckoutFields.prototype.address_1=function(){return{set:function(t,e){this.fields.set(e+"_address_1",t)},get:function(t){return this.fields.get(t+"_address_1")},isValid:function(t){return"string"==typeof t&&0<t.length}}},wc_stripe.CheckoutFields.prototype.address_2=function(){return{set:function(t,e){this.fields.set(e+"_address_2",t)},get:function(t){return this.fields.get(t+"_address_2")},isValid:function(t){return"string"==typeof t&&0<t.length}}},wc_stripe.CheckoutFields.prototype.name=function(){return{set:function(t,e){t=t.split(" ");0<t.length&&this.fields.set(e+"_first_name",t[0]),1<t.length&&this.fields.set(e+"_last_name",t[1])},get:function(t){return this.fields.get(t+"_first_name")+" "+this.fields.get(t+"_last_name")}}},wc_stripe.CheckoutFields.prototype.email=function(){return{set:function(t,e){this.fields.set(e+"_email",t)},get:function(t){return this.fields.get(t+"_email")},isValid:function(t){return"string"==typeof t&&0<t.length}}},wc_stripe.CheckoutFields.prototype.phone=function(){return{set:function(t,e){this.fields.set(e+"_phone",t)},get:function(t){return this.fields.get(t+"_phone")},isValid:function(t){return"string"==typeof t&&0<t.length}}},wc_stripe.CheckoutFields.prototype.country=function(){return{set:function(t,e){this.fields.set(e+"_country",t)},get:function(t){return this.fields.get(t+"_country")},isValid:function(t){return"string"==typeof t&&2===t.length}}},wc_stripe.CheckoutFields.prototype.state=function(){return{set:function(i,t){2<(i=i.toUpperCase()).length&&"checkout"===this.page&&o("#"+t+"_state option").each(function(){var t=o(this),e=t.text().toUpperCase();i===e&&(i=t.val())}),this.fields.set(t+"_state",i)},get:function(t){return this.fields.get(t+"_state")},isValid:function(t){return"string"==typeof t&&0<t.length}}},wc_stripe.CheckoutFields.prototype.city=function(){return{set:function(t,e){this.fields.set(e+"_city",t)},get:function(t){return this.fields.get(t+"_city")},isValid:function(t){return"string"==typeof t&&0<t.length}}},wc_stripe.CheckoutFields.prototype.postcode=function(){return{set:function(t,e){this.fields.set(e+"_postcode",t)},get:function(t){return this.fields.get(t+"_postcode")},isValid:function(t){return"string"==typeof t&&0<t.length}}},wc_stripe.CheckoutFields.prototype.recipient=function(){return wc_stripe.CheckoutFields.prototype.name.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.payerName=function(){return wc_stripe.CheckoutFields.prototype.name.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.payerEmail=function(){return wc_stripe.CheckoutFields.prototype.email.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.payerPhone=function(){return wc_stripe.CheckoutFields.prototype.phone.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.phoneNumber=function(){return wc_stripe.CheckoutFields.prototype.phone.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.countryCode=function(){return wc_stripe.CheckoutFields.prototype.country.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.address1=function(){return wc_stripe.CheckoutFields.prototype.address_1.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.address2=function(){return wc_stripe.CheckoutFields.prototype.address_2.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.line1=function(){return wc_stripe.CheckoutFields.prototype.address_1.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.line2=function(){return wc_stripe.CheckoutFields.prototype.address_2.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.addressLine=function(){return{set:function(t,e){0<t.length&&this.fields.set(e+"_address_1",t[0]),1<t.length&&this.fields.set(e+"_address_2",t[1])},get:function(t){return[this.fields.get(t+"_address_1"),this.fields.get(t+"_address_2")]},isValid:function(t){return 0<t.length&&("string"==typeof t[0]&&0<t[0].length)}}},wc_stripe.CheckoutFields.prototype.region=function(){return wc_stripe.CheckoutFields.prototype.state.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.administrativeArea=function(){return wc_stripe.CheckoutFields.prototype.state.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.locality=function(){return wc_stripe.CheckoutFields.prototype.city.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.postal_code=function(){return wc_stripe.CheckoutFields.prototype.postcode.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.postalCode=function(){return wc_stripe.CheckoutFields.prototype.postcode.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.toJson=function(){var i={};return this.fields.forEach(function(t,e){i[e]=t}),i},wc_stripe.CheckoutFields.prototype.toFormFields=function(t){var i=[];this.fields.forEach(function(t,e){e='[name="'+e+'"]';o(e).length&&""!==t&&(o(e).val()!==t&&o(e).is("select")&&i.push(e),o(e).val(t))}),0<i.length&&o(i.join(",")).trigger("change"),void 0!==t&&o(document.body).trigger("update_checkout",t)},wc_stripe.CheckoutFields.prototype.validateFields=function(t){for(var e in this.params){var i=this.params[e];if(-1<e.indexOf(t)&&i.required&&o("#"+e).length&&o("#"+e).is(":visible")){i=o("#"+e).val();if(null==i||0===i.length)return!1}}return!0};try{s=Stripe(wc_stripe_params_v3.api_key,{stripeAccount:wc_stripe_params_v3.account})}catch(t){return i.alert(t),console.log(t)}var r=new wc_stripe.CheckoutFields(wc_stripe_checkout_fields,wc_stripe_params_v3.page)}(window,jQuery);
1
+ !function(i,o){i.wc_stripe={};var s=null;"undefined"==typeof wc_stripe_checkout_fields&&(i.wc_stripe_checkout_fields=[]),wc_stripe.BaseGateway=function(t,e){this.params=t,this.gateway_id=this.params.gateway_id,this.container=void 0===e?"li.payment_method_".concat(this.gateway_id):e,o(this.container).length||(this.container=".payment_method_".concat(this.gateway_id)),this.token_selector=this.params.token_selector,this.saved_method_selector=this.params.saved_method_selector,this.payment_token_received=!1,this.stripe=s,this.elements=s.elements(o.extend({},{locale:"auto"},this.get_element_options())),this.fields=r,this.initialize()},wc_stripe.BaseGateway.prototype.get_page=function(){var t=wc_stripe_params_v3.page;return"cart"===t&&o(document.body).is(".woocommerce-checkout")&&(t="checkout"),t},wc_stripe.BaseGateway.prototype.set_nonce=function(t){this.fields.set(this.gateway_id+"_token_key",t),o(this.token_selector).val(t)},wc_stripe.BaseGateway.prototype.get_element_options=function(){return{}},wc_stripe.BaseGateway.prototype.initialize=function(){},wc_stripe.BaseGateway.prototype.create_button=function(){},wc_stripe.BaseGateway.prototype.is_gateway_selected=function(){return o('[name="payment_method"]:checked').val()===this.gateway_id},wc_stripe.BaseGateway.prototype.is_saved_method_selected=function(){return this.is_gateway_selected()&&"saved"===o('[name="'+this.gateway_id+'_payment_type_key"]:checked').val()},wc_stripe.BaseGateway.prototype.has_checkout_error=function(){return 0<o("#wc_stripe_checkout_error").length&&this.is_gateway_selected()},wc_stripe.BaseGateway.prototype.submit_error=function(t){-1==(t=this.get_error_message(t)).indexOf("</ul>")&&(t='<div class="woocommerce-error">'+t+"</div>"),this.submit_message(t)},wc_stripe.BaseGateway.prototype.submit_error_code=function(t){console.log(t)},wc_stripe.BaseGateway.prototype.get_error_message=function(t){return"object"==typeof t&&t.code&&(t=wc_stripe_messages[t.code]||t.message),t},wc_stripe.BaseGateway.prototype.submit_message=function(t){o(".woocommerce-error, .woocommerce-message, .woocommerce-info").remove();var e=o(this.message_container);e.closest("form").length&&(e=e.closest("form")),e.prepend(t),e.removeClass("processing").unblock(),e.find(".input-text, select, input:checkbox").blur(),o.scroll_to_notices?o.scroll_to_notices(e):o("html, body").animate({scrollTop:e.offset().top-100},1e3)},wc_stripe.BaseGateway.prototype.get_first_name=function(t){return o("#"+t+"_first_name").val()},wc_stripe.BaseGateway.prototype.get_last_name=function(t){return o("#"+t+"_last_name").val()},wc_stripe.BaseGateway.prototype.get_shipping_prefix=function(){return this.needs_shipping()&&0<o('[name="ship_to_different_address"]').length&&o('[name="ship_to_different_address"]').is(":checked")?"shipping":"billing"},wc_stripe.BaseGateway.prototype.should_save_method=function(){return o("#"+this.gateway_id+"_save_source_key").is(":checked")},wc_stripe.BaseGateway.prototype.is_add_payment_method_page=function(){return"add_payment_method"===this.get_page()||o(document.body).hasClass("woocommerce-add-payment-method")},wc_stripe.BaseGateway.prototype.is_change_payment_method=function(){return"change_payment_method"===this.get_page()},wc_stripe.BaseGateway.prototype.get_selected_payment_method=function(){return o(this.saved_method_selector).val()},wc_stripe.BaseGateway.prototype.needs_shipping=function(){return this.get_gateway_data().needs_shipping},wc_stripe.BaseGateway.prototype.get_currency=function(){return this.get_gateway_data().currency},wc_stripe.BaseGateway.prototype.get_gateway_data=function(){var t=o(this.container).find(".woocommerce_".concat(this.gateway_id,"_gateway_data")).data("gateway");return void 0===t&&this.is_current_page("checkout")&&(t=o("form.checkout").find(".woocommerce_".concat(this.gateway_id,"_gateway_data")).data("gateway")),t},wc_stripe.BaseGateway.prototype.set_gateway_data=function(t){o(this.container).find(".woocommerce_".concat(this.gateway_id,"_gateway_data")).data("gateway",t)},wc_stripe.BaseGateway.prototype.get_customer_name=function(t){return this.fields.get(t+"_first_name")+" "+this.fields.get(t+"_last_name")},wc_stripe.BaseGateway.prototype.get_customer_email=function(){return this.fields.get("billing_email")},wc_stripe.BaseGateway.prototype.get_address_field_hash=function(t){for(var e=["_first_name","_last_name","_address_1","_address_2","_postcode","_city","_state","_country"],i="",s=0;s<e.length;s++)i+=this.fields.get(t+e[s])+"_";return i},wc_stripe.BaseGateway.prototype.block=function(){o().block&&o.blockUI({message:null,overlayCSS:{background:"#fff",opacity:.6}})},wc_stripe.BaseGateway.prototype.unblock=function(){o().block&&o.unblockUI()},wc_stripe.BaseGateway.prototype.get_form=function(){return o(this.token_selector).closest("form")},wc_stripe.BaseGateway.prototype.get_total_price=function(){return this.get_gateway_data().total},wc_stripe.BaseGateway.prototype.get_total_price_cents=function(){return this.get_gateway_data().total_cents},wc_stripe.BaseGateway.prototype.set_total_price=function(t){var e=this.get_gateway_data();e.total=t,this.set_gateway_data(e)},wc_stripe.BaseGateway.prototype.set_total_price_cents=function(t){var e=this.get_gateway_data();e.total_cents=t,this.set_gateway_data(e)},wc_stripe.BaseGateway.prototype.set_payment_method=function(t){o('[name="payment_method"][value="'+t+'"]').prop("checked",!0).trigger("click")},wc_stripe.BaseGateway.prototype.set_selected_shipping_methods=function(t){if(this.fields.set("shipping_method",t),t&&o('[name^="shipping_method"]').length)for(var e in t){var i=t[e];o('[name="shipping_method['+e+']"][value="'+i+'"]').prop("checked",!0).trigger("change")}},wc_stripe.BaseGateway.prototype.on_token_received=function(t){this.payment_token_received=!0,this.set_nonce(t.id),this.process_checkout()},wc_stripe.BaseGateway.prototype.createPaymentRequest=function(){try{this.payment_request_options=this.get_payment_request_options(),this.paymentRequest=s.paymentRequest(this.payment_request_options),this.payment_request_options.requestShipping&&(this.paymentRequest.on("shippingaddresschange",this.update_shipping_address.bind(this)),this.paymentRequest.on("shippingoptionchange",this.update_shipping_method.bind(this))),this.paymentRequest.on("paymentmethod",this.on_payment_method_received.bind(this))}catch(t){return void this.submit_error(t.message)}},wc_stripe.BaseGateway.prototype.get_payment_request_options=function(){var t={country:this.params.country_code,currency:this.get_currency().toLowerCase(),total:{amount:this.get_total_price_cents(),label:this.params.total_label,pending:!0},requestPayerName:function(){return!this.is_current_page("checkout")||!this.is_valid_address(this.get_address_object("billing"),"billing",["email","phone"])}.bind(this)(),requestPayerEmail:this.fields.requestFieldInWallet("billing_email"),requestPayerPhone:this.fields.requestFieldInWallet("billing_phone"),requestShipping:function(){if(this.needs_shipping()){var t=this.get_shipping_prefix();if(this.is_current_page("checkout")&&!this.is_valid_address(this.get_address_object(t),t,["email","phone"])||!this.is_current_page("checkout"))return!0}return!1}.bind(this)()},e=this.get_display_items(),i=this.get_shipping_options();return e&&(t.displayItems=e),t.requestShipping&&i&&(t.shippingOptions=i),t},wc_stripe.BaseGateway.prototype.get_payment_request_update=function(t){var e={currency:this.get_currency().toLowerCase(),total:{amount:parseInt(this.get_total_price_cents()),label:this.params.total_label,pending:!0}},i=this.get_display_items(),s=this.get_shipping_options();return i&&(e.displayItems=i),this.payment_request_options.requestShipping&&s&&(e.shippingOptions=s),t&&(e=o.extend(!0,{},e,t)),e},wc_stripe.BaseGateway.prototype.get_display_items=function(){return this.get_gateway_data().items},wc_stripe.BaseGateway.prototype.set_display_items=function(t){var e=this.get_gateway_data();e.items=t,this.set_gateway_data(e)},wc_stripe.BaseGateway.prototype.get_shipping_options=function(){return this.get_gateway_data().shipping_options},wc_stripe.BaseGateway.prototype.set_shipping_options=function(t){var e=this.get_gateway_data();e.shipping_options=t,this.set_gateway_data(e)},wc_stripe.BaseGateway.prototype.map_address=function(t){return{city:t.city,postcode:t.postalCode,state:t.region,country:t.country}},wc_stripe.BaseGateway.prototype.on_payment_method_received=function(t){try{this.payment_response=t,this.populate_checkout_fields(t),t.complete("success"),this.on_token_received(t.paymentMethod)}catch(e){i.alert(e)}},wc_stripe.BaseGateway.prototype.populate_checkout_fields=function(t){this.set_nonce(t.paymentMethod.id),this.update_addresses(t)},wc_stripe.BaseGateway.prototype.update_addresses=function(t){t.payerName&&this.fields.set("name",t.payerName,"billing"),t.payerEmail&&this.fields.set("email",t.payerEmail,"billing"),t.payerPhone&&this.fields.set("phone",t.payerPhone,"billing"),t.shippingAddress&&this.populate_shipping_fields(t.shippingAddress),t.paymentMethod.billing_details.address&&this.populate_billing_fields(t.paymentMethod.billing_details.address)},wc_stripe.BaseGateway.prototype.populate_address_fields=function(t,e){for(var i in t)null!==t[i]&&this.fields.set(i,t[i],e)},wc_stripe.BaseGateway.prototype.populate_billing_fields=function(t){this.populate_address_fields(t,"billing")},wc_stripe.BaseGateway.prototype.populate_shipping_fields=function(t){this.populate_address_fields(t,"shipping")},wc_stripe.BaseGateway.prototype.get_address_fields=function(){return["first_name","last_name","country","address_1","address_2","city","state","postcode","phone","email"]},wc_stripe.BaseGateway.prototype.get_address_object=function(e){var i={};return this.get_address_fields().forEach(function(t){i[t]=this.fields.get(t,e)}.bind(this)),i},wc_stripe.BaseGateway.prototype.is_current_page=function(t){return this.get_page()===t},wc_stripe.BaseGateway.prototype.is_valid_address=function(t,e,i){if(o.isEmptyObject(t))return!1;var s=this.get_address_fields();void 0!==i&&i.forEach(function(t){-1<s.indexOf(t)&&s.splice(s.indexOf(t),1)});for(var a=0;a<s.length;a++){var n=s[a];if(this.fields.required(e+"_"+n)&&(!t[n]||"undefined"==typeof t[n]||!this.fields.isValid(n,t[n],t)))return!1}return!0},wc_stripe.BaseGateway.prototype.ajax_before_send=function(t){0<this.params.user_id&&t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)},wc_stripe.BaseGateway.prototype.process_checkout=function(){return new Promise(function(){this.block(),o.ajax({url:this.params.routes.checkout,method:"POST",dataType:"json",data:o.extend({},this.serialize_fields(),{payment_method:this.gateway_id,page_id:this.get_page(),currency:this.get_currency()}),beforeSend:this.ajax_before_send.bind(this)}).done(function(t){t.reload?i.location.reload():"success"===t.result?i.location=t.redirect:(t.messages&&this.submit_error(t.messages),this.unblock())}.bind(this)).fail(function(t,e,i){this.unblock(),this.submit_error(i)}.bind(this))}.bind(this))},wc_stripe.BaseGateway.prototype.serialize_form=function(t){var e,i=t.find("input").filter(function(t,e){return!o(e).is('[name^="add-to-cart"]')}.bind(this)).serializeArray(),s={};for(e in i){var a=i[e];s[a.name]=a.value}return s.payment_method=this.gateway_id,s},wc_stripe.BaseGateway.prototype.serialize_fields=function(){return o.extend({},this.fields.toJson(),o(document.body).triggerHandler("wc_stripe_process_checkout_data",[this,this.fields]))},wc_stripe.BaseGateway.prototype.map_shipping_methods=function(t){var e={};return"default"===t||1<(t=t.match(/^([\w+]):(.+)$/)).length&&(e[t[1]]=t[2]),e},wc_stripe.BaseGateway.prototype.maybe_set_ship_to_different=function(){o('[name="ship_to_different_address"]').length&&o('[name="ship_to_different_address"]').prop("checked",this.get_address_field_hash("billing")!==this.get_address_field_hash("shipping")).trigger("change")},wc_stripe.BaseGateway.prototype.update_shipping_address=function(s){return new Promise(function(e,i){o.ajax({url:this.params.routes.shipping_address,method:"POST",dataType:"json",data:{address:this.map_address(s.shippingAddress),payment_method:this.gateway_id,page_id:this.get_page(),currency:this.get_currency()},beforeSend:this.ajax_before_send.bind(this)}).done(function(t){t.code?(s.updateWith(t.data.newData),i(t.data)):(s.updateWith(t.data.newData),this.fields.set("shipping_method",t.data.shipping_method),e(t.data))}.bind(this)).fail(function(){}.bind(this))}.bind(this))},wc_stripe.BaseGateway.prototype.update_shipping_method=function(s){return new Promise(function(e,i){o.ajax({url:this.params.routes.shipping_method,method:"POST",dataType:"json",data:{shipping_method:s.shippingOption.id,payment_method:this.gateway_id,currency:this.get_currency(),page_id:this.get_page()},beforeSend:this.ajax_before_send.bind(this)}).done(function(t){t.code?(s.updateWith(t.data.newData),i(t.data)):(this.set_selected_shipping_methods(t.data.shipping_methods),s.updateWith(t.data.newData),e(t.data))}.bind(this)).fail(function(t,e,i){this.submit_error(i)}.bind(this))}.bind(this))},wc_stripe.CheckoutGateway=function(){this.message_container="li.payment_method_"+this.gateway_id,this.banner_container="li.banner_payment_method_"+this.gateway_id,o(document.body).on("update_checkout",this.update_checkout.bind(this)),o(document.body).on("updated_checkout",this.updated_checkout.bind(this)),o(document.body).on("updated_checkout",this.container_styles.bind(this)),o(document.body).on("cfw_updated_checkout",this.updated_checkout.bind(this)),o(document.body).on("checkout_error",this.checkout_error.bind(this)),o(this.token_selector).closest("form").on("checkout_place_order_"+this.gateway_id,this.checkout_place_order.bind(this)),o(document.body).on("wc_stripe_new_method_"+this.gateway_id,this.on_show_new_methods.bind(this)),o(document.body).on("wc_stripe_saved_method_"+this.gateway_id,this.on_show_saved_methods.bind(this)),o(document.body).on("wc_stripe_payment_method_selected",this.on_payment_method_selected.bind(this)),this.banner_enabled()&&o(".woocommerce-billing-fields").length&&o(".wc-stripe-banner-checkout").css("max-width",o(".woocommerce-billing-fields").outerWidth(!0)),this.container_styles(),this.order_review()},wc_stripe.CheckoutGateway.prototype.container_styles=function(){this.params.description||o(this.container).addClass("wc-stripe-no-desc"),o(this.container).find(".wc-stripe-saved-methods").length||o(this.container).find(".payment_box").addClass("wc-stripe-no-methods")},wc_stripe.CheckoutGateway.prototype.order_review=function(){var t,e=i.location.href.match(/order_review.+payment_method=([\w]+).+payment_nonce=(.+)/);e&&1<e.length&&(t=e[1],e=e[2],this.gateway_id===t&&(this.payment_token_received=!0,this.set_nonce(e),this.set_use_new_option(!0)))},wc_stripe.CheckoutGateway.prototype.update_shipping_address=function(){return wc_stripe.BaseGateway.prototype.update_shipping_address.apply(this,arguments).then(function(t){this.populate_address_fields(t.address,this.get_shipping_prefix()),this.fields.toFormFields({update_shipping_method:!1})}.bind(this))},wc_stripe.CheckoutGateway.prototype.updated_checkout=function(){},wc_stripe.CheckoutGateway.prototype.update_checkout=function(){},wc_stripe.CheckoutGateway.prototype.checkout_error=function(){this.has_checkout_error()&&(this.payment_token_received=!1,this.payment_response=null,this.show_payment_button(),this.hide_place_order())},wc_stripe.CheckoutGateway.prototype.is_valid_checkout=function(){return!(o('[name="terms"]').length&&!o('[name="terms"]').is(":checked"))},wc_stripe.CheckoutGateway.prototype.get_payment_method=function(){return o('[name="payment_method"]:checked').val()},wc_stripe.CheckoutGateway.prototype.set_use_new_option=function(t){o("#"+this.gateway_id+"_use_new").prop("checked",t).trigger("change")},wc_stripe.CheckoutGateway.prototype.checkout_place_order=function(){return this.is_valid_checkout()?!!this.is_saved_method_selected()||this.payment_token_received:(this.submit_error(this.params.messages.terms),!1)},wc_stripe.CheckoutGateway.prototype.on_token_received=function(t){this.payment_token_received=!0,this.set_nonce(t.id),this.hide_payment_button(),this.show_place_order()},wc_stripe.CheckoutGateway.prototype.block=function(){o().block&&o("form.checkout").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},wc_stripe.CheckoutGateway.prototype.unblock=function(){o().block&&o("form.checkout").unblock()},wc_stripe.CheckoutGateway.prototype.hide_place_order=function(){o("#place_order").addClass("wc-stripe-hide")},wc_stripe.CheckoutGateway.prototype.show_place_order=function(){o("#place_order").removeClass("wc-stripe-hide")},wc_stripe.CheckoutGateway.prototype.on_show_new_methods=function(){this.payment_token_received?(this.show_place_order(),this.hide_payment_button()):(this.hide_place_order(),this.show_payment_button())},wc_stripe.CheckoutGateway.prototype.on_show_saved_methods=function(){this.hide_payment_button(),this.show_place_order()},wc_stripe.CheckoutGateway.prototype.show_payment_button=function(){this.$button&&this.$button.show()},wc_stripe.CheckoutGateway.prototype.hide_payment_button=function(){this.$button&&this.$button.hide()},wc_stripe.CheckoutGateway.prototype.trigger_payment_method_selected=function(){this.on_payment_method_selected(null,o('[name="payment_method"]:checked').val())},wc_stripe.CheckoutGateway.prototype.on_payment_method_selected=function(t,e){e===this.gateway_id?this.payment_token_received||this.is_saved_method_selected()?(this.hide_payment_button(),this.show_place_order()):(this.show_payment_button(),this.hide_place_order()):(this.hide_payment_button(),e.indexOf("stripe_")<0&&this.show_place_order())},wc_stripe.CheckoutGateway.prototype.banner_enabled=function(){return"1"===this.params.banner_enabled},wc_stripe.CheckoutGateway.prototype.checkout_fields_valid=function(){if(["checkout","order_pay"].indexOf(this.get_page())<0)return!0;var t=!0;return(t=this.fields.validateFields("billing"))?this.needs_shipping()&&o("#ship-to-different-address-checkbox").is(":checked")?(t=this.fields.validateFields("shipping"))||this.submit_error(this.params.messages.required_field):(t=this.is_valid_checkout())||this.submit_error(this.params.messages.terms):this.submit_error(this.params.messages.required_field),t},wc_stripe.CheckoutGateway.prototype.cart_contains_subscription=function(){return"undefined"!=typeof wc_stripe_cart_contains_subscription&&!0===wc_stripe_cart_contains_subscription},wc_stripe.ProductGateway=function(){this.message_container="div.product",o("form.cart").on("found_variation",this.found_variation.bind(this)),o("form.cart").on("reset_data",this.reset_variation_data.bind(this)),this.buttonWidth=o("form.cart div.quantity").outerWidth(!0)+o(".single_add_to_cart_button").outerWidth();var t=o(".single_add_to_cart_button").css("marginLeft");t&&(this.buttonWidth+=parseInt(t.replace("px",""))),o(this.container).css("max-width",this.buttonWidth+"px")},wc_stripe.ProductGateway.prototype.get_quantity=function(){return parseInt(o('[name="quantity"]').val())},wc_stripe.ProductGateway.prototype.set_rest_nonce=function(t,e){this.params.rest_nonce=e},wc_stripe.ProductGateway.prototype.found_variation=function(t,e){var i=this.get_gateway_data();i.product.price=e.display_price,i.needs_shipping=!e.is_virtual,i.product.variation=e,this.set_gateway_data(i)},wc_stripe.ProductGateway.prototype.reset_variation_data=function(){var t=this.get_product_data();t.variation=!1,this.set_product_data(t),this.disable_payment_button()},wc_stripe.ProductGateway.prototype.disable_payment_button=function(){this.$button&&this.get_button().prop("disabled",!0).addClass("disabled")},wc_stripe.ProductGateway.prototype.enable_payment_button=function(){this.$button&&this.get_button().prop("disabled",!1).removeClass("disabled")},wc_stripe.ProductGateway.prototype.get_button=function(){return this.$button},wc_stripe.ProductGateway.prototype.is_variable_product=function(){return 0<o('[name="variation_id"]').length},wc_stripe.ProductGateway.prototype.variable_product_selected=function(){return!1!==this.get_product_data().variation},wc_stripe.ProductGateway.prototype.get_product_data=function(){return this.get_gateway_data().product},wc_stripe.ProductGateway.prototype.set_product_data=function(t){var e=this.get_gateway_data();e.product=t,this.set_gateway_data(e)},wc_stripe.ProductGateway.prototype.add_to_cart=function(){return new Promise(function(e,i){this.block(),o.ajax({url:this.params.routes.add_to_cart,method:"POST",dataType:"json",data:{product_id:this.get_product_data().id,variation_id:this.is_variable_product()?o('[name="variation_id"]').val():0,qty:o('[name="quantity"]').val(),payment_method:this.gateway_id,currency:this.get_currency(),page_id:this.get_page()},beforeSend:this.ajax_before_send.bind(this)}).done(function(t){this.unblock(),t.code?(this.submit_error(t.message),i(t)):(this.set_total_price(t.data.total),this.set_total_price_cents(t.data.totalCents),this.set_display_items(t.data.displayItems),e(t.data))}.bind(this)).fail(function(t,e,i){this.unblock(),this.submit_error(i)}.bind(this))}.bind(this))},wc_stripe.ProductGateway.prototype.cart_calculation=function(t){return new Promise(function(e,i){o.ajax({url:this.params.routes.cart_calculation,method:"POST",dataType:"json",data:{product_id:this.get_product_data().id,variation_id:this.is_variable_product()&&t?t:0,qty:o('[name="quantity"]').val(),currency:this.get_currency(),payment_method:this.gateway_id},beforeSend:this.ajax_before_send.bind(this)}).done(function(t){t.code?(this.cart_calculation_error=!0,i(t)):(this.set_total_price(t.data.total),this.set_total_price_cents(t.data.totalCents),this.set_display_items(t.data.displayItems),e(t.data))}.bind(this)).fail(function(){}.bind(this))}.bind(this))},wc_stripe.CartGateway=function(){this.message_container="div.woocommerce",o(document.body).on("updated_wc_div",this.updated_html.bind(this)),o(document.body).on("updated_cart_totals",this.updated_html.bind(this)),o(document.body).on("wc_cart_emptied",this.cart_emptied.bind(this))},wc_stripe.CartGateway.prototype.submit_error=function(t){this.submit_message(this.get_error_message(t))},wc_stripe.CartGateway.prototype.updated_html=function(t){},wc_stripe.CartGateway.prototype.cart_emptied=function(t){},wc_stripe.CartGateway.prototype.add_cart_totals_class=function(){o(".cart_totals").addClass("stripe_cart_gateway_active")},wc_stripe.GooglePay=function(){};var a={apiVersion:2,apiVersionMinor:0},n={type:"CARD",parameters:{allowedAuthMethods:["PAN_ONLY"],allowedCardNetworks:["AMEX","DISCOVER","INTERAC","JCB","MASTERCARD","VISA"]}};wc_stripe.GooglePay.prototype.update_addresses=function(t){var e;t.paymentMethodData.info.billingAddress&&(e=t.paymentMethodData.info.billingAddress,this.is_current_page("checkout")&&this.is_valid_address(this.billing_address_object,"billing",["phone","email"])&&(e={phoneNumber:e.phoneNumber}),this.populate_billing_fields(e)),t.shippingAddress&&this.populate_shipping_fields(t.shippingAddress),t.email&&this.fields.set("email",t.email,"billing")},wc_stripe.GooglePay.prototype.map_address=function(t){return{city:t.locality,postcode:t.postalCode,state:t.administrativeArea,country:t.countryCode}},wc_stripe.GooglePay.prototype.update_payment_data=function(s){return new Promise(function(e,i){var t="default"==s.shippingOptionData.id?null:s.shippingOptionData.id;o.when(o.ajax({url:this.params.routes.payment_data,dataType:"json",method:"POST",data:{address:this.map_address(s.shippingAddress),shipping_method:t,page_id:this.get_page(),currency:this.get_currency()},beforeSend:this.ajax_before_send.bind(this)})).done(function(t){t.code?i(t.data.data):e(t.data)}.bind(this)).fail(function(){i()}.bind(this))}.bind(this))},wc_stripe.GooglePay.prototype.on_payment_data_changed=function(i){return new Promise(function(e){this.update_payment_data(i).then(function(t){e(t.paymentRequestUpdate),this.set_selected_shipping_methods(t.shipping_methods),this.payment_data_updated(t,i)}.bind(this))["catch"](function(t){e(t)}.bind(this))}.bind(this))},wc_stripe.GooglePay.prototype.payment_data_updated=function(t){},wc_stripe.GooglePay.prototype.get_merchant_info=function(){var t={merchantId:this.params.merchant_id,merchantName:this.params.merchant_name};return"TEST"===this.params.environment&&delete t.merchantId,t},wc_stripe.GooglePay.prototype.get_payment_options=function(){var t,e={environment:this.params.environment,merchantInfo:this.get_merchant_info(),paymentDataCallbacks:{onPaymentAuthorized:function(){return new Promise(function(t){t({transactionState:"SUCCESS"})}.bind(this))}}};return this.needs_shipping()&&(t=this.get_shipping_prefix(),(!this.is_current_page("checkout")||this.is_valid_address(this.get_address_object(t),t,["email","phone"]))&&this.is_current_page("checkout")||(e.paymentDataCallbacks.onPaymentDataChanged=this.on_payment_data_changed.bind(this))),e},wc_stripe.GooglePay.prototype.build_payment_request=function(){var t=o.extend({},a,{emailRequired:this.fields.requestFieldInWallet("billing_email"),merchantInfo:this.get_merchant_info(),allowedPaymentMethods:[o.extend({type:"CARD",tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{gateway:"stripe","stripe:version":"2018-10-31","stripe:publishableKey":this.params.api_key}}},n)],shippingAddressRequired:function(){if(this.needs_shipping()){var t=this.get_shipping_prefix();if(this.is_current_page("checkout")&&!this.is_valid_address(this.get_address_object(t),t,["email","phone"])||!this.is_current_page("checkout"))return!0}return!1}.bind(this)(),transactionInfo:{countryCode:this.params.processing_country,currencyCode:this.get_currency(),totalPriceStatus:"ESTIMATED",totalPrice:this.get_total_price().toString(),displayItems:this.get_display_items(),totalPriceLabel:this.params.total_price_label}});return t.allowedPaymentMethods[0].parameters.billingAddressRequired=function(){if(this.is_current_page("checkout")){var t=this.billing_address_object=this.get_address_object("billing");return this.fields.requestFieldInWallet("billing_phone")||!this.is_valid_address(t,"billing",["email"])?!0:!1}return!0}.bind(this)(),t.allowedPaymentMethods[0].parameters.billingAddressRequired&&(t.allowedPaymentMethods[0].parameters.billingAddressParameters={format:"FULL",phoneNumberRequired:this.fields.requestFieldInWallet("billing_phone")}),t.shippingAddressRequired?(t.shippingAddressParameters={},t.shippingOptionRequired=!0,t.shippingOptionParameters={shippingOptions:this.get_shipping_options()},t.callbackIntents=["SHIPPING_ADDRESS","SHIPPING_OPTION","PAYMENT_AUTHORIZATION"]):t.callbackIntents=["PAYMENT_AUTHORIZATION"],this.payment_request_options=t},wc_stripe.GooglePay.prototype.createPaymentsClient=function(){this.paymentsClient=new google.payments.api.PaymentsClient(this.get_payment_options())},wc_stripe.GooglePay.prototype.isReadyToPay=function(){return new Promise(function(t){var e=o.extend({},a);e.allowedPaymentMethods=[n],this.paymentsClient.isReadyToPay(e).then(function(){this.can_pay=!0,this.create_button(),t()}.bind(this))["catch"](function(t){this.submit_error(t)}.bind(this))}.bind(this))},wc_stripe.GooglePay.prototype.create_button=function(){this.$button&&this.$button.remove(),this.$button=o(this.paymentsClient.createButton({onClick:this.start.bind(this),buttonColor:this.params.button_color,buttonType:this.params.button_style})),this.$button.addClass("gpay-button-container")},wc_stripe.GooglePay.prototype.start=function(){this.createPaymentsClient(),this.paymentsClient.loadPaymentData(this.build_payment_request()).then(function(t){var e=JSON.parse(t.paymentMethodData.tokenizationData.token);this.update_addresses(t),this.on_token_received(e)}.bind(this))["catch"](function(t){"CANCELED"!==t.statusCode&&(t.statusMessage&&-1<t.statusMessage.indexOf("paymentDataRequest.callbackIntent")?this.submit_error_code("DEVELOPER_ERROR_WHITELIST"):this.submit_error(t.statusMessage))}.bind(this))},wc_stripe.ApplePay=function(){},wc_stripe.ApplePay.prototype.initialize=function(){this.createPaymentRequest(),this.canMakePayment()},wc_stripe.ApplePay.prototype.create_button=function(){this.$button&&this.$button.remove(),this.$button=o(this.params.button),this.$button.on("click",this.start.bind(this)),this.append_button()},wc_stripe.ApplePay.prototype.canMakePayment=function(){return new Promise(function(e){this.paymentRequest.canMakePayment().then(function(t){t&&t.applePay&&(this.can_pay=!0,this.create_button(),o(this.container).show(),e(t))}.bind(this))}.bind(this))},wc_stripe.ApplePay.prototype.start=function(t){t.preventDefault(),this.paymentRequest.update(this.get_payment_request_update({total:{pending:!1}})),this.paymentRequest.show()},wc_stripe.PaymentRequest=function(){},wc_stripe.PaymentRequest.prototype.initialize=function(){this.createPaymentRequest(),this.createPaymentRequestButton(),this.canMakePayment(),this.paymentRequestButton.on("click",this.button_click.bind(this))},wc_stripe.PaymentRequest.prototype.button_click=function(t){},wc_stripe.PaymentRequest.prototype.createPaymentRequestButton=function(){this.paymentRequestButton&&this.paymentRequestButton.destroy(),this.paymentRequestButton=this.elements.create("paymentRequestButton",{paymentRequest:this.paymentRequest,style:{paymentRequestButton:{type:this.params.button.type,theme:this.params.button.theme,height:this.params.button.height}}})},wc_stripe.PaymentRequest.prototype.canMakePayment=function(){return new Promise(function(e){this.paymentRequest.canMakePayment().then(function(t){t&&!t.applePay&&(this.can_pay=!0,this.create_button(),o(this.container).show(),e(t))}.bind(this))}.bind(this))},wc_stripe.PaymentRequest.prototype.create_button=function(){this.paymentRequestButton.mount("#wc-stripe-payment-request-container")},wc_stripe.CheckoutFields=function(t,e){this.params=t,this.page=e,this.session_values=this.supportSessionStorage()&&sessionStorage.getItem("wc_stripe_checkout_fields")?JSON.parse(sessionStorage.getItem("wc_stripe_checkout_fields")):{},this.fields=new Map(Object.keys(this.params).map(function(t){return null===this.params[t].value&&(t in this.session_values&&null!==this.session_values[t]?this.params[t].value=this.session_values[t]:this.params[t].value=""),[t,this.params[t].value]}.bind(this))),("checkout"===e||"cart"===e&&o(document.body).is(".woocommerce-checkout"))&&(o("form.checkout").on("change",".input-text, select",this.onChange.bind(this)),o("form.checkout").on("change",'[name="ship_to_different_address"]',this.on_ship_to_address_change.bind(this)),this.init_i18n(),o('[name="ship_to_different_address"]').is(":checked")?this.update_required_fields(o("#shipping_country").val(),"shipping_country"):this.update_required_fields(o("#billing_country").val(),"billing_country"))},wc_stripe.CheckoutFields.prototype.supportSessionStorage=function(){return"sessionStorage"in i&&null!==i.sessionStorage&&["getItem","setItem"].reduce(function(t,e){return t&&e in sessionStorage}.bind(this),!0)},wc_stripe.CheckoutFields.prototype.init_i18n=function(){"undefined"!=typeof wc_address_i18n_params?this.locales=o.parseJSON(wc_address_i18n_params.locale.replace(/&quot;/g,'"')):this.locales=null},wc_stripe.CheckoutFields.prototype.onChange=function(t){try{var e=t.currentTarget.name,i=t.currentTarget.value;this.fields.set(e,i),"billing_country"!==e&&"shipping_country"!==e||this.update_required_fields(i,e),this.supportSessionStorage()&&sessionStorage.setItem("wc_stripe_checkout_fields",JSON.stringify(this.toJson()))}catch(s){console.log(s)}},wc_stripe.CheckoutFields.prototype.update_required_fields=function(t,e){if(this.locales){var i,s=-1<e.indexOf("billing_")?"billing_":"shipping_",t="undefined"!=typeof this.locales[t]?this.locales[t]:this.locales["default"],a=o.extend(!0,{},this.locales["default"],t);for(i in a){var n=s+i;this.params[n]&&(this.params[n]=o.extend(!0,{},this.params[n],a[i]))}}},wc_stripe.CheckoutFields.prototype.on_ship_to_address_change=function(t){o(t.currentTarget).is(":checked")&&this.update_required_fields(o("#shipping_country").val(),"shipping_country")},wc_stripe.CheckoutFields.prototype.requestFieldInWallet=function(t){return"checkout"===this.page?this.required(t)&&this.isEmpty(t):"order_pay"!==this.page&&this.required(t)},wc_stripe.CheckoutFields.prototype.set=function(t,e,i){this[t]&&"function"==typeof this[t]?this[t]().set.call(this,e,i):this.fields.set(t,e)},wc_stripe.CheckoutFields.prototype.get=function(t,e){var i;return this[t]&&"function"==typeof this[t]?i=this[t]().get.call(this,e):null!=(i=this.fields.get(t))&&""!==i||void 0!==e&&(i=e),void 0===i?"":i},wc_stripe.CheckoutFields.prototype.required=function(t){return!(!this.params[t]||"undefined"==typeof this.params[t].required)&&this.params[t].required},wc_stripe.CheckoutFields.prototype.isEmpty=function(t){if(this.fields.has(t)){t=this.fields.get(t);return null==t||"string"==typeof t&&0===t.trim().length}return!0},wc_stripe.CheckoutFields.prototype.isValid=function(t){if(this[t]&&"function"==typeof this[t])return this[t]().isValid.apply(this,Array.prototype.slice.call(arguments,1))},wc_stripe.CheckoutFields.prototype.first_name=function(){return{set:function(t,e){this.fields.set(e+"_first_name",t)},get:function(t){return this.fields.get(t+"_first_name")},isValid:function(t){return"string"==typeof t&&0<t.length}}},wc_stripe.CheckoutFields.prototype.last_name=function(){return{set:function(t,e){this.fields.set(e+"_last_name",t)},get:function(t){return this.fields.get(t+"_last_name")},isValid:function(t){return"string"==typeof t&&0<t.length}}},wc_stripe.CheckoutFields.prototype.address_1=function(){return{set:function(t,e){this.fields.set(e+"_address_1",t)},get:function(t){return this.fields.get(t+"_address_1")},isValid:function(t){return"string"==typeof t&&0<t.length}}},wc_stripe.CheckoutFields.prototype.address_2=function(){return{set:function(t,e){this.fields.set(e+"_address_2",t)},get:function(t){return this.fields.get(t+"_address_2")},isValid:function(t){return"string"==typeof t&&0<t.length}}},wc_stripe.CheckoutFields.prototype.name=function(){return{set:function(t,e){t=t.split(" ");0<t.length&&this.fields.set(e+"_first_name",t[0]),1<t.length&&this.fields.set(e+"_last_name",t[1])},get:function(t){return this.fields.get(t+"_first_name")+" "+this.fields.get(t+"_last_name")}}},wc_stripe.CheckoutFields.prototype.email=function(){return{set:function(t,e){this.fields.set(e+"_email",t)},get:function(t){return this.fields.get(t+"_email")},isValid:function(t){return"string"==typeof t&&0<t.length}}},wc_stripe.CheckoutFields.prototype.phone=function(){return{set:function(t,e){this.fields.set(e+"_phone",t)},get:function(t){return this.fields.get(t+"_phone")},isValid:function(t){return"string"==typeof t&&0<t.length}}},wc_stripe.CheckoutFields.prototype.country=function(){return{set:function(t,e){this.fields.set(e+"_country",t)},get:function(t){return this.fields.get(t+"_country")},isValid:function(t){return"string"==typeof t&&2===t.length}}},wc_stripe.CheckoutFields.prototype.state=function(){return{set:function(i,t){2<(i=i.toUpperCase()).length&&"checkout"===this.page&&o("#"+t+"_state option").each(function(){var t=o(this),e=t.text().toUpperCase();i===e&&(i=t.val())}),this.fields.set(t+"_state",i)},get:function(t){return this.fields.get(t+"_state")},isValid:function(t){return"string"==typeof t&&0<t.length}}},wc_stripe.CheckoutFields.prototype.city=function(){return{set:function(t,e){this.fields.set(e+"_city",t)},get:function(t){return this.fields.get(t+"_city")},isValid:function(t){return"string"==typeof t&&0<t.length}}},wc_stripe.CheckoutFields.prototype.postcode=function(){return{set:function(t,e){this.fields.set(e+"_postcode",t)},get:function(t){return this.fields.get(t+"_postcode")},isValid:function(t){return"string"==typeof t&&0<t.length}}},wc_stripe.CheckoutFields.prototype.recipient=function(){return wc_stripe.CheckoutFields.prototype.name.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.payerName=function(){return wc_stripe.CheckoutFields.prototype.name.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.payerEmail=function(){return wc_stripe.CheckoutFields.prototype.email.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.payerPhone=function(){return wc_stripe.CheckoutFields.prototype.phone.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.phoneNumber=function(){return wc_stripe.CheckoutFields.prototype.phone.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.countryCode=function(){return wc_stripe.CheckoutFields.prototype.country.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.address1=function(){return wc_stripe.CheckoutFields.prototype.address_1.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.address2=function(){return wc_stripe.CheckoutFields.prototype.address_2.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.line1=function(){return wc_stripe.CheckoutFields.prototype.address_1.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.line2=function(){return wc_stripe.CheckoutFields.prototype.address_2.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.addressLine=function(){return{set:function(t,e){0<t.length&&this.fields.set(e+"_address_1",t[0]),1<t.length&&this.fields.set(e+"_address_2",t[1])},get:function(t){return[this.fields.get(t+"_address_1"),this.fields.get(t+"_address_2")]},isValid:function(t){return 0<t.length&&("string"==typeof t[0]&&0<t[0].length)}}},wc_stripe.CheckoutFields.prototype.region=function(){return wc_stripe.CheckoutFields.prototype.state.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.administrativeArea=function(){return wc_stripe.CheckoutFields.prototype.state.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.locality=function(){return wc_stripe.CheckoutFields.prototype.city.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.postal_code=function(){return wc_stripe.CheckoutFields.prototype.postcode.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.postalCode=function(){return wc_stripe.CheckoutFields.prototype.postcode.apply(this,arguments)},wc_stripe.CheckoutFields.prototype.toJson=function(){var i={};return this.fields.forEach(function(t,e){i[e]=t}),i},wc_stripe.CheckoutFields.prototype.toFormFields=function(t){var i=[];this.fields.forEach(function(t,e){e='[name="'+e+'"]';o(e).length&&""!==t&&(o(e).val()!==t&&o(e).is("select")&&i.push(e),o(e).val(t))}),0<i.length&&o(i.join(",")).trigger("change"),void 0!==t&&o(document.body).trigger("update_checkout",t)},wc_stripe.CheckoutFields.prototype.validateFields=function(t){for(var e in this.params){var i=this.params[e];if(-1<e.indexOf(t)&&i.required&&o("#"+e).length&&o("#"+e).is(":visible")){i=o("#"+e).val();if(null==i||0===i.length)return!1}}return!0};try{s=Stripe(wc_stripe_params_v3.api_key,{stripeAccount:wc_stripe_params_v3.account})}catch(t){return i.alert(t),console.log(t)}var r=new wc_stripe.CheckoutFields(wc_stripe_checkout_fields,wc_stripe_params_v3.page)}(window,jQuery);
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.2.8\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-11-18T21:08:25+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,66 +30,76 @@ msgstr ""
30
  msgid "Payment Plugins, support@paymentplugins.com"
31
  msgstr ""
32
 
33
- #: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:102
34
  #: includes/admin/meta-boxes/views/html-product-data.php:14
35
  #: includes/gateways/settings/ach-settings.php:9
36
  #: includes/gateways/settings/applepay-settings.php:11
37
  #: includes/gateways/settings/cc-settings.php:4
38
- #: includes/gateways/settings/googlepay-settings.php:22
39
  #: includes/gateways/settings/payment-request-settings.php:12
40
  msgid "Enabled"
41
  msgstr ""
42
 
43
- #: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:107
44
  msgid "If enabled, your site can accept %s payments through Stripe."
45
  msgstr ""
46
 
47
- #: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:111
48
  #: includes/gateways/settings/ach-settings.php:66
49
  #: includes/gateways/settings/applepay-settings.php:20
50
  #: includes/gateways/settings/cc-settings.php:17
51
- #: includes/gateways/settings/googlepay-settings.php:31
52
  #: includes/gateways/settings/payment-request-settings.php:21
53
  msgid "General Settings"
54
  msgstr ""
55
 
56
- #: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:115
57
  #: includes/admin/meta-boxes/views/html-charge-data-subview.php:47
58
  #: includes/gateways/settings/ach-settings.php:70
59
  #: includes/gateways/settings/applepay-settings.php:24
60
  #: includes/gateways/settings/cc-settings.php:21
61
- #: includes/gateways/settings/googlepay-settings.php:41
62
  #: includes/gateways/settings/payment-request-settings.php:25
63
  msgid "Title"
64
  msgstr ""
65
 
66
- #: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:121
67
  #: includes/gateways/settings/ach-settings.php:76
68
  #: includes/gateways/settings/applepay-settings.php:30
69
  #: includes/gateways/settings/cc-settings.php:27
70
- #: includes/gateways/settings/googlepay-settings.php:47
71
  #: includes/gateways/settings/payment-request-settings.php:31
72
  msgid "Description"
73
  msgstr ""
74
 
75
- #: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:124
76
  #: includes/gateways/settings/ach-settings.php:79
77
  #: includes/gateways/settings/applepay-settings.php:33
78
  #: includes/gateways/settings/cc-settings.php:30
79
- #: includes/gateways/settings/googlepay-settings.php:50
80
  #: includes/gateways/settings/payment-request-settings.php:34
81
  msgid "Leave blank if you don't want a description to show for the gateway."
82
  msgstr ""
83
 
84
- #: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:177
 
 
 
 
 
 
 
 
 
 
85
  msgid "Order %s"
86
  msgstr ""
87
 
88
- #: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:277
89
  msgid "Gateway will appear when store currency is <strong>%s</strong>"
90
  msgstr ""
91
 
92
- #: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:280
93
  msgid " & billing country is <strong>%s</strong>"
94
  msgstr ""
95
 
@@ -100,142 +110,142 @@ msgstr ""
100
  #: includes/abstract/abstract-wc-payment-gateway-stripe.php:422
101
  #: includes/controllers/class-wc-stripe-controller-cart.php:134
102
  #: includes/controllers/class-wc-stripe-controller-cart.php:192
103
- #: includes/controllers/class-wc-stripe-controller-googlepay.php:135
104
- #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:103
105
  msgid "Total"
106
  msgstr ""
107
 
108
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:491
109
  msgid "User must be logged in."
110
  msgstr ""
111
 
112
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:503
113
  msgid "Error saving your payment method. Reason: %s"
114
  msgstr ""
115
 
116
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:518
117
  msgid "Error saving payment method. Reason: %s"
118
  msgstr ""
119
 
120
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:537
121
  msgid "Order refunded in Stripe. Amount: %s"
122
  msgstr ""
123
 
124
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:575
125
  msgid "Order amount captured in Stripe. Amount: %s"
126
  msgstr ""
127
 
128
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:585
129
  msgid "Error capturing charge in Stripe. Reason: %s"
130
  msgstr ""
131
 
132
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:606
133
  msgid "Error voiding charge. Reason: %s"
134
  msgstr ""
135
 
136
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:608
137
  msgid "Charge voided in Stripe."
138
  msgstr ""
139
 
140
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:778
141
  msgid "n/a"
142
  msgstr ""
143
 
144
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:806
145
  #: includes/admin/meta-boxes/views/html-order-pay.php:42
146
  msgid "New Card"
147
  msgstr ""
148
 
149
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:810
150
  #: includes/admin/meta-boxes/views/html-order-pay.php:30
151
  msgid "Saved Cards"
152
  msgstr ""
153
 
154
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1017
155
  msgid "Attemp to save payment method failed. Reason: %s"
156
  msgstr ""
157
 
158
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1039
159
  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."
160
  msgstr ""
161
 
162
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1041
163
  msgid "We were not able to save your payment method. Reason: %s"
164
  msgstr ""
165
 
166
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1075
167
  msgid "Payment Method Token"
168
  msgstr ""
169
 
170
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1095
171
  msgid "Recurring payment for order failed. Reason: %s"
172
  msgstr ""
173
 
174
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1108
175
  msgid "Recurring payment captured in Stripe. Payment method: %s"
176
  msgstr ""
177
 
178
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1110
179
  msgid "Recurring payment authorized in Stripe. Payment method: %s"
180
  msgstr ""
181
 
182
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1113
183
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1381
184
  msgid "Customer must manually complete payment for payment method %s"
185
  msgstr ""
186
 
187
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1129
188
  msgid "Error saving payment method for subscription. Reason: %s"
189
  msgstr ""
190
 
191
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1190
192
  #: includes/abstract/abstract-wc-stripe-payment.php:219
193
  msgid "Order %1$s from %2$s"
194
  msgstr ""
195
 
196
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1368
197
  msgid "Pre-order payment for order failed. Reason: %s"
198
  msgstr ""
199
 
200
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1376
201
  msgid "Pre-order payment captured in Stripe. Payment method: %s"
202
  msgstr ""
203
 
204
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1378
205
  msgid "Pre-order payment authorized in Stripe. Payment method: %s"
206
  msgstr ""
207
 
208
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1450
209
  msgid "Cannot process payment"
210
  msgstr ""
211
 
212
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1458
213
  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."
214
  msgstr ""
215
 
216
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1570
217
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1601
218
- #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:180
219
  #: includes/wc-stripe-functions.php:405
220
  #: includes/wc-stripe-functions.php:470
221
  msgid "Shipping"
222
  msgstr ""
223
 
224
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1578
225
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1604
226
- #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:190
227
  #: includes/wc-stripe-functions.php:422
228
  #: includes/wc-stripe-functions.php:478
229
  msgid "Discount"
230
  msgstr ""
231
 
232
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1581
233
- #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:208
234
  #: includes/wc-stripe-functions.php:430
235
  msgid "Tax"
236
  msgstr ""
237
 
238
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1611
239
  #: includes/wc-stripe-functions.php:489
240
  msgid "Fees"
241
  msgstr ""
@@ -333,7 +343,7 @@ msgstr ""
333
  #: includes/admin/meta-boxes/views/html-product-data.php:47
334
  #: includes/gateways/settings/applepay-settings.php:52
335
  #: includes/gateways/settings/cc-settings.php:49
336
- #: includes/gateways/settings/googlepay-settings.php:69
337
  #: includes/gateways/settings/payment-request-settings.php:53
338
  msgid "Capture"
339
  msgstr ""
@@ -459,7 +469,7 @@ msgstr ""
459
  #: includes/admin/meta-boxes/views/html-product-data.php:15
460
  #: includes/gateways/settings/applepay-settings.php:48
461
  #: includes/gateways/settings/cc-settings.php:45
462
- #: includes/gateways/settings/googlepay-settings.php:65
463
  #: includes/gateways/settings/payment-request-settings.php:49
464
  msgid "Charge Type"
465
  msgstr ""
@@ -468,7 +478,7 @@ msgstr ""
468
  #: includes/admin/meta-boxes/views/html-product-data.php:49
469
  #: includes/gateways/settings/applepay-settings.php:53
470
  #: includes/gateways/settings/cc-settings.php:50
471
- #: includes/gateways/settings/googlepay-settings.php:70
472
  #: includes/gateways/settings/payment-request-settings.php:54
473
  msgid "Authorize"
474
  msgstr ""
@@ -666,23 +676,27 @@ msgstr ""
666
  msgid "Your payment is being processed and your order status will be updated once the funds are received."
667
  msgstr ""
668
 
669
- #: includes/class-wc-stripe-frontend-scripts.php:77
670
  msgid "No matches found"
671
  msgstr ""
672
 
673
- #: includes/class-wc-stripe-redirect-handler.php:35
674
  msgid "Error retrieving payment source. Reason: %s"
675
  msgstr ""
676
 
677
- #: includes/class-wc-stripe-redirect-handler.php:51
 
 
 
 
678
  msgid "Payment for order was not completed."
679
  msgstr ""
680
 
681
- #: includes/class-wc-stripe-redirect-handler.php:55
682
  msgid "Payment authorization failed. Please select another payment method."
683
  msgstr ""
684
 
685
- #: includes/class-wc-stripe-redirect-handler.php:61
686
  msgid "Payment authorization failed."
687
  msgstr ""
688
 
@@ -798,10 +812,6 @@ msgstr ""
798
  msgid "ACH gateway that integrates with your Stripe account."
799
  msgstr ""
800
 
801
- #: includes/gateways/class-wc-payment-gateway-stripe-ach.php:32
802
- msgid "Bank Payment"
803
- msgstr ""
804
-
805
  #: includes/gateways/class-wc-payment-gateway-stripe-ach.php:248
806
  msgid "Saved Banks"
807
  msgstr ""
@@ -816,7 +826,6 @@ msgstr ""
816
 
817
  #: includes/gateways/class-wc-payment-gateway-stripe-alipay.php:22
818
  #: includes/gateways/class-wc-payment-gateway-stripe-alipay.php:25
819
- #: includes/gateways/class-wc-payment-gateway-stripe-alipay.php:28
820
  msgid "Alipay"
821
  msgstr ""
822
 
@@ -824,7 +833,7 @@ msgstr ""
824
  msgid "Alipay gateway that integrates with your Stripe account."
825
  msgstr ""
826
 
827
- #: includes/gateways/class-wc-payment-gateway-stripe-alipay.php:59
828
  msgid ""
829
  "Gateway will appear when store currency is CNY, or currency matches merchant's \r\n"
830
  "\t\t\t\t\tdefault Stripe currency. For merchants located in DK, NO, SE, & CH, currency must be EUR."
@@ -853,18 +862,16 @@ msgid "Please select a product option before updating quantity."
853
  msgstr ""
854
 
855
  #: includes/gateways/class-wc-payment-gateway-stripe-bancontact.php:24
856
- #: includes/gateways/class-wc-payment-gateway-stripe-bancontact.php:27
857
- #: includes/gateways/class-wc-payment-gateway-stripe-bancontact.php:30
858
  msgid "Bancontact"
859
  msgstr ""
860
 
861
- #: includes/gateways/class-wc-payment-gateway-stripe-bancontact.php:28
862
  msgid "Bancontact gateway that integrates with your Stripe account."
863
  msgstr ""
864
 
865
  #: includes/gateways/class-wc-payment-gateway-stripe-becs.php:22
866
  #: includes/gateways/class-wc-payment-gateway-stripe-becs.php:23
867
- #: includes/gateways/class-wc-payment-gateway-stripe-becs.php:26
868
  msgid "BECS"
869
  msgstr ""
870
 
@@ -872,7 +879,7 @@ msgstr ""
872
  msgid "BECS direct debit gateway that integrates with your Stripe account."
873
  msgstr ""
874
 
875
- #: includes/gateways/class-wc-payment-gateway-stripe-becs.php:30
876
  msgid ""
877
  "By providing your bank account details and confirming this payment, you agree to this \r\n"
878
  "\t\tDirect Debit Request and the %sDirect Debit Request service agreement%s, and authorise Stripe Payments Australia Pty Ltd ACN 160 180 343 Direct \r\n"
@@ -896,7 +903,6 @@ msgstr ""
896
 
897
  #: includes/gateways/class-wc-payment-gateway-stripe-eps.php:23
898
  #: includes/gateways/class-wc-payment-gateway-stripe-eps.php:26
899
- #: includes/gateways/class-wc-payment-gateway-stripe-eps.php:29
900
  msgid "EPS"
901
  msgstr ""
902
 
@@ -906,7 +912,6 @@ msgstr ""
906
 
907
  #: includes/gateways/class-wc-payment-gateway-stripe-fpx.php:25
908
  #: includes/gateways/class-wc-payment-gateway-stripe-fpx.php:26
909
- #: includes/gateways/class-wc-payment-gateway-stripe-fpx.php:29
910
  msgid "FPX"
911
  msgstr ""
912
 
@@ -916,7 +921,6 @@ msgstr ""
916
 
917
  #: includes/gateways/class-wc-payment-gateway-stripe-giropay.php:23
918
  #: includes/gateways/class-wc-payment-gateway-stripe-giropay.php:26
919
- #: includes/gateways/class-wc-payment-gateway-stripe-giropay.php:29
920
  msgid "Giropay"
921
  msgstr ""
922
 
@@ -925,7 +929,7 @@ msgid "Giropay gateway that integrates with your Stripe account."
925
  msgstr ""
926
 
927
  #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:20
928
- #: includes/gateways/settings/googlepay-settings.php:42
929
  msgid "Google Pay"
930
  msgstr ""
931
 
@@ -937,21 +941,20 @@ msgstr ""
937
  msgid "Google Pay gateway that integrates with your Stripe account."
938
  msgstr ""
939
 
940
- #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:105
941
  msgid "Please update you product quantity before using Google Pay."
942
  msgstr ""
943
 
944
- #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:160
945
  msgid "Waiting..."
946
  msgstr ""
947
 
948
- #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:161
949
  msgid "loading shipping methods..."
950
  msgstr ""
951
 
952
  #: includes/gateways/class-wc-payment-gateway-stripe-grabpay.php:25
953
  #: includes/gateways/class-wc-payment-gateway-stripe-grabpay.php:26
954
- #: includes/gateways/class-wc-payment-gateway-stripe-grabpay.php:29
955
  msgid "GrabPay"
956
  msgstr ""
957
 
@@ -961,7 +964,6 @@ msgstr ""
961
 
962
  #: includes/gateways/class-wc-payment-gateway-stripe-ideal.php:25
963
  #: includes/gateways/class-wc-payment-gateway-stripe-ideal.php:26
964
- #: includes/gateways/class-wc-payment-gateway-stripe-ideal.php:29
965
  msgid "iDEAL"
966
  msgstr ""
967
 
@@ -971,7 +973,6 @@ msgstr ""
971
 
972
  #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:22
973
  #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:25
974
- #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:28
975
  msgid "Klarna"
976
  msgstr ""
977
 
@@ -979,49 +980,48 @@ msgstr ""
979
  msgid "Klarna gateway that integrates with your Stripe account."
980
  msgstr ""
981
 
982
- #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:76
983
  msgid "Payment Categories"
984
  msgstr ""
985
 
986
- #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:82
987
  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."
988
  msgstr ""
989
 
990
- #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:88
991
  msgid "Use Stripe translation"
992
  msgstr ""
993
 
994
- #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:92
995
  msgid "If enabled, the payment option labels will use the Stripe translated text."
996
  msgstr ""
997
 
998
- #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:200
999
  msgid "Fee total"
1000
  msgstr ""
1001
 
1002
- #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:241
1003
  msgid "Pay Now"
1004
  msgstr ""
1005
 
1006
- #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:242
1007
  msgid "Pay Later"
1008
  msgstr ""
1009
 
1010
- #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:243
1011
  msgid "Pay Over Time"
1012
  msgstr ""
1013
 
1014
- #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:256
1015
  msgid "Click %1$shere%2$s for Klarna test payment methods."
1016
  msgstr ""
1017
 
1018
- #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:262
1019
  msgid "Your purchase is not approved."
1020
  msgstr ""
1021
 
1022
  #: includes/gateways/class-wc-payment-gateway-stripe-multibanco.php:23
1023
  #: includes/gateways/class-wc-payment-gateway-stripe-multibanco.php:26
1024
- #: includes/gateways/class-wc-payment-gateway-stripe-multibanco.php:29
1025
  msgid "Multibanco"
1026
  msgstr ""
1027
 
@@ -1038,10 +1038,6 @@ msgstr ""
1038
  msgid "P24 gateway that integrates with your Stripe account."
1039
  msgstr ""
1040
 
1041
- #: includes/gateways/class-wc-payment-gateway-stripe-p24.php:29
1042
- msgid "P24"
1043
- msgstr ""
1044
-
1045
  #: includes/gateways/class-wc-payment-gateway-stripe-payment-request.php:23
1046
  msgid "PaymentRequest Gateway"
1047
  msgstr ""
@@ -1063,20 +1059,16 @@ msgid "Adding to cart..."
1063
  msgstr ""
1064
 
1065
  #: includes/gateways/class-wc-payment-gateway-stripe-sepa.php:23
1066
- #: includes/gateways/class-wc-payment-gateway-stripe-sepa.php:28
1067
  #: includes/tokens/class-wc-payment-token-stripe-sepa.php:54
1068
  msgid "SEPA"
1069
  msgstr ""
1070
 
1071
- #: includes/gateways/class-wc-payment-gateway-stripe-sepa.php:25
1072
- msgid "Sepa"
1073
- msgstr ""
1074
-
1075
  #: includes/gateways/class-wc-payment-gateway-stripe-sepa.php:26
1076
- msgid "Sepa gateway that integrates with your Stripe account."
1077
  msgstr ""
1078
 
1079
- #: includes/gateways/class-wc-payment-gateway-stripe-sepa.php:33
1080
  msgid ""
1081
  "By providing your IBAN and confirming this payment, you are\r\n"
1082
  "\t\t\tauthorizing %s and Stripe, our payment service provider, to send instructions to your bank to debit your account\r\n"
@@ -1084,23 +1076,23 @@ msgid ""
1084
  "\t\t\tterms and conditions of your agreement with your bank. A refund must be claimed within 8 weeks starting from the date on which your account was debited."
1085
  msgstr ""
1086
 
1087
- #: includes/gateways/class-wc-payment-gateway-stripe-sepa.php:62
1088
  msgid "Company Name"
1089
  msgstr ""
1090
 
1091
- #: includes/gateways/class-wc-payment-gateway-stripe-sepa.php:66
1092
  msgid "The name of your company that will appear in the SEPA mandate."
1093
  msgstr ""
1094
 
1095
- #: includes/gateways/class-wc-payment-gateway-stripe-sepa.php:73
1096
  msgid "SEPA Test Accounts"
1097
  msgstr ""
1098
 
1099
- #: includes/gateways/class-wc-payment-gateway-stripe-sepa.php:77
1100
  msgid "New Account"
1101
  msgstr ""
1102
 
1103
- #: includes/gateways/class-wc-payment-gateway-stripe-sepa.php:81
1104
  msgid "Saved Accounts"
1105
  msgstr ""
1106
 
@@ -1113,21 +1105,16 @@ msgstr ""
1113
  msgid "Sofort gateway that integrates with your Stripe account."
1114
  msgstr ""
1115
 
1116
- #: includes/gateways/class-wc-payment-gateway-stripe-sofort.php:30
1117
- msgid "SOFORT"
1118
- msgstr ""
1119
-
1120
- #: includes/gateways/class-wc-payment-gateway-stripe-wechat.php:24
1121
- #: includes/gateways/class-wc-payment-gateway-stripe-wechat.php:27
1122
- #: includes/gateways/class-wc-payment-gateway-stripe-wechat.php:30
1123
  msgid "WeChat"
1124
  msgstr ""
1125
 
1126
- #: includes/gateways/class-wc-payment-gateway-stripe-wechat.php:28
1127
  msgid "WeChat gateway that integrates with your Stripe account."
1128
  msgstr ""
1129
 
1130
- #: includes/gateways/class-wc-payment-gateway-stripe-wechat.php:70
1131
  msgid "Scan the QR code using your WeChat app. Once scanned click the Place Order button."
1132
  msgstr ""
1133
 
@@ -1195,35 +1182,39 @@ msgstr ""
1195
  msgid "ACH Payment"
1196
  msgstr ""
1197
 
1198
- #: includes/gateways/settings/ach-settings.php:84
 
 
 
 
1199
  msgid "Client Name"
1200
  msgstr ""
1201
 
1202
- #: includes/gateways/settings/ach-settings.php:86
1203
  msgid "The name that appears on the ACH payment screen."
1204
  msgstr ""
1205
 
1206
- #: includes/gateways/settings/ach-settings.php:90
1207
  msgid "ACH Display"
1208
  msgstr ""
1209
 
1210
- #: includes/gateways/settings/ach-settings.php:100
1211
  msgid "ACH Fee"
1212
  msgstr ""
1213
 
1214
- #: includes/gateways/settings/ach-settings.php:110
1215
  msgid "None"
1216
  msgstr ""
1217
 
1218
- #: includes/gateways/settings/ach-settings.php:111
1219
  msgid "Amount"
1220
  msgstr ""
1221
 
1222
- #: includes/gateways/settings/ach-settings.php:112
1223
  msgid "Percentage"
1224
  msgstr ""
1225
 
1226
- #: includes/gateways/settings/ach-settings.php:115
1227
  msgid "You can assign a fee to the order for ACH payments. Amount is a static amount and percentage is a percentage of the cart amount."
1228
  msgstr ""
1229
 
@@ -1246,7 +1237,7 @@ msgstr ""
1246
 
1247
  #: includes/gateways/settings/applepay-settings.php:37
1248
  #: includes/gateways/settings/cc-settings.php:34
1249
- #: includes/gateways/settings/googlepay-settings.php:54
1250
  #: includes/gateways/settings/payment-request-settings.php:38
1251
  msgid "Credit Card Display"
1252
  msgstr ""
@@ -1258,52 +1249,52 @@ msgid "This option determines whether the customer's funds are captured immediat
1258
  msgstr ""
1259
 
1260
  #: includes/gateways/settings/applepay-settings.php:60
1261
- #: includes/gateways/settings/googlepay-settings.php:77
1262
  #: includes/gateways/settings/payment-request-settings.php:61
1263
  msgid "Payment Sections"
1264
  msgstr ""
1265
 
1266
  #: includes/gateways/settings/applepay-settings.php:63
1267
- #: includes/gateways/settings/googlepay-settings.php:80
1268
  #: includes/gateways/settings/payment-request-settings.php:64
1269
  msgid "Product Page"
1270
  msgstr ""
1271
 
1272
  #: includes/gateways/settings/applepay-settings.php:64
1273
- #: includes/gateways/settings/googlepay-settings.php:81
1274
  #: includes/gateways/settings/payment-request-settings.php:65
1275
  msgid "Cart Page"
1276
  msgstr ""
1277
 
1278
  #: includes/gateways/settings/applepay-settings.php:65
1279
- #: includes/gateways/settings/googlepay-settings.php:82
1280
  #: includes/gateways/settings/payment-request-settings.php:66
1281
  msgid "Mini Cart"
1282
  msgstr ""
1283
 
1284
  #: includes/gateways/settings/applepay-settings.php:66
1285
- #: includes/gateways/settings/googlepay-settings.php:83
1286
  #: includes/gateways/settings/payment-request-settings.php:67
1287
  msgid "Top of Checkout"
1288
  msgstr ""
1289
 
1290
  #: includes/gateways/settings/applepay-settings.php:73
1291
  #: includes/gateways/settings/cc-settings.php:57
1292
- #: includes/gateways/settings/googlepay-settings.php:90
1293
  #: includes/gateways/settings/payment-request-settings.php:74
1294
  msgid "Order Status"
1295
  msgstr ""
1296
 
1297
  #: includes/gateways/settings/applepay-settings.php:76
1298
  #: includes/gateways/settings/cc-settings.php:60
1299
- #: includes/gateways/settings/googlepay-settings.php:93
1300
  #: includes/gateways/settings/payment-request-settings.php:77
1301
  msgid "Default"
1302
  msgstr ""
1303
 
1304
  #: includes/gateways/settings/applepay-settings.php:78
1305
  #: includes/gateways/settings/cc-settings.php:62
1306
- #: includes/gateways/settings/googlepay-settings.php:95
1307
  #: includes/gateways/settings/payment-request-settings.php:79
1308
  msgid "This is the status of the order once payment is complete. If <b>Default</b> is selected, then WooCommerce will set the order status automatically based on internal logic which states if a product is virtual and downloadable then status is set to complete. Products that require shipping are set to Processing. Default is the recommended setting as it allows standard WooCommerce code to process the order status."
1309
  msgstr ""
@@ -1314,7 +1305,7 @@ msgid "Button Settings"
1314
  msgstr ""
1315
 
1316
  #: includes/gateways/settings/applepay-settings.php:86
1317
- #: includes/gateways/settings/googlepay-settings.php:143
1318
  msgid "Button Design"
1319
  msgstr ""
1320
 
@@ -1436,91 +1427,91 @@ msgstr ""
1436
  msgid "GPay Business Console"
1437
  msgstr ""
1438
 
1439
- #: includes/gateways/settings/googlepay-settings.php:7
1440
  msgid "When test mode is enabled, Google Pay will work without a merchant ID, allowing you to capture the necessary screenshots the Google API team needs to approve your integration request."
1441
  msgstr ""
1442
 
1443
- #: includes/gateways/settings/googlepay-settings.php:14
1444
  msgid "If you don't want to request a Google Merchant ID, you can use the %1$sPayment Request Gateway%2$s which has a Google Pay integration through Stripe via the Chrome browser."
1445
  msgstr ""
1446
 
1447
- #: includes/gateways/settings/googlepay-settings.php:27
1448
  msgid "If enabled, your site can accept Google Pay payments through Stripe."
1449
  msgstr ""
1450
 
1451
- #: includes/gateways/settings/googlepay-settings.php:35
1452
  msgid "Merchant ID"
1453
  msgstr ""
1454
 
1455
- #: includes/gateways/settings/googlepay-settings.php:37
1456
  msgid "Your Google Merchant ID is given to you by the Google API team once you register for Google Pay. While testing in TEST mode you can leave this value blank and Google Pay will work."
1457
  msgstr ""
1458
 
1459
- #: includes/gateways/settings/googlepay-settings.php:73
1460
  msgid "This option determines whether the customer's funds are capture immediately or authorized and can be captured at a later date."
1461
  msgstr ""
1462
 
1463
- #: includes/gateways/settings/googlepay-settings.php:99
1464
  msgid "Merchant Name"
1465
  msgstr ""
1466
 
1467
- #: includes/gateways/settings/googlepay-settings.php:101
1468
  msgid "The name of your business as it appears on the Google Pay payment sheet."
1469
  msgstr ""
1470
 
1471
- #: includes/gateways/settings/googlepay-settings.php:105
1472
  msgid "Icon"
1473
  msgstr ""
1474
 
1475
- #: includes/gateways/settings/googlepay-settings.php:108
1476
  msgid "With Outline"
1477
  msgstr ""
1478
 
1479
- #: includes/gateways/settings/googlepay-settings.php:109
1480
  msgid "Standard"
1481
  msgstr ""
1482
 
1483
- #: includes/gateways/settings/googlepay-settings.php:113
1484
  msgid "This is the icon style that appears next to the gateway on the checkout page. Google's API team typically requires the With Outline option on the checkout page for branding purposes."
1485
  msgstr ""
1486
 
1487
- #: includes/gateways/settings/googlepay-settings.php:117
1488
  msgid "Button Options"
1489
  msgstr ""
1490
 
1491
- #: includes/gateways/settings/googlepay-settings.php:120
1492
  msgid "Button Color"
1493
  msgstr ""
1494
 
1495
- #: includes/gateways/settings/googlepay-settings.php:124
1496
  msgid "Black"
1497
  msgstr ""
1498
 
1499
- #: includes/gateways/settings/googlepay-settings.php:125
1500
  msgid "White"
1501
  msgstr ""
1502
 
1503
- #: includes/gateways/settings/googlepay-settings.php:128
1504
  msgid "The button color of the GPay button."
1505
  msgstr ""
1506
 
1507
- #: includes/gateways/settings/googlepay-settings.php:131
1508
  msgid "Button Style"
1509
  msgstr ""
1510
 
1511
- #: includes/gateways/settings/googlepay-settings.php:135
1512
  msgid "Long"
1513
  msgstr ""
1514
 
1515
- #: includes/gateways/settings/googlepay-settings.php:136
1516
  msgid "Short"
1517
  msgstr ""
1518
 
1519
- #: includes/gateways/settings/googlepay-settings.php:139
1520
  msgid "The button style of the GPay button."
1521
  msgstr ""
1522
 
1523
- #: includes/gateways/settings/googlepay-settings.php:145
1524
  msgid "If you can't see the Google Pay button, try switching to a Chrome browser."
1525
  msgstr ""
1526
 
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.2.9\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-12-04T22:52:11+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:103
34
  #: includes/admin/meta-boxes/views/html-product-data.php:14
35
  #: includes/gateways/settings/ach-settings.php:9
36
  #: includes/gateways/settings/applepay-settings.php:11
37
  #: includes/gateways/settings/cc-settings.php:4
38
+ #: includes/gateways/settings/googlepay-settings.php:23
39
  #: includes/gateways/settings/payment-request-settings.php:12
40
  msgid "Enabled"
41
  msgstr ""
42
 
43
+ #: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:108
44
  msgid "If enabled, your site can accept %s payments through Stripe."
45
  msgstr ""
46
 
47
+ #: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:112
48
  #: includes/gateways/settings/ach-settings.php:66
49
  #: includes/gateways/settings/applepay-settings.php:20
50
  #: includes/gateways/settings/cc-settings.php:17
51
+ #: includes/gateways/settings/googlepay-settings.php:32
52
  #: includes/gateways/settings/payment-request-settings.php:21
53
  msgid "General Settings"
54
  msgstr ""
55
 
56
+ #: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:116
57
  #: includes/admin/meta-boxes/views/html-charge-data-subview.php:47
58
  #: includes/gateways/settings/ach-settings.php:70
59
  #: includes/gateways/settings/applepay-settings.php:24
60
  #: includes/gateways/settings/cc-settings.php:21
61
+ #: includes/gateways/settings/googlepay-settings.php:42
62
  #: includes/gateways/settings/payment-request-settings.php:25
63
  msgid "Title"
64
  msgstr ""
65
 
66
+ #: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:122
67
  #: includes/gateways/settings/ach-settings.php:76
68
  #: includes/gateways/settings/applepay-settings.php:30
69
  #: includes/gateways/settings/cc-settings.php:27
70
+ #: includes/gateways/settings/googlepay-settings.php:48
71
  #: includes/gateways/settings/payment-request-settings.php:31
72
  msgid "Description"
73
  msgstr ""
74
 
75
+ #: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:125
76
  #: includes/gateways/settings/ach-settings.php:79
77
  #: includes/gateways/settings/applepay-settings.php:33
78
  #: includes/gateways/settings/cc-settings.php:30
79
+ #: includes/gateways/settings/googlepay-settings.php:51
80
  #: includes/gateways/settings/payment-request-settings.php:34
81
  msgid "Leave blank if you don't want a description to show for the gateway."
82
  msgstr ""
83
 
84
+ #: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:129
85
+ #: includes/gateways/settings/ach-settings.php:83
86
+ msgid "Order Button Text"
87
+ msgstr ""
88
+
89
+ #: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:132
90
+ #: includes/gateways/settings/ach-settings.php:86
91
+ msgid "The text on the Place Order button that displays when the gateway is selected on the checkout page."
92
+ msgstr ""
93
+
94
+ #: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:185
95
  msgid "Order %s"
96
  msgstr ""
97
 
98
+ #: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:285
99
  msgid "Gateway will appear when store currency is <strong>%s</strong>"
100
  msgstr ""
101
 
102
+ #: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:288
103
  msgid " & billing country is <strong>%s</strong>"
104
  msgstr ""
105
 
110
  #: includes/abstract/abstract-wc-payment-gateway-stripe.php:422
111
  #: includes/controllers/class-wc-stripe-controller-cart.php:134
112
  #: includes/controllers/class-wc-stripe-controller-cart.php:192
113
+ #: includes/controllers/class-wc-stripe-controller-googlepay.php:136
114
+ #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:104
115
  msgid "Total"
116
  msgstr ""
117
 
118
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:492
119
  msgid "User must be logged in."
120
  msgstr ""
121
 
122
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:504
123
  msgid "Error saving your payment method. Reason: %s"
124
  msgstr ""
125
 
126
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:519
127
  msgid "Error saving payment method. Reason: %s"
128
  msgstr ""
129
 
130
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:538
131
  msgid "Order refunded in Stripe. Amount: %s"
132
  msgstr ""
133
 
134
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:576
135
  msgid "Order amount captured in Stripe. Amount: %s"
136
  msgstr ""
137
 
138
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:586
139
  msgid "Error capturing charge in Stripe. Reason: %s"
140
  msgstr ""
141
 
142
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:607
143
  msgid "Error voiding charge. Reason: %s"
144
  msgstr ""
145
 
146
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:609
147
  msgid "Charge voided in Stripe."
148
  msgstr ""
149
 
150
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:779
151
  msgid "n/a"
152
  msgstr ""
153
 
154
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:807
155
  #: includes/admin/meta-boxes/views/html-order-pay.php:42
156
  msgid "New Card"
157
  msgstr ""
158
 
159
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:811
160
  #: includes/admin/meta-boxes/views/html-order-pay.php:30
161
  msgid "Saved Cards"
162
  msgstr ""
163
 
164
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1018
165
  msgid "Attemp to save payment method failed. Reason: %s"
166
  msgstr ""
167
 
168
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1040
169
  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."
170
  msgstr ""
171
 
172
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1042
173
  msgid "We were not able to save your payment method. Reason: %s"
174
  msgstr ""
175
 
176
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1076
177
  msgid "Payment Method Token"
178
  msgstr ""
179
 
180
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1096
181
  msgid "Recurring payment for order failed. Reason: %s"
182
  msgstr ""
183
 
184
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1109
185
  msgid "Recurring payment captured in Stripe. Payment method: %s"
186
  msgstr ""
187
 
188
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1111
189
  msgid "Recurring payment authorized in Stripe. Payment method: %s"
190
  msgstr ""
191
 
192
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1114
193
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1382
194
  msgid "Customer must manually complete payment for payment method %s"
195
  msgstr ""
196
 
197
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1130
198
  msgid "Error saving payment method for subscription. Reason: %s"
199
  msgstr ""
200
 
201
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1191
202
  #: includes/abstract/abstract-wc-stripe-payment.php:219
203
  msgid "Order %1$s from %2$s"
204
  msgstr ""
205
 
206
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1369
207
  msgid "Pre-order payment for order failed. Reason: %s"
208
  msgstr ""
209
 
210
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1377
211
  msgid "Pre-order payment captured in Stripe. Payment method: %s"
212
  msgstr ""
213
 
214
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1379
215
  msgid "Pre-order payment authorized in Stripe. Payment method: %s"
216
  msgstr ""
217
 
218
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1451
219
  msgid "Cannot process payment"
220
  msgstr ""
221
 
222
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1459
223
  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."
224
  msgstr ""
225
 
226
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1571
227
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1602
228
+ #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:179
229
  #: includes/wc-stripe-functions.php:405
230
  #: includes/wc-stripe-functions.php:470
231
  msgid "Shipping"
232
  msgstr ""
233
 
234
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1579
235
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1605
236
+ #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:189
237
  #: includes/wc-stripe-functions.php:422
238
  #: includes/wc-stripe-functions.php:478
239
  msgid "Discount"
240
  msgstr ""
241
 
242
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1582
243
+ #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:207
244
  #: includes/wc-stripe-functions.php:430
245
  msgid "Tax"
246
  msgstr ""
247
 
248
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1612
249
  #: includes/wc-stripe-functions.php:489
250
  msgid "Fees"
251
  msgstr ""
343
  #: includes/admin/meta-boxes/views/html-product-data.php:47
344
  #: includes/gateways/settings/applepay-settings.php:52
345
  #: includes/gateways/settings/cc-settings.php:49
346
+ #: includes/gateways/settings/googlepay-settings.php:70
347
  #: includes/gateways/settings/payment-request-settings.php:53
348
  msgid "Capture"
349
  msgstr ""
469
  #: includes/admin/meta-boxes/views/html-product-data.php:15
470
  #: includes/gateways/settings/applepay-settings.php:48
471
  #: includes/gateways/settings/cc-settings.php:45
472
+ #: includes/gateways/settings/googlepay-settings.php:66
473
  #: includes/gateways/settings/payment-request-settings.php:49
474
  msgid "Charge Type"
475
  msgstr ""
478
  #: includes/admin/meta-boxes/views/html-product-data.php:49
479
  #: includes/gateways/settings/applepay-settings.php:53
480
  #: includes/gateways/settings/cc-settings.php:50
481
+ #: includes/gateways/settings/googlepay-settings.php:71
482
  #: includes/gateways/settings/payment-request-settings.php:54
483
  msgid "Authorize"
484
  msgstr ""
676
  msgid "Your payment is being processed and your order status will be updated once the funds are received."
677
  msgstr ""
678
 
679
+ #: includes/class-wc-stripe-frontend-scripts.php:87
680
  msgid "No matches found"
681
  msgstr ""
682
 
683
+ #: includes/class-wc-stripe-redirect-handler.php:37
684
  msgid "Error retrieving payment source. Reason: %s"
685
  msgstr ""
686
 
687
+ #: includes/class-wc-stripe-redirect-handler.php:39
688
+ msgid "This request is invalid. Please try again."
689
+ msgstr ""
690
+
691
+ #: includes/class-wc-stripe-redirect-handler.php:53
692
  msgid "Payment for order was not completed."
693
  msgstr ""
694
 
695
+ #: includes/class-wc-stripe-redirect-handler.php:57
696
  msgid "Payment authorization failed. Please select another payment method."
697
  msgstr ""
698
 
699
+ #: includes/class-wc-stripe-redirect-handler.php:63
700
  msgid "Payment authorization failed."
701
  msgstr ""
702
 
812
  msgid "ACH gateway that integrates with your Stripe account."
813
  msgstr ""
814
 
 
 
 
 
815
  #: includes/gateways/class-wc-payment-gateway-stripe-ach.php:248
816
  msgid "Saved Banks"
817
  msgstr ""
826
 
827
  #: includes/gateways/class-wc-payment-gateway-stripe-alipay.php:22
828
  #: includes/gateways/class-wc-payment-gateway-stripe-alipay.php:25
 
829
  msgid "Alipay"
830
  msgstr ""
831
 
833
  msgid "Alipay gateway that integrates with your Stripe account."
834
  msgstr ""
835
 
836
+ #: includes/gateways/class-wc-payment-gateway-stripe-alipay.php:58
837
  msgid ""
838
  "Gateway will appear when store currency is CNY, or currency matches merchant's \r\n"
839
  "\t\t\t\t\tdefault Stripe currency. For merchants located in DK, NO, SE, & CH, currency must be EUR."
862
  msgstr ""
863
 
864
  #: includes/gateways/class-wc-payment-gateway-stripe-bancontact.php:24
865
+ #: includes/gateways/class-wc-payment-gateway-stripe-bancontact.php:25
 
866
  msgid "Bancontact"
867
  msgstr ""
868
 
869
+ #: includes/gateways/class-wc-payment-gateway-stripe-bancontact.php:26
870
  msgid "Bancontact gateway that integrates with your Stripe account."
871
  msgstr ""
872
 
873
  #: includes/gateways/class-wc-payment-gateway-stripe-becs.php:22
874
  #: includes/gateways/class-wc-payment-gateway-stripe-becs.php:23
 
875
  msgid "BECS"
876
  msgstr ""
877
 
879
  msgid "BECS direct debit gateway that integrates with your Stripe account."
880
  msgstr ""
881
 
882
+ #: includes/gateways/class-wc-payment-gateway-stripe-becs.php:29
883
  msgid ""
884
  "By providing your bank account details and confirming this payment, you agree to this \r\n"
885
  "\t\tDirect Debit Request and the %sDirect Debit Request service agreement%s, and authorise Stripe Payments Australia Pty Ltd ACN 160 180 343 Direct \r\n"
903
 
904
  #: includes/gateways/class-wc-payment-gateway-stripe-eps.php:23
905
  #: includes/gateways/class-wc-payment-gateway-stripe-eps.php:26
 
906
  msgid "EPS"
907
  msgstr ""
908
 
912
 
913
  #: includes/gateways/class-wc-payment-gateway-stripe-fpx.php:25
914
  #: includes/gateways/class-wc-payment-gateway-stripe-fpx.php:26
 
915
  msgid "FPX"
916
  msgstr ""
917
 
921
 
922
  #: includes/gateways/class-wc-payment-gateway-stripe-giropay.php:23
923
  #: includes/gateways/class-wc-payment-gateway-stripe-giropay.php:26
 
924
  msgid "Giropay"
925
  msgstr ""
926
 
929
  msgstr ""
930
 
931
  #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:20
932
+ #: includes/gateways/settings/googlepay-settings.php:43
933
  msgid "Google Pay"
934
  msgstr ""
935
 
941
  msgid "Google Pay gateway that integrates with your Stripe account."
942
  msgstr ""
943
 
944
+ #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:106
945
  msgid "Please update you product quantity before using Google Pay."
946
  msgstr ""
947
 
948
+ #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:161
949
  msgid "Waiting..."
950
  msgstr ""
951
 
952
+ #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:162
953
  msgid "loading shipping methods..."
954
  msgstr ""
955
 
956
  #: includes/gateways/class-wc-payment-gateway-stripe-grabpay.php:25
957
  #: includes/gateways/class-wc-payment-gateway-stripe-grabpay.php:26
 
958
  msgid "GrabPay"
959
  msgstr ""
960
 
964
 
965
  #: includes/gateways/class-wc-payment-gateway-stripe-ideal.php:25
966
  #: includes/gateways/class-wc-payment-gateway-stripe-ideal.php:26
 
967
  msgid "iDEAL"
968
  msgstr ""
969
 
973
 
974
  #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:22
975
  #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:25
 
976
  msgid "Klarna"
977
  msgstr ""
978
 
980
  msgid "Klarna gateway that integrates with your Stripe account."
981
  msgstr ""
982
 
983
+ #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:75
984
  msgid "Payment Categories"
985
  msgstr ""
986
 
987
+ #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:81
988
  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."
989
  msgstr ""
990
 
991
+ #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:87
992
  msgid "Use Stripe translation"
993
  msgstr ""
994
 
995
+ #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:91
996
  msgid "If enabled, the payment option labels will use the Stripe translated text."
997
  msgstr ""
998
 
999
+ #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:199
1000
  msgid "Fee total"
1001
  msgstr ""
1002
 
1003
+ #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:240
1004
  msgid "Pay Now"
1005
  msgstr ""
1006
 
1007
+ #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:241
1008
  msgid "Pay Later"
1009
  msgstr ""
1010
 
1011
+ #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:242
1012
  msgid "Pay Over Time"
1013
  msgstr ""
1014
 
1015
+ #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:255
1016
  msgid "Click %1$shere%2$s for Klarna test payment methods."
1017
  msgstr ""
1018
 
1019
+ #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:261
1020
  msgid "Your purchase is not approved."
1021
  msgstr ""
1022
 
1023
  #: includes/gateways/class-wc-payment-gateway-stripe-multibanco.php:23
1024
  #: includes/gateways/class-wc-payment-gateway-stripe-multibanco.php:26
 
1025
  msgid "Multibanco"
1026
  msgstr ""
1027
 
1038
  msgid "P24 gateway that integrates with your Stripe account."
1039
  msgstr ""
1040
 
 
 
 
 
1041
  #: includes/gateways/class-wc-payment-gateway-stripe-payment-request.php:23
1042
  msgid "PaymentRequest Gateway"
1043
  msgstr ""
1059
  msgstr ""
1060
 
1061
  #: includes/gateways/class-wc-payment-gateway-stripe-sepa.php:23
1062
+ #: includes/gateways/class-wc-payment-gateway-stripe-sepa.php:25
1063
  #: includes/tokens/class-wc-payment-token-stripe-sepa.php:54
1064
  msgid "SEPA"
1065
  msgstr ""
1066
 
 
 
 
 
1067
  #: includes/gateways/class-wc-payment-gateway-stripe-sepa.php:26
1068
+ msgid "SEPA gateway that integrates with your Stripe account."
1069
  msgstr ""
1070
 
1071
+ #: includes/gateways/class-wc-payment-gateway-stripe-sepa.php:32
1072
  msgid ""
1073
  "By providing your IBAN and confirming this payment, you are\r\n"
1074
  "\t\t\tauthorizing %s and Stripe, our payment service provider, to send instructions to your bank to debit your account\r\n"
1076
  "\t\t\tterms and conditions of your agreement with your bank. A refund must be claimed within 8 weeks starting from the date on which your account was debited."
1077
  msgstr ""
1078
 
1079
+ #: includes/gateways/class-wc-payment-gateway-stripe-sepa.php:61
1080
  msgid "Company Name"
1081
  msgstr ""
1082
 
1083
+ #: includes/gateways/class-wc-payment-gateway-stripe-sepa.php:65
1084
  msgid "The name of your company that will appear in the SEPA mandate."
1085
  msgstr ""
1086
 
1087
+ #: includes/gateways/class-wc-payment-gateway-stripe-sepa.php:72
1088
  msgid "SEPA Test Accounts"
1089
  msgstr ""
1090
 
1091
+ #: includes/gateways/class-wc-payment-gateway-stripe-sepa.php:76
1092
  msgid "New Account"
1093
  msgstr ""
1094
 
1095
+ #: includes/gateways/class-wc-payment-gateway-stripe-sepa.php:80
1096
  msgid "Saved Accounts"
1097
  msgstr ""
1098
 
1105
  msgid "Sofort gateway that integrates with your Stripe account."
1106
  msgstr ""
1107
 
1108
+ #: includes/gateways/class-wc-payment-gateway-stripe-wechat.php:22
1109
+ #: includes/gateways/class-wc-payment-gateway-stripe-wechat.php:25
 
 
 
 
 
1110
  msgid "WeChat"
1111
  msgstr ""
1112
 
1113
+ #: includes/gateways/class-wc-payment-gateway-stripe-wechat.php:26
1114
  msgid "WeChat gateway that integrates with your Stripe account."
1115
  msgstr ""
1116
 
1117
+ #: includes/gateways/class-wc-payment-gateway-stripe-wechat.php:67
1118
  msgid "Scan the QR code using your WeChat app. Once scanned click the Place Order button."
1119
  msgstr ""
1120
 
1182
  msgid "ACH Payment"
1183
  msgstr ""
1184
 
1185
+ #: includes/gateways/settings/ach-settings.php:85
1186
+ msgid "Bank Payment"
1187
+ msgstr ""
1188
+
1189
+ #: includes/gateways/settings/ach-settings.php:91
1190
  msgid "Client Name"
1191
  msgstr ""
1192
 
1193
+ #: includes/gateways/settings/ach-settings.php:93
1194
  msgid "The name that appears on the ACH payment screen."
1195
  msgstr ""
1196
 
1197
+ #: includes/gateways/settings/ach-settings.php:97
1198
  msgid "ACH Display"
1199
  msgstr ""
1200
 
1201
+ #: includes/gateways/settings/ach-settings.php:107
1202
  msgid "ACH Fee"
1203
  msgstr ""
1204
 
1205
+ #: includes/gateways/settings/ach-settings.php:117
1206
  msgid "None"
1207
  msgstr ""
1208
 
1209
+ #: includes/gateways/settings/ach-settings.php:118
1210
  msgid "Amount"
1211
  msgstr ""
1212
 
1213
+ #: includes/gateways/settings/ach-settings.php:119
1214
  msgid "Percentage"
1215
  msgstr ""
1216
 
1217
+ #: includes/gateways/settings/ach-settings.php:122
1218
  msgid "You can assign a fee to the order for ACH payments. Amount is a static amount and percentage is a percentage of the cart amount."
1219
  msgstr ""
1220
 
1237
 
1238
  #: includes/gateways/settings/applepay-settings.php:37
1239
  #: includes/gateways/settings/cc-settings.php:34
1240
+ #: includes/gateways/settings/googlepay-settings.php:55
1241
  #: includes/gateways/settings/payment-request-settings.php:38
1242
  msgid "Credit Card Display"
1243
  msgstr ""
1249
  msgstr ""
1250
 
1251
  #: includes/gateways/settings/applepay-settings.php:60
1252
+ #: includes/gateways/settings/googlepay-settings.php:78
1253
  #: includes/gateways/settings/payment-request-settings.php:61
1254
  msgid "Payment Sections"
1255
  msgstr ""
1256
 
1257
  #: includes/gateways/settings/applepay-settings.php:63
1258
+ #: includes/gateways/settings/googlepay-settings.php:81
1259
  #: includes/gateways/settings/payment-request-settings.php:64
1260
  msgid "Product Page"
1261
  msgstr ""
1262
 
1263
  #: includes/gateways/settings/applepay-settings.php:64
1264
+ #: includes/gateways/settings/googlepay-settings.php:82
1265
  #: includes/gateways/settings/payment-request-settings.php:65
1266
  msgid "Cart Page"
1267
  msgstr ""
1268
 
1269
  #: includes/gateways/settings/applepay-settings.php:65
1270
+ #: includes/gateways/settings/googlepay-settings.php:83
1271
  #: includes/gateways/settings/payment-request-settings.php:66
1272
  msgid "Mini Cart"
1273
  msgstr ""
1274
 
1275
  #: includes/gateways/settings/applepay-settings.php:66
1276
+ #: includes/gateways/settings/googlepay-settings.php:84
1277
  #: includes/gateways/settings/payment-request-settings.php:67
1278
  msgid "Top of Checkout"
1279
  msgstr ""
1280
 
1281
  #: includes/gateways/settings/applepay-settings.php:73
1282
  #: includes/gateways/settings/cc-settings.php:57
1283
+ #: includes/gateways/settings/googlepay-settings.php:91
1284
  #: includes/gateways/settings/payment-request-settings.php:74
1285
  msgid "Order Status"
1286
  msgstr ""
1287
 
1288
  #: includes/gateways/settings/applepay-settings.php:76
1289
  #: includes/gateways/settings/cc-settings.php:60
1290
+ #: includes/gateways/settings/googlepay-settings.php:94
1291
  #: includes/gateways/settings/payment-request-settings.php:77
1292
  msgid "Default"
1293
  msgstr ""
1294
 
1295
  #: includes/gateways/settings/applepay-settings.php:78
1296
  #: includes/gateways/settings/cc-settings.php:62
1297
+ #: includes/gateways/settings/googlepay-settings.php:96
1298
  #: includes/gateways/settings/payment-request-settings.php:79
1299
  msgid "This is the status of the order once payment is complete. If <b>Default</b> is selected, then WooCommerce will set the order status automatically based on internal logic which states if a product is virtual and downloadable then status is set to complete. Products that require shipping are set to Processing. Default is the recommended setting as it allows standard WooCommerce code to process the order status."
1300
  msgstr ""
1305
  msgstr ""
1306
 
1307
  #: includes/gateways/settings/applepay-settings.php:86
1308
+ #: includes/gateways/settings/googlepay-settings.php:144
1309
  msgid "Button Design"
1310
  msgstr ""
1311
 
1427
  msgid "GPay Business Console"
1428
  msgstr ""
1429
 
1430
+ #: includes/gateways/settings/googlepay-settings.php:8
1431
  msgid "When test mode is enabled, Google Pay will work without a merchant ID, allowing you to capture the necessary screenshots the Google API team needs to approve your integration request."
1432
  msgstr ""
1433
 
1434
+ #: includes/gateways/settings/googlepay-settings.php:15
1435
  msgid "If you don't want to request a Google Merchant ID, you can use the %1$sPayment Request Gateway%2$s which has a Google Pay integration through Stripe via the Chrome browser."
1436
  msgstr ""
1437
 
1438
+ #: includes/gateways/settings/googlepay-settings.php:28
1439
  msgid "If enabled, your site can accept Google Pay payments through Stripe."
1440
  msgstr ""
1441
 
1442
+ #: includes/gateways/settings/googlepay-settings.php:36
1443
  msgid "Merchant ID"
1444
  msgstr ""
1445
 
1446
+ #: includes/gateways/settings/googlepay-settings.php:38
1447
  msgid "Your Google Merchant ID is given to you by the Google API team once you register for Google Pay. While testing in TEST mode you can leave this value blank and Google Pay will work."
1448
  msgstr ""
1449
 
1450
+ #: includes/gateways/settings/googlepay-settings.php:74
1451
  msgid "This option determines whether the customer's funds are capture immediately or authorized and can be captured at a later date."
1452
  msgstr ""
1453
 
1454
+ #: includes/gateways/settings/googlepay-settings.php:100
1455
  msgid "Merchant Name"
1456
  msgstr ""
1457
 
1458
+ #: includes/gateways/settings/googlepay-settings.php:102
1459
  msgid "The name of your business as it appears on the Google Pay payment sheet."
1460
  msgstr ""
1461
 
1462
+ #: includes/gateways/settings/googlepay-settings.php:106
1463
  msgid "Icon"
1464
  msgstr ""
1465
 
1466
+ #: includes/gateways/settings/googlepay-settings.php:109
1467
  msgid "With Outline"
1468
  msgstr ""
1469
 
1470
+ #: includes/gateways/settings/googlepay-settings.php:110
1471
  msgid "Standard"
1472
  msgstr ""
1473
 
1474
+ #: includes/gateways/settings/googlepay-settings.php:114
1475
  msgid "This is the icon style that appears next to the gateway on the checkout page. Google's API team typically requires the With Outline option on the checkout page for branding purposes."
1476
  msgstr ""
1477
 
1478
+ #: includes/gateways/settings/googlepay-settings.php:118
1479
  msgid "Button Options"
1480
  msgstr ""
1481
 
1482
+ #: includes/gateways/settings/googlepay-settings.php:121
1483
  msgid "Button Color"
1484
  msgstr ""
1485
 
1486
+ #: includes/gateways/settings/googlepay-settings.php:125
1487
  msgid "Black"
1488
  msgstr ""
1489
 
1490
+ #: includes/gateways/settings/googlepay-settings.php:126
1491
  msgid "White"
1492
  msgstr ""
1493
 
1494
+ #: includes/gateways/settings/googlepay-settings.php:129
1495
  msgid "The button color of the GPay button."
1496
  msgstr ""
1497
 
1498
+ #: includes/gateways/settings/googlepay-settings.php:132
1499
  msgid "Button Style"
1500
  msgstr ""
1501
 
1502
+ #: includes/gateways/settings/googlepay-settings.php:136
1503
  msgid "Long"
1504
  msgstr ""
1505
 
1506
+ #: includes/gateways/settings/googlepay-settings.php:137
1507
  msgid "Short"
1508
  msgstr ""
1509
 
1510
+ #: includes/gateways/settings/googlepay-settings.php:140
1511
  msgid "The button style of the GPay button."
1512
  msgstr ""
1513
 
1514
+ #: includes/gateways/settings/googlepay-settings.php:146
1515
  msgid "If you can't see the Google Pay button, try switching to a Chrome browser."
1516
  msgstr ""
1517
 
includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php CHANGED
@@ -35,6 +35,7 @@ abstract class WC_Payment_Gateway_Stripe_Local_Payment extends WC_Payment_Gatewa
35
  $this->settings['method_format'] = 'gateway_title';
36
  $this->settings['charge_type'] = 'capture';
37
  $this->settings['order_status'] = 'default';
 
38
  }
39
 
40
  public function hooks() {
@@ -94,11 +95,11 @@ abstract class WC_Payment_Gateway_Stripe_Local_Payment extends WC_Payment_Gatewa
94
  */
95
  public function get_local_payment_settings() {
96
  return array(
97
- 'desc' => array(
98
  'type' => 'description',
99
  'description' => $this->get_payment_description(),
100
  ),
101
- 'enabled' => array(
102
  'title' => __( 'Enabled', 'woo-stripe-payment' ),
103
  'type' => 'checkbox',
104
  'default' => 'no',
@@ -106,24 +107,31 @@ abstract class WC_Payment_Gateway_Stripe_Local_Payment extends WC_Payment_Gatewa
106
  'desc_tip' => true,
107
  'description' => sprintf( __( 'If enabled, your site can accept %s payments through Stripe.', 'woo-stripe-payment' ), $this->get_method_title() ),
108
  ),
109
- 'general_settings' => array(
110
  'type' => 'title',
111
  'title' => __( 'General Settings', 'woo-stripe-payment' ),
112
  ),
113
- 'title_text' => array(
114
  'type' => 'text',
115
  'title' => __( 'Title', 'woo-stripe-payment' ),
116
  'default' => $this->get_method_title(),
117
  'desc_tip' => true,
118
  'description' => sprintf( __( 'Title of the %s gateway' ), $this->get_method_title() ),
119
  ),
120
- 'description' => array(
121
  'title' => __( 'Description', 'woo-stripe-payment' ),
122
  'type' => 'text',
123
  'default' => '',
124
  'description' => __( 'Leave blank if you don\'t want a description to show for the gateway.', 'woo-stripe-payment' ),
125
  'desc_tip' => true,
126
  ),
 
 
 
 
 
 
 
127
  );
128
  }
129
 
35
  $this->settings['method_format'] = 'gateway_title';
36
  $this->settings['charge_type'] = 'capture';
37
  $this->settings['order_status'] = 'default';
38
+ $this->order_button_text = $this->get_option( 'order_button_text' );
39
  }
40
 
41
  public function hooks() {
95
  */
96
  public function get_local_payment_settings() {
97
  return array(
98
+ 'desc' => array(
99
  'type' => 'description',
100
  'description' => $this->get_payment_description(),
101
  ),
102
+ 'enabled' => array(
103
  'title' => __( 'Enabled', 'woo-stripe-payment' ),
104
  'type' => 'checkbox',
105
  'default' => 'no',
107
  'desc_tip' => true,
108
  'description' => sprintf( __( 'If enabled, your site can accept %s payments through Stripe.', 'woo-stripe-payment' ), $this->get_method_title() ),
109
  ),
110
+ 'general_settings' => array(
111
  'type' => 'title',
112
  'title' => __( 'General Settings', 'woo-stripe-payment' ),
113
  ),
114
+ 'title_text' => array(
115
  'type' => 'text',
116
  'title' => __( 'Title', 'woo-stripe-payment' ),
117
  'default' => $this->get_method_title(),
118
  'desc_tip' => true,
119
  'description' => sprintf( __( 'Title of the %s gateway' ), $this->get_method_title() ),
120
  ),
121
+ 'description' => array(
122
  'title' => __( 'Description', 'woo-stripe-payment' ),
123
  'type' => 'text',
124
  'default' => '',
125
  'description' => __( 'Leave blank if you don\'t want a description to show for the gateway.', 'woo-stripe-payment' ),
126
  'desc_tip' => true,
127
  ),
128
+ 'order_button_text' => array(
129
+ 'title' => __( 'Order Button Text', 'woo-stripe-payment' ),
130
+ 'type' => 'text',
131
+ 'default' => $this->get_order_button_text( $this->method_title ),
132
+ 'description' => __( 'The text on the Place Order button that displays when the gateway is selected on the checkout page.', 'woo-stripe-payment' ),
133
+ 'desc_tip' => true
134
+ )
135
  );
136
  }
137
 
includes/abstract/abstract-wc-payment-gateway-stripe.php CHANGED
@@ -421,7 +421,8 @@ abstract class WC_Payment_Gateway_Stripe extends WC_Payment_Gateway {
421
  'currency' => get_woocommerce_currency(),
422
  'total_label' => __( 'Total', 'woo-stripe-payment' ),
423
  'country_code' => wc_get_base_location()['country'],
424
- 'user_id' => get_current_user_id()
 
425
  );
426
  }
427
 
421
  'currency' => get_woocommerce_currency(),
422
  'total_label' => __( 'Total', 'woo-stripe-payment' ),
423
  'country_code' => wc_get_base_location()['country'],
424
+ 'user_id' => get_current_user_id(),
425
+ 'description' => $this->get_description()
426
  );
427
  }
428
 
includes/class-stripe.php CHANGED
@@ -25,7 +25,7 @@ class WC_Stripe_Manager {
25
  *
26
  * @var string
27
  */
28
- public $version = '3.2.8';
29
 
30
  /**
31
  *
@@ -255,7 +255,7 @@ class WC_Stripe_Manager {
255
  'WC_Payment_Gateway_Stripe_FPX',
256
  'WC_Payment_Gateway_Stripe_BECS',
257
  'WC_Payment_Gateway_Stripe_Alipay',
258
- //'WC_Payment_Gateway_Stripe_GrabPay'
259
  )
260
  );
261
 
25
  *
26
  * @var string
27
  */
28
+ public $version = '3.2.9';
29
 
30
  /**
31
  *
255
  'WC_Payment_Gateway_Stripe_FPX',
256
  'WC_Payment_Gateway_Stripe_BECS',
257
  'WC_Payment_Gateway_Stripe_Alipay',
258
+ 'WC_Payment_Gateway_Stripe_GrabPay'
259
  )
260
  );
261
 
includes/class-wc-stripe-frontend-scripts.php CHANGED
@@ -60,6 +60,16 @@ class WC_Stripe_Frontend_Scripts {
60
  }
61
  }
62
  }
 
 
 
 
 
 
 
 
 
 
63
  }
64
 
65
  public function localize_scripts() {
60
  }
61
  }
62
  }
63
+
64
+ if ( function_exists( 'wp_add_inline_script' ) ) {
65
+ wp_add_inline_script( $this->get_handle( 'wc-stripe' ), '(function(){
66
+ if(window.navigator.userAgent.match(/MSIE|Trident/)){
67
+ var script = document.createElement(\'script\');
68
+ script.setAttribute(\'src\', \'' . $this->assets_url( 'js/frontend/promise-polyfill.js' ) . '\');
69
+ document.head.appendChild(script);
70
+ }
71
+ }())' );
72
+ }
73
  }
74
 
75
  public function localize_scripts() {
includes/class-wc-stripe-gateway-conversions.php CHANGED
@@ -32,7 +32,7 @@ class WC_Stripe_Gateway_Conversion {
32
  $payment_method = 'stripe_cc';
33
  break;
34
  }
35
- if ( $payment_method != $old_payment_method && ! empty( $payment_method ) ) {
36
  update_post_meta( $order->get_id(), '_payment_method', $payment_method );
37
  }
38
 
32
  $payment_method = 'stripe_cc';
33
  break;
34
  }
35
+ if ( $payment_method !== $old_payment_method && ! empty( $payment_method ) ) {
36
  update_post_meta( $order->get_id(), '_payment_method', $payment_method );
37
  }
38
 
includes/class-wc-stripe-gateway.php CHANGED
@@ -435,7 +435,11 @@ class WC_Stripe_Gateway {
435
  * @todo use in future version to replace manual returns of WP_Error in each method
436
  */
437
  public function get_wp_error( $e, $code = 'stripe-error' ) {
438
- $err = $e->getJsonBody()['error'];
 
 
 
 
439
 
440
  return new WP_Error( $code, $this->get_error_message( $err ), $err );
441
  }
435
  * @todo use in future version to replace manual returns of WP_Error in each method
436
  */
437
  public function get_wp_error( $e, $code = 'stripe-error' ) {
438
+ if ( ( $json_body = $e->getJsonBody() ) ) {
439
+ $err = $json_body['error'];
440
+ } else {
441
+ $err = '';
442
+ }
443
 
444
  return new WP_Error( $code, $this->get_error_message( $err ), $err );
445
  }
includes/class-wc-stripe-payment-charge.php CHANGED
@@ -1,183 +1,183 @@
1
- <?php
2
- defined( 'ABSPATH' ) || exit();
3
-
4
- require_once( WC_STRIPE_PLUGIN_FILE_PATH . 'includes/abstract/abstract-wc-stripe-payment.php' );
5
-
6
- /**
7
- *
8
- * @package Stripe/Classes
9
- * @author Payment Plugins
10
- * @since 3.1.0
11
- *
12
- */
13
- class WC_Stripe_Payment_Charge extends WC_Stripe_Payment {
14
-
15
- /**
16
- *
17
- * {@inheritDoc}
18
- *
19
- * @see WC_Stripe_Payment::process_payment()
20
- */
21
- public function process_payment( $order ) {
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
- }
30
-
31
- $args = $this->get_order_charge_args( $args, $order );
32
-
33
- $charge = $this->gateway->charges->mode( wc_stripe_order_mode( $order ) )->create( $args );
34
-
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
-
43
- return (object) array(
44
- 'complete_payment' => true,
45
- 'charge' => $charge,
46
- );
47
- }
48
-
49
- /**
50
- *
51
- * {@inheritDoc}
52
- *
53
- * @see WC_Stripe_Payment::capture_charge()
54
- */
55
- public function capture_charge( $amount, $order ) {
56
- return $this->gateway->charges->mode( wc_stripe_order_mode( $order ) )->capture(
57
- $order->get_transaction_id(),
58
- array(
59
- 'amount' => wc_stripe_add_number_precision(
60
- $amount,
61
- $order->get_currency()
62
- ),
63
- )
64
- );
65
- }
66
-
67
- /**
68
- *
69
- * {@inheritDoc}
70
- *
71
- * @see WC_Stripe_Payment::void_charge()
72
- */
73
- public function void_charge( $order ) {
74
- return $this->gateway->refunds->mode( wc_stripe_order_mode( $order ) )->create( array( 'charge' => $order->get_transaction_id() ) );
75
- }
76
-
77
- public function scheduled_subscription_payment( $amount, $order ) {
78
- $this->get_order_charge_args( $args, $order );
79
-
80
- $args['source'] = $order->get_meta( WC_Stripe_Constants::PAYMENT_METHOD_TOKEN );
81
-
82
- if ( ( $customer_id = $order->get_meta( WC_Stripe_Constants::CUSTOMER_ID ) ) ) {
83
- $args['customer'] = $customer_id;
84
- } elseif ( ( $customer_id = wc_stripe_get_customer_id( $order->get_customer_id(), wc_stripe_order_mode( $order ) ) ) ) {
85
- $args['customer'] = $customer_id;
86
- }
87
-
88
- $charge = $this->gateway->charges->mode( wc_stripe_order_mode( $order ) )->create( $args );
89
-
90
- if ( is_wp_error( $charge ) ) {
91
- return $charge;
92
- } else {
93
- return (object) array(
94
- 'complete_payment' => true,
95
- 'charge' => $charge,
96
- );
97
- }
98
- }
99
-
100
- /**
101
- *
102
- * {@inheritDoc}
103
- *
104
- * @see WC_Stripe_Payment::process_pre_order_payment()
105
- */
106
- public function process_pre_order_payment( $order ) {
107
- $this->get_order_charge_args( $args, $order );
108
-
109
- $args['source'] = $order->get_meta( WC_Stripe_Constants::PAYMENT_METHOD_TOKEN );
110
-
111
- if ( ( $customer_id = $order->get_meta( WC_Stripe_Constants::CUSTOMER_ID ) ) ) {
112
- $args['customer'] = $customer_id;
113
- } elseif ( ( $customer_id = wc_stripe_get_customer_id( $order->get_customer_id(), wc_stripe_order_mode( $order ) ) ) ) {
114
- $args['customer'] = $customer_id;
115
- }
116
-
117
- $charge = $this->gateway->charges->mode( wc_stripe_order_mode( $order ) )->create( $args );
118
-
119
- if ( is_wp_error( $charge ) ) {
120
- return $charge;
121
- } else {
122
- return (object) array(
123
- 'complete_payment' => true,
124
- 'charge' => $charge,
125
- );
126
- }
127
- }
128
-
129
- /**
130
- *
131
- * @param array $args
132
- * @param WC_Order $order
133
- */
134
- public function get_order_charge_args( &$args, $order ) {
135
- $this->add_general_order_args( $args, $order );
136
-
137
- if ( get_option( 'woocommerce_stripe_email_receipt', 'no' ) === 'yes' && ( $email = $order->get_billing_email() ) ) {
138
- $args['receipt_email'] = $email;
139
- }
140
- $args['capture'] = $this->payment_method->get_option( 'charge_type' ) === 'capture';
141
-
142
- $customer_id = wc_stripe_get_customer_id( $order->get_user_id() );
143
-
144
- // only add customer ID if user is paying with a saved payment method
145
- if ( $customer_id && $this->payment_method->use_saved_source() ) {
146
- $args['customer'] = $customer_id;
147
- }
148
-
149
- $this->payment_method->add_stripe_order_args( $args, $order );
150
-
151
- return apply_filters( 'wc_stripe_charge_order_args', $args, $order, $this->payment_method->id );
152
- }
153
-
154
- /**
155
- *
156
- * {@inheritDoc}
157
- *
158
- * @see WC_Stripe_Payment::get_payment_method_from_charge()
159
- */
160
- public function get_payment_method_from_charge( $charge ) {
161
- return $charge->source->id;
162
- }
163
-
164
- /**
165
- *
166
- * {@inheritDoc}
167
- *
168
- * @see WC_Stripe_Payment::add_order_payment_method()
169
- */
170
- public function add_order_payment_method( &$args, $order ) {
171
- $args['source'] = $this->payment_method->get_payment_method_from_request();
172
- }
173
-
174
- /**
175
- *
176
- * {@inheritDoc}
177
- *
178
- * @see WC_Stripe_Payment::can_void_charge()
179
- */
180
- public function can_void_order( $order ) {
181
- return $order->get_transaction_id();
182
- }
183
- }
1
+ <?php
2
+ defined( 'ABSPATH' ) || exit();
3
+
4
+ require_once( WC_STRIPE_PLUGIN_FILE_PATH . 'includes/abstract/abstract-wc-stripe-payment.php' );
5
+
6
+ /**
7
+ *
8
+ * @package Stripe/Classes
9
+ * @author Payment Plugins
10
+ * @since 3.1.0
11
+ *
12
+ */
13
+ class WC_Stripe_Payment_Charge extends WC_Stripe_Payment {
14
+
15
+ /**
16
+ *
17
+ * {@inheritDoc}
18
+ *
19
+ * @see WC_Stripe_Payment::process_payment()
20
+ */
21
+ public function process_payment( $order ) {
22
+ if ( $this->payment_method->should_save_payment_method( $order ) || ( $this->payment_method->supports( 'add_payment_method' ) && apply_filters( 'wc_stripe_force_save_payment_method', false, $order, $this->payment_method ) ) ) {
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
+ }
30
+
31
+ $args = $this->get_order_charge_args( $args, $order );
32
+
33
+ $charge = $this->gateway->charges->mode( wc_stripe_order_mode( $order ) )->create( $args );
34
+
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
+
43
+ return (object) array(
44
+ 'complete_payment' => true,
45
+ 'charge' => $charge,
46
+ );
47
+ }
48
+
49
+ /**
50
+ *
51
+ * {@inheritDoc}
52
+ *
53
+ * @see WC_Stripe_Payment::capture_charge()
54
+ */
55
+ public function capture_charge( $amount, $order ) {
56
+ return $this->gateway->charges->mode( wc_stripe_order_mode( $order ) )->capture(
57
+ $order->get_transaction_id(),
58
+ array(
59
+ 'amount' => wc_stripe_add_number_precision(
60
+ $amount,
61
+ $order->get_currency()
62
+ ),
63
+ )
64
+ );
65
+ }
66
+
67
+ /**
68
+ *
69
+ * {@inheritDoc}
70
+ *
71
+ * @see WC_Stripe_Payment::void_charge()
72
+ */
73
+ public function void_charge( $order ) {
74
+ return $this->gateway->refunds->mode( wc_stripe_order_mode( $order ) )->create( array( 'charge' => $order->get_transaction_id() ) );
75
+ }
76
+
77
+ public function scheduled_subscription_payment( $amount, $order ) {
78
+ $this->get_order_charge_args( $args, $order );
79
+
80
+ $args['source'] = $order->get_meta( WC_Stripe_Constants::PAYMENT_METHOD_TOKEN );
81
+
82
+ if ( ( $customer_id = $order->get_meta( WC_Stripe_Constants::CUSTOMER_ID ) ) ) {
83
+ $args['customer'] = $customer_id;
84
+ } elseif ( ( $customer_id = wc_stripe_get_customer_id( $order->get_customer_id(), wc_stripe_order_mode( $order ) ) ) ) {
85
+ $args['customer'] = $customer_id;
86
+ }
87
+
88
+ $charge = $this->gateway->charges->mode( wc_stripe_order_mode( $order ) )->create( $args );
89
+
90
+ if ( is_wp_error( $charge ) ) {
91
+ return $charge;
92
+ } else {
93
+ return (object) array(
94
+ 'complete_payment' => true,
95
+ 'charge' => $charge,
96
+ );
97
+ }
98
+ }
99
+
100
+ /**
101
+ *
102
+ * {@inheritDoc}
103
+ *
104
+ * @see WC_Stripe_Payment::process_pre_order_payment()
105
+ */
106
+ public function process_pre_order_payment( $order ) {
107
+ $this->get_order_charge_args( $args, $order );
108
+
109
+ $args['source'] = $order->get_meta( WC_Stripe_Constants::PAYMENT_METHOD_TOKEN );
110
+
111
+ if ( ( $customer_id = $order->get_meta( WC_Stripe_Constants::CUSTOMER_ID ) ) ) {
112
+ $args['customer'] = $customer_id;
113
+ } elseif ( ( $customer_id = wc_stripe_get_customer_id( $order->get_customer_id(), wc_stripe_order_mode( $order ) ) ) ) {
114
+ $args['customer'] = $customer_id;
115
+ }
116
+
117
+ $charge = $this->gateway->charges->mode( wc_stripe_order_mode( $order ) )->create( $args );
118
+
119
+ if ( is_wp_error( $charge ) ) {
120
+ return $charge;
121
+ } else {
122
+ return (object) array(
123
+ 'complete_payment' => true,
124
+ 'charge' => $charge,
125
+ );
126
+ }
127
+ }
128
+
129
+ /**
130
+ *
131
+ * @param array $args
132
+ * @param WC_Order $order
133
+ */
134
+ public function get_order_charge_args( &$args, $order ) {
135
+ $this->add_general_order_args( $args, $order );
136
+
137
+ if ( get_option( 'woocommerce_stripe_email_receipt', 'no' ) === 'yes' && ( $email = $order->get_billing_email() ) ) {
138
+ $args['receipt_email'] = $email;
139
+ }
140
+ $args['capture'] = $this->payment_method->get_option( 'charge_type' ) === 'capture';
141
+
142
+ $customer_id = wc_stripe_get_customer_id( $order->get_user_id() );
143
+
144
+ // only add customer ID if user is paying with a saved payment method
145
+ if ( $customer_id && $this->payment_method->use_saved_source() ) {
146
+ $args['customer'] = $customer_id;
147
+ }
148
+
149
+ $this->payment_method->add_stripe_order_args( $args, $order );
150
+
151
+ return apply_filters( 'wc_stripe_charge_order_args', $args, $order, $this->payment_method->id );
152
+ }
153
+
154
+ /**
155
+ *
156
+ * {@inheritDoc}
157
+ *
158
+ * @see WC_Stripe_Payment::get_payment_method_from_charge()
159
+ */
160
+ public function get_payment_method_from_charge( $charge ) {
161
+ return $charge->source->id;
162
+ }
163
+
164
+ /**
165
+ *
166
+ * {@inheritDoc}
167
+ *
168
+ * @see WC_Stripe_Payment::add_order_payment_method()
169
+ */
170
+ public function add_order_payment_method( &$args, $order ) {
171
+ $args['source'] = $this->payment_method->get_payment_method_from_request();
172
+ }
173
+
174
+ /**
175
+ *
176
+ * {@inheritDoc}
177
+ *
178
+ * @see WC_Stripe_Payment::can_void_charge()
179
+ */
180
+ public function can_void_order( $order ) {
181
+ return $order->get_transaction_id();
182
+ }
183
+ }
includes/class-wc-stripe-payment-intent.php CHANGED
@@ -1,346 +1,346 @@
1
- <?php
2
- defined( 'ABSPATH' ) || exit();
3
-
4
- require_once( WC_STRIPE_PLUGIN_FILE_PATH . 'includes/abstract/abstract-wc-stripe-payment.php' );
5
-
6
- /**
7
- *
8
- * @package Stripe/Classes
9
- * @author Payment Plugins
10
- * @since 3.1.0
11
- *
12
- */
13
- class WC_Stripe_Payment_Intent extends WC_Stripe_Payment {
14
-
15
- /**
16
- *
17
- * {@inheritDoc}
18
- *
19
- * @see WC_Stripe_Payment::process_payment()
20
- */
21
- public function process_payment( $order ) {
22
- // first check to see if a payment intent can be used
23
- if ( ( $intent = $this->can_use_payment_intent( $order ) ) ) {
24
- $intent_id = $intent['id'];
25
- if ( $this->can_update_payment_intent( $order ) ) {
26
- $intent = $this->gateway->paymentIntents->update( $intent_id, $this->get_payment_intent_args( $order, false ) );
27
- } else {
28
- $intent = $this->gateway->paymentIntents->retrieve( $intent_id );
29
- }
30
- } else {
31
- $intent = $this->gateway->paymentIntents->create( $this->get_payment_intent_args( $order ) );
32
- }
33
-
34
- if ( is_wp_error( $intent ) ) {
35
- $this->add_payment_failed_note( $order, $intent );
36
-
37
- return $intent;
38
- }
39
-
40
- // always update the order with the payment intent.
41
- $order->update_meta_data( WC_Stripe_Constants::PAYMENT_INTENT_ID, $intent->id );
42
- $order->update_meta_data( WC_Stripe_Constants::PAYMENT_METHOD_TOKEN, $intent->payment_method );
43
- $order->update_meta_data( WC_Stripe_Constants::MODE, wc_stripe_mode() );
44
- // serialize the the intent and save to the order. The intent will be used to analyze if anything
45
- // has changed.
46
- $order->update_meta_data( WC_Stripe_Constants::PAYMENT_INTENT, $intent->jsonSerialize() );
47
- $order->save();
48
-
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
- }
57
-
58
- // the intent was processed.
59
- if ( $intent->status === 'succeeded' || $intent->status === 'requires_capture' ) {
60
-
61
- if ( isset( $intent['setup_future_usage'] ) && 'off_session' === $intent['setup_future_usage'] ) {
62
- $result = $this->payment_method->save_payment_method( $this->payment_method->get_new_source_token(), $order );
63
- if ( is_wp_error( $result ) ) {
64
- $this->payment_method->set_payment_save_error( $order, $result );
65
- }
66
- }
67
-
68
- // payment has been processed.
69
- $charges = $intent->charges;
70
- if ( count( $charges->data ) > 0 ) {
71
- $charge = $charges->data[0];
72
-
73
- return (object) array(
74
- 'complete_payment' => true,
75
- 'charge' => $charge,
76
- );
77
- }
78
- }
79
- if ( $intent->status === 'requires_source_action' || $intent->status === 'requires_action' ) {
80
- return (object) array(
81
- 'complete_payment' => false,
82
- 'redirect' => $this->payment_method->get_payment_intent_checkout_url( $intent, $order ),
83
- );
84
- }
85
- if ( $intent->status === 'requires_source' || $intent->status === 'requires_payment_method' ) {
86
- return (object) array(
87
- 'complete_payment' => false,
88
- 'redirect' => $this->payment_method->get_payment_intent_checkout_url( $intent, $order ),
89
- );
90
- }
91
- }
92
-
93
- public function scheduled_subscription_payment( $amount, $order ) {
94
- $args = $this->get_payment_intent_args( $order );
95
-
96
- $args['confirm'] = true;
97
- $args['off_session'] = true;
98
- $args['payment_method'] = $this->payment_method->get_order_meta_data( WC_Stripe_Constants::PAYMENT_METHOD_TOKEN, $order );
99
-
100
- if ( ( $customer = $this->payment_method->get_order_meta_data( WC_Stripe_Constants::CUSTOMER_ID, $order ) ) ) {
101
- $args['customer'] = $customer;
102
- }
103
-
104
- $intent = $this->gateway->paymentIntents->mode( wc_stripe_order_mode( $order ) )->create( $args );
105
-
106
- if ( is_wp_error( $intent ) ) {
107
- return $intent;
108
- } else {
109
- $order->update_meta_data( WC_Stripe_Constants::PAYMENT_INTENT_ID, $intent->id );
110
-
111
- $charge = $intent->charges->data[0];
112
-
113
- if ( $intent->status === 'succeeded' || $intent->status === 'requires_capture' ) {
114
-
115
- return (object) array(
116
- 'complete_payment' => true,
117
- 'charge' => $charge,
118
- );
119
- } else {
120
- return (object) array(
121
- 'complete_payment' => false,
122
- 'charge' => $charge,
123
- );
124
- }
125
- }
126
- }
127
-
128
- /**
129
- *
130
- * {@inheritDoc}
131
- *
132
- * @see WC_Stripe_Payment::process_pre_order_payment()
133
- */
134
- public function process_pre_order_payment( $order ) {
135
- $args = $this->get_payment_intent_args( $order );
136
-
137
- $args['confirm'] = true;
138
- $args['off_session'] = true;
139
- $args['payment_method'] = $this->payment_method->get_order_meta_data( WC_Stripe_Constants::PAYMENT_METHOD_TOKEN, $order );
140
-
141
- if ( ( $customer = $this->payment_method->get_order_meta_data( WC_Stripe_Constants::CUSTOMER_ID, $order ) ) ) {
142
- $args['customer'] = $customer;
143
- }
144
-
145
- $intent = $this->gateway->paymentIntents->mode( wc_stripe_order_mode( $order ) )->create( $args );
146
-
147
- if ( is_wp_error( $intent ) ) {
148
- return $intent;
149
- } else {
150
- $order->update_meta_data( WC_Stripe_Constants::PAYMENT_INTENT_ID, $intent->id );
151
-
152
- $charge = $intent->charges->data[0];
153
-
154
- if ( $intent->status === 'succeeded' || $intent->status === 'requires_capture' ) {
155
- return (object) array(
156
- 'complete_payment' => true,
157
- 'charge' => $charge,
158
- );
159
- } else {
160
- return (object) array(
161
- 'complete_payment' => false,
162
- 'charge' => $charge,
163
- );
164
- }
165
- }
166
- }
167
-
168
- /**
169
- * Compares the order's saved intent to the order's attributes.
170
- * If there is a delta, then the payment intent can be updated. The intent should
171
- * only be updated if this is the checkout page.
172
- *
173
- * @param WC_Order $order
174
- */
175
- public function can_update_payment_intent( $order ) {
176
- if ( ! is_checkout() || defined( WC_Stripe_Constants::REDIRECT_HANDLER ) ) {
177
- return false;
178
- }
179
- $intent = $order->get_meta( WC_Stripe_Constants::PAYMENT_INTENT );
180
- if ( $intent ) {
181
- $order_hash = implode(
182
- '_',
183
- array(
184
- wc_stripe_add_number_precision( $order->get_total(), $order->get_currency() ),
185
- wc_stripe_get_customer_id( $order->get_user_id() ),
186
- $this->payment_method->get_payment_method_from_request(),
187
- $this->payment_method->get_payment_method_type(),
188
- )
189
- );
190
- $intent_hash = implode(
191
- '_',
192
- array(
193
- $intent['amount'],
194
- $intent['customer'],
195
- $intent['payment_method'],
196
- isset( $intent['payment_method_types'] ) ? $intent['payment_method_types'][0] : '',
197
- )
198
- );
199
-
200
- return $order_hash !== $intent_hash;
201
- }
202
-
203
- return false;
204
- }
205
-
206
- /**
207
- *
208
- * @param WC_Order $order
209
- */
210
- public function get_payment_intent_args( $order, $new = true ) {
211
- $this->add_general_order_args( $args, $order );
212
-
213
- if ( $new ) {
214
- $args['confirmation_method'] = $this->payment_method->get_confirmation_method( $order );
215
- $args['capture_method'] = $this->payment_method->get_option( 'charge_type' ) === 'capture' ? 'automatic' : 'manual';
216
- $args['confirm'] = false;
217
- }
218
-
219
- if ( get_option( 'woocommerce_stripe_email_receipt', 'no' ) === 'yes' && ( $email = $order->get_billing_email() ) ) {
220
- $args['receipt_email'] = $email;
221
- }
222
-
223
- if ( ( $customer_id = wc_stripe_get_customer_id( $order->get_customer_id() ) ) ) {
224
- $args['customer'] = $customer_id;
225
- }
226
-
227
- if ( $this->payment_method->should_save_payment_method( $order ) ) {
228
- $args['setup_future_usage'] = 'off_session';
229
- }
230
-
231
- $args['payment_method_types'][] = $this->payment_method->get_payment_method_type();
232
-
233
- $this->payment_method->add_stripe_order_args( $args, $order );
234
-
235
- /**
236
- * @param array $args
237
- * @param WC_Order $order
238
- * @param WC_Stripe_Payment_Intent $this
239
- */
240
- return apply_filters( 'wc_stripe_payment_intent_args', $args, $order, $this );
241
- }
242
-
243
- /**
244
- *
245
- * {@inheritDoc}
246
- *
247
- * @see WC_Stripe_Payment::capture_charge()
248
- */
249
- public function capture_charge( $amount, $order ) {
250
- $payment_intent = $this->payment_method->get_order_meta_data( WC_Stripe_Constants::PAYMENT_INTENT_ID, $order );
251
- if ( empty( $payment_intent ) ) {
252
- $charge = $this->gateway->charges->mode( wc_stripe_order_mode( $order ) )->retrieve( $order->get_transaction_id() );
253
- $payment_intent = $charge->payment_intent;
254
- $order->update_meta_data( WC_Stripe_Constants::PAYMENT_INTENT_ID, $payment_intent );
255
- $order->save();
256
- }
257
-
258
- return $this->gateway->paymentIntents->mode( wc_stripe_order_mode( $order ) )->capture(
259
- $payment_intent,
260
- array(
261
- 'amount_to_capture' => wc_stripe_add_number_precision(
262
- $amount,
263
- $order->get_currency()
264
- ),
265
- )
266
- );
267
- }
268
-
269
- /**
270
- *
271
- * {@inheritDoc}
272
- *
273
- * @see WC_Stripe_Payment::void_charge()
274
- */
275
- public function void_charge( $order ) {
276
- // fetch the intent and check its status
277
- $payment_intent = $this->gateway->paymentIntents->mode( wc_stripe_order_mode( $order ) )->retrieve( $order->get_meta( WC_Stripe_Constants::PAYMENT_INTENT_ID ) );
278
- if ( is_wp_error( $payment_intent ) ) {
279
- return $payment_intent;
280
- }
281
- $statuses = array( 'requires_payment_method', 'requires_capture', 'requires_confirmation', 'requires_action' );
282
- if ( 'canceled' !== $payment_intent->status ) {
283
- if ( in_array( $payment_intent->status, $statuses ) ) {
284
- return $this->gateway->paymentIntents->mode( wc_stripe_order_mode( $order ) )->cancel( $payment_intent->id );
285
- } elseif ( 'succeeded' === $payment_intent->status ) {
286
- return $this->process_refund( $order, $order->get_total() );
287
- }
288
- }
289
- }
290
-
291
- /**
292
- *
293
- * {@inheritDoc}
294
- *
295
- * @see WC_Stripe_Payment::get_payment_method_from_charge()
296
- */
297
- public function get_payment_method_from_charge( $charge ) {
298
- return $charge->payment_method;
299
- }
300
-
301
- /**
302
- *
303
- * {@inheritDoc}
304
- *
305
- * @see WC_Stripe_Payment::add_order_payment_method()
306
- */
307
- public function add_order_payment_method( &$args, $order ) {
308
- $args['payment_method'] = $this->payment_method->get_payment_method_from_request();
309
- if ( empty( $args['payment_method'] ) ) {
310
- unset( $args['payment_method'] );
311
- }
312
- }
313
-
314
- /**
315
- *
316
- * @param WC_Order $order
317
- */
318
- public function can_use_payment_intent( $order ) {
319
- $intent = $order->get_meta( WC_Stripe_Constants::PAYMENT_INTENT );
320
-
321
- if ( $intent ) {
322
- if ( $intent['confirmation_method'] != $this->payment_method->get_confirmation_method( $order ) ) {
323
- return false;
324
- }
325
-
326
- // compare the active environment to the order's environment
327
- if ( wc_stripe_order_mode( $order ) != wc_stripe_mode() ) {
328
- return false;
329
- }
330
-
331
- return $intent;
332
- }
333
-
334
- return false;
335
- }
336
-
337
- /**
338
- *
339
- * {@inheritDoc}
340
- *
341
- * @see WC_Stripe_Payment::can_void_charge()
342
- */
343
- public function can_void_order( $order ) {
344
- return $order->get_meta( WC_Stripe_Constants::PAYMENT_INTENT_ID );
345
- }
346
- }
1
+ <?php
2
+ defined( 'ABSPATH' ) || exit();
3
+
4
+ require_once( WC_STRIPE_PLUGIN_FILE_PATH . 'includes/abstract/abstract-wc-stripe-payment.php' );
5
+
6
+ /**
7
+ *
8
+ * @package Stripe/Classes
9
+ * @author Payment Plugins
10
+ * @since 3.1.0
11
+ *
12
+ */
13
+ class WC_Stripe_Payment_Intent extends WC_Stripe_Payment {
14
+
15
+ /**
16
+ *
17
+ * {@inheritDoc}
18
+ *
19
+ * @see WC_Stripe_Payment::process_payment()
20
+ */
21
+ public function process_payment( $order ) {
22
+ // first check to see if a payment intent can be used
23
+ if ( ( $intent = $this->can_use_payment_intent( $order ) ) ) {
24
+ $intent_id = $intent['id'];
25
+ if ( $this->can_update_payment_intent( $order ) ) {
26
+ $intent = $this->gateway->paymentIntents->update( $intent_id, $this->get_payment_intent_args( $order, false ) );
27
+ } else {
28
+ $intent = $this->gateway->paymentIntents->retrieve( $intent_id );
29
+ }
30
+ } else {
31
+ $intent = $this->gateway->paymentIntents->create( $this->get_payment_intent_args( $order ) );
32
+ }
33
+
34
+ if ( is_wp_error( $intent ) ) {
35
+ $this->add_payment_failed_note( $order, $intent );
36
+
37
+ return $intent;
38
+ }
39
+
40
+ // always update the order with the payment intent.
41
+ $order->update_meta_data( WC_Stripe_Constants::PAYMENT_INTENT_ID, $intent->id );
42
+ $order->update_meta_data( WC_Stripe_Constants::PAYMENT_METHOD_TOKEN, $intent->payment_method );
43
+ $order->update_meta_data( WC_Stripe_Constants::MODE, wc_stripe_mode() );
44
+ // serialize the the intent and save to the order. The intent will be used to analyze if anything
45
+ // has changed.
46
+ $order->update_meta_data( WC_Stripe_Constants::PAYMENT_INTENT, $intent->jsonSerialize() );
47
+ $order->save();
48
+
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
+ }
57
+
58
+ // the intent was processed.
59
+ if ( $intent->status === 'succeeded' || $intent->status === 'requires_capture' ) {
60
+
61
+ if ( isset( $intent['setup_future_usage'] ) && 'off_session' === $intent['setup_future_usage'] ) {
62
+ $result = $this->payment_method->save_payment_method( $this->payment_method->get_new_source_token(), $order );
63
+ if ( is_wp_error( $result ) ) {
64
+ $this->payment_method->set_payment_save_error( $order, $result );
65
+ }
66
+ }
67
+
68
+ // payment has been processed.
69
+ $charges = $intent->charges;
70
+ if ( count( $charges->data ) > 0 ) {
71
+ $charge = $charges->data[0];
72
+
73
+ return (object) array(
74
+ 'complete_payment' => true,
75
+ 'charge' => $charge,
76
+ );
77
+ }
78
+ }
79
+ if ( $intent->status === 'requires_source_action' || $intent->status === 'requires_action' ) {
80
+ return (object) array(
81
+ 'complete_payment' => false,
82
+ 'redirect' => $this->payment_method->get_payment_intent_checkout_url( $intent, $order ),
83
+ );
84
+ }
85
+ if ( $intent->status === 'requires_source' || $intent->status === 'requires_payment_method' ) {
86
+ return (object) array(
87
+ 'complete_payment' => false,
88
+ 'redirect' => $this->payment_method->get_payment_intent_checkout_url( $intent, $order ),
89
+ );
90
+ }
91
+ }
92
+
93
+ public function scheduled_subscription_payment( $amount, $order ) {
94
+ $args = $this->get_payment_intent_args( $order );
95
+
96
+ $args['confirm'] = true;
97
+ $args['off_session'] = true;
98
+ $args['payment_method'] = $this->payment_method->get_order_meta_data( WC_Stripe_Constants::PAYMENT_METHOD_TOKEN, $order );
99
+
100
+ if ( ( $customer = $this->payment_method->get_order_meta_data( WC_Stripe_Constants::CUSTOMER_ID, $order ) ) ) {
101
+ $args['customer'] = $customer;
102
+ }
103
+
104
+ $intent = $this->gateway->paymentIntents->mode( wc_stripe_order_mode( $order ) )->create( $args );
105
+
106
+ if ( is_wp_error( $intent ) ) {
107
+ return $intent;
108
+ } else {
109
+ $order->update_meta_data( WC_Stripe_Constants::PAYMENT_INTENT_ID, $intent->id );
110
+
111
+ $charge = $intent->charges->data[0];
112
+
113
+ if ( $intent->status === 'succeeded' || $intent->status === 'requires_capture' ) {
114
+
115
+ return (object) array(
116
+ 'complete_payment' => true,
117
+ 'charge' => $charge,
118
+ );
119
+ } else {
120
+ return (object) array(
121
+ 'complete_payment' => false,
122
+ 'charge' => $charge,
123
+ );
124
+ }
125
+ }
126
+ }
127
+
128
+ /**
129
+ *
130
+ * {@inheritDoc}
131
+ *
132
+ * @see WC_Stripe_Payment::process_pre_order_payment()
133
+ */
134
+ public function process_pre_order_payment( $order ) {
135
+ $args = $this->get_payment_intent_args( $order );
136
+
137
+ $args['confirm'] = true;
138
+ $args['off_session'] = true;
139
+ $args['payment_method'] = $this->payment_method->get_order_meta_data( WC_Stripe_Constants::PAYMENT_METHOD_TOKEN, $order );
140
+
141
+ if ( ( $customer = $this->payment_method->get_order_meta_data( WC_Stripe_Constants::CUSTOMER_ID, $order ) ) ) {
142
+ $args['customer'] = $customer;
143
+ }
144
+
145
+ $intent = $this->gateway->paymentIntents->mode( wc_stripe_order_mode( $order ) )->create( $args );
146
+
147
+ if ( is_wp_error( $intent ) ) {
148
+ return $intent;
149
+ } else {
150
+ $order->update_meta_data( WC_Stripe_Constants::PAYMENT_INTENT_ID, $intent->id );
151
+
152
+ $charge = $intent->charges->data[0];
153
+
154
+ if ( $intent->status === 'succeeded' || $intent->status === 'requires_capture' ) {
155
+ return (object) array(
156
+ 'complete_payment' => true,
157
+ 'charge' => $charge,
158
+ );
159
+ } else {
160
+ return (object) array(
161
+ 'complete_payment' => false,
162
+ 'charge' => $charge,
163
+ );
164
+ }
165
+ }
166
+ }
167
+
168
+ /**
169
+ * Compares the order's saved intent to the order's attributes.
170
+ * If there is a delta, then the payment intent can be updated. The intent should
171
+ * only be updated if this is the checkout page.
172
+ *
173
+ * @param WC_Order $order
174
+ */
175
+ public function can_update_payment_intent( $order ) {
176
+ if ( ! is_checkout() || defined( WC_Stripe_Constants::REDIRECT_HANDLER ) ) {
177
+ return false;
178
+ }
179
+ $intent = $order->get_meta( WC_Stripe_Constants::PAYMENT_INTENT );
180
+ if ( $intent ) {
181
+ $order_hash = implode(
182
+ '_',
183
+ array(
184
+ wc_stripe_add_number_precision( $order->get_total(), $order->get_currency() ),
185
+ wc_stripe_get_customer_id( $order->get_user_id() ),
186
+ $this->payment_method->get_payment_method_from_request(),
187
+ $this->payment_method->get_payment_method_type(),
188
+ )
189
+ );
190
+ $intent_hash = implode(
191
+ '_',
192
+ array(
193
+ $intent['amount'],
194
+ $intent['customer'],
195
+ $intent['payment_method'],
196
+ isset( $intent['payment_method_types'] ) ? $intent['payment_method_types'][0] : '',
197
+ )
198
+ );
199
+
200
+ return $order_hash !== $intent_hash;
201
+ }
202
+
203
+ return false;
204
+ }
205
+
206
+ /**
207
+ *
208
+ * @param WC_Order $order
209
+ */
210
+ public function get_payment_intent_args( $order, $new = true ) {
211
+ $this->add_general_order_args( $args, $order );
212
+
213
+ if ( $new ) {
214
+ $args['confirmation_method'] = $this->payment_method->get_confirmation_method( $order );
215
+ $args['capture_method'] = $this->payment_method->get_option( 'charge_type' ) === 'capture' ? 'automatic' : 'manual';
216
+ $args['confirm'] = false;
217
+ }
218
+
219
+ if ( get_option( 'woocommerce_stripe_email_receipt', 'no' ) === 'yes' && ( $email = $order->get_billing_email() ) ) {
220
+ $args['receipt_email'] = $email;
221
+ }
222
+
223
+ if ( ( $customer_id = wc_stripe_get_customer_id( $order->get_customer_id() ) ) ) {
224
+ $args['customer'] = $customer_id;
225
+ }
226
+
227
+ if ( $this->payment_method->should_save_payment_method( $order ) || ( $this->payment_method->supports( 'add_payment_method' ) && apply_filters( 'wc_stripe_force_save_payment_method', false, $order, $this->payment_method ) ) ) {
228
+ $args['setup_future_usage'] = 'off_session';
229
+ }
230
+
231
+ $args['payment_method_types'][] = $this->payment_method->get_payment_method_type();
232
+
233
+ $this->payment_method->add_stripe_order_args( $args, $order );
234
+
235
+ /**
236
+ * @param array $args
237
+ * @param WC_Order $order
238
+ * @param WC_Stripe_Payment_Intent $this
239
+ */
240
+ return apply_filters( 'wc_stripe_payment_intent_args', $args, $order, $this );
241
+ }
242
+
243
+ /**
244
+ *
245
+ * {@inheritDoc}
246
+ *
247
+ * @see WC_Stripe_Payment::capture_charge()
248
+ */
249
+ public function capture_charge( $amount, $order ) {
250
+ $payment_intent = $this->payment_method->get_order_meta_data( WC_Stripe_Constants::PAYMENT_INTENT_ID, $order );
251
+ if ( empty( $payment_intent ) ) {
252
+ $charge = $this->gateway->charges->mode( wc_stripe_order_mode( $order ) )->retrieve( $order->get_transaction_id() );
253
+ $payment_intent = $charge->payment_intent;
254
+ $order->update_meta_data( WC_Stripe_Constants::PAYMENT_INTENT_ID, $payment_intent );
255
+ $order->save();
256
+ }
257
+
258
+ return $this->gateway->paymentIntents->mode( wc_stripe_order_mode( $order ) )->capture(
259
+ $payment_intent,
260
+ array(
261
+ 'amount_to_capture' => wc_stripe_add_number_precision(
262
+ $amount,
263
+ $order->get_currency()
264
+ ),
265
+ )
266
+ );
267
+ }
268
+
269
+ /**
270
+ *
271
+ * {@inheritDoc}
272
+ *
273
+ * @see WC_Stripe_Payment::void_charge()
274
+ */
275
+ public function void_charge( $order ) {
276
+ // fetch the intent and check its status
277
+ $payment_intent = $this->gateway->paymentIntents->mode( wc_stripe_order_mode( $order ) )->retrieve( $order->get_meta( WC_Stripe_Constants::PAYMENT_INTENT_ID ) );
278
+ if ( is_wp_error( $payment_intent ) ) {
279
+ return $payment_intent;
280
+ }
281
+ $statuses = array( 'requires_payment_method', 'requires_capture', 'requires_confirmation', 'requires_action' );
282
+ if ( 'canceled' !== $payment_intent->status ) {
283
+ if ( in_array( $payment_intent->status, $statuses ) ) {
284
+ return $this->gateway->paymentIntents->mode( wc_stripe_order_mode( $order ) )->cancel( $payment_intent->id );
285
+ } elseif ( 'succeeded' === $payment_intent->status ) {
286
+ return $this->process_refund( $order, $order->get_total() );
287
+ }
288
+ }
289
+ }
290
+
291
+ /**
292
+ *
293
+ * {@inheritDoc}
294
+ *
295
+ * @see WC_Stripe_Payment::get_payment_method_from_charge()
296
+ */
297
+ public function get_payment_method_from_charge( $charge ) {
298
+ return $charge->payment_method;
299
+ }
300
+
301
+ /**
302
+ *
303
+ * {@inheritDoc}
304
+ *
305
+ * @see WC_Stripe_Payment::add_order_payment_method()
306
+ */
307
+ public function add_order_payment_method( &$args, $order ) {
308
+ $args['payment_method'] = $this->payment_method->get_payment_method_from_request();
309
+ if ( empty( $args['payment_method'] ) ) {
310
+ unset( $args['payment_method'] );
311
+ }
312
+ }
313
+
314
+ /**
315
+ *
316
+ * @param WC_Order $order
317
+ */
318
+ public function can_use_payment_intent( $order ) {
319
+ $intent = $order->get_meta( WC_Stripe_Constants::PAYMENT_INTENT );
320
+
321
+ if ( $intent ) {
322
+ if ( $intent['confirmation_method'] != $this->payment_method->get_confirmation_method( $order ) ) {
323
+ return false;
324
+ }
325
+
326
+ // compare the active environment to the order's environment
327
+ if ( wc_stripe_order_mode( $order ) != wc_stripe_mode() ) {
328
+ return false;
329
+ }
330
+
331
+ return $intent;
332
+ }
333
+
334
+ return false;
335
+ }
336
+
337
+ /**
338
+ *
339
+ * {@inheritDoc}
340
+ *
341
+ * @see WC_Stripe_Payment::can_void_charge()
342
+ */
343
+ public function can_void_order( $order ) {
344
+ return $order->get_meta( WC_Stripe_Constants::PAYMENT_INTENT_ID );
345
+ }
346
+ }
includes/controllers/class-wc-stripe-controller-googlepay.php CHANGED
@@ -129,6 +129,7 @@ class WC_Stripe_Controller_GooglePay extends WC_Stripe_Rest_Controller {
129
  return array(
130
  'newTransactionInfo' => array(
131
  'currencyCode' => get_woocommerce_currency(),
 
132
  'totalPriceStatus' => 'FINAL',
133
  'totalPrice' => strval( round( WC()->cart->total, 2 ) ),
134
  'displayItems' => $this->gateway->get_display_items(),
129
  return array(
130
  'newTransactionInfo' => array(
131
  'currencyCode' => get_woocommerce_currency(),
132
+ 'countryCode' => WC()->countries->get_base_country(),
133
  'totalPriceStatus' => 'FINAL',
134
  'totalPrice' => strval( round( WC()->cart->total, 2 ) ),
135
  'displayItems' => $this->gateway->get_display_items(),
includes/gateways/class-wc-payment-gateway-stripe-ach.php CHANGED
@@ -29,10 +29,10 @@ class WC_Payment_Gateway_Stripe_ACH extends WC_Payment_Gateway_Stripe {
29
  $this->method_title = __( 'Stripe ACH', 'woo-stripe-payment' );
30
  $this->method_description = __( 'ACH gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
31
  $this->icon = stripe_wc()->assets_url( 'img/ach.svg' );
32
- $this->order_button_text = __( 'Bank Payment', 'woo-stripe-payment' );
33
  $this->metadata_key = $this->id . '_metadata';
34
  parent::__construct();
35
  $this->settings['charge_type'] = 'capture';
 
36
  }
37
 
38
  public static function init() {
29
  $this->method_title = __( 'Stripe ACH', 'woo-stripe-payment' );
30
  $this->method_description = __( 'ACH gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
31
  $this->icon = stripe_wc()->assets_url( 'img/ach.svg' );
 
32
  $this->metadata_key = $this->id . '_metadata';
33
  parent::__construct();
34
  $this->settings['charge_type'] = 'capture';
35
+ $this->order_button_text = $this->get_option( 'order_button_text' );
36
  }
37
 
38
  public static function init() {
includes/gateways/class-wc-payment-gateway-stripe-alipay.php CHANGED
@@ -25,7 +25,6 @@ class WC_Payment_Gateway_Stripe_Alipay extends WC_Payment_Gateway_Stripe_Local_P
25
  $this->method_title = __( 'Alipay', 'woo-stripe-payment' );
26
  $this->method_description = __( 'Alipay gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
27
  $this->icon = stripe_wc()->assets_url( 'img/alipay.svg' );
28
- $this->order_button_text = $this->get_order_button_text( __( 'Alipay', 'woo-stripe-payment' ) );
29
  parent::__construct();
30
  }
31
 
25
  $this->method_title = __( 'Alipay', 'woo-stripe-payment' );
26
  $this->method_description = __( 'Alipay gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
27
  $this->icon = stripe_wc()->assets_url( 'img/alipay.svg' );
 
28
  parent::__construct();
29
  }
30
 
includes/gateways/class-wc-payment-gateway-stripe-bancontact.php CHANGED
@@ -22,12 +22,9 @@ class WC_Payment_Gateway_Stripe_Bancontact extends WC_Payment_Gateway_Stripe_Loc
22
  $this->countries = array( 'BE' );
23
  $this->id = 'stripe_bancontact';
24
  $this->tab_title = __( 'Bancontact', 'woo-stripe-payment' );
25
- $this->template_name = 'local-payment.php';
26
- $this->token_type = 'Stripe_Local';
27
  $this->method_title = __( 'Bancontact', 'woo-stripe-payment' );
28
  $this->method_description = __( 'Bancontact gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
29
  $this->icon = stripe_wc()->assets_url( 'img/bancontact.svg' );
30
- $this->order_button_text = $this->get_order_button_text( __( 'Bancontact', 'woo-stripe-payment' ) );
31
  parent::__construct();
32
  }
33
  }
22
  $this->countries = array( 'BE' );
23
  $this->id = 'stripe_bancontact';
24
  $this->tab_title = __( 'Bancontact', 'woo-stripe-payment' );
 
 
25
  $this->method_title = __( 'Bancontact', 'woo-stripe-payment' );
26
  $this->method_description = __( 'Bancontact gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
27
  $this->icon = stripe_wc()->assets_url( 'img/bancontact.svg' );
 
28
  parent::__construct();
29
  }
30
  }
includes/gateways/class-wc-payment-gateway-stripe-becs.php CHANGED
@@ -23,7 +23,6 @@ class WC_Payment_Gateway_Stripe_BECS extends WC_Payment_Gateway_Stripe_Local_Pay
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 = ''; //stripe_wc()->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(
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 = ''; //stripe_wc()->assets_url( 'img/becs.svg' );
 
26
  parent::__construct();
27
 
28
  $this->local_payment_description = sprintf(
includes/gateways/class-wc-payment-gateway-stripe-eps.php CHANGED
@@ -26,7 +26,6 @@ class WC_Payment_Gateway_Stripe_EPS extends WC_Payment_Gateway_Stripe_Local_Paym
26
  $this->method_title = __( 'EPS', 'woo-stripe-payment' );
27
  $this->method_description = __( 'EPS gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
28
  $this->icon = stripe_wc()->assets_url( 'img/eps.svg' );
29
- $this->order_button_text = $this->get_order_button_text( __( 'EPS', 'woo-stripe-payment' ) );
30
  parent::__construct();
31
  }
32
  }
26
  $this->method_title = __( 'EPS', 'woo-stripe-payment' );
27
  $this->method_description = __( 'EPS gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
28
  $this->icon = stripe_wc()->assets_url( 'img/eps.svg' );
 
29
  parent::__construct();
30
  }
31
  }
includes/gateways/class-wc-payment-gateway-stripe-fpx.php CHANGED
@@ -26,7 +26,6 @@ class WC_Payment_Gateway_Stripe_FPX extends WC_Payment_Gateway_Stripe_Local_Paym
26
  $this->method_title = __( 'FPX', 'woo-stripe-payment' );
27
  $this->method_description = __( 'FPX gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
28
  $this->icon = stripe_wc()->assets_url( 'img/fpx.svg' );
29
- $this->order_button_text = $this->get_order_button_text( __( 'FPX', 'woo-stripe-payment' ) );
30
  parent::__construct();
31
  }
32
 
26
  $this->method_title = __( 'FPX', 'woo-stripe-payment' );
27
  $this->method_description = __( 'FPX gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
28
  $this->icon = stripe_wc()->assets_url( 'img/fpx.svg' );
 
29
  parent::__construct();
30
  }
31
 
includes/gateways/class-wc-payment-gateway-stripe-giropay.php CHANGED
@@ -26,7 +26,6 @@ class WC_Payment_Gateway_Stripe_Giropay extends WC_Payment_Gateway_Stripe_Local_
26
  $this->method_title = __( 'Giropay', 'woo-stripe-payment' );
27
  $this->method_description = __( 'Giropay gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
28
  $this->icon = stripe_wc()->assets_url( 'img/giropay.svg' );
29
- $this->order_button_text = $this->get_order_button_text( __( 'Giropay', 'woo-stripe-payment' ) );
30
  parent::__construct();
31
  }
32
  }
26
  $this->method_title = __( 'Giropay', 'woo-stripe-payment' );
27
  $this->method_description = __( 'Giropay gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
28
  $this->icon = stripe_wc()->assets_url( 'img/giropay.svg' );
 
29
  parent::__construct();
30
  }
31
  }
includes/gateways/class-wc-payment-gateway-stripe-googlepay.php CHANGED
@@ -95,14 +95,15 @@ class WC_Payment_Gateway_Stripe_GooglePay extends WC_Payment_Gateway_Stripe {
95
  $data = array_merge_recursive(
96
  parent::get_localized_params(),
97
  array(
98
- 'environment' => wc_stripe_mode() === 'test' ? 'TEST' : 'PRODUCTION',
99
- 'merchant_id' => wc_stripe_mode() === 'test' ? '' : $this->get_option( 'merchant_id' ),
100
- 'merchant_name' => $this->get_option( 'merchant_name' ),
101
- 'button_color' => $this->get_option( 'button_color' ),
102
- 'button_style' => $this->get_option( 'button_style' ),
103
- 'total_price_label' => __( 'Total', 'woo-stripe-payment' ),
104
- 'routes' => array( 'payment_data' => WC_Stripe_Rest_API::get_endpoint( stripe_wc()->rest_api->googlepay->rest_uri( 'shipping-data' ) ) ),
105
- 'messages' => array( 'invalid_amount' => __( 'Please update you product quantity before using Google Pay.', 'woo-stripe-payment' ) )
 
106
  )
107
  );
108
 
95
  $data = array_merge_recursive(
96
  parent::get_localized_params(),
97
  array(
98
+ 'environment' => wc_stripe_mode() === 'test' ? 'TEST' : 'PRODUCTION',
99
+ 'merchant_id' => wc_stripe_mode() === 'test' ? '' : $this->get_option( 'merchant_id' ),
100
+ 'merchant_name' => $this->get_option( 'merchant_name' ),
101
+ 'processing_country' => WC()->countries ? WC()->countries->get_base_country() : wc_get_base_location()['country'],
102
+ 'button_color' => $this->get_option( 'button_color' ),
103
+ 'button_style' => $this->get_option( 'button_style' ),
104
+ 'total_price_label' => __( 'Total', 'woo-stripe-payment' ),
105
+ 'routes' => array( 'payment_data' => WC_Stripe_Rest_API::get_endpoint( stripe_wc()->rest_api->googlepay->rest_uri( 'shipping-data' ) ) ),
106
+ 'messages' => array( 'invalid_amount' => __( 'Please update you product quantity before using Google Pay.', 'woo-stripe-payment' ) )
107
  )
108
  );
109
 
includes/gateways/class-wc-payment-gateway-stripe-grabpay.php CHANGED
@@ -19,14 +19,13 @@ class WC_Payment_Gateway_Stripe_GrabPay extends WC_Payment_Gateway_Stripe_Local_
19
 
20
  public function __construct() {
21
  $this->local_payment_type = 'grabpay';
22
- $this->currencies = array( 'SGD' );
23
  $this->countries = array();
24
  $this->id = 'stripe_grabpay';
25
  $this->tab_title = __( 'GrabPay', 'woo-stripe-payment' );
26
  $this->method_title = __( 'GrabPay', 'woo-stripe-payment' );
27
  $this->method_description = __( 'GrabPay gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
28
  $this->icon = stripe_wc()->assets_url( 'img/grabpay.svg' );
29
- $this->order_button_text = $this->get_order_button_text( __( 'GrabPay', 'woo-stripe-payment' ) );
30
  parent::__construct();
31
  }
32
  }
19
 
20
  public function __construct() {
21
  $this->local_payment_type = 'grabpay';
22
+ $this->currencies = array( 'SGD', 'MYR' );
23
  $this->countries = array();
24
  $this->id = 'stripe_grabpay';
25
  $this->tab_title = __( 'GrabPay', 'woo-stripe-payment' );
26
  $this->method_title = __( 'GrabPay', 'woo-stripe-payment' );
27
  $this->method_description = __( 'GrabPay gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
28
  $this->icon = stripe_wc()->assets_url( 'img/grabpay.svg' );
 
29
  parent::__construct();
30
  }
31
  }
includes/gateways/class-wc-payment-gateway-stripe-ideal.php CHANGED
@@ -26,7 +26,6 @@ class WC_Payment_Gateway_Stripe_Ideal extends WC_Payment_Gateway_Stripe_Local_Pa
26
  $this->method_title = __( 'iDEAL', 'woo-stripe-payment' );
27
  $this->method_description = __( 'Ideal gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
28
  $this->icon = stripe_wc()->assets_url( 'img/ideal.svg' );
29
- $this->order_button_text = $this->get_order_button_text( __( 'iDEAL', 'woo-stripe-payment' ) );
30
  parent::__construct();
31
  }
32
  }
26
  $this->method_title = __( 'iDEAL', 'woo-stripe-payment' );
27
  $this->method_description = __( 'Ideal gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
28
  $this->icon = stripe_wc()->assets_url( 'img/ideal.svg' );
 
29
  parent::__construct();
30
  }
31
  }
includes/gateways/class-wc-payment-gateway-stripe-klarna.php CHANGED
@@ -25,7 +25,6 @@ class WC_Payment_Gateway_Stripe_Klarna extends WC_Payment_Gateway_Stripe_Local_P
25
  $this->method_title = __( 'Klarna', 'woo-stripe-payment' );
26
  $this->method_description = __( 'Klarna gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
27
  $this->icon = stripe_wc()->assets_url( 'img/klarna.svg' );
28
- $this->order_button_text = $this->get_order_button_text( __( 'Klarna', 'woo-stripe-payment' ) );
29
  parent::__construct();
30
  $this->template_name = 'klarna.php';
31
  }
25
  $this->method_title = __( 'Klarna', 'woo-stripe-payment' );
26
  $this->method_description = __( 'Klarna gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
27
  $this->icon = stripe_wc()->assets_url( 'img/klarna.svg' );
 
28
  parent::__construct();
29
  $this->template_name = 'klarna.php';
30
  }
includes/gateways/class-wc-payment-gateway-stripe-multibanco.php CHANGED
@@ -26,7 +26,6 @@ class WC_Payment_Gateway_Stripe_Multibanco extends WC_Payment_Gateway_Stripe_Loc
26
  $this->method_title = __( 'Multibanco', 'woo-stripe-payment' );
27
  $this->method_description = __( 'Multibanco gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
28
  $this->icon = stripe_wc()->assets_url( 'img/multibanco.svg' );
29
- $this->order_button_text = $this->get_order_button_text( __( 'Multibanco', 'woo-stripe-payment' ) );
30
  parent::__construct();
31
  }
32
  }
26
  $this->method_title = __( 'Multibanco', 'woo-stripe-payment' );
27
  $this->method_description = __( 'Multibanco gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
28
  $this->icon = stripe_wc()->assets_url( 'img/multibanco.svg' );
 
29
  parent::__construct();
30
  }
31
  }
includes/gateways/class-wc-payment-gateway-stripe-p24.php CHANGED
@@ -26,7 +26,6 @@ class WC_Payment_Gateway_Stripe_P24 extends WC_Payment_Gateway_Stripe_Local_Paym
26
  $this->method_title = __( 'Przelewy24', 'woo-stripe-payment' );
27
  $this->method_description = __( 'P24 gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
28
  $this->icon = stripe_wc()->assets_url( 'img/p24.svg' );
29
- $this->order_button_text = $this->get_order_button_text( __( 'P24', 'woo-stripe-payment' ) );
30
  parent::__construct();
31
  }
32
  }
26
  $this->method_title = __( 'Przelewy24', 'woo-stripe-payment' );
27
  $this->method_description = __( 'P24 gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
28
  $this->icon = stripe_wc()->assets_url( 'img/p24.svg' );
 
29
  parent::__construct();
30
  }
31
  }
includes/gateways/class-wc-payment-gateway-stripe-sepa.php CHANGED
@@ -22,10 +22,9 @@ class WC_Payment_Gateway_Stripe_Sepa extends WC_Payment_Gateway_Stripe_Local_Pay
22
  $this->id = 'stripe_sepa';
23
  $this->tab_title = __( 'SEPA', 'woo-stripe-payment' );
24
  $this->template_name = 'local-payment.php';
25
- $this->method_title = __( 'Sepa', 'woo-stripe-payment' );
26
- $this->method_description = __( 'Sepa gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
27
  $this->icon = stripe_wc()->assets_url( 'img/sepa.svg' );
28
- $this->order_button_text = $this->get_order_button_text( __( 'SEPA', 'woo-stripe-payment' ) );
29
  parent::__construct();
30
  $this->token_type = 'Stripe_Sepa';
31
 
22
  $this->id = 'stripe_sepa';
23
  $this->tab_title = __( 'SEPA', 'woo-stripe-payment' );
24
  $this->template_name = 'local-payment.php';
25
+ $this->method_title = __( 'SEPA', 'woo-stripe-payment' );
26
+ $this->method_description = __( 'SEPA gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
27
  $this->icon = stripe_wc()->assets_url( 'img/sepa.svg' );
 
28
  parent::__construct();
29
  $this->token_type = 'Stripe_Sepa';
30
 
includes/gateways/class-wc-payment-gateway-stripe-sofort.php CHANGED
@@ -27,7 +27,6 @@ class WC_Payment_Gateway_Stripe_Sofort extends WC_Payment_Gateway_Stripe_Local_P
27
  $this->method_title = __( 'Sofort', 'woo-stripe-payment' );
28
  $this->method_description = __( 'Sofort gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
29
  $this->icon = stripe_wc()->assets_url( 'img/sofort.svg' );
30
- $this->order_button_text = $this->get_order_button_text( __( 'SOFORT', 'woo-stripe-payment' ) );
31
  parent::__construct();
32
  }
33
 
27
  $this->method_title = __( 'Sofort', 'woo-stripe-payment' );
28
  $this->method_description = __( 'Sofort gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
29
  $this->icon = stripe_wc()->assets_url( 'img/sofort.svg' );
 
30
  parent::__construct();
31
  }
32
 
includes/gateways/class-wc-payment-gateway-stripe-wechat.php CHANGED
@@ -18,8 +18,6 @@ class WC_Payment_Gateway_Stripe_WeChat extends WC_Payment_Gateway_Stripe_Local_P
18
  public function __construct() {
19
  $this->local_payment_type = 'wechat';
20
  $this->currencies = array( 'AUD', 'CAD', 'EUR', 'GBP', 'HKD', 'JPY', 'SGD', 'USD' );
21
- // $this->countries = [ 'CN'
22
- // ];
23
  $this->id = 'stripe_wechat';
24
  $this->tab_title = __( 'WeChat', 'woo-stripe-payment' );
25
  $this->template_name = 'local-payment.php';
@@ -27,7 +25,6 @@ class WC_Payment_Gateway_Stripe_WeChat extends WC_Payment_Gateway_Stripe_Local_P
27
  $this->method_title = __( 'WeChat', 'woo-stripe-payment' );
28
  $this->method_description = __( 'WeChat gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
29
  $this->icon = stripe_wc()->assets_url( 'img/wechat.svg' );
30
- $this->order_button_text = $this->get_order_button_text( __( 'WeChat', 'woo-stripe-payment' ) );
31
  parent::__construct();
32
  }
33
 
@@ -68,6 +65,7 @@ class WC_Payment_Gateway_Stripe_WeChat extends WC_Payment_Gateway_Stripe_Local_P
68
  $data = parent::get_localized_params();
69
  $data['qr_script'] = sprintf( stripe_wc()->scripts()->assets_url( 'js/frontend/qrcode.js?ver=%s' ), stripe_wc()->version );
70
  $data['qr_message'] = __( 'Scan the QR code using your WeChat app. Once scanned click the Place Order button.', 'woo-stripe-payment' );
 
71
  return $data;
72
  }
73
  }
18
  public function __construct() {
19
  $this->local_payment_type = 'wechat';
20
  $this->currencies = array( 'AUD', 'CAD', 'EUR', 'GBP', 'HKD', 'JPY', 'SGD', 'USD' );
 
 
21
  $this->id = 'stripe_wechat';
22
  $this->tab_title = __( 'WeChat', 'woo-stripe-payment' );
23
  $this->template_name = 'local-payment.php';
25
  $this->method_title = __( 'WeChat', 'woo-stripe-payment' );
26
  $this->method_description = __( 'WeChat gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
27
  $this->icon = stripe_wc()->assets_url( 'img/wechat.svg' );
 
28
  parent::__construct();
29
  }
30
 
65
  $data = parent::get_localized_params();
66
  $data['qr_script'] = sprintf( stripe_wc()->scripts()->assets_url( 'js/frontend/qrcode.js?ver=%s' ), stripe_wc()->version );
67
  $data['qr_message'] = __( 'Scan the QR code using your WeChat app. Once scanned click the Place Order button.', 'woo-stripe-payment' );
68
+
69
  return $data;
70
  }
71
  }
includes/gateways/settings/ach-settings.php CHANGED
@@ -79,6 +79,13 @@ return array(
79
  'description' => __( 'Leave blank if you don\'t want a description to show for the gateway.', 'woo-stripe-payment' ),
80
  'desc_tip' => true,
81
  ),
 
 
 
 
 
 
 
82
  'client_name' => array(
83
  'type' => 'text',
84
  'title' => __( 'Client Name', 'woo-stripe-payment' ),
79
  'description' => __( 'Leave blank if you don\'t want a description to show for the gateway.', 'woo-stripe-payment' ),
80
  'desc_tip' => true,
81
  ),
82
+ 'order_button_text' => array(
83
+ 'title' => __( 'Order Button Text', 'woo-stripe-payment' ),
84
+ 'type' => 'text',
85
+ 'default' => __( 'Bank Payment', 'woo-stripe-payment' ),
86
+ 'description' => __( 'The text on the Place Order button that displays when the gateway is selected on the checkout page.', 'woo-stripe-payment' ),
87
+ 'desc_tip' => true
88
+ ),
89
  'client_name' => array(
90
  'type' => 'text',
91
  'title' => __( 'Client Name', 'woo-stripe-payment' ),
includes/gateways/settings/googlepay-settings.php CHANGED
@@ -4,6 +4,7 @@ return array(
4
  'type' => 'description',
5
  'description' => '<p><a target="_blank" href="https://pay.google.com/business/console">' . __( 'GPay Business Console', 'woo-stripe-payment' ) .
6
  '</a></p>' .
 
7
  __( 'When test mode is enabled, Google Pay will work without a merchant ID, allowing you to capture the necessary screenshots the Google API team needs to approve your integration request.', 'woo-stripe-payment' ),
8
  ),
9
  'desc2' => array(
4
  'type' => 'description',
5
  'description' => '<p><a target="_blank" href="https://pay.google.com/business/console">' . __( 'GPay Business Console', 'woo-stripe-payment' ) .
6
  '</a></p>' .
7
+ '<p><a target="_blank" href="https://docs.paymentplugins.com/wc-stripe/config/#/stripe_googlepay?id=testing">Testing GPay</a></p>' .
8
  __( 'When test mode is enabled, Google Pay will work without a merchant ID, allowing you to capture the necessary screenshots the Google API team needs to approve your integration request.', 'woo-stripe-payment' ),
9
  ),
10
  'desc2' => array(
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: mr.clayton
3
  Tags: stripe, ach, klarna, credit card, apple pay, google pay, ideal, sepa, sofort
4
  Requires at least: 3.0.1
5
- Tested up to: 5.5
6
  Requires PHP: 5.6
7
- Stable tag: 3.2.8
8
  Copyright: Payment Plugins
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -58,6 +58,14 @@ If you're site is not loading over https, then Stripe won't render the Payment R
58
  8. Edit payment gateways on the product page
59
 
60
  == Changelog ==
 
 
 
 
 
 
 
 
61
  = 3.2.8 =
62
  * Updated - Changed function wc_stripe to stripe_wc because WooCommerce Stripe Payment Gateway introduced a function with same name in version 4.5.4 which caused a fatal error.
63
  * Updated - Apple Pay and GPay - if billing address already populated, don't request it in wallet.
2
  Contributors: mr.clayton
3
  Tags: stripe, ach, klarna, credit card, apple pay, google pay, ideal, sepa, sofort
4
  Requires at least: 3.0.1
5
+ Tested up to: 5.6
6
  Requires PHP: 5.6
7
+ Stable tag: 3.2.9
8
  Copyright: Payment Plugins
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
58
  8. Edit payment gateways on the product page
59
 
60
  == Changelog ==
61
+ = 3.2.9 =
62
+ * Updated - WP tested to 5.6
63
+ * Updated - Tested with PHP 8
64
+ * Added - GrabPay gateway
65
+ * Added - Promise polyfill for older browsers
66
+ * Added - GPay added SCA required fields (https://developers.google.com/pay/api/web/guides/resources/sca)
67
+ * Added - Order button text option for local payment methods
68
+ * Added - new filter wc_stripe_force_save_payment_method
69
  = 3.2.8 =
70
  * Updated - Changed function wc_stripe to stripe_wc because WooCommerce Stripe Payment Gateway introduced a function with same name in version 4.5.4 which caused a fatal error.
71
  * Updated - Apple Pay and GPay - if billing address already populated, don't request it in wallet.
stripe-payments.php CHANGED
@@ -3,13 +3,13 @@
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.2.8
7
  * Author: Payment Plugins, support@paymentplugins.com
8
  * Text Domain: woo-stripe-payment
9
  * Domain Path: /i18n/languages/
10
- * Tested up to: 5.5
11
  * WC requires at least: 3.0.0
12
- * WC tested up to: 4.7.0
13
  */
14
  defined( 'ABSPATH' ) || exit ();
15
 
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.2.9
7
  * Author: Payment Plugins, support@paymentplugins.com
8
  * Text Domain: woo-stripe-payment
9
  * Domain Path: /i18n/languages/
10
+ * Tested up to: 5.6
11
  * WC requires at least: 3.0.0
12
+ * WC tested up to: 4.8.0
13
  */
14
  defined( 'ABSPATH' ) || exit ();
15