Version Description
- Added - billing_details property to local payment methods
- Added - Improved support for multisite. Replaced use of get_user_meta with get_user_option
- Added - Filter wc_stripe_get_customer_id
- Added - Filter wc_stripe_save_customer
- Added - Stripe token object added to filter wc_stripe_get_token_formats
- Added - Payment method formats (Credit Card, Apple Pay, Google Pay)
- Added - Added address property to customer create and update API call
- Added - New GPay rounded corners icon
- Added - Additional credit card form error messages for translation.
- Added - Guest checkout for Pre-Order products where payment method must be saved.
- Updated - Removed stripe customer Id from metadata since it's redundant. Customer ID is already associated with charge object
- Updated - Admin Pay for order - display message if order is not created or doesn't have pending payment status
Download this release
Release Info
Developer | mr.clayton |
Plugin | Payment Plugins for Stripe WooCommerce |
Version | 3.2.12 |
Comparing to | |
See all releases |
Code changes from version 3.2.11 to 3.2.12
- assets/css/stripe-rtl.css +6 -0
- assets/css/stripe.css +6 -0
- assets/css/stripe.min-rtl.css +1 -1
- assets/css/stripe.min.css +1 -1
- assets/img/bancontact.svg +80 -1
- assets/img/googlepay_round_outline.svg +33 -0
- assets/js/admin/admin-settings.js +4 -0
- assets/js/admin/meta-boxes-order.js +28 -21
- assets/js/frontend/ach-payments.min.js +1 -0
- assets/js/frontend/applepay-cart.min.js +1 -0
- assets/js/frontend/applepay-checkout.min.js +1 -0
- assets/js/frontend/applepay-product.min.js +1 -0
- assets/js/frontend/cc-forms.min.js +1 -0
- assets/js/frontend/credit-card.js +1 -1
- assets/js/frontend/credit-card.min.js +1 -0
- assets/js/frontend/form-handler.js +44 -15
- assets/js/frontend/form-handler.min.js +1 -0
- assets/js/frontend/googlepay-cart.min.js +1 -0
- assets/js/frontend/googlepay-checkout.min.js +1 -0
- assets/js/frontend/googlepay-product.min.js +1 -0
- assets/js/frontend/local-payment.js +3 -13
- assets/js/frontend/local-payment.min.js +1 -1
- assets/js/frontend/mini-cart.min.js +1 -0
- assets/js/frontend/notices.min.js +1 -0
- assets/js/frontend/payment-request.min.js +1 -0
- assets/js/frontend/{promise-polyfill.js → promise-polyfill.min.js} +0 -0
- assets/js/frontend/qrcode.min.js +1 -0
- assets/js/frontend/wc-stripe.js +8 -6
- assets/js/frontend/wc-stripe.min.js +1 -1
- i18n/languages/woo-stripe-payment.pot +148 -123
- includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php +5 -5
- includes/abstract/abstract-wc-payment-gateway-stripe.php +33 -25
- includes/abstract/abstract-wc-payment-token-stripe.php +9 -0
- includes/abstract/abstract-wc-stripe-payment.php +7 -8
- includes/admin/meta-boxes/class-wc-stripe-admin-order-metaboxes.php +3 -0
- includes/class-stripe.php +1 -1
- includes/class-wc-stripe-customer-manager.php +230 -195
- includes/class-wc-stripe-field-manager.php +4 -4
- includes/class-wc-stripe-frontend-scripts.php +6 -3
- includes/class-wc-stripe-redirect-handler.php +2 -2
- includes/controllers/class-wc-stripe-controller-checkout.php +5 -6
- includes/gateways/settings/googlepay-settings.php +4 -3
- includes/tokens/class-wc-payment-token-stripe-ach.php +94 -85
- includes/tokens/class-wc-payment-token-stripe-applepay.php +21 -17
- includes/tokens/class-wc-payment-token-stripe-cc.php +135 -126
- includes/tokens/class-wc-payment-token-stripe-googlepay.php +4 -0
- includes/tokens/class-wc-payment-token-stripe-sepa.php +1 -1
- includes/traits/wc-stripe-payment-traits.php +3 -8
- includes/wc-stripe-functions.php +12 -2
- readme.txt +14 -1
- stripe-payments.php +1 -1
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +3 -3
assets/css/stripe-rtl.css
CHANGED
@@ -373,6 +373,11 @@ li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_standa
|
|
373 |
max-height: 35px;
|
374 |
}
|
375 |
|
|
|
|
|
|
|
|
|
|
|
376 |
li.payment_method_stripe_ach label:first-of-type img {
|
377 |
width: 32px;
|
378 |
height: 32px;
|
@@ -647,6 +652,7 @@ li[class*="payment_method_stripe"] .select2-container--default .select2-selectio
|
|
647 |
height: 42px;
|
648 |
top: 1px;
|
649 |
left: 1px;
|
|
|
650 |
}
|
651 |
|
652 |
.blockUI.blockMsg {
|
373 |
max-height: 35px;
|
374 |
}
|
375 |
|
376 |
+
li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_round_outline]{
|
377 |
+
width: 56px;
|
378 |
+
max-height: 30px;
|
379 |
+
}
|
380 |
+
|
381 |
li.payment_method_stripe_ach label:first-of-type img {
|
382 |
width: 32px;
|
383 |
height: 32px;
|
652 |
height: 42px;
|
653 |
top: 1px;
|
654 |
left: 1px;
|
655 |
+
transform: translateY(0);
|
656 |
}
|
657 |
|
658 |
.blockUI.blockMsg {
|
assets/css/stripe.css
CHANGED
@@ -373,6 +373,11 @@ li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_standa
|
|
373 |
max-height: 35px;
|
374 |
}
|
375 |
|
|
|
|
|
|
|
|
|
|
|
376 |
li.payment_method_stripe_ach label:first-of-type img {
|
377 |
width: 32px;
|
378 |
height: 32px;
|
@@ -647,6 +652,7 @@ li[class*="payment_method_stripe"] .select2-container--default .select2-selectio
|
|
647 |
height: 42px;
|
648 |
top: 1px;
|
649 |
right: 1px;
|
|
|
650 |
}
|
651 |
|
652 |
.blockUI.blockMsg {
|
373 |
max-height: 35px;
|
374 |
}
|
375 |
|
376 |
+
li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_round_outline]{
|
377 |
+
width: 56px;
|
378 |
+
max-height: 30px;
|
379 |
+
}
|
380 |
+
|
381 |
li.payment_method_stripe_ach label:first-of-type img {
|
382 |
width: 32px;
|
383 |
height: 32px;
|
652 |
height: 42px;
|
653 |
top: 1px;
|
654 |
right: 1px;
|
655 |
+
transform: translateY(0);
|
656 |
}
|
657 |
|
658 |
.blockUI.blockMsg {
|
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-new-method-container .wc-stripe-save-source{display:flex;align-items:center;justify-content:flex-start}.wc-stripe_cc-container .wc-stripe-save-source .save-source-label{display:block;padding:0;margin:0 5px 0 0}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]{opacity:0;position:absolute;width:20px;height:20px}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{position:relative}.wc-stripe_cc-container .save-source-checkbox{height:20px;width:20px;position:relative;background-color:#fff;display:block;border-radius:3px;border:1px solid #bababa}.wc-stripe_cc-container .save-source-checkbox:after{content:"";position:absolute;top:0;right:0}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]:checked+.save-source-checkbox:after{right:6px;top:2px;width:7px;height:12px;border:solid #2196f3;border-width:0 0 3px 3px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}li.payment_method_stripe_applepay,li.payment_method_stripe_googlepay,li.payment_method_stripe_payment_request{display:none}#payment #place_order.wc-stripe-hide,#place_order.wc-stripe-hide,.woocommerce-checkout-review-order #payment #place_order.wc-stripe-hide{position:absolute!important;z-index:-1000!important;height:0!important;padding:0!important;opacity:0!important}.wc-stripe-product-checkout-container{display:none;width:100%}.wc-stripe-product-checkout-container.bottom{margin-top:1em}.wc-stripe-product-checkout-container.top{margin-bottom:1em}.wc-stripe-product-checkout-container.active{display:block}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods,.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods{list-style:none;margin:0;padding:0}.wc-stripe-cart-checkout-container{margin:0;padding:0;clear:both}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods{margin-bottom:1.5em}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_],.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]{margin:0 0 1em 0}.wc_stripe_cart_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}div[id*=wc_stripe_local_payment_stripe_].StripeElement{border:1px solid #eee;border-radius:4px}.qrcode-message{margin:10px 0 0 0}#wc_stripe_local_payment_stripe_becs,#wc_stripe_local_payment_stripe_sepa{padding:10px 12px;box-shadow:0 1px 3px 0 #e6ebf1}.wc-stripe-local-desc.stripe_becs,.wc-stripe-local-desc.stripe_sepa{margin:10px 0}.wc-stripe-clear{clear:both;height:0;visibility:hidden}.wc-stripe-gateway-desc p{margin:0}#wc_stripe_local_payment_stripe_klarna,li[class*=payment_method_stripe_] div.wc-stripe-gateway-container.has_tokens{margin-top:10px}.wc-stripe-gateway-desc{margin-top:10px}#wc-stripe-card-element.StripeElement--webkit-autofill{background-color:transparent!important}#wc_stripe_local_payment_stripe_klarna .stripe-klarna-categories{list-style:none;margin:0;padding:10px}li.payment_method_stripe_alipay,li.payment_method_stripe_bancontact,li.payment_method_stripe_becs,li.payment_method_stripe_eps,li.payment_method_stripe_fpx,li.payment_method_stripe_giropay,li.payment_method_stripe_ideal,li.payment_method_stripe_klarna,li.payment_method_stripe_multibanco,li.payment_method_stripe_p24,li.payment_method_stripe_sepa,li.payment_method_stripe_sofort,li.payment_method_stripe_wechat{display:none}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods{list-style:none;margin:0;padding:0}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods li{margin:0}.widget_shopping_cart_content a.wc-stripe-applepay-mini-cart,.widget_shopping_cart_content a.wc-stripe-gpay-mini-cart,.widget_shopping_cart_content a.wc-stripe-payment-request-mini-cart{background:0 0;padding:0;border:none}a.wc-stripe-gpay-mini-cart .gpay-button,a.wc-stripe-gpay-mini-cart .gpay-card-info-container a.wc-stripe-applepay-mini-cart .apple-pay-button{width:100%;margin:0}.wc-stripe-payment-request-mini-cart.StripeElement{padding:0;background:0 0;border:none;width:100%}.wc-stripe-payment-request-mini-cart.StripeElement .__PrivateStripeElement{width:100%}.widget_shopping_cart_content .wc-stripe-overlay{display:none!important;position:absolute;background:rgba(255,255,255,.75);height:100%;width:100%;z-index:-1}.widget_shopping_cart_content .wc-stripe-overlay.active{display:block!important;z-index:9999}.wc-stripe-klarna-loader{display:flex;justify-content:center;position:relative;width:100%;height:30px;box-sizing:border-box;transform:scale(.65)}.wc-stripe-klarna-loader div{box-sizing:border-box;display:block;position:absolute;box-sizing:border-box;width:30px;height:30px;border:3px solid #000;border-radius:50%;animation:klarna-payments-loader 1.3s cubic-bezier(.5,0,.5,1) infinite;border-color:#000 transparent transparent transparent}.wc-stripe-klarna-loader div:nth-child(1){animation-delay:-.45s}.wc-stripe-klarna-loader div:nth-child(2){animation-delay:-.3s}.wc-stripe-klarna-loader div:nth-child(3){animation-delay:-.15s}@keyframes klarna-payments-loader{0%{transform:rotate(0)}100%{transform:rotate(-360deg)}}li.payment_method_stripe_alipay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_applepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_bancontact.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_eps.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_giropay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_googlepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_grabpay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_multibanco.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_p24.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_payment_request.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_sofort.wc-stripe-no-desc .payment_box.wc-stripe-no-methods{padding:0;margin:0}
|
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-new-method-container .wc-stripe-save-source{display:flex;align-items:center;justify-content:flex-start}.wc-stripe_cc-container .wc-stripe-save-source .save-source-label{display:block;padding:0;margin:0 5px 0 0}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]{opacity:0;position:absolute;width:20px;height:20px}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{position:relative}.wc-stripe_cc-container .save-source-checkbox{height:20px;width:20px;position:relative;background-color:#fff;display:block;border-radius:3px;border:1px solid #bababa}.wc-stripe_cc-container .save-source-checkbox:after{content:"";position:absolute;top:0;right:0}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]:checked+.save-source-checkbox:after{right:6px;top:2px;width:7px;height:12px;border:solid #2196f3;border-width:0 0 3px 3px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}li.payment_method_stripe_applepay,li.payment_method_stripe_googlepay,li.payment_method_stripe_payment_request{display:none}#payment #place_order.wc-stripe-hide,#place_order.wc-stripe-hide,.woocommerce-checkout-review-order #payment #place_order.wc-stripe-hide{position:absolute!important;z-index:-1000!important;height:0!important;padding:0!important;opacity:0!important}.wc-stripe-product-checkout-container{display:none;width:100%}.wc-stripe-product-checkout-container.bottom{margin-top:1em}.wc-stripe-product-checkout-container.top{margin-bottom:1em}.wc-stripe-product-checkout-container.active{display:block}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods,.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods{list-style:none;margin:0;padding:0}.wc-stripe-cart-checkout-container{margin:0;padding:0;clear:both}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods{margin-bottom:1.5em}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_],.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]{margin:0 0 1em 0}.wc_stripe_cart_payment_methods .gpay-button,.wc_stripe_cart_payment_methods .gpay-card-info-container,.wc_stripe_product_payment_methods .gpay-button,.wc_stripe_product_payment_methods .gpay-card-info-container{width:100%!important;margin:0}.wc_stripe_product_payment_methods .disabled{opacity:.45}.stripe_cart_gateway_active .checkout-button,.woocommerce-cart .stripe_cart_gateway_active .wc-proceed-to-checkout .checkout-button{margin-bottom:0}.wc-stripe-cart-or{margin:1em 0;text-align:center}li.wc-stripe-payment-method.or{display:none}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or{display:block;margin:15px 0}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or p{margin:0}li[class*=payment_method_stripe_].active~li.wc-stripe-payment-method.or{display:block;margin:0}li.payment_method_stripe_applepay label:first-of-type img{width:49px;max-height:32px}li.payment_method_stripe_googlepay label:first-of-type img{width:48px;max-height:35px}li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_standard]{width:60px;max-height:35px}li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_round_outline]{width:56px;max-height:30px}li.payment_method_stripe_ach label:first-of-type img{width:32px;height:32px;min-width:32px;min-height:32px}.gpay-button:hover{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:active{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:focus{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}@supports (-webkit-appearance:-apple-pay-button){.apple-pay-button{display:block;-webkit-appearance:-apple-pay-button;width:100%;max-width:100%;min-width:200px;height:40px;max-height:40px}.apple-pay-button-black{-apple-pay-button-style:#000}.apple-pay-button-white{-apple-pay-button-style:#fff}.apple-pay-button-white-with-line{-apple-pay-button-style:white-outline}.applepay-top-container .apple-pay-button{max-width:240px}.woocommerce-checkout-payment .apple-pay-button{max-width:240px}body.single-product div.product form.cart .wc_stripe_product_payment_methods .apple-pay-button{max-width:100%}}.wc-stripe-banner-checkout{display:none;padding:20px 15px 0 15px;border:1px solid #d1d1d1;border-width:0 0 1px;position:relative;margin:1em 0}.wc-stripe-banner-checkout.active{display:block}.wc-stripe-banner-checkout span.banner-title{position:absolute;display:flex;align-items:center;top:-13px;left:0;right:0;background:0 0;white-space:nowrap;font-size:16px}.wc-stripe-banner-checkout span.banner-title:after,.wc-stripe-banner-checkout span.banner-title:before{content:' ';height:1px;background:#d1d1d1;display:block;width:50%}.wc-stripe-banner-checkout span.banner-title:before{margin-left:8px}.wc-stripe-banner-checkout span.banner-title:after{margin-right:8px}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways{list-style:none;margin:0;padding:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway{margin:0 0 20px 0;display:none}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-card-info-container{margin:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-card-info-container{width:100%}.wc_stripe_cart_payment_methods .payment_method_stripe_payment_request .StripeElement,.wc_stripe_product_payment_methods .payment_method_stripe_payment_request .StripeElement{padding:0;width:100%}.woocommerce-checkout #wc-stripe-payment-request-container.StripeElement{width:240px;padding:0}.wc-stripe-checkout-banner-gateway #wc-stripe-payment-request-banner.StripeElement{width:100%}ul.payment_methods li.payment_method_stripe_p24 img{max-width:90px;width:90px;max-height:45px}ul.payment_methods li.payment_method_stripe_ideal img{max-width:38px;width:38px;max-height:35px}ul.payment_methods li.payment_method_stripe_fpx img{max-width:75px;width:75px;max-height:25px}ul.payment_methods li.payment_method_stripe_klarna img{max-width:72px;width:72px;max-height:20px}ul.payment_methods li.payment_method_stripe_giropay img{max-width:65px;width:65px;max-height:28px}ul.payment_methods li.payment_method_stripe_eps img{max-width:70px;width:70px;max-height:46px}ul.payment_methods li.payment_method_stripe_multibanco img{max-width:48px;width:48px;max-height:48px}ul.payment_methods li.payment_method_stripe_sepa img{max-width:67px;width:67px;max-height:18px}ul.payment_methods li.payment_method_stripe_sofort img{max-width:70px;width:70px;max-height:21px}label[for=payment_method_stripe_bancontact] img,ul.payment_methods li.payment_method_stripe_bancontact img{width:60px;height:42px;max-width:60px;max-height:42px}ul.payment_methods li.payment_method_stripe_wechat label img{max-width:82px;width:82px;max-height:23px}ul.payment_methods li.payment_method_stripe_alipay img{max-width:72px;width:72px;height:36px;max-height:36px}ul.payment_methods li.payment_method_stripe_grabpay img{max-width:95px;width:95px;max-height:28px}#wc-stripe-card-element{width:100%}li.banner_payment_method_stripe_payment_request .StripeElement{padding:0}.single-product .blockMsg{border:none!important;background-color:transparent!important}#wc-stripe-card{position:absolute!important;top:50%;left:8px;transform:translatey(-50%);width:23px;height:15px;padding:0;border:none}#wc-stripe-card.active{width:32px;height:20px}input[id=stripe-postal-code]:focus{outline:0;background:0 0;border:none;box-shadow:none}div.postalCode:focus{outline:0;border:none}li[class*=payment_method_stripe] .select2-container .select2-selection--single{height:42px;padding:0 5px}li[class*=payment_method_stripe] .select2-container--default .select2-selection--single .select2-selection__arrow{height:42px;top:1px;left:1px;transform:translateY(0)}.blockUI.blockMsg{font-size:20px;white-space:nowrap}#wc-stripe-payment-request-container.disabled{opacity:.45}.wc-stripe-paymentRequest-icons-container img{float:none}.select2-container .select2-selection--single .wc-stripe-select2-container.wc-stripe-ach:before{display:none}ul.wc_stripe_cart_payment_methods li.wc-stripe-payment-method button,ul.wc_stripe_checkout_banner_gateways li button,ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_] button{margin:0}ul.payment_methods li[class*=payment_method]{margin:0;padding:10px 0}ul.payment_methods li[class*=payment_method] input[name=payment_method]{margin:0 5px 0 10px;float:none}ul.payment_methods li[class*=payment_method]>input[name=payment_method]+label{padding-top:0;padding-left:0;padding-bottom:0}ul.payment_methods{list-style:none}ul.payment_methods li[class*=payment_method_stripe_] .wc-stripe_cc-new-method-container label:before{display:none}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{padding:0!important;margin:0}div[id*=wc_stripe_local_payment_stripe_].StripeElement{border:1px solid #eee;border-radius:4px}.qrcode-message{margin:10px 0 0 0}#wc_stripe_local_payment_stripe_becs,#wc_stripe_local_payment_stripe_sepa{padding:10px 12px;box-shadow:0 1px 3px 0 #e6ebf1}.wc-stripe-local-desc.stripe_becs,.wc-stripe-local-desc.stripe_sepa{margin:10px 0}.wc-stripe-clear{clear:both;height:0;visibility:hidden}.wc-stripe-gateway-desc p{margin:0}#wc_stripe_local_payment_stripe_klarna,li[class*=payment_method_stripe_] div.wc-stripe-gateway-container.has_tokens{margin-top:10px}.wc-stripe-gateway-desc{margin-top:10px}#wc-stripe-card-element.StripeElement--webkit-autofill{background-color:transparent!important}#wc_stripe_local_payment_stripe_klarna .stripe-klarna-categories{list-style:none;margin:0;padding:10px}li.payment_method_stripe_alipay,li.payment_method_stripe_bancontact,li.payment_method_stripe_becs,li.payment_method_stripe_eps,li.payment_method_stripe_fpx,li.payment_method_stripe_giropay,li.payment_method_stripe_ideal,li.payment_method_stripe_klarna,li.payment_method_stripe_multibanco,li.payment_method_stripe_p24,li.payment_method_stripe_sepa,li.payment_method_stripe_sofort,li.payment_method_stripe_wechat{display:none}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods{list-style:none;margin:0;padding:0}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods li{margin:0}.widget_shopping_cart_content a.wc-stripe-applepay-mini-cart,.widget_shopping_cart_content a.wc-stripe-gpay-mini-cart,.widget_shopping_cart_content a.wc-stripe-payment-request-mini-cart{background:0 0;padding:0;border:none}a.wc-stripe-gpay-mini-cart .gpay-button,a.wc-stripe-gpay-mini-cart .gpay-card-info-container a.wc-stripe-applepay-mini-cart .apple-pay-button{width:100%;margin:0}.wc-stripe-payment-request-mini-cart.StripeElement{padding:0;background:0 0;border:none;width:100%}.wc-stripe-payment-request-mini-cart.StripeElement .__PrivateStripeElement{width:100%}.widget_shopping_cart_content .wc-stripe-overlay{display:none!important;position:absolute;background:rgba(255,255,255,.75);height:100%;width:100%;z-index:-1}.widget_shopping_cart_content .wc-stripe-overlay.active{display:block!important;z-index:9999}.wc-stripe-klarna-loader{display:flex;justify-content:center;position:relative;width:100%;height:30px;box-sizing:border-box;transform:scale(.65)}.wc-stripe-klarna-loader div{box-sizing:border-box;display:block;position:absolute;box-sizing:border-box;width:30px;height:30px;border:3px solid #000;border-radius:50%;animation:klarna-payments-loader 1.3s cubic-bezier(.5,0,.5,1) infinite;border-color:#000 transparent transparent transparent}.wc-stripe-klarna-loader div:nth-child(1){animation-delay:-.45s}.wc-stripe-klarna-loader div:nth-child(2){animation-delay:-.3s}.wc-stripe-klarna-loader div:nth-child(3){animation-delay:-.15s}@keyframes klarna-payments-loader{0%{transform:rotate(0)}100%{transform:rotate(-360deg)}}li.payment_method_stripe_alipay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_applepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_bancontact.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_eps.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_giropay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_googlepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_grabpay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_multibanco.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_p24.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_payment_request.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_sofort.wc-stripe-no-desc .payment_box.wc-stripe-no-methods{padding:0;margin:0}
|
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-new-method-container .wc-stripe-save-source{display:flex;align-items:center;justify-content:flex-start}.wc-stripe_cc-container .wc-stripe-save-source .save-source-label{display:block;padding:0;margin:0 0 0 5px}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]{opacity:0;position:absolute;width:20px;height:20px}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{position:relative}.wc-stripe_cc-container .save-source-checkbox{height:20px;width:20px;position:relative;background-color:#fff;display:block;border-radius:3px;border:1px solid #bababa}.wc-stripe_cc-container .save-source-checkbox:after{content:"";position:absolute;top:0;left:0}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]:checked+.save-source-checkbox:after{left:6px;top:2px;width:7px;height:12px;border:solid #2196f3;border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}li.payment_method_stripe_applepay,li.payment_method_stripe_googlepay,li.payment_method_stripe_payment_request{display:none}#payment #place_order.wc-stripe-hide,#place_order.wc-stripe-hide,.woocommerce-checkout-review-order #payment #place_order.wc-stripe-hide{position:absolute!important;z-index:-1000!important;height:0!important;padding:0!important;opacity:0!important}.wc-stripe-product-checkout-container{display:none;width:100%}.wc-stripe-product-checkout-container.bottom{margin-top:1em}.wc-stripe-product-checkout-container.top{margin-bottom:1em}.wc-stripe-product-checkout-container.active{display:block}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods,.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods{list-style:none;margin:0;padding:0}.wc-stripe-cart-checkout-container{margin:0;padding:0;clear:both}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods{margin-bottom:1.5em}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_],.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]{margin:0 0 1em 0}.wc_stripe_cart_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}div[id*=wc_stripe_local_payment_stripe_].StripeElement{border:1px solid #eee;border-radius:4px}.qrcode-message{margin:10px 0 0 0}#wc_stripe_local_payment_stripe_becs,#wc_stripe_local_payment_stripe_sepa{padding:10px 12px;box-shadow:0 1px 3px 0 #e6ebf1}.wc-stripe-local-desc.stripe_becs,.wc-stripe-local-desc.stripe_sepa{margin:10px 0}.wc-stripe-clear{clear:both;height:0;visibility:hidden}.wc-stripe-gateway-desc p{margin:0}#wc_stripe_local_payment_stripe_klarna,li[class*=payment_method_stripe_] div.wc-stripe-gateway-container.has_tokens{margin-top:10px}.wc-stripe-gateway-desc{margin-top:10px}#wc-stripe-card-element.StripeElement--webkit-autofill{background-color:transparent!important}#wc_stripe_local_payment_stripe_klarna .stripe-klarna-categories{list-style:none;margin:0;padding:10px}li.payment_method_stripe_alipay,li.payment_method_stripe_bancontact,li.payment_method_stripe_becs,li.payment_method_stripe_eps,li.payment_method_stripe_fpx,li.payment_method_stripe_giropay,li.payment_method_stripe_ideal,li.payment_method_stripe_klarna,li.payment_method_stripe_multibanco,li.payment_method_stripe_p24,li.payment_method_stripe_sepa,li.payment_method_stripe_sofort,li.payment_method_stripe_wechat{display:none}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods{list-style:none;margin:0;padding:0}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods li{margin:0}.widget_shopping_cart_content a.wc-stripe-applepay-mini-cart,.widget_shopping_cart_content a.wc-stripe-gpay-mini-cart,.widget_shopping_cart_content a.wc-stripe-payment-request-mini-cart{background:0 0;padding:0;border:none}a.wc-stripe-gpay-mini-cart .gpay-button,a.wc-stripe-gpay-mini-cart .gpay-card-info-container a.wc-stripe-applepay-mini-cart .apple-pay-button{width:100%;margin:0}.wc-stripe-payment-request-mini-cart.StripeElement{padding:0;background:0 0;border:none;width:100%}.wc-stripe-payment-request-mini-cart.StripeElement .__PrivateStripeElement{width:100%}.widget_shopping_cart_content .wc-stripe-overlay{display:none!important;position:absolute;background:rgba(255,255,255,.75);height:100%;width:100%;z-index:-1}.widget_shopping_cart_content .wc-stripe-overlay.active{display:block!important;z-index:9999}.wc-stripe-klarna-loader{display:flex;justify-content:center;position:relative;width:100%;height:30px;box-sizing:border-box;transform:scale(.65)}.wc-stripe-klarna-loader div{box-sizing:border-box;display:block;position:absolute;box-sizing:border-box;width:30px;height:30px;border:3px solid #000;border-radius:50%;animation:klarna-payments-loader 1.3s cubic-bezier(.5,0,.5,1) infinite;border-color:#000 transparent transparent transparent}.wc-stripe-klarna-loader div:nth-child(1){animation-delay:-.45s}.wc-stripe-klarna-loader div:nth-child(2){animation-delay:-.3s}.wc-stripe-klarna-loader div:nth-child(3){animation-delay:-.15s}@keyframes klarna-payments-loader{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}li.payment_method_stripe_alipay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_applepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_bancontact.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_eps.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_giropay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_googlepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_grabpay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_multibanco.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_p24.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_payment_request.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_sofort.wc-stripe-no-desc .payment_box.wc-stripe-no-methods{padding:0;margin:0}
|
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-new-method-container .wc-stripe-save-source{display:flex;align-items:center;justify-content:flex-start}.wc-stripe_cc-container .wc-stripe-save-source .save-source-label{display:block;padding:0;margin:0 0 0 5px}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]{opacity:0;position:absolute;width:20px;height:20px}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{position:relative}.wc-stripe_cc-container .save-source-checkbox{height:20px;width:20px;position:relative;background-color:#fff;display:block;border-radius:3px;border:1px solid #bababa}.wc-stripe_cc-container .save-source-checkbox:after{content:"";position:absolute;top:0;left:0}.wc-stripe_cc-container .wc-stripe-save-source input[type=checkbox]:checked+.save-source-checkbox:after{left:6px;top:2px;width:7px;height:12px;border:solid #2196f3;border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}li.payment_method_stripe_applepay,li.payment_method_stripe_googlepay,li.payment_method_stripe_payment_request{display:none}#payment #place_order.wc-stripe-hide,#place_order.wc-stripe-hide,.woocommerce-checkout-review-order #payment #place_order.wc-stripe-hide{position:absolute!important;z-index:-1000!important;height:0!important;padding:0!important;opacity:0!important}.wc-stripe-product-checkout-container{display:none;width:100%}.wc-stripe-product-checkout-container.bottom{margin-top:1em}.wc-stripe-product-checkout-container.top{margin-bottom:1em}.wc-stripe-product-checkout-container.active{display:block}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods,.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods{list-style:none;margin:0;padding:0}.wc-stripe-cart-checkout-container{margin:0;padding:0;clear:both}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods{margin-bottom:1.5em}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods li[class*=payment_method_stripe_],.wc-stripe-product-checkout-container ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_]{margin:0 0 1em 0}.wc_stripe_cart_payment_methods .gpay-button,.wc_stripe_cart_payment_methods .gpay-card-info-container,.wc_stripe_product_payment_methods .gpay-button,.wc_stripe_product_payment_methods .gpay-card-info-container{width:100%!important;margin:0}.wc_stripe_product_payment_methods .disabled{opacity:.45}.stripe_cart_gateway_active .checkout-button,.woocommerce-cart .stripe_cart_gateway_active .wc-proceed-to-checkout .checkout-button{margin-bottom:0}.wc-stripe-cart-or{margin:1em 0;text-align:center}li.wc-stripe-payment-method.or{display:none}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or{display:block;margin:15px 0}.wc-stripe-cart-checkout-container ul.wc_stripe_cart_payment_methods.active li.wc-stripe-payment-method.or p{margin:0}li[class*=payment_method_stripe_].active~li.wc-stripe-payment-method.or{display:block;margin:0}li.payment_method_stripe_applepay label:first-of-type img{width:49px;max-height:32px}li.payment_method_stripe_googlepay label:first-of-type img{width:48px;max-height:35px}li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_standard]{width:60px;max-height:35px}li.payment_method_stripe_googlepay label:first-of-type img[src*=googlepay_round_outline]{width:56px;max-height:30px}li.payment_method_stripe_ach label:first-of-type img{width:32px;height:32px;min-width:32px;min-height:32px}.gpay-button:hover{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:active{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}.gpay-button:focus{background-origin:content-box;background-position:center center;background-repeat:no-repeat;background-size:contain}@supports (-webkit-appearance:-apple-pay-button){.apple-pay-button{display:block;-webkit-appearance:-apple-pay-button;width:100%;max-width:100%;min-width:200px;height:40px;max-height:40px}.apple-pay-button-black{-apple-pay-button-style:#000}.apple-pay-button-white{-apple-pay-button-style:#fff}.apple-pay-button-white-with-line{-apple-pay-button-style:white-outline}.applepay-top-container .apple-pay-button{max-width:240px}.woocommerce-checkout-payment .apple-pay-button{max-width:240px}body.single-product div.product form.cart .wc_stripe_product_payment_methods .apple-pay-button{max-width:100%}}.wc-stripe-banner-checkout{display:none;padding:20px 15px 0 15px;border:1px solid #d1d1d1;border-width:0 0 1px;position:relative;margin:1em 0}.wc-stripe-banner-checkout.active{display:block}.wc-stripe-banner-checkout span.banner-title{position:absolute;display:flex;align-items:center;top:-13px;right:0;left:0;background:0 0;white-space:nowrap;font-size:16px}.wc-stripe-banner-checkout span.banner-title:after,.wc-stripe-banner-checkout span.banner-title:before{content:' ';height:1px;background:#d1d1d1;display:block;width:50%}.wc-stripe-banner-checkout span.banner-title:before{margin-right:8px}.wc-stripe-banner-checkout span.banner-title:after{margin-left:8px}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways{list-style:none;margin:0;padding:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway{margin:0 0 20px 0;display:none}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways li.wc-stripe-checkout-banner-gateway .gpay-card-info-container{margin:0}.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-button,.wc-stripe-banner-checkout ul.wc_stripe_checkout_banner_gateways .gpay-card-info-container{width:100%}.wc_stripe_cart_payment_methods .payment_method_stripe_payment_request .StripeElement,.wc_stripe_product_payment_methods .payment_method_stripe_payment_request .StripeElement{padding:0;width:100%}.woocommerce-checkout #wc-stripe-payment-request-container.StripeElement{width:240px;padding:0}.wc-stripe-checkout-banner-gateway #wc-stripe-payment-request-banner.StripeElement{width:100%}ul.payment_methods li.payment_method_stripe_p24 img{max-width:90px;width:90px;max-height:45px}ul.payment_methods li.payment_method_stripe_ideal img{max-width:38px;width:38px;max-height:35px}ul.payment_methods li.payment_method_stripe_fpx img{max-width:75px;width:75px;max-height:25px}ul.payment_methods li.payment_method_stripe_klarna img{max-width:72px;width:72px;max-height:20px}ul.payment_methods li.payment_method_stripe_giropay img{max-width:65px;width:65px;max-height:28px}ul.payment_methods li.payment_method_stripe_eps img{max-width:70px;width:70px;max-height:46px}ul.payment_methods li.payment_method_stripe_multibanco img{max-width:48px;width:48px;max-height:48px}ul.payment_methods li.payment_method_stripe_sepa img{max-width:67px;width:67px;max-height:18px}ul.payment_methods li.payment_method_stripe_sofort img{max-width:70px;width:70px;max-height:21px}label[for=payment_method_stripe_bancontact] img,ul.payment_methods li.payment_method_stripe_bancontact img{width:60px;height:42px;max-width:60px;max-height:42px}ul.payment_methods li.payment_method_stripe_wechat label img{max-width:82px;width:82px;max-height:23px}ul.payment_methods li.payment_method_stripe_alipay img{max-width:72px;width:72px;height:36px;max-height:36px}ul.payment_methods li.payment_method_stripe_grabpay img{max-width:95px;width:95px;max-height:28px}#wc-stripe-card-element{width:100%}li.banner_payment_method_stripe_payment_request .StripeElement{padding:0}.single-product .blockMsg{border:none!important;background-color:transparent!important}#wc-stripe-card{position:absolute!important;top:50%;right:8px;transform:translatey(-50%);width:23px;height:15px;padding:0;border:none}#wc-stripe-card.active{width:32px;height:20px}input[id=stripe-postal-code]:focus{outline:0;background:0 0;border:none;box-shadow:none}div.postalCode:focus{outline:0;border:none}li[class*=payment_method_stripe] .select2-container .select2-selection--single{height:42px;padding:0 5px}li[class*=payment_method_stripe] .select2-container--default .select2-selection--single .select2-selection__arrow{height:42px;top:1px;right:1px;transform:translateY(0)}.blockUI.blockMsg{font-size:20px;white-space:nowrap}#wc-stripe-payment-request-container.disabled{opacity:.45}.wc-stripe-paymentRequest-icons-container img{float:none}.select2-container .select2-selection--single .wc-stripe-select2-container.wc-stripe-ach:before{display:none}ul.wc_stripe_cart_payment_methods li.wc-stripe-payment-method button,ul.wc_stripe_checkout_banner_gateways li button,ul.wc_stripe_product_payment_methods li[class*=payment_method_stripe_] button{margin:0}ul.payment_methods li[class*=payment_method]{margin:0;padding:10px 0}ul.payment_methods li[class*=payment_method] input[name=payment_method]{margin:0 10px 0 5px;float:none}ul.payment_methods li[class*=payment_method]>input[name=payment_method]+label{padding-top:0;padding-right:0;padding-bottom:0}ul.payment_methods{list-style:none}ul.payment_methods li[class*=payment_method_stripe_] .wc-stripe_cc-new-method-container label:before{display:none}.wc-stripe_cc-container .wc-stripe-save-source label.checkbox{padding:0!important;margin:0}div[id*=wc_stripe_local_payment_stripe_].StripeElement{border:1px solid #eee;border-radius:4px}.qrcode-message{margin:10px 0 0 0}#wc_stripe_local_payment_stripe_becs,#wc_stripe_local_payment_stripe_sepa{padding:10px 12px;box-shadow:0 1px 3px 0 #e6ebf1}.wc-stripe-local-desc.stripe_becs,.wc-stripe-local-desc.stripe_sepa{margin:10px 0}.wc-stripe-clear{clear:both;height:0;visibility:hidden}.wc-stripe-gateway-desc p{margin:0}#wc_stripe_local_payment_stripe_klarna,li[class*=payment_method_stripe_] div.wc-stripe-gateway-container.has_tokens{margin-top:10px}.wc-stripe-gateway-desc{margin-top:10px}#wc-stripe-card-element.StripeElement--webkit-autofill{background-color:transparent!important}#wc_stripe_local_payment_stripe_klarna .stripe-klarna-categories{list-style:none;margin:0;padding:10px}li.payment_method_stripe_alipay,li.payment_method_stripe_bancontact,li.payment_method_stripe_becs,li.payment_method_stripe_eps,li.payment_method_stripe_fpx,li.payment_method_stripe_giropay,li.payment_method_stripe_ideal,li.payment_method_stripe_klarna,li.payment_method_stripe_multibanco,li.payment_method_stripe_p24,li.payment_method_stripe_sepa,li.payment_method_stripe_sofort,li.payment_method_stripe_wechat{display:none}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods{list-style:none;margin:0;padding:0}.widget_shopping_cart_content .wc-stripe-mini-cart-payment-methods li{margin:0}.widget_shopping_cart_content a.wc-stripe-applepay-mini-cart,.widget_shopping_cart_content a.wc-stripe-gpay-mini-cart,.widget_shopping_cart_content a.wc-stripe-payment-request-mini-cart{background:0 0;padding:0;border:none}a.wc-stripe-gpay-mini-cart .gpay-button,a.wc-stripe-gpay-mini-cart .gpay-card-info-container a.wc-stripe-applepay-mini-cart .apple-pay-button{width:100%;margin:0}.wc-stripe-payment-request-mini-cart.StripeElement{padding:0;background:0 0;border:none;width:100%}.wc-stripe-payment-request-mini-cart.StripeElement .__PrivateStripeElement{width:100%}.widget_shopping_cart_content .wc-stripe-overlay{display:none!important;position:absolute;background:rgba(255,255,255,.75);height:100%;width:100%;z-index:-1}.widget_shopping_cart_content .wc-stripe-overlay.active{display:block!important;z-index:9999}.wc-stripe-klarna-loader{display:flex;justify-content:center;position:relative;width:100%;height:30px;box-sizing:border-box;transform:scale(.65)}.wc-stripe-klarna-loader div{box-sizing:border-box;display:block;position:absolute;box-sizing:border-box;width:30px;height:30px;border:3px solid #000;border-radius:50%;animation:klarna-payments-loader 1.3s cubic-bezier(.5,0,.5,1) infinite;border-color:#000 transparent transparent transparent}.wc-stripe-klarna-loader div:nth-child(1){animation-delay:-.45s}.wc-stripe-klarna-loader div:nth-child(2){animation-delay:-.3s}.wc-stripe-klarna-loader div:nth-child(3){animation-delay:-.15s}@keyframes klarna-payments-loader{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}li.payment_method_stripe_alipay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_applepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_bancontact.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_eps.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_giropay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_googlepay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_grabpay.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_multibanco.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_p24.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_payment_request.wc-stripe-no-desc .payment_box.wc-stripe-no-methods,li.payment_method_stripe_sofort.wc-stripe-no-desc .payment_box.wc-stripe-no-methods{padding:0;margin:0}
|
assets/img/bancontact.svg
CHANGED
@@ -1 +1,80 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
4 |
+
width="256px" height="160px" viewBox="36 36 256 160" style="enable-background:new 0 0 326.1 230.5;" xml:space="preserve"
|
5 |
+
>
|
6 |
+
<style type="text/css">
|
7 |
+
.st0{fill:#FFFFFF;}
|
8 |
+
.st1{fill:#005498;}
|
9 |
+
.st2{fill:#FFD800;}
|
10 |
+
.st3{fill:none;}
|
11 |
+
</style>
|
12 |
+
<g>
|
13 |
+
<path class="st0" d="M326.1,210.7c0,10.9-8.9,19.8-19.8,19.8H19.9c-10.9,0-19.8-8.9-19.8-19.8V19.8C0.1,8.9,9,0,19.9,0h286.4
|
14 |
+
c10.9,0,19.8,8.9,19.8,19.8L326.1,210.7L326.1,210.7z"/>
|
15 |
+
</g>
|
16 |
+
<g>
|
17 |
+
<path class="st1" d="M262,64.4h-11.8h-54.6h-11.9l-8,9l-25.8,29.1l0,0l-8,9h-11.8H76.5H64.7l7.8-9.1l3.7-4.3L84,89H72.2H57h-8.5
|
18 |
+
c-6.5,0-11.8,5.5-11.8,12.1l0,0v23.4v2.2c0,6.7,5.3,12.1,11.8,12.1h3.3h124h8.9c6.5,0,15.4-4,19.7-9l20.6-23.4L262,64.4z"/>
|
19 |
+
<path class="st2" d="M277.7,37.1c6.5,0,11.8,5.5,11.8,12.1v25.5c0,6.7-5.3,12.1-11.8,12.1h-6.4h-17.2h-11.8l7.9-9l0,0l3.9-4.5
|
20 |
+
l7.9-9h-78.3l-41.7,47H64.3l55.7-63l2.1-2.4c4.4-4.9,13.3-9,19.8-9h2.7h133.1V37.1z"/>
|
21 |
+
</g>
|
22 |
+
<path class="st1" d="M289.5,192.4v-3.7c0-0.5-0.3-0.8-1-0.8h-2.4c-0.7,0-1.2-0.1-1.3-0.4c-0.2-0.3-0.2-0.9-0.2-1.9v-14h3.9
|
23 |
+
c0.3,0,0.5-0.1,0.7-0.3s0.3-0.4,0.3-0.7v-3.9c0-0.3-0.1-0.5-0.3-0.7c-0.2-0.2-0.4-0.3-0.7-0.3h-3.9v-5.1c0-0.3-0.1-0.5-0.2-0.6
|
24 |
+
c-0.2-0.1-0.4-0.2-0.6-0.2h-0.1l-5.8,1c-0.3,0.1-0.5,0.2-0.7,0.3c-0.2,0.2-0.3,0.4-0.3,0.6v3.9H273c-0.3,0-0.5,0.1-0.7,0.3
|
25 |
+
s-0.3,0.4-0.3,0.7v3.2c0,0.3,0.1,0.5,0.3,0.6c0.2,0.2,0.4,0.3,0.7,0.4l3.9,0.6v14c0,1.7,0.2,3.1,0.5,4.2c0.4,1.1,0.9,1.9,1.5,2.5
|
26 |
+
c0.7,0.6,1.5,1,2.5,1.2s2.2,0.3,3.5,0.3c0.7,0,1.3,0,1.9-0.1c0.5-0.1,1.2-0.2,1.9-0.3C289.2,193.2,289.5,192.9,289.5,192.4
|
27 |
+
M268.7,191.9v-4.3c0-0.3-0.1-0.5-0.3-0.6c-0.2-0.1-0.4-0.2-0.6-0.2h-0.1c-0.9,0.1-1.8,0.2-2.6,0.2c-0.8,0.1-1.9,0.1-3.3,0.1
|
28 |
+
c-0.5,0-1.1-0.1-1.5-0.3c-0.5-0.2-0.9-0.5-1.3-0.9s-0.6-1-0.8-1.7c-0.2-0.7-0.3-1.6-0.3-2.7v-4c0-1.1,0.1-2,0.3-2.7
|
29 |
+
c0.2-0.7,0.5-1.3,0.8-1.7c0.4-0.4,0.8-0.7,1.3-0.9s1-0.3,1.5-0.3c1.4,0,2.5,0,3.3,0.1s1.7,0.1,2.6,0.2h0.1c0.3,0,0.5-0.1,0.6-0.2
|
30 |
+
c0.2-0.1,0.3-0.3,0.3-0.6v-4.3c0-0.4-0.1-0.6-0.2-0.7c-0.2-0.1-0.4-0.3-0.8-0.4c-0.7-0.2-1.5-0.3-2.6-0.5s-2.3-0.2-3.8-0.2
|
31 |
+
c-3.4,0-6.1,1-8.2,3.1c-2,2.1-3.1,5.1-3.1,9.1v4c0,3.9,1,7,3.1,9.1c2,2.1,4.8,3.1,8.2,3.1c1.4,0,2.7-0.1,3.8-0.2
|
32 |
+
c1.1-0.2,2-0.3,2.6-0.5c0.4-0.1,0.6-0.2,0.8-0.4C268.7,192.5,268.7,192.2,268.7,191.9 M237.4,186.8c-0.6,0.3-1.2,0.5-1.9,0.7
|
33 |
+
c-0.7,0.2-1.4,0.3-2.1,0.3c-1,0-1.8-0.1-2.3-0.4s-0.7-0.9-0.7-2V185c0-0.6,0.1-1.1,0.2-1.5s0.4-0.8,0.7-1.1c0.3-0.3,0.8-0.5,1.3-0.6
|
34 |
+
s1.2-0.2,2.1-0.2h2.7L237.4,186.8L237.4,186.8z M245,175.1c0-1.8-0.3-3.3-0.8-4.5s-1.3-2.2-2.2-3c-1-0.8-2.1-1.4-3.5-1.7
|
35 |
+
c-1.4-0.4-3-0.6-4.7-0.6c-1.6,0-3.2,0.1-4.7,0.3s-2.7,0.4-3.6,0.7c-0.6,0.2-0.9,0.5-0.9,1.1v3.9c0,0.3,0.1,0.5,0.2,0.7
|
36 |
+
c0.2,0.1,0.4,0.2,0.6,0.2h0.2c0.4,0,0.9-0.1,1.4-0.1c0.6,0,1.2-0.1,1.9-0.1c0.7,0,1.5-0.1,2.3-0.1s1.6,0,2.3,0c1.1,0,2,0.2,2.6,0.6
|
37 |
+
c0.6,0.4,1,1.3,1,2.7v1.7h-2.6c-4.1,0-7.2,0.6-9,1.9c-1.9,1.3-2.8,3.4-2.8,6.2v0.4c0,1.6,0.2,2.9,0.7,3.9c0.5,1.1,1.1,1.9,1.9,2.6
|
38 |
+
c0.8,0.6,1.6,1.1,2.6,1.4s2,0.4,3.1,0.4c1.4,0,2.7-0.2,3.7-0.6s2-0.9,3-1.6v0.8c0,0.3,0.1,0.5,0.3,0.7c0.2,0.2,0.4,0.3,0.7,0.3h5.4
|
39 |
+
c0.3,0,0.5-0.1,0.7-0.3c0.2-0.2,0.3-0.4,0.3-0.7v-17.2H245z M219.3,192.4v-3.7c0-0.5-0.3-0.8-1-0.8h-2.4c-0.7,0-1.2-0.1-1.3-0.4
|
40 |
+
c-0.2-0.3-0.2-0.9-0.2-1.9v-14h3.9c0.3,0,0.5-0.1,0.7-0.3s0.3-0.4,0.3-0.7v-3.9c0-0.3-0.1-0.5-0.3-0.7s-0.4-0.3-0.7-0.3h-3.9v-5.1
|
41 |
+
c0-0.3-0.1-0.5-0.2-0.6c-0.2-0.1-0.4-0.2-0.6-0.2h-0.1l-5.8,1c-0.3,0.1-0.5,0.2-0.7,0.3c-0.2,0.2-0.3,0.4-0.3,0.6v3.9h-4
|
42 |
+
c-0.3,0-0.5,0.1-0.7,0.3s-0.3,0.4-0.3,0.7v3.2c0,0.3,0.1,0.5,0.3,0.6c0.2,0.2,0.4,0.3,0.7,0.4l3.9,0.6v14c0,1.7,0.2,3.1,0.5,4.2
|
43 |
+
c0.4,1.1,0.9,1.9,1.5,2.5c0.7,0.6,1.5,1,2.5,1.2s2.2,0.3,3.5,0.3c0.7,0,1.3,0,1.9-0.1c0.5-0.1,1.2-0.2,1.9-0.3
|
44 |
+
C219,193.2,219.3,192.9,219.3,192.4 M198.3,192.3v-16c0-1.5-0.1-2.9-0.4-4.3c-0.2-1.3-0.7-2.5-1.3-3.5c-0.6-1-1.5-1.8-2.6-2.3
|
45 |
+
c-1.1-0.6-2.5-0.9-4.3-0.9c-1.5,0-2.9,0.2-4.1,0.6c-1.2,0.4-2.4,1-3.8,2v-1.2c0-0.3-0.1-0.5-0.3-0.7s-0.4-0.3-0.7-0.3h-5.4
|
46 |
+
c-0.3,0-0.5,0.1-0.7,0.3s-0.3,0.4-0.3,0.7v25.6c0,0.3,0.1,0.5,0.3,0.7s0.4,0.3,0.7,0.3h5.8c0.3,0,0.5-0.1,0.7-0.3
|
47 |
+
c0.2-0.2,0.3-0.4,0.3-0.7v-18.9c0.8-0.4,1.6-0.8,2.4-1.1c0.7-0.3,1.5-0.4,2.2-0.4s1.3,0.1,1.8,0.2c0.5,0.1,0.8,0.4,1.1,0.7
|
48 |
+
c0.3,0.4,0.4,0.8,0.5,1.4c0.1,0.6,0.1,1.3,0.1,2.1v16c0,0.3,0.1,0.5,0.3,0.7c0.2,0.2,0.4,0.3,0.7,0.3h5.8c0.3,0,0.5-0.1,0.7-0.3
|
49 |
+
C198.2,192.8,198.3,192.5,198.3,192.3 M161.9,181.2c0,3.9-1.4,5.9-4.3,5.9c-1.4,0-2.5-0.5-3.2-1.5s-1.1-2.5-1.1-4.4v-3.4
|
50 |
+
c0-2,0.4-3.4,1.1-4.4c0.7-1,1.8-1.5,3.2-1.5c2.8,0,4.3,2,4.3,5.9V181.2z M169.7,177.8c0-1.9-0.3-3.7-0.8-5.2s-1.3-2.8-2.3-3.9
|
51 |
+
c-1-1.1-2.3-1.9-3.8-2.5s-3.2-0.9-5.2-0.9s-3.7,0.3-5.2,0.9c-1.5,0.6-2.8,1.4-3.8,2.5s-1.8,2.4-2.3,3.9s-0.8,3.3-0.8,5.2v3.4
|
52 |
+
c0,1.9,0.3,3.7,0.8,5.2s1.3,2.8,2.3,3.9s2.3,1.9,3.8,2.5s3.2,0.9,5.2,0.9s3.7-0.3,5.2-0.9s2.8-1.4,3.8-2.5s1.8-2.4,2.3-3.9
|
53 |
+
s0.8-3.3,0.8-5.2V177.8z M143,191.9v-4.3c0-0.3-0.1-0.5-0.3-0.6s-0.4-0.2-0.7-0.2h-0.1c-0.9,0.1-1.8,0.2-2.6,0.2
|
54 |
+
c-0.8,0.1-1.9,0.1-3.3,0.1c-0.5,0-1.1-0.1-1.5-0.3c-0.5-0.2-0.9-0.5-1.3-0.9c-0.4-0.4-0.6-1-0.8-1.7s-0.3-1.6-0.3-2.7v-4
|
55 |
+
c0-1.1,0.1-2,0.3-2.7s0.5-1.3,0.8-1.7c0.4-0.4,0.8-0.7,1.3-0.9s1-0.3,1.5-0.3c1.4,0,2.5,0,3.3,0.1s1.7,0.1,2.6,0.2h0.1
|
56 |
+
c0.3,0,0.5-0.1,0.7-0.2c0.2-0.1,0.3-0.3,0.3-0.6v-4.3c0-0.4-0.1-0.6-0.2-0.7c-0.2-0.1-0.4-0.3-0.8-0.4c-0.7-0.2-1.5-0.3-2.6-0.5
|
57 |
+
s-2.3-0.2-3.8-0.2c-3.4,0-6.1,1-8.2,3.1c-2,2.1-3.1,5.1-3.1,9.1v4c0,3.9,1,7,3.1,9.1c2,2.1,4.8,3.1,8.2,3.1c1.4,0,2.7-0.1,3.8-0.2
|
58 |
+
c1.1-0.2,1.9-0.3,2.6-0.5c0.4-0.1,0.6-0.2,0.8-0.4C142.9,192.5,143,192.2,143,191.9 M119.3,192.3v-16c0-1.5-0.1-2.9-0.4-4.3
|
59 |
+
c-0.2-1.3-0.7-2.5-1.3-3.5s-1.5-1.8-2.6-2.3c-1.1-0.6-2.5-0.9-4.3-0.9c-1.5,0-2.9,0.2-4.1,0.6c-1.2,0.4-2.4,1-3.8,2v-1.2
|
60 |
+
c0-0.3-0.1-0.5-0.3-0.7s-0.4-0.3-0.7-0.3h-5.4c-0.3,0-0.5,0.1-0.7,0.3s-0.3,0.4-0.3,0.7v25.6c0,0.3,0.1,0.5,0.3,0.7s0.4,0.3,0.7,0.3
|
61 |
+
h5.8c0.3,0,0.5-0.1,0.7-0.3c0.2-0.2,0.3-0.4,0.3-0.7v-18.9c0.8-0.4,1.6-0.8,2.4-1.1c0.7-0.3,1.5-0.4,2.2-0.4s1.3,0.1,1.8,0.2
|
62 |
+
c0.5,0.1,0.8,0.4,1.1,0.7c0.3,0.4,0.4,0.8,0.5,1.4c0.1,0.6,0.1,1.3,0.1,2.1v16c0,0.3,0.1,0.5,0.3,0.7s0.4,0.3,0.7,0.3h5.8
|
63 |
+
c0.3,0,0.5-0.1,0.7-0.3C119.2,192.8,119.3,192.5,119.3,192.3 M82.1,186.8c-0.6,0.3-1.2,0.5-1.9,0.7s-1.4,0.3-2.1,0.3
|
64 |
+
c-1,0-1.8-0.1-2.3-0.4s-0.7-0.9-0.7-2V185c0-0.6,0.1-1.1,0.2-1.5c0.1-0.4,0.4-0.8,0.7-1.1c0.3-0.3,0.8-0.5,1.3-0.6s1.2-0.2,2.1-0.2
|
65 |
+
h2.7V186.8z M89.8,175.1c0-1.8-0.3-3.3-0.8-4.5s-1.3-2.2-2.2-3c-1-0.8-2.1-1.4-3.5-1.7c-1.4-0.4-3-0.6-4.7-0.6
|
66 |
+
c-1.6,0-3.2,0.1-4.7,0.3s-2.7,0.4-3.6,0.7c-0.6,0.2-0.9,0.5-0.9,1.1v3.9c0,0.3,0.1,0.5,0.2,0.7c0.2,0.1,0.4,0.2,0.6,0.2h0.2
|
67 |
+
c0.4,0,0.9-0.1,1.4-0.1c0.6,0,1.2-0.1,2-0.1c0.7,0,1.5-0.1,2.3-0.1s1.6,0,2.3,0c1.1,0,2,0.2,2.6,0.6c0.6,0.4,1,1.3,1,2.7v1.7h-2.6
|
68 |
+
c-4.1,0-7.2,0.6-9,1.9c-1.9,1.3-2.8,3.4-2.8,6.2v0.4c0,1.6,0.2,2.9,0.7,3.9c0.5,1.1,1.1,1.9,1.9,2.6c0.8,0.6,1.6,1.1,2.6,1.4
|
69 |
+
s2,0.4,3.1,0.4c1.4,0,2.7-0.2,3.7-0.6s2-0.9,3-1.6v0.8c0,0.3,0.1,0.5,0.3,0.7s0.4,0.3,0.7,0.3H89c0.3,0,0.5-0.1,0.7-0.3
|
70 |
+
c0.2-0.2,0.3-0.4,0.3-0.7v-17.2H89.8z M55.4,182.7c0,1.3-0.5,2.4-1.4,3.1s-2.7,1.1-5.1,1.1h-0.8c-0.4,0-0.8,0-1.2,0
|
71 |
+
c-0.4,0-0.8,0-1.2,0h-0.8v-9h5.4c1.9,0,3.3,0.4,4,1.3c0.7,0.9,1.1,1.9,1.1,3V182.7z M55.2,168.4c0,0.5-0.1,1-0.2,1.5
|
72 |
+
c-0.2,0.5-0.4,0.9-0.8,1.2s-0.9,0.6-1.5,0.8s-1.4,0.3-2.4,0.3h-5.4v-8.3c0.2,0,0.4,0,0.7,0c0.3,0,0.7,0,1.1,0h1.1h0.8
|
73 |
+
c2.5,0,4.2,0.3,5.2,0.9c1,0.6,1.5,1.6,1.5,2.9L55.2,168.4L55.2,168.4z M63.4,182.2c0-1.7-0.4-3.1-1.2-4.3s-1.8-2.2-3.1-2.8
|
74 |
+
c1.3-0.6,2.3-1.6,3-2.8c0.7-1.3,1.1-2.7,1.1-4.2v-0.9c0-1.9-0.4-3.5-1.1-4.8c-0.7-1.3-1.8-2.3-3.1-3.1s-2.9-1.3-4.8-1.7
|
75 |
+
c-1.9-0.3-3.9-0.5-6.2-0.5c-0.8,0-1.6,0-2.4,0s-1.6,0.1-2.4,0.1s-1.5,0.1-2.2,0.2c-0.7,0.1-1.2,0.1-1.6,0.2c-0.9,0.2-1.6,0.4-2,0.9
|
76 |
+
c-0.4,0.4-0.6,1.2-0.6,2.3v29.3c0,1.1,0.2,1.8,0.6,2.3c0.4,0.4,1.1,0.7,2,0.9c0.5,0.1,1.1,0.2,1.7,0.2c0.7,0.1,1.4,0.1,2.2,0.2
|
77 |
+
s1.6,0.1,2.4,0.1s1.7,0,2.5,0c2.1,0,4.1-0.2,5.9-0.5c1.8-0.3,3.4-0.9,4.8-1.7c1.4-0.8,2.4-1.9,3.3-3.3c0.8-1.4,1.2-3.2,1.2-5.3
|
78 |
+
L63.4,182.2L63.4,182.2z"/>
|
79 |
+
<rect x="0" y="0" class="st3" width="326" height="230.5"/>
|
80 |
+
</svg>
|
assets/img/googlepay_round_outline.svg
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<svg version="1.1" id="G_Pay_Acceptance_Mark" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="170.70001220703125 172 752 400" enable-background="new 0 0 1094 742" xml:space="preserve">
|
2 |
+
<path id="Base_1_" fill="#FFFFFF" d="M722.7,170h-352c-110,0-200,90-200,200l0,0c0,110,90,200,200,200h352c110,0,200-90,200-200l0,0
|
3 |
+
C922.7,260,832.7,170,722.7,170z"></path>
|
4 |
+
<path id="Outline" fill="#3C4043" d="M722.7,186.2c24.7,0,48.7,4.9,71.3,14.5c21.9,9.3,41.5,22.6,58.5,39.5
|
5 |
+
c16.9,16.9,30.2,36.6,39.5,58.5c9.6,22.6,14.5,46.6,14.5,71.3s-4.9,48.7-14.5,71.3c-9.3,21.9-22.6,41.5-39.5,58.5
|
6 |
+
c-16.9,16.9-36.6,30.2-58.5,39.5c-22.6,9.6-46.6,14.5-71.3,14.5h-352c-24.7,0-48.7-4.9-71.3-14.5c-21.9-9.3-41.5-22.6-58.5-39.5
|
7 |
+
c-16.9-16.9-30.2-36.6-39.5-58.5c-9.6-22.6-14.5-46.6-14.5-71.3s4.9-48.7,14.5-71.3c9.3-21.9,22.6-41.5,39.5-58.5
|
8 |
+
c16.9-16.9,36.6-30.2,58.5-39.5c22.6-9.6,46.6-14.5,71.3-14.5L722.7,186.2 M722.7,170h-352c-110,0-200,90-200,200l0,0
|
9 |
+
c0,110,90,200,200,200h352c110,0,200-90,200-200l0,0C922.7,260,832.7,170,722.7,170L722.7,170z"></path>
|
10 |
+
<g id="G_Pay_Lockup_1_">
|
11 |
+
<g id="Pay_Typeface_3_">
|
12 |
+
<path id="Letter_p_3_" fill="#3C4043" d="M529.3,384.2v60.5h-19.2V295.3H561c12.9,0,23.9,4.3,32.9,12.9
|
13 |
+
c9.2,8.6,13.8,19.1,13.8,31.5c0,12.7-4.6,23.2-13.8,31.7c-8.9,8.5-19.9,12.7-32.9,12.7h-31.7V384.2z M529.3,313.7v52.1h32.1
|
14 |
+
c7.6,0,14-2.6,19-7.7c5.1-5.1,7.7-11.3,7.7-18.3c0-6.9-2.6-13-7.7-18.1c-5-5.3-11.3-7.9-19-7.9h-32.1V313.7z"></path>
|
15 |
+
<path id="Letter_a_3_" fill="#3C4043" d="M657.9,339.1c14.2,0,25.4,3.8,33.6,11.4c8.2,7.6,12.3,18,12.3,31.2v63h-18.3v-14.2h-0.8
|
16 |
+
c-7.9,11.7-18.5,17.5-31.7,17.5c-11.3,0-20.7-3.3-28.3-10s-11.4-15-11.4-25c0-10.6,4-19,12-25.2c8-6.3,18.7-9.4,32-9.4
|
17 |
+
c11.4,0,20.8,2.1,28.1,6.3v-4.4c0-6.7-2.6-12.3-7.9-17c-5.3-4.7-11.5-7-18.6-7c-10.7,0-19.2,4.5-25.4,13.6l-16.9-10.6
|
18 |
+
C625.9,345.8,639.7,339.1,657.9,339.1z M633.1,413.3c0,5,2.1,9.2,6.4,12.5c4.2,3.3,9.2,5,14.9,5c8.1,0,15.3-3,21.6-9
|
19 |
+
s9.5-13,9.5-21.1c-6-4.7-14.3-7.1-25-7.1c-7.8,0-14.3,1.9-19.5,5.6C635.7,403.1,633.1,407.8,633.1,413.3z"></path>
|
20 |
+
<path id="Letter_y_3_" fill="#3C4043" d="M808.2,342.4l-64,147.2h-19.8l23.8-51.5L706,342.4h20.9l30.4,73.4h0.4l29.6-73.4H808.2z"></path>
|
21 |
+
</g>
|
22 |
+
<g id="G_Mark_1_">
|
23 |
+
<path id="Blue_500" fill="#4285F4" d="M452.93,372c0-6.26-0.56-12.25-1.6-18.01h-80.48v33L417.2,387
|
24 |
+
c-1.88,10.98-7.93,20.34-17.2,26.58v21.41h27.59C443.7,420.08,452.93,398.04,452.93,372z"></path>
|
25 |
+
<path id="Green_500_1_" fill="#34A853" d="M400.01,413.58c-7.68,5.18-17.57,8.21-29.14,8.21c-22.35,0-41.31-15.06-48.1-35.36
|
26 |
+
h-28.46v22.08c14.1,27.98,43.08,47.18,76.56,47.18c23.14,0,42.58-7.61,56.73-20.71L400.01,413.58z"></path>
|
27 |
+
<path id="Yellow_500_1_" fill="#FABB05" d="M320.09,370.05c0-5.7,0.95-11.21,2.68-16.39v-22.08h-28.46
|
28 |
+
c-5.83,11.57-9.11,24.63-9.11,38.47s3.29,26.9,9.11,38.47l28.46-22.08C321.04,381.26,320.09,375.75,320.09,370.05z"></path>
|
29 |
+
<path id="Red_500" fill="#E94235" d="M370.87,318.3c12.63,0,23.94,4.35,32.87,12.85l24.45-24.43
|
30 |
+
c-14.85-13.83-34.21-22.32-57.32-22.32c-33.47,0-62.46,19.2-76.56,47.18l28.46,22.08C329.56,333.36,348.52,318.3,370.87,318.3z"></path>
|
31 |
+
</g>
|
32 |
+
</g>
|
33 |
+
</svg>
|
assets/js/admin/admin-settings.js
CHANGED
@@ -26,6 +26,10 @@ jQuery(function ($) {
|
|
26 |
}
|
27 |
|
28 |
this.display_children();
|
|
|
|
|
|
|
|
|
29 |
}
|
30 |
|
31 |
/**
|
26 |
}
|
27 |
|
28 |
this.display_children();
|
29 |
+
|
30 |
+
if (window.location.search.match(/_stripe_connect_nonce/)) {
|
31 |
+
history.pushState({}, '', window.location.pathname + '?page=wc-settings&tab=checkout§ion=stripe_api');
|
32 |
+
}
|
33 |
}
|
34 |
|
35 |
/**
|
assets/js/admin/meta-boxes-order.js
CHANGED
@@ -1,4 +1,8 @@
|
|
1 |
-
(function($) {
|
|
|
|
|
|
|
|
|
2 |
/**
|
3 |
* @constructor
|
4 |
*/
|
@@ -7,7 +11,7 @@
|
|
7 |
this.initialize();
|
8 |
}
|
9 |
|
10 |
-
MetaBox.prototype.initialize = function() {
|
11 |
$(document.body).on('click', '.do-transaction-view',
|
12 |
this.render_charge_view.bind(this)).on('click',
|
13 |
'.do-api-capture', this.do_api_capture.bind(this)).on('click',
|
@@ -18,7 +22,7 @@
|
|
18 |
/**
|
19 |
* Fetch the charge view data and render the modal.
|
20 |
*/
|
21 |
-
MetaBox.prototype.render_charge_view = function(e) {
|
22 |
e.preventDefault();
|
23 |
var $icon = $(e.target);
|
24 |
$icon.addClass('disabled');
|
@@ -31,7 +35,7 @@
|
|
31 |
order_id: $icon.data('order'),
|
32 |
_wpnonce: this.params._wpnonce
|
33 |
}
|
34 |
-
})).done(function(response) {
|
35 |
if (!response.code) {
|
36 |
$icon.data('charge', response.data);
|
37 |
$icon.removeClass('disabled');
|
@@ -42,7 +46,7 @@
|
|
42 |
} else {
|
43 |
window.alert(response.message);
|
44 |
}
|
45 |
-
}.bind(this)).fail(function(jqXHR, textStatus, errorThrown) {
|
46 |
$icon.removeClass('disabled');
|
47 |
window.alert(errorThrown);
|
48 |
}.bind(this))
|
@@ -55,9 +59,9 @@
|
|
55 |
}
|
56 |
|
57 |
/**
|
58 |
-
*
|
59 |
*/
|
60 |
-
MetaBox.prototype.do_api_capture = function(e) {
|
61 |
e.preventDefault();
|
62 |
var $modal = $('.wc-transaction-data');
|
63 |
this.block($modal);
|
@@ -70,23 +74,23 @@
|
|
70 |
order_id: $('#post_ID').val(),
|
71 |
amount: $('[name="capture_amount"]').val()
|
72 |
},
|
73 |
-
}).done(function(response) {
|
74 |
if (!response.code) {
|
75 |
window.location.reload();
|
76 |
} else {
|
77 |
this.unblock($modal);
|
78 |
window.alert(response.message);
|
79 |
}
|
80 |
-
}.bind(this))).fail(function(jqXHR, textStatus, errorThrown) {
|
81 |
this.unblock($modal);
|
82 |
window.alert(errorThrown);
|
83 |
}.bind(this));
|
84 |
}
|
85 |
|
86 |
/**
|
87 |
-
*
|
88 |
*/
|
89 |
-
MetaBox.prototype.do_api_cancel = function(e) {
|
90 |
e.preventDefault();
|
91 |
var $modal = $('.wc-transaction-data');
|
92 |
this.block($modal);
|
@@ -98,21 +102,24 @@
|
|
98 |
_wpnonce: this.params._wpnonce,
|
99 |
order_id: $('#post_ID').val()
|
100 |
},
|
101 |
-
}).done(function(response) {
|
102 |
if (!response.code) {
|
103 |
window.location.reload();
|
104 |
} else {
|
105 |
this.unblock($modal);
|
106 |
window.alert(response.message);
|
107 |
}
|
108 |
-
}.bind(this))).fail(function(jqXHR, textStatus, errorThrown) {
|
109 |
this.unblock($modal);
|
110 |
window.alert(errorThrown);
|
111 |
}.bind(this));
|
112 |
}
|
113 |
|
114 |
-
MetaBox.prototype.open_pay_order_modal = function(e) {
|
115 |
e.preventDefault();
|
|
|
|
|
|
|
116 |
$(e.target).WCStripePayOrderBackboneModal({
|
117 |
template: 'wc-stripe-modal-pay-order',
|
118 |
params: {
|
@@ -123,7 +130,7 @@
|
|
123 |
})
|
124 |
}
|
125 |
|
126 |
-
MetaBox.prototype.fetch_payment_methods = function(e) {
|
127 |
wc_stripe_order_pay_params.payment_methods = [];
|
128 |
var customer_id = $('#customer_user').val();
|
129 |
if (customer_id) {
|
@@ -135,18 +142,18 @@
|
|
135 |
_wpnonce: this.params._wpnonce,
|
136 |
customer_id: customer_id
|
137 |
}
|
138 |
-
}).done(function(response) {
|
139 |
wc_stripe_order_pay_params.payment_methods = response.payment_methods;
|
140 |
-
}.bind(this)).fail(function() {
|
141 |
|
142 |
}.bind(this))
|
143 |
}
|
144 |
}
|
145 |
|
146 |
/**
|
147 |
-
*
|
148 |
*/
|
149 |
-
MetaBox.prototype.block = function($el) {
|
150 |
$el.block({
|
151 |
message: null,
|
152 |
overlayCSS: {
|
@@ -157,9 +164,9 @@
|
|
157 |
}
|
158 |
|
159 |
/**
|
160 |
-
*
|
161 |
*/
|
162 |
-
MetaBox.prototype.unblock = function($el) {
|
163 |
$el.unblock();
|
164 |
}
|
165 |
|
1 |
+
(function ($) {
|
2 |
+
if (typeof wc_stripe_order_metabox_params === 'undefined') {
|
3 |
+
return;
|
4 |
+
}
|
5 |
+
|
6 |
/**
|
7 |
* @constructor
|
8 |
*/
|
11 |
this.initialize();
|
12 |
}
|
13 |
|
14 |
+
MetaBox.prototype.initialize = function () {
|
15 |
$(document.body).on('click', '.do-transaction-view',
|
16 |
this.render_charge_view.bind(this)).on('click',
|
17 |
'.do-api-capture', this.do_api_capture.bind(this)).on('click',
|
22 |
/**
|
23 |
* Fetch the charge view data and render the modal.
|
24 |
*/
|
25 |
+
MetaBox.prototype.render_charge_view = function (e) {
|
26 |
e.preventDefault();
|
27 |
var $icon = $(e.target);
|
28 |
$icon.addClass('disabled');
|
35 |
order_id: $icon.data('order'),
|
36 |
_wpnonce: this.params._wpnonce
|
37 |
}
|
38 |
+
})).done(function (response) {
|
39 |
if (!response.code) {
|
40 |
$icon.data('charge', response.data);
|
41 |
$icon.removeClass('disabled');
|
46 |
} else {
|
47 |
window.alert(response.message);
|
48 |
}
|
49 |
+
}.bind(this)).fail(function (jqXHR, textStatus, errorThrown) {
|
50 |
$icon.removeClass('disabled');
|
51 |
window.alert(errorThrown);
|
52 |
}.bind(this))
|
59 |
}
|
60 |
|
61 |
/**
|
62 |
+
*
|
63 |
*/
|
64 |
+
MetaBox.prototype.do_api_capture = function (e) {
|
65 |
e.preventDefault();
|
66 |
var $modal = $('.wc-transaction-data');
|
67 |
this.block($modal);
|
74 |
order_id: $('#post_ID').val(),
|
75 |
amount: $('[name="capture_amount"]').val()
|
76 |
},
|
77 |
+
}).done(function (response) {
|
78 |
if (!response.code) {
|
79 |
window.location.reload();
|
80 |
} else {
|
81 |
this.unblock($modal);
|
82 |
window.alert(response.message);
|
83 |
}
|
84 |
+
}.bind(this))).fail(function (jqXHR, textStatus, errorThrown) {
|
85 |
this.unblock($modal);
|
86 |
window.alert(errorThrown);
|
87 |
}.bind(this));
|
88 |
}
|
89 |
|
90 |
/**
|
91 |
+
*
|
92 |
*/
|
93 |
+
MetaBox.prototype.do_api_cancel = function (e) {
|
94 |
e.preventDefault();
|
95 |
var $modal = $('.wc-transaction-data');
|
96 |
this.block($modal);
|
102 |
_wpnonce: this.params._wpnonce,
|
103 |
order_id: $('#post_ID').val()
|
104 |
},
|
105 |
+
}).done(function (response) {
|
106 |
if (!response.code) {
|
107 |
window.location.reload();
|
108 |
} else {
|
109 |
this.unblock($modal);
|
110 |
window.alert(response.message);
|
111 |
}
|
112 |
+
}.bind(this))).fail(function (jqXHR, textStatus, errorThrown) {
|
113 |
this.unblock($modal);
|
114 |
window.alert(errorThrown);
|
115 |
}.bind(this));
|
116 |
}
|
117 |
|
118 |
+
MetaBox.prototype.open_pay_order_modal = function (e) {
|
119 |
e.preventDefault();
|
120 |
+
if (wc_stripe_order_pay_params.order_status !== 'pending') {
|
121 |
+
return window.alert(wc_stripe_order_pay_params.messages.order_status);
|
122 |
+
}
|
123 |
$(e.target).WCStripePayOrderBackboneModal({
|
124 |
template: 'wc-stripe-modal-pay-order',
|
125 |
params: {
|
130 |
})
|
131 |
}
|
132 |
|
133 |
+
MetaBox.prototype.fetch_payment_methods = function (e) {
|
134 |
wc_stripe_order_pay_params.payment_methods = [];
|
135 |
var customer_id = $('#customer_user').val();
|
136 |
if (customer_id) {
|
142 |
_wpnonce: this.params._wpnonce,
|
143 |
customer_id: customer_id
|
144 |
}
|
145 |
+
}).done(function (response) {
|
146 |
wc_stripe_order_pay_params.payment_methods = response.payment_methods;
|
147 |
+
}.bind(this)).fail(function () {
|
148 |
|
149 |
}.bind(this))
|
150 |
}
|
151 |
}
|
152 |
|
153 |
/**
|
154 |
+
*
|
155 |
*/
|
156 |
+
MetaBox.prototype.block = function ($el) {
|
157 |
$el.block({
|
158 |
message: null,
|
159 |
overlayCSS: {
|
164 |
}
|
165 |
|
166 |
/**
|
167 |
+
*
|
168 |
*/
|
169 |
+
MetaBox.prototype.unblock = function ($el) {
|
170 |
$el.unblock();
|
171 |
}
|
172 |
|
assets/js/frontend/ach-payments.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(i,t){function e(){t.BaseGateway.call(this,wc_stripe_ach_params),t.CheckoutGateway.call(this),i(document.body).on("payment_method_selected",this.payment_method_selected.bind(this))}(e.prototype=i.extend({},t.BaseGateway.prototype,t.CheckoutGateway.prototype)).initialize=function(){i(document.body).on("click","#place_order",this.place_order.bind(this)),this.init_plaid()},e.prototype.init_plaid=function(){this.fetch_link_token().then(function(t){this.linkHandler=Plaid.create({clientName:this.params.client_name,env:this.params.env,product:["auth"],token:t,selectAccount:!0,countryCodes:["US"],onSuccess:function(t,e){this.payment_token_received=!0,this.set_nonce(t),this.set_metadata(e),this.fields.toFormFields(),i("#place_order").text(i("#place_order").data("value")),this.get_form().submit()}.bind(this),onExit:function(t,e){null!=t&&this.submit_error(t.error_message)}.bind(this)})}.bind(this))},e.prototype.place_order=function(t){this.is_gateway_selected()&&(this.payment_token_received||this.is_saved_method_selected()||(t.preventDefault(),this.linkHandler.open()))},e.prototype.hide_place_order=function(){},e.prototype.show_payment_button=function(){t.CheckoutGateway.prototype.show_place_order.apply(this,arguments)},e.prototype.set_metadata=function(t){this.fields.set(this.gateway_id+"_metadata",JSON.stringify(t))},e.prototype.fees_enabled=function(){return"1"==this.params.fees_enabled},e.prototype.payment_method_selected=function(){this.fees_enabled()&&i(document.body).trigger("update_checkout")},e.prototype.fetch_link_token=function(){return new Promise(function(e){i.post({url:this.params.routes.link_token,dataType:"json",data:{_wpnonce:this.params.rest_nonce}}).done(function(t){e(t.token)}.bind(this)).fail(function(t,e,n){i(this.container).hide(),console.log(n)}.bind(this))}.bind(this))},new e}(jQuery,window.wc_stripe);
|
assets/js/frontend/applepay-cart.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(t,a){function e(){a.BaseGateway.call(this,wc_stripe_applepay_cart_params)}(e.prototype=t.extend({},a.BaseGateway.prototype,a.CartGateway.prototype,a.ApplePay.prototype)).initialize=function(){a.CartGateway.call(this),a.ApplePay.prototype.initialize.call(this),this.canMakePayment().then(function(){t(this.container).addClass("active").parent().addClass("active"),this.add_cart_totals_class()}.bind(this))},e.prototype.append_button=function(){t("#wc-stripe-applepay-container").append(this.$button)},e.prototype.updated_html=function(){t(this.container).length||(this.can_pay=!1),this.can_pay&&(this.create_button(),t(this.container).show().addClass("active").parent().addClass("active"),this.add_cart_totals_class())},e.prototype.cart_emptied=function(t){this.can_pay=!1},new e}(jQuery,window.wc_stripe);
|
assets/js/frontend/applepay-checkout.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e,i){function t(){i.BaseGateway.call(this,wc_stripe_applepay_checkout_params)}(t.prototype=e.extend({},i.BaseGateway.prototype,i.CheckoutGateway.prototype,i.ApplePay.prototype)).initialize=function(){i.CheckoutGateway.call(this),e("form.checkout").on("change",".form-row:not(.address-field) .input-text",this.update_payment_request.bind(this)),e(this.container).length&&i.ApplePay.prototype.initialize.call(this)},t.prototype.canMakePayment=function(){i.ApplePay.prototype.canMakePayment.apply(this,arguments).then(function(){var t;this.banner_enabled()&&((t=e(this.params.button)).addClass("banner-checkout"),t.on("click",this.start.bind(this)),e(this.banner_container).empty().append(t),e(this.banner_container).show().parent().parent().addClass("active"))}.bind(this))},t.prototype.append_button=function(){e("#place_order").parent().append(this.$button),this.trigger_payment_method_selected()},t.prototype.updated_checkout=function(){e(this.container).length&&i.ApplePay.prototype.initialize.call(this)},t.prototype.start=function(t){e(t.target).is(".banner-checkout")&&(this.set_payment_method(this.gateway_id),this.set_use_new_option(!0)),i.ApplePay.prototype.start.apply(this,arguments)},t.prototype.on_token_received=function(){i.CheckoutGateway.prototype.on_token_received.apply(this,arguments),this.payment_request_options.requestShipping&&this.maybe_set_ship_to_different(),this.fields.toFormFields({update_shipping_method:!1}),this.checkout_fields_valid()&&this.get_form().submit()},t.prototype.update_payment_request=function(){e(this.container).length&&i.ApplePay.prototype.initialize.call(this)},new t}(jQuery,window.wc_stripe);
|
assets/js/frontend/applepay-product.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(t,a){function i(){a.BaseGateway.call(this,wc_stripe_applepay_product_params),this.old_qty=this.get_quantity()}(i.prototype=t.extend({},a.BaseGateway.prototype,a.ProductGateway.prototype,a.ApplePay.prototype)).initialize=function(){t(".wc_stripe_product_payment_methods "+this.container).length?(this.container=".wc_stripe_product_payment_methods "+this.container,a.ProductGateway.call(this),a.ApplePay.prototype.initialize.call(this)):setTimeout(this.initialize.bind(this),1e3)},i.prototype.canMakePayment=function(){a.ApplePay.prototype.canMakePayment.call(this).then(function(){t(document.body).on("change",'[name="quantity"]',this.add_to_cart.bind(this)),t(this.container).parent().parent().addClass("active"),this.is_variable_product()?this.variable_product_selected()?this.cart_calculation(this.get_product_data().variation.variation_id):this.disable_payment_button():this.cart_calculation()}.bind(this))},i.prototype.start=function(t){0===this.get_quantity()?(t.preventDefault(),this.submit_error(this.params.messages.invalid_amount)):a.ApplePay.prototype.start.apply(this,arguments)},i.prototype.append_button=function(){t("#wc-stripe-applepay-container").append(this.$button)},i.prototype.add_to_cart=function(){this.disable_payment_button(),this.old_qty=this.get_quantity();var t=this.get_product_data().variation;this.is_variable_product()&&!this.variable_product_selected()||this.cart_calculation(t.variation_id).then(function(){this.is_variable_product()?(this.createPaymentRequest(),a.ApplePay.prototype.canMakePayment.apply(this,arguments).then(function(){this.enable_payment_button()}.bind(this))):this.enable_payment_button()}.bind(this))},new i}(jQuery,wc_stripe);
|
assets/js/frontend/cc-forms.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e){function t(){this.index=1,this.total_steps=e(".wc-stripe-steps").data("steps"),this.updateSteppers(),this.updateStyles(),e(document.body).on("click",".wc-stripe-back",this.prev.bind(this)).on("click",".wc-stripe-next",this.next.bind(this)).on("updated_checkout",this.updated_checkout.bind(this))}t.prototype.next=function(t){t.preventDefault(),this.index++,e('.wc-stripe-minimalist-form .field-container[data-index="'+this.index+'"]').removeClass("field-container--hidden"),e('.wc-stripe-minimalist-form .field-container[data-index="'+(this.index-1)+'"]').addClass("field-container--hidden"),this.updateSteppers()},t.prototype.prev=function(t){t.preventDefault(),this.index--,e('.wc-stripe-minimalist-form .field-container[data-index="'+(this.index+1)+'"]').addClass("field-container--hidden"),e('.wc-stripe-minimalist-form .field-container[data-index="'+this.index+'"]').removeClass("field-container--hidden"),this.updateSteppers()},t.prototype.updateText=function(){var t=e(".wc-stripe-step").data("text");e(".wc-stripe-step").text(t.replace("%s",this.index))},t.prototype.updateSteppers=function(){1==this.index?e(".wc-stripe-back").hide():this.index==this.total_steps?e(".wc-stripe-next").hide():(e(".wc-stripe-next").show(),e(".wc-stripe-back").show()),this.updateText()},t.prototype.updated_checkout=function(){e('.wc-stripe-minimalist-form .field-container[data-index="'+this.index+'"]').removeClass("field-container--hidden"),this.updateSteppers(),this.updateStyles()},t.prototype.updateStyles=function(){var t;wc_stripe.credit_card&&(e("ul.payment_methods").outerWidth(),e("ul.payment_methods").outerWidth()<400&&(t={style:{base:{fontSize:"18px"}}},wc_stripe.credit_card.cardNumber.update(t),wc_stripe.credit_card.cardExpiry.update(t),wc_stripe.credit_card.cardCvc.update(t),e("ul.payment_methods").addClass("wc-stripe-sm")))},new t}(jQuery);
|
assets/js/frontend/credit-card.js
CHANGED
@@ -33,7 +33,6 @@
|
|
33 |
CC.prototype.initialize = function () {
|
34 |
$(document.body).on('click', '#place_order', this.place_order.bind(this));
|
35 |
this.setup_card();
|
36 |
-
this.create_card_element();
|
37 |
|
38 |
if (this.can_create_setup_intent()) {
|
39 |
this.create_setup_intent();
|
@@ -160,6 +159,7 @@
|
|
160 |
} else {
|
161 |
if ($('#wc-stripe-card-element').length) {
|
162 |
if ($('#wc-stripe-card-element').find('iframe').length == 0) {
|
|
|
163 |
this.card.mount('#wc-stripe-card-element');
|
164 |
this.card.update({
|
165 |
value: {
|
33 |
CC.prototype.initialize = function () {
|
34 |
$(document.body).on('click', '#place_order', this.place_order.bind(this));
|
35 |
this.setup_card();
|
|
|
36 |
|
37 |
if (this.can_create_setup_intent()) {
|
38 |
this.create_setup_intent();
|
159 |
} else {
|
160 |
if ($('#wc-stripe-card-element').length) {
|
161 |
if ($('#wc-stripe-card-element').find('iframe').length == 0) {
|
162 |
+
this.card.unmount();
|
163 |
this.card.mount('#wc-stripe-card-element');
|
164 |
this.card.update({
|
165 |
value: {
|
assets/js/frontend/credit-card.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(o,t){function e(){t.BaseGateway.call(this,wc_stripe_credit_card_params),t.CheckoutGateway.call(this),window.addEventListener("hashchange",this.hashchange.bind(this)),(t.credit_card=this).has3DSecureParams()}var i={focus:"focused",empty:"empty",invalid:"invalid"};(e.prototype=o.extend({},t.BaseGateway.prototype,t.CheckoutGateway.prototype)).mappings={cardNumber:"#stripe-card-number",cardExpiry:"#stripe-exp",cardCvc:"#stripe-cvv"},e.prototype.initialize=function(){o(document.body).on("click","#place_order",this.place_order.bind(this)),this.setup_card(),this.can_create_setup_intent()&&this.create_setup_intent()},e.prototype.setup_card=function(){this.is_custom_form()?(this.cardNumber=this.elements.create("cardNumber",{style:this.params.style,classes:i}),this.cardNumber.on("change",this.card_number_change.bind(this)),this.cardExpiry=this.elements.create("cardExpiry",{style:this.params.style,classes:i}),this.cardCvc=this.elements.create("cardCvc",{style:this.params.style,classes:i}),this.cardNumber.on("change",this.on_input_change.bind(this)),this.cardExpiry.on("change",this.on_input_change.bind(this)),this.cardCvc.on("change",this.on_input_change.bind(this)),this.fields.required("billing_postcode")&&""!==this.fields.get("billing_postcode")&&0<o("#stripe-postal-code").length&&(o("#stripe-postal-code").val(this.fields.get("billing_postcode")),this.validate_postal_field()),o(document.body).on("change","#billing_postcode",function(e){var t=o("#billing_postcode").val();o("#stripe-postal-code").val(t).trigger("keyup")}.bind(this))):(this.card=this.elements.create("card",{value:{postalCode:this.fields.get("billing_postcode","")},hidePostalCode:this.fields.required("billing_postcode"),style:this.params.style,iconStyle:"default"}),o(document.body).on("change","#billing_postcode",function(e){this.card&&this.card.update({value:o("#billing_postcode").val()})}.bind(this))),setInterval(this.create_card_element.bind(this),2e3)},e.prototype.validate_postal_field=function(){var e,t;o("#billing_postcode").length&&o("#stripe-postal-code").length?this.params.postal_regex[this.fields.get("billing_country")]?(t=this.params.postal_regex[this.fields.get("billing_country")],e=o("#stripe-postal-code").val(),t=new RegExp(t,"i"),""!==e?null!==t.exec(e)?o("#stripe-postal-code").addClass("StripeElement--complete").removeClass("invalid"):o("#stripe-postal-code").removeClass("StripeElement--complete").addClass("invalid"):o("#stripe-postal-code").removeClass("StripeElement--complete").removeClass("invalid")):0!=o("#stripe-postal-code").val()?o("#stripe-postal-code").addClass("StripeElement--complete"):o("#stripe-postal-code").removeClass("StripeElement--complete"):o("#stripe-postal-code").length&&(""!=o("#stripe-postal-code").val()?o("#stripe-postal-code").addClass("StripeElement--complete"):o("#stripe-postal-code").removeClass("StripeElement--complete"))},e.prototype.create_card_element=function(){this.is_custom_form()?o("#wc-stripe-cc-custom-form").length&&0==o("#wc-stripe-cc-custom-form").find("iframe").length&&(o(this.mappings.cardNumber).length&&(this.cardNumber.mount(this.mappings.cardNumber),o(this.mappings.cardNumber).prepend(this.params.html.card_brand)),o(this.mappings.cardExpiry).length&&this.cardExpiry.mount(this.mappings.cardExpiry),o(this.mappings.cardCvc).length&&this.cardCvc.mount(this.mappings.cardCvc),o("#stripe-postal-code").length&&(o("#stripe-postal-code, .postalCode").on("focus",function(e){o("#stripe-postal-code").addClass("focused")}.bind(this)),o("#stripe-postal-code, .postalCode").on("blur",function(e){o("#stripe-postal-code").removeClass("focused").trigger("keyup")}.bind(this)),o("#stripe-postal-code").on("keyup",function(e){0==o("#stripe-postal-code").val()?o("#stripe-postal-code").addClass("empty"):o("#stripe-postal-code").removeClass("empty")}.bind(this)),o("#stripe-postal-code").on("change",this.validate_postal_field.bind(this)),o("#stripe-postal-code").trigger("change"))):o("#wc-stripe-card-element").length&&0==o("#wc-stripe-card-element").find("iframe").length&&(this.card.unmount(),this.card.mount("#wc-stripe-card-element"),this.card.update({value:{postalCode:this.fields.get("billing_postcode","")},hidePostalCode:this.fields.required("billing_postcode")})),o(this.container).outerWidth(!0)<450?o(this.container).addClass("stripe-small-container"):o(this.container).removeClass("stripe-small-container")},e.prototype.place_order=function(e){this.is_gateway_selected()&&(this.can_create_setup_intent()&&!this.is_saved_method_selected()?(e.preventDefault(),this.stripe.confirmCardSetup(this.client_secret,{payment_method:{card:this.is_custom_form()?this.cardNumber:this.card,billing_details:function(){return this.is_current_page("checkout")?this.get_billing_details():o.extend({},this.is_custom_form()?{address:{postal_code:o("#stripe-postal-code").val()}}:{})}.bind(this)()}}).then(function(e){e.error?this.submit_error(e.error):this.on_setup_intent_received(e.setupIntent.payment_method)}.bind(this))):this.payment_token_received||this.is_saved_method_selected()||(e.preventDefault(),this.checkout_fields_valid()&&this.stripe.createPaymentMethod({type:"card",card:this.is_custom_form()?this.cardNumber:this.card,billing_details:this.get_billing_details()}).then(function(e){e.error?this.submit_error(e.error):this.on_token_received(e.paymentMethod)}.bind(this))))},e.prototype.checkout_place_order=function(){return this.is_saved_method_selected()||this.payment_token_received?t.CheckoutGateway.prototype.checkout_place_order.apply(this,arguments):(this.place_order.apply(this,arguments),!1)},e.prototype.create_setup_intent=function(){return new Promise(function(t,e){o.when(o.ajax({method:"GET",dataType:"json",url:this.params.routes.setup_intent,beforeSend:this.ajax_before_send.bind(this)})).done(function(e){e.code?this.submit_error(e.message):this.client_secret=e.intent.client_secret,t(e)}.bind(this)).fail(function(e,t,i){this.submit_error(i)}.bind(this))}.bind(this))},e.prototype.on_token_received=function(e){this.payment_token_received=!0,this.set_nonce(e.id),this.get_form().submit()},e.prototype.on_setup_intent_received=function(e){this.payment_token_received=!0,this.set_nonce(e),this.get_form().submit()},e.prototype.updated_checkout=function(){this.create_card_element(),this.can_create_setup_intent()&&!this.client_secret&&this.create_setup_intent()},e.prototype.update_checkout=function(){this.clear_card_elements()},e.prototype.show_payment_button=function(){t.CheckoutGateway.prototype.show_place_order.apply(this,arguments)},e.prototype.hide_place_order=function(){},e.prototype.is_custom_form=function(){return"1"===this.params.custom_form},e.prototype.get_element_options=function(){return this.params.elementOptions},e.prototype.get_postal_code=function(){return this.is_custom_form()&&0<o("#stripe-postal-code").length?o("#stripe-postal-code").val():this.fields.get("billing_postcode",null)},e.prototype.card_number_change=function(e){"unknown"===e.brand?o("#wc-stripe-card").removeClass("active"):o("#wc-stripe-card").addClass("active"),o("#wc-stripe-card").attr("src",this.params.cards[e.brand])},e.prototype.on_input_change=function(e){if(e.complete){var t=o("#wc-stripe-cc-custom-form").find(".StripeElement, #stripe-postal-code"),i=[];t.each(function(e,t){i.push("#"+o(t).attr("id"))}.bind(this));var e=this.mappings[e.elementType],s=i.indexOf(e);if("undefined"!=typeof i[s+1])if("#stripe-postal-code"===i[s+1])document.getElementById("stripe-postal-code").focus();else for(var r in this.mappings)this.mappings[r]===i[s+1]&&this[r].focus()}},e.prototype.clear_card_elements=function(){for(var e=["cardNumber","cardExpiry","cardCvc"],t=0;t<e.length;t++)this[e[t]]&&this[e[t]].clear()},e.prototype.checkout_error=function(){this.is_gateway_selected()&&(this.payment_token_received=!1),t.CheckoutGateway.prototype.checkout_error.call(this)},e.prototype.get_billing_details=function(){var e=t.BaseGateway.prototype.get_billing_details.call(this);return e.address.postal_code=this.get_postal_code(),e},e.prototype.can_create_setup_intent=function(){return this.is_add_payment_method_page()||this.is_change_payment_method()||this.is_current_page("checkout")&&this.cart_contains_subscription()&&this.get_gateway_data()&&0==this.get_total_price_cents()||this.is_current_page("checkout")&&"undefined"!=typeof wc_stripe_preorder_exists||this.is_current_page("order_pay")&&"pre_order"in this.get_gateway_data()&&!0===this.get_gateway_data().pre_order},new e}(jQuery,window.wc_stripe);
|
assets/js/frontend/form-handler.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
jQuery(function($) {
|
2 |
|
3 |
/**
|
4 |
* @constructor
|
@@ -11,7 +11,7 @@ jQuery(function($) {
|
|
11 |
* Initialize functionality.
|
12 |
* @return {[type]}
|
13 |
*/
|
14 |
-
Handler.prototype.init = function() {
|
15 |
|
16 |
// event emitted from WC checkout.js
|
17 |
$(document.body).on('payment_method_selected', this.payment_method_selected.bind(this));
|
@@ -22,18 +22,47 @@ jQuery(function($) {
|
|
22 |
|
23 |
this.saved_payment_methods();
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
if ($(document.body).is('.woocommerce-cart')) {
|
26 |
$(window).on('resize', this.cart_html);
|
27 |
this.cart_html();
|
28 |
}
|
29 |
}
|
30 |
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
/**
|
34 |
* @return {[type]}
|
35 |
*/
|
36 |
-
Handler.prototype.payment_method_selected = function() {
|
37 |
var gateway = this.get_payment_method();
|
38 |
$(document.body).triggerHandler('wc_stripe_payment_method_selected', gateway);
|
39 |
}
|
@@ -41,7 +70,7 @@ jQuery(function($) {
|
|
41 |
/**
|
42 |
* @return {[type]}
|
43 |
*/
|
44 |
-
Handler.prototype.updated_checkout = function() {
|
45 |
this.saved_payment_methods();
|
46 |
|
47 |
if ($(document.body).hasClass('woocommerce-checkout')) {
|
@@ -54,16 +83,16 @@ jQuery(function($) {
|
|
54 |
/**
|
55 |
* @return {[type]}
|
56 |
*/
|
57 |
-
Handler.prototype.payment_type_change = function() {
|
58 |
var gateway = this.get_payment_method();
|
59 |
var $input = $('[name="' + gateway + '_payment_type_key"]:checked');
|
60 |
if ($input.length === 0 || $input.val() === "new") {
|
61 |
-
$('.wc-' + gateway + '-saved-methods-container').slideUp(400, function() {
|
62 |
$('.wc-' + gateway + '-new-method-container').slideDown(400);
|
63 |
});
|
64 |
$(document.body).triggerHandler('wc_stripe_new_method_' + gateway);
|
65 |
} else {
|
66 |
-
$('.wc-' + gateway + '-new-method-container').slideUp(400, function() {
|
67 |
$('.wc-' + gateway + '-saved-methods-container').slideDown(400);
|
68 |
});
|
69 |
$(document.body).triggerHandler('wc_stripe_saved_method_' + gateway);
|
@@ -73,7 +102,7 @@ jQuery(function($) {
|
|
73 |
/**
|
74 |
* @return {[type]}
|
75 |
*/
|
76 |
-
Handler.prototype.saved_payment_methods = function() {
|
77 |
if ($().selectWoo) {
|
78 |
if ($('select.wc-stripe-saved-methods').length && !$('select.wc-stripe-saved-methods').hasClass('enhanced')) {
|
79 |
$('select.wc-stripe-saved-methods').selectWoo({
|
@@ -81,7 +110,7 @@ jQuery(function($) {
|
|
81 |
templateResult: this.output_template,
|
82 |
templateSelection: this.output_template,
|
83 |
language: {
|
84 |
-
noResults: function() {
|
85 |
return wc_stripe_form_handler_params.no_results;
|
86 |
}.bind(this)
|
87 |
}
|
@@ -93,7 +122,7 @@ jQuery(function($) {
|
|
93 |
/**
|
94 |
* @return {[type]}
|
95 |
*/
|
96 |
-
Handler.prototype.get_payment_method = function() {
|
97 |
return $('[name="payment_method"]:checked').val();
|
98 |
}
|
99 |
|
@@ -101,7 +130,7 @@ jQuery(function($) {
|
|
101 |
* @param {[type]}
|
102 |
* @return {[type]}
|
103 |
*/
|
104 |
-
Handler.prototype.get_payment_type = function(gateway) {
|
105 |
return $('[name="' + gateway + '"]:checked').val();
|
106 |
}
|
107 |
|
@@ -110,9 +139,9 @@ jQuery(function($) {
|
|
110 |
* @param {[type]}
|
111 |
* @return {[type]}
|
112 |
*/
|
113 |
-
Handler.prototype.output_template = function(data, container) {
|
114 |
var classes = $(data.element).attr('class');
|
115 |
-
$.each($(data.element).parent().find('option'), function() {
|
116 |
$(container).removeClass($(this).attr('class'));
|
117 |
})
|
118 |
$(container).addClass('wc-stripe-select2-container ' + classes);
|
@@ -120,7 +149,7 @@ jQuery(function($) {
|
|
120 |
return data.text;
|
121 |
}
|
122 |
|
123 |
-
Handler.prototype.cart_html = function() {
|
124 |
var $button = $('.checkout-button'),
|
125 |
width = $button.outerWidth();
|
126 |
if (width && $('.wc_stripe_cart_payment_methods').length) {
|
1 |
+
jQuery(function ($) {
|
2 |
|
3 |
/**
|
4 |
* @constructor
|
11 |
* Initialize functionality.
|
12 |
* @return {[type]}
|
13 |
*/
|
14 |
+
Handler.prototype.init = function () {
|
15 |
|
16 |
// event emitted from WC checkout.js
|
17 |
$(document.body).on('payment_method_selected', this.payment_method_selected.bind(this));
|
22 |
|
23 |
this.saved_payment_methods();
|
24 |
|
25 |
+
if ('MutationObserver' in window && null !== document.querySelector('form.checkout')) {
|
26 |
+
var observer = new MutationObserver(this.observer_callback.bind(this));
|
27 |
+
observer.observe(document.querySelector('form.checkout'), {
|
28 |
+
attributes: false,
|
29 |
+
childList: true,
|
30 |
+
subtree: true
|
31 |
+
});
|
32 |
+
}
|
33 |
+
|
34 |
if ($(document.body).is('.woocommerce-cart')) {
|
35 |
$(window).on('resize', this.cart_html);
|
36 |
this.cart_html();
|
37 |
}
|
38 |
}
|
39 |
|
40 |
+
Handler.prototype.observer_callback = function (records, observer) {
|
41 |
+
try {
|
42 |
+
if (records.length > 0) {
|
43 |
+
for (var i = 0; i < records.length; i++) {
|
44 |
+
if (records[i].addedNodes && records[i].addedNodes.length > 0) {
|
45 |
+
var nodes = records[i].addedNodes;
|
46 |
+
for (var n = 0; n < nodes.length; n++) {
|
47 |
+
if (nodes[n].nodeName === 'UL' && nodes[n].classList && nodes[n].classList.value.indexOf('payment_methods')) {
|
48 |
+
// destroy the select2 elements so they can be re-added since previous events are orphaned
|
49 |
+
$('select.wc-stripe-saved-methods').removeClass('enhanced');
|
50 |
+
$('select.wc-stripe-saved-methods + .select2').remove();
|
51 |
+
this.saved_payment_methods();
|
52 |
+
}
|
53 |
+
}
|
54 |
+
}
|
55 |
+
}
|
56 |
+
}
|
57 |
+
} catch (err) {
|
58 |
+
//fail gracefully
|
59 |
+
}
|
60 |
+
}
|
61 |
|
62 |
/**
|
63 |
* @return {[type]}
|
64 |
*/
|
65 |
+
Handler.prototype.payment_method_selected = function () {
|
66 |
var gateway = this.get_payment_method();
|
67 |
$(document.body).triggerHandler('wc_stripe_payment_method_selected', gateway);
|
68 |
}
|
70 |
/**
|
71 |
* @return {[type]}
|
72 |
*/
|
73 |
+
Handler.prototype.updated_checkout = function () {
|
74 |
this.saved_payment_methods();
|
75 |
|
76 |
if ($(document.body).hasClass('woocommerce-checkout')) {
|
83 |
/**
|
84 |
* @return {[type]}
|
85 |
*/
|
86 |
+
Handler.prototype.payment_type_change = function () {
|
87 |
var gateway = this.get_payment_method();
|
88 |
var $input = $('[name="' + gateway + '_payment_type_key"]:checked');
|
89 |
if ($input.length === 0 || $input.val() === "new") {
|
90 |
+
$('.wc-' + gateway + '-saved-methods-container').slideUp(400, function () {
|
91 |
$('.wc-' + gateway + '-new-method-container').slideDown(400);
|
92 |
});
|
93 |
$(document.body).triggerHandler('wc_stripe_new_method_' + gateway);
|
94 |
} else {
|
95 |
+
$('.wc-' + gateway + '-new-method-container').slideUp(400, function () {
|
96 |
$('.wc-' + gateway + '-saved-methods-container').slideDown(400);
|
97 |
});
|
98 |
$(document.body).triggerHandler('wc_stripe_saved_method_' + gateway);
|
102 |
/**
|
103 |
* @return {[type]}
|
104 |
*/
|
105 |
+
Handler.prototype.saved_payment_methods = function () {
|
106 |
if ($().selectWoo) {
|
107 |
if ($('select.wc-stripe-saved-methods').length && !$('select.wc-stripe-saved-methods').hasClass('enhanced')) {
|
108 |
$('select.wc-stripe-saved-methods').selectWoo({
|
110 |
templateResult: this.output_template,
|
111 |
templateSelection: this.output_template,
|
112 |
language: {
|
113 |
+
noResults: function () {
|
114 |
return wc_stripe_form_handler_params.no_results;
|
115 |
}.bind(this)
|
116 |
}
|
122 |
/**
|
123 |
* @return {[type]}
|
124 |
*/
|
125 |
+
Handler.prototype.get_payment_method = function () {
|
126 |
return $('[name="payment_method"]:checked').val();
|
127 |
}
|
128 |
|
130 |
* @param {[type]}
|
131 |
* @return {[type]}
|
132 |
*/
|
133 |
+
Handler.prototype.get_payment_type = function (gateway) {
|
134 |
return $('[name="' + gateway + '"]:checked').val();
|
135 |
}
|
136 |
|
139 |
* @param {[type]}
|
140 |
* @return {[type]}
|
141 |
*/
|
142 |
+
Handler.prototype.output_template = function (data, container) {
|
143 |
var classes = $(data.element).attr('class');
|
144 |
+
$.each($(data.element).parent().find('option'), function () {
|
145 |
$(container).removeClass($(this).attr('class'));
|
146 |
})
|
147 |
$(container).addClass('wc-stripe-select2-container ' + classes);
|
149 |
return data.text;
|
150 |
}
|
151 |
|
152 |
+
Handler.prototype.cart_html = function () {
|
153 |
var $button = $('.checkout-button'),
|
154 |
width = $button.outerWidth();
|
155 |
if (width && $('.wc_stripe_cart_payment_methods').length) {
|
assets/js/frontend/form-handler.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
jQuery(function(a){function e(){this.init()}e.prototype.init=function(){a(document.body).on("payment_method_selected",this.payment_method_selected.bind(this)),a(document.body).on("change",'[name="payment_method"]',this.payment_method_selected.bind(this)),a(document.body).on("updated_checkout",this.updated_checkout.bind(this)),a(document.body).on("change",".wc-stripe-payment-type",this.payment_type_change.bind(this)),a(document.body).on("updated_wc_div, updated_cart_totals",this.cart_html.bind(this)),this.saved_payment_methods(),"MutationObserver"in window&&null!==document.querySelector("form.checkout")&&new MutationObserver(this.observer_callback.bind(this)).observe(document.querySelector("form.checkout"),{attributes:!1,childList:!0,subtree:!0}),a(document.body).is(".woocommerce-cart")&&(a(window).on("resize",this.cart_html),this.cart_html())},e.prototype.observer_callback=function(e,t){try{if(0<e.length)for(var o=0;o<e.length;o++)if(e[o].addedNodes&&0<e[o].addedNodes.length)for(var n=e[o].addedNodes,s=0;s<n.length;s++)"UL"===n[s].nodeName&&n[s].classList&&n[s].classList.value.indexOf("payment_methods")&&(a("select.wc-stripe-saved-methods").removeClass("enhanced"),a("select.wc-stripe-saved-methods + .select2").remove(),this.saved_payment_methods())}catch(d){}},e.prototype.payment_method_selected=function(){var e=this.get_payment_method();a(document.body).triggerHandler("wc_stripe_payment_method_selected",e)},e.prototype.updated_checkout=function(){this.saved_payment_methods(),a(document.body).hasClass("woocommerce-checkout")&&a(".payment_methods").width()<475&&a(".payment_methods").addClass("stripe-small")},e.prototype.payment_type_change=function(){var e=this.get_payment_method(),t=a('[name="'+e+'_payment_type_key"]:checked');0===t.length||"new"===t.val()?(a(".wc-"+e+"-saved-methods-container").slideUp(400,function(){a(".wc-"+e+"-new-method-container").slideDown(400)}),a(document.body).triggerHandler("wc_stripe_new_method_"+e)):(a(".wc-"+e+"-new-method-container").slideUp(400,function(){a(".wc-"+e+"-saved-methods-container").slideDown(400)}),a(document.body).triggerHandler("wc_stripe_saved_method_"+e))},e.prototype.saved_payment_methods=function(){a().selectWoo&&a("select.wc-stripe-saved-methods").length&&!a("select.wc-stripe-saved-methods").hasClass("enhanced")&&a("select.wc-stripe-saved-methods").selectWoo({width:"100%",templateResult:this.output_template,templateSelection:this.output_template,language:{noResults:function(){return wc_stripe_form_handler_params.no_results}.bind(this)}}).addClass("enhanced").trigger("change")},e.prototype.get_payment_method=function(){return a('[name="payment_method"]:checked').val()},e.prototype.get_payment_type=function(e){return a('[name="'+e+'"]:checked').val()},e.prototype.output_template=function(e,t){var o=a(e.element).attr("class");return a.each(a(e.element).parent().find("option"),function(){a(t).removeClass(a(this).attr("class"))}),a(t).addClass("wc-stripe-select2-container "+o),a(document.body).triggerHandler("wc_stripe_payment_method_template",[e,t]),e.text},e.prototype.cart_html=function(){var e=a(".checkout-button"),t=e.outerWidth();t&&a(".wc_stripe_cart_payment_methods").length&&a(".wc_stripe_cart_payment_methods ").width(t),"none"!==e.css("float")&&a(".wc_stripe_cart_payment_methods ").css("float",e.css("float"))},new e});
|
assets/js/frontend/googlepay-cart.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e,t){function a(){t.BaseGateway.call(this,wc_stripe_googlepay_cart_params),t.CartGateway.call(this),window.addEventListener("hashchange",this.hashchange.bind(this))}(a.prototype=e.extend({},t.BaseGateway.prototype,t.CartGateway.prototype,t.GooglePay.prototype)).initialize=function(){this.createPaymentsClient(),this.isReadyToPay().then(function(){e(this.container).show().addClass("active").parent().addClass("active"),this.add_cart_totals_class()}.bind(this))},a.prototype.create_button=function(){t.GooglePay.prototype.create_button.apply(this,arguments),e("#wc-stripe-googlepay-container").append(this.$button)},a.prototype.updated_html=function(){this.can_pay&&(this.create_button(),e(this.container).show().addClass("active").parent().addClass("active"),this.add_cart_totals_class())},a.prototype.payment_data_updated=function(t,a){"SHIPPING_ADDRESS"===a.callbackTrigger&&e(document.body).trigger("wc_update_cart")},new a}(jQuery,window.wc_stripe);
|
assets/js/frontend/googlepay-checkout.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e,t){function i(){this.can_pay=!1,t.BaseGateway.call(this,wc_stripe_googlepay_checkout_params),t.CheckoutGateway.call(this),window.addEventListener("hashchange",this.hashchange.bind(this)),this.has3DSecureParams()}(i.prototype=e.extend({},t.BaseGateway.prototype,t.CheckoutGateway.prototype,t.GooglePay.prototype)).initialize=function(){e(this.container).length&&(this.createPaymentsClient(),this.isReadyToPay().then(function(){var t;e(this.container).show(),this.banner_enabled()&&(t=e(this.paymentsClient.createButton({onClick:this.banner_checkout.bind(this),buttonColor:this.params.button_color,buttonType:this.params.button_style})),e(this.banner_container).show().parent().parent().addClass("active"),e(this.banner_container).empty().append(t))}.bind(this)))},i.prototype.create_button=function(){t.GooglePay.prototype.create_button.apply(this,arguments),e("#place_order").parent().append(this.$button),this.trigger_payment_method_selected()},i.prototype.updated_checkout=function(){this.initialize()},i.prototype.banner_checkout=function(){this.set_payment_method(this.gateway_id),this.set_use_new_option(!0),t.GooglePay.prototype.start.apply(this,arguments)},i.prototype.on_token_received=function(){t.CheckoutGateway.prototype.on_token_received.apply(this,arguments),this.payment_request_options.shippingAddressRequired&&this.maybe_set_ship_to_different(),this.fields.toFormFields({update_shipping_method:!1}),this.checkout_fields_valid()&&this.get_form().submit()},i.prototype.payment_data_updated=function(t){this.populate_billing_fields(t.address),this.fields.toFormFields({update_shipping_method:!1})},new i}(jQuery,window.wc_stripe);
|
assets/js/frontend/googlepay-product.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(t,e){function i(){e.BaseGateway.call(this,wc_stripe_googlepay_product_params),window.addEventListener("hashchange",this.hashchange.bind(this))}(i.prototype=t.extend({},e.BaseGateway.prototype,e.ProductGateway.prototype,e.GooglePay.prototype)).initialize=function(){if(!t(this.container).length)return setTimeout(this.initialize.bind(this),1e3);e.ProductGateway.call(this),this.createPaymentsClient(),this.isReadyToPay().then(function(){t(this.container).show(),t(this.container).parent().parent().addClass("active")}.bind(this))},i.prototype.create_button=function(){e.GooglePay.prototype.create_button.apply(this,arguments),t("#wc-stripe-googlepay-container").append(this.$button),this.is_variable_product()&&!this.variable_product_selected()&&this.disable_payment_button()},i.prototype.get_button=function(){return t(this.$button).find(".gpay-button")},i.prototype.start=function(){0<this.get_quantity()?this.add_to_cart().then(function(){e.GooglePay.prototype.start.apply(this,arguments)}.bind(this)):this.submit_error(this.params.messages.invalid_amount)},i.prototype.found_variation=function(){e.ProductGateway.prototype.found_variation.apply(this,arguments),this.enable_payment_button()},new i}(jQuery,wc_stripe);
|
assets/js/frontend/local-payment.js
CHANGED
@@ -1,13 +1,5 @@
|
|
1 |
(function ($, wc_stripe) {
|
2 |
|
3 |
-
var place_order_width = $('#place_order').css('width');
|
4 |
-
|
5 |
-
// this will ensure the place order's width does not change when the
|
6 |
-
// text for the local payment method is added
|
7 |
-
$(document.body).on('updated_checkout', function () {
|
8 |
-
$('#place_order').css('min-width', place_order_width)
|
9 |
-
})
|
10 |
-
|
11 |
/**
|
12 |
* [LocalPayment description]
|
13 |
*/
|
@@ -188,7 +180,7 @@
|
|
188 |
var match = e.newURL.match(/response=(.*)/);
|
189 |
if (match) {
|
190 |
history.pushState({}, '', window.location.pathname);
|
191 |
-
var obj = JSON.parse(window.atob(match[1]));
|
192 |
this.processConfirmation(obj);
|
193 |
}
|
194 |
}
|
@@ -206,9 +198,7 @@
|
|
206 |
LocalPayment.prototype.get_confirmation_args = function (obj) {
|
207 |
var args = {
|
208 |
payment_method: {
|
209 |
-
billing_details:
|
210 |
-
name: this.get_first_name('billing') + ' ' + this.get_last_name('billing')
|
211 |
-
}
|
212 |
},
|
213 |
return_url: obj.return_url
|
214 |
};
|
@@ -587,7 +577,7 @@
|
|
587 |
var match = e.newURL.match(/qrcode=(.*)/);
|
588 |
if (match) {
|
589 |
history.pushState({}, '', window.location.pathname);
|
590 |
-
this.qrcode = JSON.parse(window.atob(match[1]));
|
591 |
this.get_form().unblock().removeClass('processing').addClass('wechat');
|
592 |
var qrCode = new QRCode('wc_stripe_local_payment_stripe_wechat', {
|
593 |
text: this.qrcode.code,
|
1 |
(function ($, wc_stripe) {
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
/**
|
4 |
* [LocalPayment description]
|
5 |
*/
|
180 |
var match = e.newURL.match(/response=(.*)/);
|
181 |
if (match) {
|
182 |
history.pushState({}, '', window.location.pathname);
|
183 |
+
var obj = JSON.parse(window.atob(decodeURIComponent(match[1])));
|
184 |
this.processConfirmation(obj);
|
185 |
}
|
186 |
}
|
198 |
LocalPayment.prototype.get_confirmation_args = function (obj) {
|
199 |
var args = {
|
200 |
payment_method: {
|
201 |
+
billing_details: this.get_billing_details()
|
|
|
|
|
202 |
},
|
203 |
return_url: obj.return_url
|
204 |
};
|
577 |
var match = e.newURL.match(/qrcode=(.*)/);
|
578 |
if (match) {
|
579 |
history.pushState({}, '', window.location.pathname);
|
580 |
+
this.qrcode = JSON.parse(window.atob(decodeURIComponent(match[1])));
|
581 |
this.get_form().unblock().removeClass('processing').addClass('wechat');
|
582 |
var qrCode = new QRCode('wc_stripe_local_payment_stripe_wechat', {
|
583 |
text: this.qrcode.code,
|
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)),this.is_current_page("order_pay")&&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 a(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 o(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||this.is_saved_method_selected()||(e.preventDefault(),this.createSource()))},s.prototype.process_order_pay=function(e){this.is_gateway_selected()&&(e.preventDefault(),(e=this.get_form().serializeArray()).push({name:"_wpnonce",value:this.params.rest_nonce}),e.push({name:"order_id",value:this.params.order_id}),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()}.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))},a.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))},a.prototype.processConfirmation=function(e){window.Klarna.Payments.init({client_token:e.klarna.client_token},function(e){}.bind(this)),this.payment_categories=e.klarna.payment_method_categories.split(","),this.render_ui(!0)},a.prototype.hashchange=function(){this.is_gateway_selected()&&(history.pushState({},"",window.location.pathname),this.get_form().submit())},a.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")}},a.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)))},a.prototype.klarna_fields_valid=function(){if(this.fields.validateFields("billing"))return!this.needs_shipping()||(!!("billing"===this.get_shipping_prefix()||"shipping"===this.get_shipping_prefix()&&this.fields.validateFields("shipping"))||void 0)},a.prototype.initialize=function(){this.is_gateway_selected()&&this.is_active()&&!this.source&&this.klarna_fields_valid()&&this.createSource()},a.prototype.createSource=function(){clearTimeout(this.createSourceTimer),this.createSourceTimer=setTimeout(function(){this.show_loader(),this.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)},a.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)())},a.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)},a.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))},a.prototype.checkout_error=function(){s.prototype.checkout_error.apply(this,arguments),this.is_gateway_selected()&&this.createSource()},a.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)},a.prototype.hide_loader=function(){r(this.container).find(".wc-stripe-klarna-loader").remove()},a.prototype.filter_payment_method_categories=function(){var e=this.source.klarna.payment_method_categories.split(",");this.source.klarna.payment_method_categories=e.filter(function(e){return-1<this.get_gateway_data().payment_sections.indexOf(e)}.bind(this)).join(",")},a.prototype.get_source_update_args=function(e){return["type","currency","statement_descriptor","redirect","klarna.product","klarna.locale","klarna.custom_payment_methods"].reduce(function(e,t){if(-1<t.indexOf(".")){var i=t.split(".");return delete i.slice(0,i.length-1).reduce(function(e,t){return e[t]},e)[t=i[i.length-1]],e}return delete e[t],e},e)},a.prototype.on_payment_method_selected=function(e,t){t===this.gateway_id&&(this.source||(this.klarna_fields_valid()?this.createSource():this.submit_error(this.params.messages.required_field)),i.CheckoutGateway.prototype.on_payment_method_selected.apply(this,arguments))},a.prototype.input_change=function(){this.is_gateway_selected()&&(this.source?this.update_source():this.klarna_fields_valid()&&this.createSource())},h.prototype.updated_checkout=function(){!this.script_loaded&&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(){var e=r.extend({},s.prototype.getSourceArgs.apply(this,arguments),{mandate:{notification_method:"email",interval:this.cart_contains_subscription()||this.is_change_payment_method()?"scheduled":"one_time"}});return"scheduled"===e.mandate.interval&&delete e.amount,e},t.prototype=r.extend({},s.prototype,t.prototype),n.prototype=r.extend({},s.prototype,n.prototype),a.prototype=r.extend({},s.prototype,a.prototype),o.prototype=r.extend({},s.prototype,o.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:a,fpx:o,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);
|
1 |
+
!function(o,i){function s(e){i.BaseGateway.call(this,e),i.CheckoutGateway.call(this),o(document.body).on("click","#place_order",this.place_order.bind(this)),this.is_current_page("order_pay")&&o("#order_review").on("submit",this.process_order_pay.bind(this)),this.maybe_hide_gateway()}function e(e){this.elementType="idealBank",this.confirmation_method="confirmIdealPayment",s.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}function t(e){this.elementType="iban",s.call(this,e)}function n(e){s.call(this,e),o(document.body).on("change",".wc-stripe-klarna-category",this.category_change.bind(this)),window.addEventListener("hashchange",this.hashchange.bind(this)),o("form.checkout").on("change",".form-row:not(.address-field) .input-text, .form-row:not(.address-field) select",this.input_change.bind(this))}function r(e){this.elementType="fpxBank",this.confirmation_method="confirmFpxPayment",s.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}function a(e){s.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}function h(e){this.elementType="auBankAccount",this.confirmation_method="confirmAuBecsDebitPayment",s.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}function c(e){this.confirmation_method="confirmGrabPayPayment",s.call(this,e),window.addEventListener("hashchange",this.hashChange.bind(this))}(s.prototype=o.extend({},i.BaseGateway.prototype,i.CheckoutGateway.prototype)).initialize=function(){this.mount_button()},s.prototype.elementType=null,s.prototype.is_active=function(){return o("#wc_stripe_local_payment_"+this.gateway_id).data("active")},s.prototype.maybe_hide_gateway=function(){this.is_active()?o(this.container).show():o(this.container).hide()},s.prototype.createSource=function(){return new Promise(function(t,e){var i=function(e){e.error?this.submit_error(e.error.message):(this.payment_token_received=!0,o(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||this.is_saved_method_selected()||(e.preventDefault(),this.createSource()))},s.prototype.process_order_pay=function(e){this.is_gateway_selected()&&(e.preventDefault(),(e=this.get_form().serializeArray()).push({name:"_wpnonce",value:this.params.rest_nonce}),e.push({name:"order_id",value:this.params.order_id}),o.ajax({url:this.params.routes.order_pay+window.location.search,method:"POST",dataType:"json",data:o.param(e)}).done(function(e){e.success?window.location.href=e.redirect:this.submit_error(e.message)}.bind(this)).fail(function(e,t,i){this.submit_error(i)}.bind(this)))},s.prototype.show_payment_button=function(){this.show_place_order()},s.prototype.hide_place_order=function(){},s.prototype.show_place_order=function(){i.CheckoutGateway.prototype.show_place_order.apply(this,arguments),this.payment_token_received&&o("#place_order").text(o("#place_order").data("value"))},s.prototype.getSourceArgs=function(){return{type:this.params.local_payment_type,amount:this.get_total_price_cents(),currency:this.get_currency(),owner:{name:this.get_customer_name("billing"),email:this.fields.get("billing_email",null)},redirect:{return_url:this.params.return_url}}},s.prototype.updated_checkout=function(){this.mount_button(),this.maybe_hide_gateway()},s.prototype.mount_button=function(){var e="#wc_stripe_local_payment_"+this.gateway_id;o(e).length&&null!=this.elementType&&(o(e).empty(),this.element||(this.element=this.elements.create(this.elementType,this.params.element_params),this.element.on("change",this.handleElementChange.bind(this))),this.elementEmpty=!0,this.element.mount(e))},s.prototype.handleElementChange=function(e){this.elementEmpty=e.empty},s.prototype.load_external_script=function(e){var t=document.createElement("script");t.type="text/javascript",t.src=e,t.onload=function(){this.script_loaded=!0}.bind(this),document.body.appendChild(t)},s.prototype.hashChange=function(e){!this.is_gateway_selected()||(e=e.newURL.match(/response=(.*)/))&&(history.pushState({},"",window.location.pathname),e=JSON.parse(window.atob(decodeURIComponent(e[1]))),this.processConfirmation(e))},s.prototype.processConfirmation=function(e){this.stripe[this.confirmation_method](e.client_secret,this.get_confirmation_args(e)).then(function(e){if(e.error)return this.submit_error(e.error.message);this.get_form().submit()}.bind(this))},s.prototype.get_confirmation_args=function(e){e={payment_method:{billing_details:this.get_billing_details()},return_url:e.return_url};return this.elementType&&(e.payment_method[this.params.local_payment_type]=this.element),e},s.prototype.isValidElement=function(){return!this.element||!this.elementEmpty},s.prototype.delete_order_source=function(){return new Promise(function(t,e){o.ajax({url:this.params.routes.delete_order_source,method:"DELETE",dataType:"json",beforeSend:this.ajax_before_send.bind(this)}).done(function(e){t(e)}.bind(this)).fail(function(){e()}.bind(this))}.bind(this))},s.prototype.update_source=function(i){return new Promise(function(t,e){o.ajax({url:this.params.routes.update_source,method:"POST",dataType:"json",data:{_wpnonce:this.params.rest_nonce,updates:i,source_id:this.source.id,client_secret:this.source.client_secret,payment_method:this.gateway_id}}).done(function(e){t(e.source)}.bind(this)).fail(function(){e()})}.bind(this))},n.prototype.category_change=function(e){var t=function(){o('[id^="klarna-instance-"]').slideUp();var e=o('[name="klarna_category"]:checked').val();o("#klarna-instance-"+e).slideDown()}.bind(this);e.originalEvent?t():(clearTimeout(this.categoryChangeTimer),this.categoryChangeTimer=setTimeout(t,500))},n.prototype.processConfirmation=function(e){window.Klarna.Payments.init({client_token:e.klarna.client_token},function(e){}.bind(this)),this.payment_categories=e.klarna.payment_method_categories.split(","),this.render_ui(!0)},n.prototype.hashchange=function(){this.is_gateway_selected()&&(history.pushState({},"",window.location.pathname),this.get_form().submit())},n.prototype.render_ui=function(e){if((this.show_form_false=0)<this.payment_categories.length){o("#wc_stripe_local_payment_stripe_klarna").show();for(var t=0;t<this.payment_categories.length;t++){var i,s="#klarna-instance-"+this.payment_categories[t];if(o(s).empty(),o("#klarna-category-"+this.payment_categories[t]).length){this.params.translate&&(i=this.source.klarna[this.payment_categories[t]+"_name"],o('label[for="klarna_'+this.payment_categories[t]+'"').text(i)),o("#klarna-category-"+this.payment_categories[t]).show();try{window.Klarna.Payments.load({container:s,payment_method_category:this.payment_categories[t],instance_id:"klarna-instance-"+this.payment_categories[t]},function(e){e.show_form||(this.source=null)}.bind(this))}catch(n){window.alert(n)}}}e&&o('[id^="klarna-category-"]:visible [name="klarna_category"]').first().prop("checked",!0).trigger("change")}},n.prototype.place_order=function(e){this.is_gateway_selected()&&(e.preventDefault(),this.checkout_fields_valid()&&window.Klarna.Payments.authorize({instance_id:"klarna-instance-"+o('[name="klarna_category"]:checked').val()},function(e){e.approved?(this.set_nonce(this.source.id),this.payment_token_received=!0,this.get_form().submit()):e.error?this.submit_error(e.error):this.submit_error(this.params.messages.klarna_error)}.bind(this)))},n.prototype.klarna_fields_valid=function(){if(this.fields.validateFields("billing"))return!this.needs_shipping()||(!!("billing"===this.get_shipping_prefix()||"shipping"===this.get_shipping_prefix()&&this.fields.validateFields("shipping"))||void 0)},n.prototype.initialize=function(){this.is_gateway_selected()&&this.is_active()&&!this.source&&this.klarna_fields_valid()&&this.createSource()},n.prototype.createSource=function(){clearTimeout(this.createSourceTimer),this.createSourceTimer=setTimeout(function(){this.show_loader(),this.stripe.createSource(this.getSourceArgs()).then(function(e){if(this.hide_loader(),e.error)return this.submit_error(e.error.message);this.source=e.source,this.set_nonce(this.source.id),this.filter_payment_method_categories(),this.processConfirmation(this.source)}.bind(this))["catch"](function(e){this.hide_loader(),this.submit_error(e.message)}.bind(this))}.bind(this),100)},n.prototype.getSourceArgs=function(){return o.extend(!0,{},this.get_gateway_data().source_args,function(){var e,t={owner:{name:this.fields.get("billing_first_name")+" "+this.fields.get("billing_last_name"),email:this.fields.get("billing_email"),address:{city:this.fields.get("billing_city"),country:this.fields.get("billing_country"),line1:this.fields.get("billing_address_1"),line2:this.fields.get("billing_address_2"),postal_code:this.fields.get("billing_postcode"),state:this.fields.get("billing_state")}},klarna:{purchase_country:this.fields.get("billing_country"),first_name:this.fields.get("billing_first_name"),last_name:this.fields.get("billing_last_name")}};return this.needs_shipping()&&(e=this.get_shipping_prefix(),t.klarna.shipping_first_name=this.fields.get("first_name",e),t.klarna.shipping_last_name=this.fields.get("last_name",e),t.source_order={shipping:{address:{city:this.fields.get("city",e),country:this.fields.get("country",e),line1:this.fields.get("address_1",e),line2:this.fields.get("address_2",e),postal_code:this.fields.get("postcode",e),state:this.fields.get("state",e)}}}),t}.bind(this)())},n.prototype.updated_checkout=function(){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)},n.prototype.update_source=function(){var e=this.get_source_update_args(this.getSourceArgs());this.show_loader(),s.prototype.update_source.call(this,e).then(function(e){this.source=e,this.filter_payment_method_categories(),this.hide_loader(),this.render_ui()}.bind(this))},n.prototype.checkout_error=function(){s.prototype.checkout_error.apply(this,arguments),this.is_gateway_selected()&&this.createSource()},n.prototype.show_loader=function(){o(this.container).find(".wc-stripe-klarna-loader").remove(),o(this.container).find('label[for="payment_method_'+this.gateway_id+'" ]').after(this.params.klarna_loader)},n.prototype.hide_loader=function(){o(this.container).find(".wc-stripe-klarna-loader").remove()},n.prototype.filter_payment_method_categories=function(){var e=this.source.klarna.payment_method_categories.split(",");this.source.klarna.payment_method_categories=e.filter(function(e){return-1<this.get_gateway_data().payment_sections.indexOf(e)}.bind(this)).join(",")},n.prototype.get_source_update_args=function(e){return["type","currency","statement_descriptor","redirect","klarna.product","klarna.locale","klarna.custom_payment_methods"].reduce(function(e,t){if(-1<t.indexOf(".")){var i=t.split(".");return delete i.slice(0,i.length-1).reduce(function(e,t){return e[t]},e)[t=i[i.length-1]],e}return delete e[t],e},e)},n.prototype.on_payment_method_selected=function(e,t){t===this.gateway_id&&(this.source||(this.klarna_fields_valid()?this.createSource():this.submit_error(this.params.messages.required_field)),i.CheckoutGateway.prototype.on_payment_method_selected.apply(this,arguments))},n.prototype.input_change=function(){this.is_gateway_selected()&&(this.source?this.update_source():this.klarna_fields_valid()&&this.createSource())},a.prototype.updated_checkout=function(){!this.script_loaded&&o(this.container).length&&this.load_external_script(this.params.qr_script),s.prototype.updated_checkout.apply(this,arguments)},a.prototype.hashChange=function(e){!this.is_gateway_selected()||(e=e.newURL.match(/qrcode=(.*)/))&&(history.pushState({},"",window.location.pathname),this.qrcode=JSON.parse(window.atob(decodeURIComponent(e[1]))),this.get_form().unblock().removeClass("processing").addClass("wechat"),new QRCode("wc_stripe_local_payment_stripe_wechat",{text:this.qrcode.code,width:128,height:128,colorDark:"#424770",colorLight:"#f8fbfd",correctLevel:QRCode.CorrectLevel.H}),o("#wc_stripe_local_payment_stripe_wechat").append('<p class="qrcode-message">'+this.params.qr_message+"</p>"),this.payment_token_received=!0,this.show_place_order())},a.prototype.place_order=function(){this.get_form().is(".wechat")?window.location=this.qrcode.redirect:s.prototype.place_order.apply(this,arguments)},h.prototype.get_confirmation_args=function(e){var t=s.prototype.get_confirmation_args.apply(this,arguments);return t.payment_method.billing_details.email=this.fields.get("billing_email"),t},t.prototype.getSourceArgs=function(){var e=o.extend({},s.prototype.getSourceArgs.apply(this,arguments),{mandate:{notification_method:"email",interval:this.cart_contains_subscription()||this.is_change_payment_method()?"scheduled":"one_time"}});return"scheduled"===e.mandate.interval&&delete e.amount,e},e.prototype=o.extend({},s.prototype,e.prototype),t.prototype=o.extend({},s.prototype,t.prototype),n.prototype=o.extend({},s.prototype,n.prototype),r.prototype=o.extend({},s.prototype,r.prototype),a.prototype=o.extend({},s.prototype,a.prototype),h.prototype=o.extend({},s.prototype,h.prototype),c.prototype=o.extend({},s.prototype,c.prototype);var p,l={ideal:e,sepa_debit:t,klarna:n,fpx:r,wechat:a,au_becs_debit:h,grabpay:c};for(p in wc_stripe_local_payment_params.gateways){var _=wc_stripe_local_payment_params.gateways[p];new(l[_.local_payment_type]||s)(_)}}(jQuery,window.wc_stripe);
|
assets/js/frontend/mini-cart.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(n,e){function i(t){this.message_container=".widget_shopping_cart_content",e.BaseGateway.call(this,t,s)}function t(t){i.apply(this,arguments)}function p(t){i.apply(this,arguments)}function o(t){i.apply(this,arguments)}i.prototype.on_token_received=function(){this.block(),this.block_cart(),e.BaseGateway.prototype.on_token_received.apply(this,arguments)},i.prototype.block_cart=function(){n(this.container).closest(".widget_shopping_cart_content").find(".wc-stripe-overlay").addClass("active")},i.prototype.unblock_cart=function(){n(this.container).closest(".widget_shopping_cart_content").find(".wc-stripe-overlay").addClass("active")},(t.prototype=Object.assign({},e.BaseGateway.prototype,i.prototype,e.GooglePay.prototype)).initialize=function(){this.createPaymentsClient(),this.isReadyToPay().then(function(){this.$button.find(".gpay-button").addClass("button"),this.append_button()}.bind(this))},t.prototype.create_button=function(){e.GooglePay.prototype.create_button.apply(this,arguments),this.$button=this.$button.find(".gpay-button"),this.append_button()},t.prototype.append_button=function(){n(this.container).find(".wc-stripe-gpay-mini-cart").empty(),n(this.container).find(".wc-stripe-gpay-mini-cart").append(this.$button).show()},(p.prototype=Object.assign({},e.BaseGateway.prototype,i.prototype,e.ApplePay.prototype)).initialize=function(){e.ApplePay.prototype.initialize.apply(this,arguments)},p.prototype.append_button=function(){n(this.container).find(".wc-stripe-applepay-mini-cart").empty(),n(this.container).find(".wc-stripe-applepay-mini-cart").append(this.$button).show()},(o.prototype=Object.assign({},e.BaseGateway.prototype,i.prototype,e.PaymentRequest.prototype)).initialize=function(){e.PaymentRequest.prototype.initialize.apply(this,arguments)},o.prototype.create_button=function(){this.append_button()},o.prototype.append_button=function(){n(this.container).find(".wc-stripe-payment-request-mini-cart").empty().show(),this.paymentRequestButton.mount(n(this.container).find(".wc-stripe-payment-request-mini-cart").first()[0])};var a=[],s=null;"undefined"!=typeof wc_stripe_googlepay_mini_cart_params&&a.push([t,wc_stripe_googlepay_mini_cart_params]),"undefined"!=typeof wc_stripe_applepay_mini_cart_params&&a.push([p,wc_stripe_applepay_mini_cart_params]),"undefined"!=typeof wc_stripe_payment_request_mini_cart_params&&a.push([o,wc_stripe_payment_request_mini_cart_params]),n(document.body).on("wc_fragments_refreshed wc_fragments_loaded",function(){n(".widget_shopping_cart_content").not(":empty").each(function(t,e){!n(e).find(".wc_stripe_mini_cart_payment_methods").length||(e=n(e).parent()).length&&(t="wc-stripe-mini-cart-idx-"+t,e.addClass(t),e.find(".widget_shopping_cart_content").prepend('<div class="wc-stripe-overlay"></div>'),s="."+t+" .widget_shopping_cart_content p.buttons",a.forEach(function(t){new t[0](t[1])}))})})}(jQuery,window.wc_stripe);
|
assets/js/frontend/notices.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(i){function t(){this.params=wc_stripe_notices_params,this.container=this.params.container,this.notices=this.params.notices,this.display_notices()}t.prototype.display_notices=function(){for(var t=0;t<this.notices.length;t++)i(this.container).prepend(this.notices[t])},new t}(jQuery);
|
assets/js/frontend/payment-request.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(a,i){var t;a(document.body).is(".single-product")&&((t=function(){i.BaseGateway.call(this,wc_stripe_payment_request_params),window.addEventListener("hashchange",this.hashchange.bind(this)),this.old_qty=this.get_quantity()}).prototype=a.extend({},i.BaseGateway.prototype,i.ProductGateway.prototype,i.PaymentRequest.prototype),t.prototype.initialize=function(){if(!a(this.container).length)return setTimeout(this.initialize.bind(this),1e3);i.ProductGateway.call(this),i.PaymentRequest.prototype.initialize.call(this)},t.prototype.canMakePayment=function(){i.PaymentRequest.prototype.canMakePayment.apply(this,arguments).then(function(){a(document.body).on("change",'[name="quantity"]',this.add_to_cart.bind(this)),a(this.container).parent().parent().addClass("active"),this.is_variable_product()?this.variable_product_selected()?(this.cart_calculation(this.get_product_data().variation.variation_id),a(this.container).removeClass("processingFoundVariation")):this.disable_payment_button():this.cart_calculation()}.bind(this))},t.prototype.add_to_cart=function(t){this.disable_payment_button(),this.old_qty=this.get_quantity();var e=this.get_product_data().variation;this.is_variable_product()&&!this.variable_product_selected()||this.cart_calculation(e.variation_id).then(function(){this.is_variable_product()&&a(this.container).is(".processingFoundVariation")?(this.createPaymentRequest(),this.createPaymentRequestButton(),i.PaymentRequest.prototype.canMakePayment.apply(this,arguments).then(function(){this.enable_payment_button(),a(this.container).removeClass("processingFoundVariation")}.bind(this))):this.enable_payment_button()}.bind(this))},t.prototype.cart_calculation=function(){return i.ProductGateway.prototype.cart_calculation.apply(this,arguments).then(function(){this.paymentRequest.update(this.get_payment_request_update({total:{pending:!1}}))}.bind(this))["catch"](function(){}.bind(this))},t.prototype.create_button=function(){a("#wc-stripe-payment-request-container").empty(),i.PaymentRequest.prototype.create_button.apply(this,arguments),this.$button=a("#wc-stripe-payment-request-container")},t.prototype.button_click=function(t){this.$button.is(".disabled")?t.preventDefault():0==this.get_quantity()&&(t.preventDefault(),this.submit_error(this.params.messages.invalid_amount))},t.prototype.found_variation=function(){a(this.container).addClass("processingFoundVariation"),i.ProductGateway.prototype.found_variation.apply(this,arguments)},t.prototype.block=function(){a.blockUI({message:this.adding_to_cart?this.params.messages.add_to_cart:null,overlayCSS:{background:"#fff",opacity:.6}})}),a(document.body).is(".woocommerce-cart")&&((t=function(){i.BaseGateway.call(this,wc_stripe_payment_request_params),window.addEventListener("hashchange",this.hashchange.bind(this))}).prototype=a.extend({},i.BaseGateway.prototype,i.CartGateway.prototype,i.PaymentRequest.prototype),t.prototype.initialize=function(){i.CartGateway.call(this),i.PaymentRequest.prototype.initialize.call(this)},t.prototype.canMakePayment=function(){i.PaymentRequest.prototype.canMakePayment.apply(this,arguments).then(function(){a(this.container).addClass("active").parent().addClass("active")}.bind(this))},t.prototype.updated_html=function(){a(this.container).length||(this.can_pay=!1),this.can_pay&&this.initialize()},t.prototype.button_click=function(t){this.paymentRequest.update(this.get_payment_request_update({total:{pending:!1}}))},t.prototype.cart_emptied=function(t){this.can_pay=!1}),a(document.body).is(".woocommerce-checkout")&&((t=function(){i.BaseGateway.call(this,wc_stripe_payment_request_params),window.addEventListener("hashchange",this.hashchange.bind(this))}).prototype=a.extend({},i.BaseGateway.prototype,i.CheckoutGateway.prototype,i.PaymentRequest.prototype),t.prototype.initialize=function(){i.CheckoutGateway.call(this),a("form.checkout").on("change",".form-row:not(.address-field) .input-text",this.update_payment_request.bind(this)),a(this.container).length&&i.PaymentRequest.prototype.initialize.call(this)},t.prototype.canMakePayment=function(){i.PaymentRequest.prototype.canMakePayment.apply(this,arguments).then(function(){var t;this.banner_enabled()&&(a(this.banner_container).empty().show().append('<div id="wc-stripe-payment-request-banner"></div>'),a(this.banner_container).show().parent().parent().addClass("active"),(t=this.stripe.elements().create("paymentRequestButton",{paymentRequest:this.paymentRequest,style:{paymentRequestButton:{type:this.params.button.type,theme:this.params.button.theme,height:this.params.button.height}}})).on("click",this.banner_checkout.bind(this)),t.mount("#wc-stripe-payment-request-banner"))}.bind(this))},t.prototype.create_button=function(){var t=a("#place_order").parent();this.$button&&this.$button.remove(),this.$button=a('<div id="wc-stripe-payment-request-container"></div>'),t.append(this.$button),i.PaymentRequest.prototype.create_button.call(this),this.trigger_payment_method_selected()},t.prototype.updated_checkout=function(){a(this.container).length&&i.PaymentRequest.prototype.initialize.call(this)},t.prototype.banner_checkout=function(t){this.set_payment_method(this.gateway_id),this.set_use_new_option(!0)},t.prototype.on_token_received=function(){i.CheckoutGateway.prototype.on_token_received.apply(this,arguments),this.fields.toFormFields(),this.payment_request_options.requestShipping&&this.maybe_set_ship_to_different(),this.checkout_fields_valid()&&this.get_form().submit()},t.prototype.update_payment_request=function(){a(this.container).length&&i.PaymentRequest.prototype.initialize.call(this)}),new t}(jQuery,window.wc_stripe);
|
assets/js/frontend/{promise-polyfill.js → promise-polyfill.min.js}
RENAMED
File without changes
|
assets/js/frontend/qrcode.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
var QRCode;!function(){function e(t){this.mode=n.MODE_8BIT_BYTE,this.data=t,this.parsedData=[];for(var e=[],r=0,o=this.data.length;r<o;r++){var i=this.data.charCodeAt(r);65536<i?(e[0]=240|(1835008&i)>>>18,e[1]=128|(258048&i)>>>12,e[2]=128|(4032&i)>>>6,e[3]=128|63&i):2048<i?(e[0]=224|(61440&i)>>>12,e[1]=128|(4032&i)>>>6,e[2]=128|63&i):128<i?(e[0]=192|(1984&i)>>>6,e[1]=128|63&i):e[0]=i,this.parsedData=this.parsedData.concat(e)}this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function h(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function m(t,e){if(null==t.length)throw new Error(t.length+"/"+e);for(var r=0;r<t.length&&0==t[r];)r++;this.num=new Array(t.length-r+e);for(var o=0;o<t.length-r;o++)this.num[o]=t[o+r]}function u(t,e){this.totalCount=t,this.dataCount=e}function l(){this.buffer=[],this.length=0}function o(){var t=!1,e=navigator.userAgent;return/android/i.test(e)&&(t=!0,aMat=e.toString().match(/android ([0-9]\.[0-9])/i),aMat&&aMat[1]&&(t=parseFloat(aMat[1]))),t}function r(t,e){for(var r,o=1,i=(r=t,(t=encodeURI(r).toString().replace(/\%[0-9a-fA-F]{2}/g,"a")).length+(t.length!=r?3:0)),n=0,a=D.length;n<=a;n++){var s=0;switch(e){case g.L:s=D[n][0];break;case g.M:s=D[n][1];break;case g.Q:s=D[n][2];break;case g.H:s=D[n][3]}if(i<=s)break;o++}if(D.length<o)throw new Error("Too long data");return o}e.prototype={getLength:function(){return this.parsedData.length},write:function(t){for(var e=0,r=this.parsedData.length;e<r;e++)t.put(this.parsedData[e],8)}},h.prototype={addData:function(t){t=new e(t);this.dataList.push(t),this.dataCache=null},isDark:function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(t,e){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(var o=0;o<this.moduleCount;o++)this.modules[r][o]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),7<=this.typeNumber&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=h.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},setupPositionProbePattern:function(t,e){for(var r=-1;r<=7;r++)if(!(t+r<=-1||this.moduleCount<=t+r))for(var o=-1;o<=7;o++)e+o<=-1||this.moduleCount<=e+o||(this.modules[t+r][e+o]=0<=r&&r<=6&&(0==o||6==o)||0<=o&&o<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=o&&o<=4)},getBestMaskPattern:function(){for(var t=0,e=0,r=0;r<8;r++){this.makeImpl(!0,r);var o=v.getLostPoint(this);(0==r||o<t)&&(t=o,e=r)}return e},createMovieClip:function(t,e,r){var o=t.createEmptyMovieClip(e,r);this.make();for(var i=0;i<this.modules.length;i++)for(var n=+i,a=0;a<this.modules[i].length;a++){var s=+a;this.modules[i][a]&&(o.beginFill(0,100),o.moveTo(s,n),o.lineTo(1+s,n),o.lineTo(1+s,1+n),o.lineTo(s,1+n),o.endFill())}return o},setupTimingPattern:function(){for(var t=8;t<this.moduleCount-8;t++)null==this.modules[t][6]&&(this.modules[t][6]=0==t%2);for(var e=8;e<this.moduleCount-8;e++)null==this.modules[6][e]&&(this.modules[6][e]=0==e%2)},setupPositionAdjustPattern:function(){for(var t=v.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var r=0;r<t.length;r++){var o=t[e],i=t[r];if(null==this.modules[o][i])for(var n=-2;n<=2;n++)for(var a=-2;a<=2;a++)this.modules[o+n][i+a]=-2==n||2==n||-2==a||2==a||0==n&&0==a}},setupTypeNumber:function(t){for(var e=v.getBCHTypeNumber(this.typeNumber),r=0;r<18;r++){var o=!t&&1==(1&e>>r);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=o}for(r=0;r<18;r++){o=!t&&1==(1&e>>r);this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=o}},setupTypeInfo:function(t,e){for(var e=this.errorCorrectLevel<<3|e,r=v.getBCHTypeInfo(e),o=0;o<15;o++){var i=!t&&1==(1&r>>o);o<6?this.modules[o][8]=i:o<8?this.modules[o+1][8]=i:this.modules[this.moduleCount-15+o][8]=i}for(o=0;o<15;o++){i=!t&&1==(1&r>>o);o<8?this.modules[8][this.moduleCount-o-1]=i:o<9?this.modules[8][15-o-1+1]=i:this.modules[8][15-o-1]=i}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var r=-1,o=this.moduleCount-1,i=7,n=0,a=this.moduleCount-1;0<a;a-=2)for(6==a&&a--;;){for(var s,h=0;h<2;h++){null==this.modules[o][a-h]&&(s=!1,n<t.length&&(s=1==(1&t[n]>>>i)),v.getMask(e,o,a-h)&&(s=!s),this.modules[o][a-h]=s,-1==--i&&(n++,i=7))}if((o+=r)<0||this.moduleCount<=o){o-=r,r=-r;break}}}},h.PAD0=236,h.PAD1=17,h.createData=function(t,e,r){for(var o=u.getRSBlocks(t,e),i=new l,n=0;n<r.length;n++){var a=r[n];i.put(a.mode,4),i.put(a.getLength(),v.getLengthInBits(a.mode,t)),a.write(i)}for(var s=0,n=0;n<o.length;n++)s+=o[n].dataCount;if(i.getLengthInBits()>8*s)throw new Error("code length overflow. ("+i.getLengthInBits()+">"+8*s+")");for(i.getLengthInBits()+4<=8*s&&i.put(0,4);0!=i.getLengthInBits()%8;)i.putBit(!1);for(;!(i.getLengthInBits()>=8*s)&&(i.put(h.PAD0,8),!(i.getLengthInBits()>=8*s));)i.put(h.PAD1,8);return h.createBytes(i,o)},h.createBytes=function(t,e){for(var r=0,o=0,i=0,n=new Array(e.length),a=new Array(e.length),s=0;s<e.length;s++){var h=e[s].dataCount,l=e[s].totalCount-h,o=Math.max(o,h),i=Math.max(i,l);n[s]=new Array(h);for(var u=0;u<n[s].length;u++)n[s][u]=255&t.buffer[u+r];r+=h;var l=v.getErrorCorrectPolynomial(l),g=new m(n[s],l.getLength()-1).mod(l);a[s]=new Array(l.getLength()-1);for(u=0;u<a[s].length;u++){var f=u+g.getLength()-a[s].length;a[s][u]=0<=f?g.get(f):0}}for(var d=0,u=0;u<e.length;u++)d+=e[u].totalCount;for(var c=new Array(d),p=0,u=0;u<o;u++)for(s=0;s<e.length;s++)u<n[s].length&&(c[p++]=n[s][u]);for(u=0;u<i;u++)for(s=0;s<e.length;s++)u<a[s].length&&(c[p++]=a[s][u]);return c};for(var n={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},g={L:1,M:0,Q:3,H:2},i=0,a=1,s=2,f=3,d=4,c=5,p=6,_=7,v={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(t){for(var e=t<<10;0<=v.getBCHDigit(e)-v.getBCHDigit(v.G15);)e^=v.G15<<v.getBCHDigit(e)-v.getBCHDigit(v.G15);return(t<<10|e)^v.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;0<=v.getBCHDigit(e)-v.getBCHDigit(v.G18);)e^=v.G18<<v.getBCHDigit(e)-v.getBCHDigit(v.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;0!=t;)e++,t>>>=1;return e},getPatternPosition:function(t){return v.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,r){switch(t){case i:return 0==(e+r)%2;case a:return 0==e%2;case s:return 0==r%3;case f:return 0==(e+r)%3;case d:return 0==(Math.floor(e/2)+Math.floor(r/3))%2;case c:return 0==e*r%2+e*r%3;case p:return 0==(e*r%2+e*r%3)%2;case _:return 0==(e*r%3+(e+r)%2)%2;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new m([1],0),r=0;r<t;r++)e=e.multiply(new m([1,C.gexp(r)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){case n.MODE_NUMBER:return 10;case n.MODE_ALPHA_NUM:return 9;case n.MODE_8BIT_BYTE:case n.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(e<27)switch(t){case n.MODE_NUMBER:return 12;case n.MODE_ALPHA_NUM:return 11;case n.MODE_8BIT_BYTE:return 16;case n.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else{if(!(e<41))throw new Error("type:"+e);switch(t){case n.MODE_NUMBER:return 14;case n.MODE_ALPHA_NUM:return 13;case n.MODE_8BIT_BYTE:return 16;case n.MODE_KANJI:return 12;default:throw new Error("mode:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),r=0,o=0;o<e;o++)for(var i=0;i<e;i++){for(var n=0,a=t.isDark(o,i),s=-1;s<=1;s++)if(!(o+s<0||e<=o+s))for(var h=-1;h<=1;h++)i+h<0||e<=i+h||0==s&&0==h||a!=t.isDark(o+s,i+h)||n++;5<n&&(r+=3+n-5)}for(o=0;o<e-1;o++)for(i=0;i<e-1;i++){var l=0;t.isDark(o,i)&&l++,t.isDark(o+1,i)&&l++,t.isDark(o,i+1)&&l++,t.isDark(o+1,i+1)&&l++,0!=l&&4!=l||(r+=3)}for(o=0;o<e;o++)for(i=0;i<e-6;i++)t.isDark(o,i)&&!t.isDark(o,i+1)&&t.isDark(o,i+2)&&t.isDark(o,i+3)&&t.isDark(o,i+4)&&!t.isDark(o,i+5)&&t.isDark(o,i+6)&&(r+=40);for(i=0;i<e;i++)for(o=0;o<e-6;o++)t.isDark(o,i)&&!t.isDark(o+1,i)&&t.isDark(o+2,i)&&t.isDark(o+3,i)&&t.isDark(o+4,i)&&!t.isDark(o+5,i)&&t.isDark(o+6,i)&&(r+=40);for(var u=0,i=0;i<e;i++)for(o=0;o<e;o++)t.isDark(o,i)&&u++;return r+10*(Math.abs(100*u/e/e-50)/5)}},C={glog:function(t){if(t<1)throw new Error("glog("+t+")");return C.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;256<=t;)t-=255;return C.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},t=0;t<8;t++)C.EXP_TABLE[t]=1<<t;for(t=8;t<256;t++)C.EXP_TABLE[t]=C.EXP_TABLE[t-4]^C.EXP_TABLE[t-5]^C.EXP_TABLE[t-6]^C.EXP_TABLE[t-8];for(t=0;t<255;t++)C.LOG_TABLE[C.EXP_TABLE[t]]=t;m.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),r=0;r<this.getLength();r++)for(var o=0;o<t.getLength();o++)e[r+o]^=C.gexp(C.glog(this.get(r))+C.glog(t.get(o)));return new m(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=C.glog(this.get(0))-C.glog(t.get(0)),r=new Array(this.getLength()),o=0;o<this.getLength();o++)r[o]=this.get(o);for(o=0;o<t.getLength();o++)r[o]^=C.gexp(C.glog(t.get(o))+e);return new m(r,0).mod(t)}},u.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],u.getRSBlocks=function(t,e){var r=u.getRsBlockTable(t,e);if(null==r)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var o=r.length/3,i=[],n=0;n<o;n++)for(var a=r[3*n+0],s=r[3*n+1],h=r[3*n+2],l=0;l<a;l++)i.push(new u(s,h));return i},u.getRsBlockTable=function(t,e){switch(e){case g.L:return u.RS_BLOCK_TABLE[4*(t-1)+0];case g.M:return u.RS_BLOCK_TABLE[4*(t-1)+1];case g.Q:return u.RS_BLOCK_TABLE[4*(t-1)+2];case g.H:return u.RS_BLOCK_TABLE[4*(t-1)+3];default:return}},l.prototype={get:function(t){var e=Math.floor(t/8);return 1==(1&this.buffer[e]>>>7-t%8)},put:function(t,e){for(var r=0;r<e;r++)this.putBit(1==(1&t>>>e-r-1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var w,D=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]],w=((w=function(t,e){this._el=t,this._htOption=e}).prototype.draw=function(t){function e(t,e){var r,o=document.createElementNS("http://www.w3.org/2000/svg",t);for(r in e)e.hasOwnProperty(r)&&o.setAttribute(r,e[r]);return o}var r=this._htOption,o=this._el,i=t.getModuleCount();Math.floor(r.width/i),Math.floor(r.height/i),this.clear();var n=e("svg",{viewBox:"0 0 "+String(i)+" "+String(i),width:"100%",height:"100%",fill:r.colorLight});n.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),o.appendChild(n),n.appendChild(e("rect",{fill:r.colorDark,width:"1",height:"1",id:"template"}));for(var a,s=0;s<i;s++)for(var h=0;h<i;h++){t.isDark(s,h)&&((a=e("use",{x:String(s),y:String(h)})).setAttributeNS("http://www.w3.org/1999/xlink","href","#template"),n.appendChild(a))}},w.prototype.clear=function(){for(;this._el.hasChildNodes();)this._el.removeChild(this._el.lastChild)},w),A="svg"===document.documentElement.tagName.toLowerCase()?w:"undefined"!=typeof CanvasRenderingContext2D?function(){function t(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}function e(t,e){var r=this;if(r._fFail=e,r._fSuccess=t,null===r._bSupportDataURI){e=document.createElement("img"),t=function(){r._bSupportDataURI=!1,r._fFail&&_fFail.call(r)};return e.onabort=t,e.onerror=t,e.onload=function(){r._bSupportDataURI=!0,r._fSuccess&&r._fSuccess.call(r)},void(e.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==")}!0===r._bSupportDataURI&&r._fSuccess?r._fSuccess.call(r):!1===r._bSupportDataURI&&r._fFail&&r._fFail.call(r)}var l,u;this._android&&this._android<=2.1&&(l=1/window.devicePixelRatio,u=CanvasRenderingContext2D.prototype.drawImage,CanvasRenderingContext2D.prototype.drawImage=function(t,e,r,o,i,n,a,s){if("nodeName"in t&&/img/i.test(t.nodeName))for(var h=arguments.length-1;1<=h;h--)arguments[h]=arguments[h]*l;else void 0===s&&(arguments[1]*=l,arguments[2]*=l,arguments[3]*=l,arguments[4]*=l);u.apply(this,arguments)});var r=function(t,e){this._bIsPainted=!1,this._android=o(),this._htOption=e,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=e.width,this._elCanvas.height=e.height,t.appendChild(this._elCanvas),this._el=t,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return r.prototype.draw=function(t){var e=this._elImage,r=this._oContext,o=this._htOption,i=t.getModuleCount(),n=o.width/i,a=o.height/i,s=Math.round(n),h=Math.round(a);e.style.display="none",this.clear();for(var l=0;l<i;l++)for(var u=0;u<i;u++){var g=t.isDark(l,u),f=u*n,d=l*a;r.strokeStyle=g?o.colorDark:o.colorLight,r.lineWidth=1,r.fillStyle=g?o.colorDark:o.colorLight,r.fillRect(f,d,n,a),r.strokeRect(Math.floor(f)+.5,Math.floor(d)+.5,s,h),r.strokeRect(Math.ceil(f)-.5,Math.ceil(d)-.5,s,h)}this._bIsPainted=!0},r.prototype.makeImage=function(){this._bIsPainted&&e.call(this,t)},r.prototype.isPainted=function(){return this._bIsPainted},r.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},r.prototype.round=function(t){return t&&Math.floor(1e3*t)/1e3},r}():((w=function(t,e){this._el=t,this._htOption=e}).prototype.draw=function(t){for(var e=this._htOption,r=this._el,o=t.getModuleCount(),i=Math.floor(e.width/o),n=Math.floor(e.height/o),a=['<table style="border:0;border-collapse:collapse;">'],s=0;s<o;s++){a.push("<tr>");for(var h=0;h<o;h++)a.push('<td style="border:0;border-collapse:collapse;padding:0;margin:0;width:'+i+"px;height:"+n+"px;background-color:"+(t.isDark(s,h)?e.colorDark:e.colorLight)+';"></td>');a.push("</tr>")}a.push("</table>"),r.innerHTML=a.join("");var l=r.childNodes[0],u=(e.width-l.offsetWidth)/2,r=(e.height-l.offsetHeight)/2;0<u&&0<r&&(l.style.margin=r+"px "+u+"px")},w.prototype.clear=function(){this._el.innerHTML=""},w);(QRCode=function(t,e){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:g.H},"string"==typeof e&&(e={text:e}),e)for(var r in e)this._htOption[r]=e[r];"string"==typeof t&&(t=document.getElementById(t)),this._android=o(),this._el=t,this._oQRCode=null,this._oDrawing=new A(this._el,this._htOption),this._htOption.text&&this.makeCode(this._htOption.text)}).prototype.makeCode=function(t){this._oQRCode=new h(r(t,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(t),this._oQRCode.make(),this._el.title=t,this._oDrawing.draw(this._oQRCode),this.makeImage()},QRCode.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||3<=this._android)&&this._oDrawing.makeImage()},QRCode.prototype.clear=function(){this._oDrawing.clear()},QRCode.CorrectLevel=g}();
|
assets/js/frontend/wc-stripe.js
CHANGED
@@ -715,7 +715,7 @@
|
|
715 |
var match = e.newURL.match(/response=(.*)/);
|
716 |
if (match) {
|
717 |
try {
|
718 |
-
var obj = JSON.parse(window.atob(match[1]));
|
719 |
if (obj && obj.hasOwnProperty('client_secret') && obj.gateway_id === this.gateway_id) {
|
720 |
history.pushState({}, '', window.location.pathname);
|
721 |
this.handle_card_action(obj);
|
@@ -914,11 +914,13 @@
|
|
914 |
|
915 |
if (match && match.length > 1) {
|
916 |
try {
|
917 |
-
var obj = JSON.parse(window.atob(match[1]));
|
918 |
if (this.gateway_id === obj.payment_method) {
|
919 |
-
|
920 |
-
|
921 |
-
|
|
|
|
|
922 |
history.pushState({}, '', window.location.pathname);
|
923 |
}
|
924 |
} catch (err) {
|
@@ -932,7 +934,7 @@
|
|
932 |
var match = window.location.hash.match(/response=(.*)/);
|
933 |
if (match) {
|
934 |
try {
|
935 |
-
var obj = JSON.parse(window.atob(match[1]));
|
936 |
if (obj && obj.hasOwnProperty('client_secret') && obj.gateway_id === this.gateway_id) {
|
937 |
$(function () {
|
938 |
this.set_payment_method(this.gateway_id);
|
715 |
var match = e.newURL.match(/response=(.*)/);
|
716 |
if (match) {
|
717 |
try {
|
718 |
+
var obj = JSON.parse(window.atob(decodeURIComponent(match[1])));
|
719 |
if (obj && obj.hasOwnProperty('client_secret') && obj.gateway_id === this.gateway_id) {
|
720 |
history.pushState({}, '', window.location.pathname);
|
721 |
this.handle_card_action(obj);
|
914 |
|
915 |
if (match && match.length > 1) {
|
916 |
try {
|
917 |
+
var obj = JSON.parse(window.atob(decodeURIComponent(match[1])));
|
918 |
if (this.gateway_id === obj.payment_method) {
|
919 |
+
$(function () {
|
920 |
+
this.payment_token_received = true;
|
921 |
+
this.set_nonce(obj.payment_nonce);
|
922 |
+
this.set_use_new_option(true);
|
923 |
+
}.bind(this));
|
924 |
history.pushState({}, '', window.location.pathname);
|
925 |
}
|
926 |
} catch (err) {
|
934 |
var match = window.location.hash.match(/response=(.*)/);
|
935 |
if (match) {
|
936 |
try {
|
937 |
+
var obj = JSON.parse(window.atob(decodeURIComponent(match[1])));
|
938 |
if (obj && obj.hasOwnProperty('client_secret') && obj.gateway_id === this.gateway_id) {
|
939 |
$(function () {
|
940 |
this.set_payment_method(this.gateway_id);
|
assets/js/frontend/wc-stripe.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(a,o){a.wc_stripe={};var i=null;"undefined"==typeof wc_stripe_checkout_fields&&(a.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=i,this.elements=i.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){var e=this.get_error_message(t);e.indexOf("</ul>")<0&&(e='<div class="'+function(){var t="woocommerce-NoticeGroup";return this.is_current_page("checkout")&&(t+=" woocommerce-NoticeGroup-checkout"),t}.bind(this)()+'"><ul class="woocommerce-error"><li>'+e+"</li></ul></div>");t=o(document.body).triggerHandler("wc_stripe_submit_error",[e,t,this]);e=void 0===t?e:t,this.submit_message(e)},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_billing_details=function(){var t={name:this.get_customer_name("billing"),address:{city:this.fields.get("billing_city",null),country:this.fields.get("billing_country",null),line1:this.fields.get("billing_address_1",null),line2:this.fields.get("billing_address_2",null),postal_code:this.fields.get("billing_postcode",null),state:this.fields.get("billing_state",null)}};return t.name&&" "!==t.name||delete t.name,""!=this.fields.get("billing_email")&&(t.email=this.fields.get("billing_email")),""!=this.fields.get("billing_phone")&&(t.phone=this.fields.get("billing_phone")),t},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")&&void 0===(t=o("form.checkout").find(".woocommerce_".concat(this.gateway_id,"_gateway_data")).data("gateway"))&&(t=o(".woocommerce_"+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=i.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){a.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?a.location.reload():"success"===t.result?a.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.process_payment=function(t,e){o.ajax({method:"POST",url:this.params.routes.checkout_payment,dataType:"json",data:o.extend({},this.fields.toJson(),{order_id:t,order_key:e}),beforeSend:this.ajax_before_send.bind(this)}).done(function(t){if(t.result&&"success"===t.result)a.location=t.redirect;else{if(t.reload)return a.location.reload();t.messages?this.submit_error(t.messages):this.submit_error(wc_checkout_params.i18n_checkout_error)}}.bind(this)).fail(function(){}.bind(this))},wc_stripe.BaseGateway.prototype.handle_card_action=function(e){try{return this.stripe.handleCardAction(e.client_secret).then(function(t){if(t.error)return this.payment_token_received=!1,this.submit_error(t.error),void this.sync_payment_intent(e.order_id,e.client_secret)["catch"](function(t){this.submit_error(t.message)}.bind(this));this.is_current_page("order_pay")?this.get_form().submit():this.process_payment(e.order_id,e.order_key)}.bind(this))["catch"](function(t){this.submit_error(t.message)}.bind(this)),!1}catch(t){}},wc_stripe.BaseGateway.prototype.hashchange=function(t){var e=t.newURL.match(/response=(.*)/);if(e)try{var i=JSON.parse(a.atob(e[1]));i&&i.hasOwnProperty("client_secret")&&i.gateway_id===this.gateway_id&&(history.pushState({},"",a.location.pathname),this.handle_card_action(i))}catch(s){}return!0},wc_stripe.BaseGateway.prototype.sync_payment_intent=function(t,s){return new Promise(function(e,i){o.when(o.ajax({method:"POST",dataType:"json",url:this.params.routes.sync_intent,data:{order_id:t,client_secret:s},beforeSend:this.ajax_before_send.bind(this)})).done(function(t){(t.code?i:e)(t)}).fail(function(t,e,i){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.hasOrderReviewParams()},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.hasOrderReviewParams=function(){var t=a.location.search.match(/_stripe_order_review=(.+)/);if(t&&1<t.length)try{var e=JSON.parse(a.atob(t[1]));this.gateway_id===e.payment_method&&(this.payment_token_received=!0,this.set_nonce(e.payment_nonce),this.set_use_new_option(!0),history.pushState({},"",a.location.pathname))}catch(i){}},wc_stripe.CheckoutGateway.prototype.has3DSecureParams=function(){if((this.is_current_page("order_pay")||this.is_change_payment_method())&&a.location.hash&&"string"==typeof a.location.hash){var t=a.location.hash.match(/response=(.*)/);if(t)try{var e=JSON.parse(a.atob(t[1]));e&&e.hasOwnProperty("client_secret")&&e.gateway_id===this.gateway_id&&(o(function(){this.set_payment_method(this.gateway_id),this.set_use_new_option(!0),this.set_nonce(e.pm),!0===e.save_method&&this.set_save_payment_method(!0),o('[name="terms"]').prop("checked",!0)}.bind(this)),history.pushState({},"",a.location.pathname+a.location.search),this.handle_card_action(e))}catch(i){}}},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.CheckoutGateway.prototype.set_save_payment_method=function(t){o('[name="'+this.gateway_id+'_save_source_key"]').prop("checked",t)},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:o.extend({},{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()},this.get_product_variations()),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:o.extend({},{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},this.get_product_variations()),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.ProductGateway.prototype.get_product_variations=function(){var s={};return this.is_variable_product()&&o('.variations [name^="attribute_"]').each(function(t,e){var i=o(e),e=i.data("attribute_name")||i.attr("name");s[e]=i.val()}),s},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 s={apiVersion:2,apiVersionMinor:0},n={type:"CARD",parameters:{allowedAuthMethods:["PAN_ONLY"],allowedCardNetworks:["AMEX","DISCOVER","INTERAC","JCB","MASTERCARD","VISA"],assuranceDetailsRequired:!0}};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({},s,{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({},s);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.stripe.createPaymentMethod({type:"card",card:{token:e.id},billing_details:this.get_billing_details()}).then(function(t){if(t.error)return this.submit_error(t.error);this.on_token_received(t.paymentMethod)}.bind(this))}.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.supportsSessionStorage()&&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.supportsSessionStorage=function(){return"sessionStorage"in a&&null!==a.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=JSON.parse(wc_address_i18n_params.locale.replace(/"/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.supportsSessionStorage()&&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{i=Stripe(wc_stripe_params_v3.api_key,"test"===wc_stripe_params_v3.mode&&""===wc_stripe_params_v3.account?{}:{stripeAccount:wc_stripe_params_v3.account})}catch(t){return a.alert(t),console.log(t)}var r=new wc_stripe.CheckoutFields(wc_stripe_checkout_fields,wc_stripe_params_v3.page)}(window,jQuery);
|
1 |
+
!function(a,o){a.wc_stripe={};var i=null;"undefined"==typeof wc_stripe_checkout_fields&&(a.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=i,this.elements=i.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){var e=this.get_error_message(t);e.indexOf("</ul>")<0&&(e='<div class="'+function(){var t="woocommerce-NoticeGroup";return this.is_current_page("checkout")&&(t+=" woocommerce-NoticeGroup-checkout"),t}.bind(this)()+'"><ul class="woocommerce-error"><li>'+e+"</li></ul></div>");t=o(document.body).triggerHandler("wc_stripe_submit_error",[e,t,this]);e=void 0===t?e:t,this.submit_message(e)},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_billing_details=function(){var t={name:this.get_customer_name("billing"),address:{city:this.fields.get("billing_city",null),country:this.fields.get("billing_country",null),line1:this.fields.get("billing_address_1",null),line2:this.fields.get("billing_address_2",null),postal_code:this.fields.get("billing_postcode",null),state:this.fields.get("billing_state",null)}};return t.name&&" "!==t.name||delete t.name,""!=this.fields.get("billing_email")&&(t.email=this.fields.get("billing_email")),""!=this.fields.get("billing_phone")&&(t.phone=this.fields.get("billing_phone")),t},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")&&void 0===(t=o("form.checkout").find(".woocommerce_".concat(this.gateway_id,"_gateway_data")).data("gateway"))&&(t=o(".woocommerce_"+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=i.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){a.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?a.location.reload():"success"===t.result?a.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.process_payment=function(t,e){o.ajax({method:"POST",url:this.params.routes.checkout_payment,dataType:"json",data:o.extend({},this.fields.toJson(),{order_id:t,order_key:e}),beforeSend:this.ajax_before_send.bind(this)}).done(function(t){if(t.result&&"success"===t.result)a.location=t.redirect;else{if(t.reload)return a.location.reload();t.messages?this.submit_error(t.messages):this.submit_error(wc_checkout_params.i18n_checkout_error)}}.bind(this)).fail(function(){}.bind(this))},wc_stripe.BaseGateway.prototype.handle_card_action=function(e){try{return this.stripe.handleCardAction(e.client_secret).then(function(t){if(t.error)return this.payment_token_received=!1,this.submit_error(t.error),void this.sync_payment_intent(e.order_id,e.client_secret)["catch"](function(t){this.submit_error(t.message)}.bind(this));this.is_current_page("order_pay")?this.get_form().submit():this.process_payment(e.order_id,e.order_key)}.bind(this))["catch"](function(t){this.submit_error(t.message)}.bind(this)),!1}catch(t){}},wc_stripe.BaseGateway.prototype.hashchange=function(t){var e=t.newURL.match(/response=(.*)/);if(e)try{var i=JSON.parse(a.atob(decodeURIComponent(e[1])));i&&i.hasOwnProperty("client_secret")&&i.gateway_id===this.gateway_id&&(history.pushState({},"",a.location.pathname),this.handle_card_action(i))}catch(s){}return!0},wc_stripe.BaseGateway.prototype.sync_payment_intent=function(t,s){return new Promise(function(e,i){o.when(o.ajax({method:"POST",dataType:"json",url:this.params.routes.sync_intent,data:{order_id:t,client_secret:s},beforeSend:this.ajax_before_send.bind(this)})).done(function(t){(t.code?i:e)(t)}).fail(function(t,e,i){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.hasOrderReviewParams()},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.hasOrderReviewParams=function(){var t=a.location.search.match(/_stripe_order_review=(.+)/);if(t&&1<t.length)try{var e=JSON.parse(a.atob(decodeURIComponent(t[1])));this.gateway_id===e.payment_method&&(o(function(){this.payment_token_received=!0,this.set_nonce(e.payment_nonce),this.set_use_new_option(!0)}.bind(this)),history.pushState({},"",a.location.pathname))}catch(i){}},wc_stripe.CheckoutGateway.prototype.has3DSecureParams=function(){if((this.is_current_page("order_pay")||this.is_change_payment_method())&&a.location.hash&&"string"==typeof a.location.hash){var t=a.location.hash.match(/response=(.*)/);if(t)try{var e=JSON.parse(a.atob(decodeURIComponent(t[1])));e&&e.hasOwnProperty("client_secret")&&e.gateway_id===this.gateway_id&&(o(function(){this.set_payment_method(this.gateway_id),this.set_use_new_option(!0),this.set_nonce(e.pm),!0===e.save_method&&this.set_save_payment_method(!0),o('[name="terms"]').prop("checked",!0)}.bind(this)),history.pushState({},"",a.location.pathname+a.location.search),this.handle_card_action(e))}catch(i){}}},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.CheckoutGateway.prototype.set_save_payment_method=function(t){o('[name="'+this.gateway_id+'_save_source_key"]').prop("checked",t)},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:o.extend({},{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()},this.get_product_variations()),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:o.extend({},{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},this.get_product_variations()),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.ProductGateway.prototype.get_product_variations=function(){var s={};return this.is_variable_product()&&o('.variations [name^="attribute_"]').each(function(t,e){var i=o(e),e=i.data("attribute_name")||i.attr("name");s[e]=i.val()}),s},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 s={apiVersion:2,apiVersionMinor:0},n={type:"CARD",parameters:{allowedAuthMethods:["PAN_ONLY"],allowedCardNetworks:["AMEX","DISCOVER","INTERAC","JCB","MASTERCARD","VISA"],assuranceDetailsRequired:!0}};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({},s,{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({},s);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.stripe.createPaymentMethod({type:"card",card:{token:e.id},billing_details:this.get_billing_details()}).then(function(t){if(t.error)return this.submit_error(t.error);this.on_token_received(t.paymentMethod)}.bind(this))}.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.supportsSessionStorage()&&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.supportsSessionStorage=function(){return"sessionStorage"in a&&null!==a.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=JSON.parse(wc_address_i18n_params.locale.replace(/"/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.supportsSessionStorage()&&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{i=Stripe(wc_stripe_params_v3.api_key,"test"===wc_stripe_params_v3.mode&&""===wc_stripe_params_v3.account?{}:{stripeAccount:wc_stripe_params_v3.account})}catch(t){return a.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.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woo-stripe-payment\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"POT-Creation-Date: 2021-
|
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"
|
@@ -132,135 +132,131 @@ msgstr ""
|
|
132 |
msgid "User must be logged in."
|
133 |
msgstr ""
|
134 |
|
135 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
136 |
-
msgid "Error saving your payment method. Reason: %s"
|
137 |
-
msgstr ""
|
138 |
-
|
139 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:519
|
140 |
msgid "Error saving payment method. Reason: %s"
|
141 |
msgstr ""
|
142 |
|
143 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
144 |
#: includes/wc-stripe-webhook-functions.php:217
|
145 |
msgid "Order refunded in Stripe. Amount: %s"
|
146 |
msgstr ""
|
147 |
|
148 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
149 |
msgid "Order amount captured in Stripe. Amount: %s"
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
153 |
msgid "Error capturing charge in Stripe. Reason: %s"
|
154 |
msgstr ""
|
155 |
|
156 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
157 |
msgid "Error voiding charge. Reason: %s"
|
158 |
msgstr ""
|
159 |
|
160 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
161 |
msgid "Charge voided in Stripe."
|
162 |
msgstr ""
|
163 |
|
164 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
165 |
msgid "n/a"
|
166 |
msgstr ""
|
167 |
|
168 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
169 |
#: includes/admin/meta-boxes/views/html-order-pay.php:42
|
170 |
msgid "New Card"
|
171 |
msgstr ""
|
172 |
|
173 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
174 |
#: includes/admin/meta-boxes/views/html-order-pay.php:30
|
175 |
msgid "Saved Cards"
|
176 |
msgstr ""
|
177 |
|
178 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
179 |
msgid "Attemp to save payment method failed. Reason: %s"
|
180 |
msgstr ""
|
181 |
|
182 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
183 |
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."
|
184 |
msgstr ""
|
185 |
|
186 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
187 |
msgid "We were not able to save your payment method. Reason: %s"
|
188 |
msgstr ""
|
189 |
|
190 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
191 |
msgid "Payment Method Token"
|
192 |
msgstr ""
|
193 |
|
194 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
195 |
msgid "Recurring payment for order failed. Reason: %s"
|
196 |
msgstr ""
|
197 |
|
198 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
199 |
msgid "Recurring payment captured in Stripe. Payment method: %s"
|
200 |
msgstr ""
|
201 |
|
202 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
203 |
msgid "Recurring payment authorized in Stripe. Payment method: %s"
|
204 |
msgstr ""
|
205 |
|
206 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
207 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
208 |
msgid "Customer must manually complete payment for payment method %s"
|
209 |
msgstr ""
|
210 |
|
211 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
212 |
msgid "Error saving payment method for subscription. Reason: %s"
|
213 |
msgstr ""
|
214 |
|
215 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
216 |
-
#: includes/abstract/abstract-wc-stripe-payment.php:
|
217 |
msgid "Order %1$s from %2$s"
|
218 |
msgstr ""
|
219 |
|
220 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
221 |
msgid "Pre-order payment for order failed. Reason: %s"
|
222 |
msgstr ""
|
223 |
|
224 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
225 |
msgid "Pre-order payment captured in Stripe. Payment method: %s"
|
226 |
msgstr ""
|
227 |
|
228 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
229 |
msgid "Pre-order payment authorized in Stripe. Payment method: %s"
|
230 |
msgstr ""
|
231 |
|
232 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
233 |
msgid "Cannot process payment"
|
234 |
msgstr ""
|
235 |
|
236 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
237 |
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."
|
238 |
msgstr ""
|
239 |
|
240 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
241 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
242 |
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:192
|
243 |
-
#: includes/wc-stripe-functions.php:
|
244 |
-
#: includes/wc-stripe-functions.php:
|
245 |
msgid "Shipping"
|
246 |
msgstr ""
|
247 |
|
248 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
249 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
250 |
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:202
|
251 |
-
#: includes/wc-stripe-functions.php:
|
252 |
-
#: includes/wc-stripe-functions.php:
|
253 |
msgid "Discount"
|
254 |
msgstr ""
|
255 |
|
256 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
257 |
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:220
|
258 |
-
#: includes/wc-stripe-functions.php:
|
259 |
msgid "Tax"
|
260 |
msgstr ""
|
261 |
|
262 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
263 |
-
#: includes/wc-stripe-functions.php:
|
264 |
msgid "Fees"
|
265 |
msgstr ""
|
266 |
|
@@ -284,7 +280,7 @@ msgstr ""
|
|
284 |
msgid "Transaction Id cannot be empty."
|
285 |
msgstr ""
|
286 |
|
287 |
-
#: includes/abstract/abstract-wc-stripe-payment.php:
|
288 |
#: includes/gateways/class-wc-payment-gateway-stripe-ach.php:123
|
289 |
msgid "Error processing payment. Reason: %s"
|
290 |
msgstr ""
|
@@ -341,6 +337,10 @@ msgstr ""
|
|
341 |
msgid "Stripe Settings"
|
342 |
msgstr ""
|
343 |
|
|
|
|
|
|
|
|
|
344 |
#: includes/admin/meta-boxes/views/html-charge-data-subview.php:9
|
345 |
#: includes/admin/views/html-user-profile.php:36
|
346 |
#: includes/admin/views/html-user-profile.php:69
|
@@ -707,8 +707,8 @@ msgstr ""
|
|
707 |
msgid "%1$snote:%2$s payment methods will be deleted in Stripe if you use the delete action."
|
708 |
msgstr ""
|
709 |
|
710 |
-
#: includes/class-wc-stripe-customer-manager.php:
|
711 |
-
#: includes/class-wc-stripe-customer-manager.php:
|
712 |
msgid "Error saving customer. Reason: %s"
|
713 |
msgstr ""
|
714 |
|
@@ -760,8 +760,8 @@ msgstr ""
|
|
760 |
msgid "Invalid order key."
|
761 |
msgstr ""
|
762 |
|
763 |
-
#: includes/controllers/class-wc-stripe-controller-checkout.php:
|
764 |
-
#: includes/controllers/class-wc-stripe-controller-checkout.php:
|
765 |
msgid "Please review your order details then click Place Order."
|
766 |
msgstr ""
|
767 |
|
@@ -890,6 +890,7 @@ msgstr ""
|
|
890 |
|
891 |
#: includes/gateways/class-wc-payment-gateway-stripe-applepay.php:22
|
892 |
#: includes/gateways/settings/applepay-settings.php:25
|
|
|
893 |
msgid "Apple Pay"
|
894 |
msgstr ""
|
895 |
|
@@ -979,6 +980,7 @@ msgstr ""
|
|
979 |
|
980 |
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:22
|
981 |
#: includes/gateways/settings/googlepay-settings.php:43
|
|
|
982 |
msgid "Google Pay"
|
983 |
msgstr ""
|
984 |
|
@@ -1239,6 +1241,7 @@ msgid "ACH Payment"
|
|
1239 |
msgstr ""
|
1240 |
|
1241 |
#: includes/gateways/settings/ach-settings.php:85
|
|
|
1242 |
msgid "Bank Payment"
|
1243 |
msgstr ""
|
1244 |
|
@@ -1355,7 +1358,7 @@ msgid "Button Settings"
|
|
1355 |
msgstr ""
|
1356 |
|
1357 |
#: includes/gateways/settings/applepay-settings.php:86
|
1358 |
-
#: includes/gateways/settings/googlepay-settings.php:
|
1359 |
msgid "Button Design"
|
1360 |
msgstr ""
|
1361 |
|
@@ -1514,54 +1517,58 @@ msgid "Icon"
|
|
1514 |
msgstr ""
|
1515 |
|
1516 |
#: includes/gateways/settings/googlepay-settings.php:109
|
1517 |
-
msgid "With Outline"
|
1518 |
msgstr ""
|
1519 |
|
1520 |
#: includes/gateways/settings/googlepay-settings.php:110
|
|
|
|
|
|
|
|
|
1521 |
msgid "Standard"
|
1522 |
msgstr ""
|
1523 |
|
1524 |
-
#: includes/gateways/settings/googlepay-settings.php:
|
1525 |
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."
|
1526 |
msgstr ""
|
1527 |
|
1528 |
-
#: includes/gateways/settings/googlepay-settings.php:
|
1529 |
msgid "Button Options"
|
1530 |
msgstr ""
|
1531 |
|
1532 |
-
#: includes/gateways/settings/googlepay-settings.php:
|
1533 |
msgid "Button Color"
|
1534 |
msgstr ""
|
1535 |
|
1536 |
-
#: includes/gateways/settings/googlepay-settings.php:
|
1537 |
msgid "Black"
|
1538 |
msgstr ""
|
1539 |
|
1540 |
-
#: includes/gateways/settings/googlepay-settings.php:
|
1541 |
msgid "White"
|
1542 |
msgstr ""
|
1543 |
|
1544 |
-
#: includes/gateways/settings/googlepay-settings.php:
|
1545 |
msgid "The button color of the GPay button."
|
1546 |
msgstr ""
|
1547 |
|
1548 |
-
#: includes/gateways/settings/googlepay-settings.php:
|
1549 |
msgid "Button Style"
|
1550 |
msgstr ""
|
1551 |
|
1552 |
-
#: includes/gateways/settings/googlepay-settings.php:
|
1553 |
msgid "Long"
|
1554 |
msgstr ""
|
1555 |
|
1556 |
-
#: includes/gateways/settings/googlepay-settings.php:
|
1557 |
msgid "Short"
|
1558 |
msgstr ""
|
1559 |
|
1560 |
-
#: includes/gateways/settings/googlepay-settings.php:
|
1561 |
msgid "The button style of the GPay button."
|
1562 |
msgstr ""
|
1563 |
|
1564 |
-
#: includes/gateways/settings/googlepay-settings.php:
|
1565 |
msgid "If you can't see the Google Pay button, try switching to a Chrome browser."
|
1566 |
msgstr ""
|
1567 |
|
@@ -1629,6 +1636,13 @@ msgstr ""
|
|
1629 |
msgid "{bank_name} **** {last4}"
|
1630 |
msgstr ""
|
1631 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1632 |
#: includes/tokens/class-wc-payment-token-stripe-cc.php:92
|
1633 |
msgid "{brand} ending in {last4}"
|
1634 |
msgstr ""
|
@@ -1657,13 +1671,12 @@ msgstr ""
|
|
1657 |
msgid "Card Type"
|
1658 |
msgstr ""
|
1659 |
|
1660 |
-
#: includes/tokens/class-wc-payment-token-stripe-
|
1661 |
-
msgid "
|
1662 |
msgstr ""
|
1663 |
|
1664 |
-
#: includes/tokens/class-wc-payment-token-stripe-
|
1665 |
-
|
1666 |
-
msgid "Gateway Title"
|
1667 |
msgstr ""
|
1668 |
|
1669 |
#: includes/traits/wc-stripe-controller-traits.php:39
|
@@ -1691,218 +1704,230 @@ msgstr ""
|
|
1691 |
msgid "Kind Regards,"
|
1692 |
msgstr ""
|
1693 |
|
1694 |
-
#: includes/wc-stripe-functions.php:
|
1695 |
msgid "Bootstrap form"
|
1696 |
msgstr ""
|
1697 |
|
1698 |
-
#: includes/wc-stripe-functions.php:
|
1699 |
msgid "Simple form"
|
1700 |
msgstr ""
|
1701 |
|
1702 |
-
#: includes/wc-stripe-functions.php:
|
1703 |
msgid "Minimalist form"
|
1704 |
msgstr ""
|
1705 |
|
1706 |
-
#: includes/wc-stripe-functions.php:
|
1707 |
msgid "Inline Form"
|
1708 |
msgstr ""
|
1709 |
|
1710 |
-
#: includes/wc-stripe-functions.php:
|
1711 |
msgid "Rounded Form"
|
1712 |
msgstr ""
|
1713 |
|
1714 |
-
#: includes/wc-stripe-functions.php:
|
1715 |
msgid "There was an error processing your credit card."
|
1716 |
msgstr ""
|
1717 |
|
1718 |
-
#: includes/wc-stripe-functions.php:
|
1719 |
msgid "Your card number is incomplete."
|
1720 |
msgstr ""
|
1721 |
|
1722 |
-
#: includes/wc-stripe-functions.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1723 |
msgid "The card number is incorrect. Check the card's number or use a different card."
|
1724 |
msgstr ""
|
1725 |
|
1726 |
-
#: includes/wc-stripe-functions.php:
|
1727 |
msgid "The card's security code is incorrect. Check the card's security code or use a different card."
|
1728 |
msgstr ""
|
1729 |
|
1730 |
-
#: includes/wc-stripe-functions.php:
|
1731 |
msgid "The card's ZIP code is incorrect. Check the card's ZIP code or use a different card."
|
1732 |
msgstr ""
|
1733 |
|
1734 |
-
#: includes/wc-stripe-functions.php:
|
1735 |
-
#: includes/wc-stripe-functions.php:
|
1736 |
msgid "The card number is invalid. Check the card details or use a different card."
|
1737 |
msgstr ""
|
1738 |
|
1739 |
-
#: includes/wc-stripe-functions.php:
|
1740 |
msgid "This value provided to the field contains characters that are unsupported by the field."
|
1741 |
msgstr ""
|
1742 |
|
1743 |
-
#: includes/wc-stripe-functions.php:
|
1744 |
msgid "The card's security code is invalid. Check the card's security code or use a different card."
|
1745 |
msgstr ""
|
1746 |
|
1747 |
-
#: includes/wc-stripe-functions.php:
|
1748 |
msgid "The card's expiration month is incorrect. Check the expiration date or use a different card."
|
1749 |
msgstr ""
|
1750 |
|
1751 |
-
#: includes/wc-stripe-functions.php:
|
1752 |
msgid "The card's expiration year is incorrect. Check the expiration date or use a different card."
|
1753 |
msgstr ""
|
1754 |
|
1755 |
-
#: includes/wc-stripe-functions.php:
|
1756 |
msgid "The card's address is incorrect. Check the card's address or use a different card."
|
1757 |
msgstr ""
|
1758 |
|
1759 |
-
#: includes/wc-stripe-functions.php:
|
1760 |
msgid "The card has expired. Check the expiration date or use a different card."
|
1761 |
msgstr ""
|
1762 |
|
1763 |
-
#: includes/wc-stripe-functions.php:
|
1764 |
msgid "The card has been declined."
|
1765 |
msgstr ""
|
1766 |
|
1767 |
-
#: includes/wc-stripe-functions.php:
|
1768 |
msgid "Your card's expiration year is in the past."
|
1769 |
msgstr ""
|
1770 |
|
1771 |
-
#: includes/wc-stripe-functions.php:
|
1772 |
msgid "The bank account number provided is invalid (e.g., missing digits). Bank account information varies from country to country. We recommend creating validations in your entry forms based on the bank account formats we provide."
|
1773 |
msgstr ""
|
1774 |
|
1775 |
-
#: includes/wc-stripe-functions.php:
|
1776 |
msgid "The specified amount is greater than the maximum amount allowed. Use a lower amount and try again."
|
1777 |
msgstr ""
|
1778 |
|
1779 |
-
#: includes/wc-stripe-functions.php:
|
1780 |
msgid "The specified amount is less than the minimum amount allowed. Use a higher amount and try again."
|
1781 |
msgstr ""
|
1782 |
|
1783 |
-
#: includes/wc-stripe-functions.php:
|
1784 |
msgid "The payment requires authentication to proceed. If your customer is off session, notify your customer to return to your application and complete the payment. If you provided the error_on_requires_action parameter, then your customer should try another card that does not require authentication."
|
1785 |
msgstr ""
|
1786 |
|
1787 |
-
#: includes/wc-stripe-functions.php:
|
1788 |
msgid "The transfer or payout could not be completed because the associated account does not have a sufficient balance available. Create a new transfer or payout using an amount less than or equal to the account's available balance."
|
1789 |
msgstr ""
|
1790 |
|
1791 |
-
#: includes/wc-stripe-functions.php:
|
1792 |
msgid "The bank account provided can not be used to charge, either because it is not verified yet or it is not supported."
|
1793 |
msgstr ""
|
1794 |
|
1795 |
-
#: includes/wc-stripe-functions.php:
|
1796 |
msgid "The bank account provided already exists on the specified Customer object. If the bank account should also be attached to a different customer, include the correct customer ID when making the request again."
|
1797 |
msgstr ""
|
1798 |
|
1799 |
-
#: includes/wc-stripe-functions.php:
|
1800 |
msgid "The bank account provided cannot be used for payouts. A different bank account must be used."
|
1801 |
msgstr ""
|
1802 |
|
1803 |
-
#: includes/wc-stripe-functions.php:
|
1804 |
msgid "Your Connect platform is attempting to share an unverified bank account with a connected account."
|
1805 |
msgstr ""
|
1806 |
|
1807 |
-
#: includes/wc-stripe-functions.php:
|
1808 |
msgid "The bank account cannot be verified, either because the microdeposit amounts provided do not match the actual amounts, or because verification has failed too many times."
|
1809 |
msgstr ""
|
1810 |
|
1811 |
-
#: includes/wc-stripe-functions.php:
|
1812 |
msgid "This card has been declined too many times. You can try to charge this card again after 24 hours. We suggest reaching out to your customer to make sure they have entered all of their information correctly and that there are no issues with their card."
|
1813 |
msgstr ""
|
1814 |
|
1815 |
-
#: includes/wc-stripe-functions.php:
|
1816 |
msgid "The charge you're attempting to capture has already been captured. Update the request with an uncaptured charge ID."
|
1817 |
msgstr ""
|
1818 |
|
1819 |
-
#: includes/wc-stripe-functions.php:
|
1820 |
msgid "The charge you're attempting to refund has already been refunded. Update the request to use the ID of a charge that has not been refunded."
|
1821 |
msgstr ""
|
1822 |
|
1823 |
-
#: includes/wc-stripe-functions.php:
|
1824 |
msgid "The charge you're attempting to refund has been charged back. Check the disputes documentation to learn how to respond to the dispute."
|
1825 |
msgstr ""
|
1826 |
|
1827 |
-
#: includes/wc-stripe-functions.php:
|
1828 |
msgid "This charge would cause you to exceed your rolling-window processing limit for this source type. Please retry the charge later, or contact us to request a higher processing limit."
|
1829 |
msgstr ""
|
1830 |
|
1831 |
-
#: includes/wc-stripe-functions.php:
|
1832 |
msgid "The charge cannot be captured as the authorization has expired. Auth and capture charges must be captured within seven days."
|
1833 |
msgstr ""
|
1834 |
|
1835 |
-
#: includes/wc-stripe-functions.php:
|
1836 |
msgid "One or more provided parameters was not allowed for the given operation on the Charge. Check our API reference or the returned error message to see which values were not correct for that Charge."
|
1837 |
msgstr ""
|
1838 |
|
1839 |
-
#: includes/wc-stripe-functions.php:
|
1840 |
msgid "The email address is invalid (e.g., not properly formatted). Check that the email address is properly formatted and only includes allowed characters."
|
1841 |
msgstr ""
|
1842 |
|
1843 |
-
#: includes/wc-stripe-functions.php:
|
1844 |
msgid "The idempotency key provided is currently being used in another request. This occurs if your integration is making duplicate requests simultaneously."
|
1845 |
msgstr ""
|
1846 |
|
1847 |
-
#: includes/wc-stripe-functions.php:
|
1848 |
msgid "The specified amount is invalid. The charge amount must be a positive integer in the smallest currency unit, and not exceed the minimum or maximum amount."
|
1849 |
msgstr ""
|
1850 |
|
1851 |
-
#: includes/wc-stripe-functions.php:
|
1852 |
msgid "The source cannot be used because it is not in the correct state (e.g., a charge request is trying to use a source with a pending, failed, or consumed source). Check the status of the source you are attempting to use."
|
1853 |
msgstr ""
|
1854 |
|
1855 |
-
#: includes/wc-stripe-functions.php:
|
1856 |
msgid "Both a customer and source ID have been provided, but the source has not been saved to the customer. To create a charge for a customer with a specified source, you must first save the card details."
|
1857 |
msgstr ""
|
1858 |
|
1859 |
-
#: includes/wc-stripe-functions.php:
|
1860 |
msgid "The ZIP code provided was incorrect."
|
1861 |
msgstr ""
|
1862 |
|
1863 |
-
#: includes/wc-stripe-functions.php:
|
1864 |
msgid "An error occurred while processing the card. Try again later or with a different payment method."
|
1865 |
msgstr ""
|
1866 |
|
1867 |
-
#: includes/wc-stripe-functions.php:
|
1868 |
msgid "The card does not support this type of purchase."
|
1869 |
msgstr ""
|
1870 |
|
1871 |
-
#: includes/wc-stripe-functions.php:
|
1872 |
-
#: includes/wc-stripe-functions.php:
|
1873 |
-
#: includes/wc-stripe-functions.php:
|
1874 |
msgid "The card has been declined for an unknown reason."
|
1875 |
msgstr ""
|
1876 |
|
1877 |
-
#: includes/wc-stripe-functions.php:
|
1878 |
msgid "The customer has exceeded the balance or credit limit available on their card."
|
1879 |
msgstr ""
|
1880 |
|
1881 |
-
#: includes/wc-stripe-functions.php:
|
1882 |
msgid "The card does not support the specified currency."
|
1883 |
msgstr ""
|
1884 |
|
1885 |
-
#: includes/wc-stripe-functions.php:
|
1886 |
msgid "The payment has been declined as Stripe suspects it is fraudulent."
|
1887 |
msgstr ""
|
1888 |
|
1889 |
-
#: includes/wc-stripe-functions.php:
|
1890 |
msgid "The PIN entered is incorrect. "
|
1891 |
msgstr ""
|
1892 |
|
1893 |
-
#: includes/wc-stripe-functions.php:
|
1894 |
msgid "The card has insufficient funds to complete the purchase."
|
1895 |
msgstr ""
|
1896 |
|
1897 |
-
#: includes/wc-stripe-functions.php:
|
1898 |
msgid "Please select a payment method before proceeding."
|
1899 |
msgstr ""
|
1900 |
|
1901 |
-
#: includes/wc-stripe-functions.php:
|
1902 |
msgid "Please enter your IBAN before proceeding."
|
1903 |
msgstr ""
|
1904 |
|
1905 |
-
#: includes/wc-stripe-functions.php:
|
1906 |
msgid "Please select a bank before proceeding"
|
1907 |
msgstr ""
|
1908 |
|
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.12\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woo-stripe-payment\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2021-02-03T06:59:33+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"
|
132 |
msgid "User must be logged in."
|
133 |
msgstr ""
|
134 |
|
135 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:517
|
|
|
|
|
|
|
|
|
136 |
msgid "Error saving payment method. Reason: %s"
|
137 |
msgstr ""
|
138 |
|
139 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:536
|
140 |
#: includes/wc-stripe-webhook-functions.php:217
|
141 |
msgid "Order refunded in Stripe. Amount: %s"
|
142 |
msgstr ""
|
143 |
|
144 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:574
|
145 |
msgid "Order amount captured in Stripe. Amount: %s"
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:584
|
149 |
msgid "Error capturing charge in Stripe. Reason: %s"
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:605
|
153 |
msgid "Error voiding charge. Reason: %s"
|
154 |
msgstr ""
|
155 |
|
156 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:607
|
157 |
msgid "Charge voided in Stripe."
|
158 |
msgstr ""
|
159 |
|
160 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:770
|
161 |
msgid "n/a"
|
162 |
msgstr ""
|
163 |
|
164 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:798
|
165 |
#: includes/admin/meta-boxes/views/html-order-pay.php:42
|
166 |
msgid "New Card"
|
167 |
msgstr ""
|
168 |
|
169 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:802
|
170 |
#: includes/admin/meta-boxes/views/html-order-pay.php:30
|
171 |
msgid "Saved Cards"
|
172 |
msgstr ""
|
173 |
|
174 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1009
|
175 |
msgid "Attemp to save payment method failed. Reason: %s"
|
176 |
msgstr ""
|
177 |
|
178 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1031
|
179 |
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."
|
180 |
msgstr ""
|
181 |
|
182 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1033
|
183 |
msgid "We were not able to save your payment method. Reason: %s"
|
184 |
msgstr ""
|
185 |
|
186 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1067
|
187 |
msgid "Payment Method Token"
|
188 |
msgstr ""
|
189 |
|
190 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1087
|
191 |
msgid "Recurring payment for order failed. Reason: %s"
|
192 |
msgstr ""
|
193 |
|
194 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1100
|
195 |
msgid "Recurring payment captured in Stripe. Payment method: %s"
|
196 |
msgstr ""
|
197 |
|
198 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1102
|
199 |
msgid "Recurring payment authorized in Stripe. Payment method: %s"
|
200 |
msgstr ""
|
201 |
|
202 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1105
|
203 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1390
|
204 |
msgid "Customer must manually complete payment for payment method %s"
|
205 |
msgstr ""
|
206 |
|
207 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1121
|
208 |
msgid "Error saving payment method for subscription. Reason: %s"
|
209 |
msgstr ""
|
210 |
|
211 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1182
|
212 |
+
#: includes/abstract/abstract-wc-stripe-payment.php:227
|
213 |
msgid "Order %1$s from %2$s"
|
214 |
msgstr ""
|
215 |
|
216 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1377
|
217 |
msgid "Pre-order payment for order failed. Reason: %s"
|
218 |
msgstr ""
|
219 |
|
220 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1385
|
221 |
msgid "Pre-order payment captured in Stripe. Payment method: %s"
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1387
|
225 |
msgid "Pre-order payment authorized in Stripe. Payment method: %s"
|
226 |
msgstr ""
|
227 |
|
228 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1459
|
229 |
msgid "Cannot process payment"
|
230 |
msgstr ""
|
231 |
|
232 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1467
|
233 |
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."
|
234 |
msgstr ""
|
235 |
|
236 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1581
|
237 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1612
|
238 |
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:192
|
239 |
+
#: includes/wc-stripe-functions.php:412
|
240 |
+
#: includes/wc-stripe-functions.php:477
|
241 |
msgid "Shipping"
|
242 |
msgstr ""
|
243 |
|
244 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1589
|
245 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1615
|
246 |
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:202
|
247 |
+
#: includes/wc-stripe-functions.php:429
|
248 |
+
#: includes/wc-stripe-functions.php:485
|
249 |
msgid "Discount"
|
250 |
msgstr ""
|
251 |
|
252 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1592
|
253 |
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:220
|
254 |
+
#: includes/wc-stripe-functions.php:437
|
255 |
msgid "Tax"
|
256 |
msgstr ""
|
257 |
|
258 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1622
|
259 |
+
#: includes/wc-stripe-functions.php:496
|
260 |
msgid "Fees"
|
261 |
msgstr ""
|
262 |
|
280 |
msgid "Transaction Id cannot be empty."
|
281 |
msgstr ""
|
282 |
|
283 |
+
#: includes/abstract/abstract-wc-stripe-payment.php:294
|
284 |
#: includes/gateways/class-wc-payment-gateway-stripe-ach.php:123
|
285 |
msgid "Error processing payment. Reason: %s"
|
286 |
msgstr ""
|
337 |
msgid "Stripe Settings"
|
338 |
msgstr ""
|
339 |
|
340 |
+
#: includes/admin/meta-boxes/class-wc-stripe-admin-order-metaboxes.php:80
|
341 |
+
msgid "You must create the order before payment can be processed."
|
342 |
+
msgstr ""
|
343 |
+
|
344 |
#: includes/admin/meta-boxes/views/html-charge-data-subview.php:9
|
345 |
#: includes/admin/views/html-user-profile.php:36
|
346 |
#: includes/admin/views/html-user-profile.php:69
|
707 |
msgid "%1$snote:%2$s payment methods will be deleted in Stripe if you use the delete action."
|
708 |
msgstr ""
|
709 |
|
710 |
+
#: includes/class-wc-stripe-customer-manager.php:39
|
711 |
+
#: includes/class-wc-stripe-customer-manager.php:48
|
712 |
msgid "Error saving customer. Reason: %s"
|
713 |
msgstr ""
|
714 |
|
760 |
msgid "Invalid order key."
|
761 |
msgstr ""
|
762 |
|
763 |
+
#: includes/controllers/class-wc-stripe-controller-checkout.php:244
|
764 |
+
#: includes/controllers/class-wc-stripe-controller-checkout.php:290
|
765 |
msgid "Please review your order details then click Place Order."
|
766 |
msgstr ""
|
767 |
|
890 |
|
891 |
#: includes/gateways/class-wc-payment-gateway-stripe-applepay.php:22
|
892 |
#: includes/gateways/settings/applepay-settings.php:25
|
893 |
+
#: includes/tokens/class-wc-payment-token-stripe-applepay.php:19
|
894 |
msgid "Apple Pay"
|
895 |
msgstr ""
|
896 |
|
980 |
|
981 |
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:22
|
982 |
#: includes/gateways/settings/googlepay-settings.php:43
|
983 |
+
#: includes/tokens/class-wc-payment-token-stripe-googlepay.php:29
|
984 |
msgid "Google Pay"
|
985 |
msgstr ""
|
986 |
|
1241 |
msgstr ""
|
1242 |
|
1243 |
#: includes/gateways/settings/ach-settings.php:85
|
1244 |
+
#: includes/tokens/class-wc-payment-token-stripe-ach.php:92
|
1245 |
msgid "Bank Payment"
|
1246 |
msgstr ""
|
1247 |
|
1358 |
msgstr ""
|
1359 |
|
1360 |
#: includes/gateways/settings/applepay-settings.php:86
|
1361 |
+
#: includes/gateways/settings/googlepay-settings.php:145
|
1362 |
msgid "Button Design"
|
1363 |
msgstr ""
|
1364 |
|
1517 |
msgstr ""
|
1518 |
|
1519 |
#: includes/gateways/settings/googlepay-settings.php:109
|
1520 |
+
msgid "With Rounded Outline"
|
1521 |
msgstr ""
|
1522 |
|
1523 |
#: includes/gateways/settings/googlepay-settings.php:110
|
1524 |
+
msgid "With Outline"
|
1525 |
+
msgstr ""
|
1526 |
+
|
1527 |
+
#: includes/gateways/settings/googlepay-settings.php:111
|
1528 |
msgid "Standard"
|
1529 |
msgstr ""
|
1530 |
|
1531 |
+
#: includes/gateways/settings/googlepay-settings.php:115
|
1532 |
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."
|
1533 |
msgstr ""
|
1534 |
|
1535 |
+
#: includes/gateways/settings/googlepay-settings.php:119
|
1536 |
msgid "Button Options"
|
1537 |
msgstr ""
|
1538 |
|
1539 |
+
#: includes/gateways/settings/googlepay-settings.php:122
|
1540 |
msgid "Button Color"
|
1541 |
msgstr ""
|
1542 |
|
1543 |
+
#: includes/gateways/settings/googlepay-settings.php:126
|
1544 |
msgid "Black"
|
1545 |
msgstr ""
|
1546 |
|
1547 |
+
#: includes/gateways/settings/googlepay-settings.php:127
|
1548 |
msgid "White"
|
1549 |
msgstr ""
|
1550 |
|
1551 |
+
#: includes/gateways/settings/googlepay-settings.php:130
|
1552 |
msgid "The button color of the GPay button."
|
1553 |
msgstr ""
|
1554 |
|
1555 |
+
#: includes/gateways/settings/googlepay-settings.php:133
|
1556 |
msgid "Button Style"
|
1557 |
msgstr ""
|
1558 |
|
1559 |
+
#: includes/gateways/settings/googlepay-settings.php:137
|
1560 |
msgid "Long"
|
1561 |
msgstr ""
|
1562 |
|
1563 |
+
#: includes/gateways/settings/googlepay-settings.php:138
|
1564 |
msgid "Short"
|
1565 |
msgstr ""
|
1566 |
|
1567 |
+
#: includes/gateways/settings/googlepay-settings.php:141
|
1568 |
msgid "The button style of the GPay button."
|
1569 |
msgstr ""
|
1570 |
|
1571 |
+
#: includes/gateways/settings/googlepay-settings.php:147
|
1572 |
msgid "If you can't see the Google Pay button, try switching to a Chrome browser."
|
1573 |
msgstr ""
|
1574 |
|
1636 |
msgid "{bank_name} **** {last4}"
|
1637 |
msgstr ""
|
1638 |
|
1639 |
+
#: includes/tokens/class-wc-payment-token-stripe-ach.php:80
|
1640 |
+
#: includes/tokens/class-wc-payment-token-stripe-cc.php:125
|
1641 |
+
#: includes/tokens/class-wc-payment-token-stripe-local-payment.php:33
|
1642 |
+
#: includes/tokens/class-wc-payment-token-stripe-sepa.php:60
|
1643 |
+
msgid "Gateway Title"
|
1644 |
+
msgstr ""
|
1645 |
+
|
1646 |
#: includes/tokens/class-wc-payment-token-stripe-cc.php:92
|
1647 |
msgid "{brand} ending in {last4}"
|
1648 |
msgstr ""
|
1671 |
msgid "Card Type"
|
1672 |
msgstr ""
|
1673 |
|
1674 |
+
#: includes/tokens/class-wc-payment-token-stripe-cc.php:133
|
1675 |
+
msgid "Credit Card"
|
1676 |
msgstr ""
|
1677 |
|
1678 |
+
#: includes/tokens/class-wc-payment-token-stripe-googlepay.php:21
|
1679 |
+
msgid "Gateway Name"
|
|
|
1680 |
msgstr ""
|
1681 |
|
1682 |
#: includes/traits/wc-stripe-controller-traits.php:39
|
1704 |
msgid "Kind Regards,"
|
1705 |
msgstr ""
|
1706 |
|
1707 |
+
#: includes/wc-stripe-functions.php:838
|
1708 |
msgid "Bootstrap form"
|
1709 |
msgstr ""
|
1710 |
|
1711 |
+
#: includes/wc-stripe-functions.php:864
|
1712 |
msgid "Simple form"
|
1713 |
msgstr ""
|
1714 |
|
1715 |
+
#: includes/wc-stripe-functions.php:887
|
1716 |
msgid "Minimalist form"
|
1717 |
msgstr ""
|
1718 |
|
1719 |
+
#: includes/wc-stripe-functions.php:913
|
1720 |
msgid "Inline Form"
|
1721 |
msgstr ""
|
1722 |
|
1723 |
+
#: includes/wc-stripe-functions.php:935
|
1724 |
msgid "Rounded Form"
|
1725 |
msgstr ""
|
1726 |
|
1727 |
+
#: includes/wc-stripe-functions.php:1153
|
1728 |
msgid "There was an error processing your credit card."
|
1729 |
msgstr ""
|
1730 |
|
1731 |
+
#: includes/wc-stripe-functions.php:1154
|
1732 |
msgid "Your card number is incomplete."
|
1733 |
msgstr ""
|
1734 |
|
1735 |
+
#: includes/wc-stripe-functions.php:1155
|
1736 |
+
msgid "Your card's expiration date is incomplete."
|
1737 |
+
msgstr ""
|
1738 |
+
|
1739 |
+
#: includes/wc-stripe-functions.php:1156
|
1740 |
+
msgid "Your card's security code is incomplete."
|
1741 |
+
msgstr ""
|
1742 |
+
|
1743 |
+
#: includes/wc-stripe-functions.php:1157
|
1744 |
+
msgid "Your card's zip code is incomplete."
|
1745 |
+
msgstr ""
|
1746 |
+
|
1747 |
+
#: includes/wc-stripe-functions.php:1158
|
1748 |
msgid "The card number is incorrect. Check the card's number or use a different card."
|
1749 |
msgstr ""
|
1750 |
|
1751 |
+
#: includes/wc-stripe-functions.php:1159
|
1752 |
msgid "The card's security code is incorrect. Check the card's security code or use a different card."
|
1753 |
msgstr ""
|
1754 |
|
1755 |
+
#: includes/wc-stripe-functions.php:1160
|
1756 |
msgid "The card's ZIP code is incorrect. Check the card's ZIP code or use a different card."
|
1757 |
msgstr ""
|
1758 |
|
1759 |
+
#: includes/wc-stripe-functions.php:1161
|
1760 |
+
#: includes/wc-stripe-functions.php:1166
|
1761 |
msgid "The card number is invalid. Check the card details or use a different card."
|
1762 |
msgstr ""
|
1763 |
|
1764 |
+
#: includes/wc-stripe-functions.php:1162
|
1765 |
msgid "This value provided to the field contains characters that are unsupported by the field."
|
1766 |
msgstr ""
|
1767 |
|
1768 |
+
#: includes/wc-stripe-functions.php:1163
|
1769 |
msgid "The card's security code is invalid. Check the card's security code or use a different card."
|
1770 |
msgstr ""
|
1771 |
|
1772 |
+
#: includes/wc-stripe-functions.php:1164
|
1773 |
msgid "The card's expiration month is incorrect. Check the expiration date or use a different card."
|
1774 |
msgstr ""
|
1775 |
|
1776 |
+
#: includes/wc-stripe-functions.php:1165
|
1777 |
msgid "The card's expiration year is incorrect. Check the expiration date or use a different card."
|
1778 |
msgstr ""
|
1779 |
|
1780 |
+
#: includes/wc-stripe-functions.php:1167
|
1781 |
msgid "The card's address is incorrect. Check the card's address or use a different card."
|
1782 |
msgstr ""
|
1783 |
|
1784 |
+
#: includes/wc-stripe-functions.php:1168
|
1785 |
msgid "The card has expired. Check the expiration date or use a different card."
|
1786 |
msgstr ""
|
1787 |
|
1788 |
+
#: includes/wc-stripe-functions.php:1169
|
1789 |
msgid "The card has been declined."
|
1790 |
msgstr ""
|
1791 |
|
1792 |
+
#: includes/wc-stripe-functions.php:1170
|
1793 |
msgid "Your card's expiration year is in the past."
|
1794 |
msgstr ""
|
1795 |
|
1796 |
+
#: includes/wc-stripe-functions.php:1171
|
1797 |
msgid "The bank account number provided is invalid (e.g., missing digits). Bank account information varies from country to country. We recommend creating validations in your entry forms based on the bank account formats we provide."
|
1798 |
msgstr ""
|
1799 |
|
1800 |
+
#: includes/wc-stripe-functions.php:1172
|
1801 |
msgid "The specified amount is greater than the maximum amount allowed. Use a lower amount and try again."
|
1802 |
msgstr ""
|
1803 |
|
1804 |
+
#: includes/wc-stripe-functions.php:1173
|
1805 |
msgid "The specified amount is less than the minimum amount allowed. Use a higher amount and try again."
|
1806 |
msgstr ""
|
1807 |
|
1808 |
+
#: includes/wc-stripe-functions.php:1174
|
1809 |
msgid "The payment requires authentication to proceed. If your customer is off session, notify your customer to return to your application and complete the payment. If you provided the error_on_requires_action parameter, then your customer should try another card that does not require authentication."
|
1810 |
msgstr ""
|
1811 |
|
1812 |
+
#: includes/wc-stripe-functions.php:1175
|
1813 |
msgid "The transfer or payout could not be completed because the associated account does not have a sufficient balance available. Create a new transfer or payout using an amount less than or equal to the account's available balance."
|
1814 |
msgstr ""
|
1815 |
|
1816 |
+
#: includes/wc-stripe-functions.php:1176
|
1817 |
msgid "The bank account provided can not be used to charge, either because it is not verified yet or it is not supported."
|
1818 |
msgstr ""
|
1819 |
|
1820 |
+
#: includes/wc-stripe-functions.php:1177
|
1821 |
msgid "The bank account provided already exists on the specified Customer object. If the bank account should also be attached to a different customer, include the correct customer ID when making the request again."
|
1822 |
msgstr ""
|
1823 |
|
1824 |
+
#: includes/wc-stripe-functions.php:1178
|
1825 |
msgid "The bank account provided cannot be used for payouts. A different bank account must be used."
|
1826 |
msgstr ""
|
1827 |
|
1828 |
+
#: includes/wc-stripe-functions.php:1179
|
1829 |
msgid "Your Connect platform is attempting to share an unverified bank account with a connected account."
|
1830 |
msgstr ""
|
1831 |
|
1832 |
+
#: includes/wc-stripe-functions.php:1180
|
1833 |
msgid "The bank account cannot be verified, either because the microdeposit amounts provided do not match the actual amounts, or because verification has failed too many times."
|
1834 |
msgstr ""
|
1835 |
|
1836 |
+
#: includes/wc-stripe-functions.php:1181
|
1837 |
msgid "This card has been declined too many times. You can try to charge this card again after 24 hours. We suggest reaching out to your customer to make sure they have entered all of their information correctly and that there are no issues with their card."
|
1838 |
msgstr ""
|
1839 |
|
1840 |
+
#: includes/wc-stripe-functions.php:1182
|
1841 |
msgid "The charge you're attempting to capture has already been captured. Update the request with an uncaptured charge ID."
|
1842 |
msgstr ""
|
1843 |
|
1844 |
+
#: includes/wc-stripe-functions.php:1183
|
1845 |
msgid "The charge you're attempting to refund has already been refunded. Update the request to use the ID of a charge that has not been refunded."
|
1846 |
msgstr ""
|
1847 |
|
1848 |
+
#: includes/wc-stripe-functions.php:1184
|
1849 |
msgid "The charge you're attempting to refund has been charged back. Check the disputes documentation to learn how to respond to the dispute."
|
1850 |
msgstr ""
|
1851 |
|
1852 |
+
#: includes/wc-stripe-functions.php:1185
|
1853 |
msgid "This charge would cause you to exceed your rolling-window processing limit for this source type. Please retry the charge later, or contact us to request a higher processing limit."
|
1854 |
msgstr ""
|
1855 |
|
1856 |
+
#: includes/wc-stripe-functions.php:1186
|
1857 |
msgid "The charge cannot be captured as the authorization has expired. Auth and capture charges must be captured within seven days."
|
1858 |
msgstr ""
|
1859 |
|
1860 |
+
#: includes/wc-stripe-functions.php:1187
|
1861 |
msgid "One or more provided parameters was not allowed for the given operation on the Charge. Check our API reference or the returned error message to see which values were not correct for that Charge."
|
1862 |
msgstr ""
|
1863 |
|
1864 |
+
#: includes/wc-stripe-functions.php:1188
|
1865 |
msgid "The email address is invalid (e.g., not properly formatted). Check that the email address is properly formatted and only includes allowed characters."
|
1866 |
msgstr ""
|
1867 |
|
1868 |
+
#: includes/wc-stripe-functions.php:1189
|
1869 |
msgid "The idempotency key provided is currently being used in another request. This occurs if your integration is making duplicate requests simultaneously."
|
1870 |
msgstr ""
|
1871 |
|
1872 |
+
#: includes/wc-stripe-functions.php:1190
|
1873 |
msgid "The specified amount is invalid. The charge amount must be a positive integer in the smallest currency unit, and not exceed the minimum or maximum amount."
|
1874 |
msgstr ""
|
1875 |
|
1876 |
+
#: includes/wc-stripe-functions.php:1191
|
1877 |
msgid "The source cannot be used because it is not in the correct state (e.g., a charge request is trying to use a source with a pending, failed, or consumed source). Check the status of the source you are attempting to use."
|
1878 |
msgstr ""
|
1879 |
|
1880 |
+
#: includes/wc-stripe-functions.php:1192
|
1881 |
msgid "Both a customer and source ID have been provided, but the source has not been saved to the customer. To create a charge for a customer with a specified source, you must first save the card details."
|
1882 |
msgstr ""
|
1883 |
|
1884 |
+
#: includes/wc-stripe-functions.php:1193
|
1885 |
msgid "The ZIP code provided was incorrect."
|
1886 |
msgstr ""
|
1887 |
|
1888 |
+
#: includes/wc-stripe-functions.php:1194
|
1889 |
msgid "An error occurred while processing the card. Try again later or with a different payment method."
|
1890 |
msgstr ""
|
1891 |
|
1892 |
+
#: includes/wc-stripe-functions.php:1195
|
1893 |
msgid "The card does not support this type of purchase."
|
1894 |
msgstr ""
|
1895 |
|
1896 |
+
#: includes/wc-stripe-functions.php:1196
|
1897 |
+
#: includes/wc-stripe-functions.php:1199
|
1898 |
+
#: includes/wc-stripe-functions.php:1201
|
1899 |
msgid "The card has been declined for an unknown reason."
|
1900 |
msgstr ""
|
1901 |
|
1902 |
+
#: includes/wc-stripe-functions.php:1197
|
1903 |
msgid "The customer has exceeded the balance or credit limit available on their card."
|
1904 |
msgstr ""
|
1905 |
|
1906 |
+
#: includes/wc-stripe-functions.php:1198
|
1907 |
msgid "The card does not support the specified currency."
|
1908 |
msgstr ""
|
1909 |
|
1910 |
+
#: includes/wc-stripe-functions.php:1200
|
1911 |
msgid "The payment has been declined as Stripe suspects it is fraudulent."
|
1912 |
msgstr ""
|
1913 |
|
1914 |
+
#: includes/wc-stripe-functions.php:1202
|
1915 |
msgid "The PIN entered is incorrect. "
|
1916 |
msgstr ""
|
1917 |
|
1918 |
+
#: includes/wc-stripe-functions.php:1203
|
1919 |
msgid "The card has insufficient funds to complete the purchase."
|
1920 |
msgstr ""
|
1921 |
|
1922 |
+
#: includes/wc-stripe-functions.php:1204
|
1923 |
msgid "Please select a payment method before proceeding."
|
1924 |
msgstr ""
|
1925 |
|
1926 |
+
#: includes/wc-stripe-functions.php:1205
|
1927 |
msgid "Please enter your IBAN before proceeding."
|
1928 |
msgstr ""
|
1929 |
|
1930 |
+
#: includes/wc-stripe-functions.php:1206
|
1931 |
msgid "Please select a bank before proceeding"
|
1932 |
msgstr ""
|
1933 |
|
includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php
CHANGED
@@ -192,8 +192,8 @@ abstract class WC_Payment_Gateway_Stripe_Local_Payment extends WC_Payment_Gatewa
|
|
192 |
'local_payment_type' => $this->local_payment_type,
|
193 |
'return_url' => add_query_arg(
|
194 |
array(
|
195 |
-
'key'
|
196 |
-
'
|
197 |
),
|
198 |
wc_get_checkout_url()
|
199 |
),
|
@@ -294,9 +294,9 @@ abstract class WC_Payment_Gateway_Stripe_Local_Payment extends WC_Payment_Gatewa
|
|
294 |
|
295 |
return add_query_arg(
|
296 |
array(
|
297 |
-
'key'
|
298 |
-
'order_id'
|
299 |
-
'
|
300 |
),
|
301 |
$url
|
302 |
);
|
192 |
'local_payment_type' => $this->local_payment_type,
|
193 |
'return_url' => add_query_arg(
|
194 |
array(
|
195 |
+
'key' => wp_create_nonce( 'local-payment' ),
|
196 |
+
'_stripe_local_payment' => $this->id,
|
197 |
),
|
198 |
wc_get_checkout_url()
|
199 |
),
|
294 |
|
295 |
return add_query_arg(
|
296 |
array(
|
297 |
+
'key' => $order->get_order_key(),
|
298 |
+
'order_id' => $order->get_id(),
|
299 |
+
'_stripe_local_payment' => $this->id,
|
300 |
),
|
301 |
$url
|
302 |
);
|
includes/abstract/abstract-wc-payment-gateway-stripe.php
CHANGED
@@ -285,7 +285,7 @@ abstract class WC_Payment_Gateway_Stripe extends WC_Payment_Gateway {
|
|
285 |
}
|
286 |
}
|
287 |
if ( ! empty( stripe_wc()->scripts()->enqueued_scripts ) ) {
|
288 |
-
wp_enqueue_style( stripe_wc()->scripts()->prefix . 'styles', stripe_wc()->assets_url( 'css/stripe
|
289 |
wp_style_add_data( stripe_wc()->scripts()->prefix . 'styles', 'rtl', 'replace' );
|
290 |
}
|
291 |
}
|
@@ -501,9 +501,7 @@ abstract class WC_Payment_Gateway_Stripe extends WC_Payment_Gateway {
|
|
501 |
$result = $this->create_payment_method( $this->get_new_source_token(), $customer_id );
|
502 |
|
503 |
if ( is_wp_error( $result ) ) {
|
504 |
-
|
505 |
-
|
506 |
-
return array( 'result' => 'error' );
|
507 |
}
|
508 |
$result->set_user_id( $user_id );
|
509 |
$result->save();
|
@@ -515,7 +513,7 @@ abstract class WC_Payment_Gateway_Stripe extends WC_Payment_Gateway {
|
|
515 |
'result' => 'success',
|
516 |
'redirect' => wc_get_account_endpoint_url( 'payment-methods' ),
|
517 |
);
|
518 |
-
} catch (
|
519 |
wc_add_notice( sprintf( __( 'Error saving payment method. Reason: %s', 'woo-stripe-payment' ), $e->getMessage() ), 'error' );
|
520 |
|
521 |
return array( 'result' => 'error' );
|
@@ -716,26 +714,19 @@ abstract class WC_Payment_Gateway_Stripe extends WC_Payment_Gateway {
|
|
716 |
* Create a customer in the stripe gateway.
|
717 |
*
|
718 |
* @param int $user_id
|
|
|
|
|
719 |
*/
|
720 |
public function create_customer( $user_id ) {
|
721 |
$customer = WC()->customer;
|
722 |
-
$response =
|
723 |
-
apply_filters( 'wc_stripe_customer_args', array(
|
724 |
-
'email' => $customer->get_email(),
|
725 |
-
'name' => sprintf( '%s %s', $customer->get_first_name(), $customer->get_last_name() ),
|
726 |
-
'phone' => $customer->get_billing_phone(),
|
727 |
-
'metadata' => array(
|
728 |
-
'user_id' => $customer->get_id(),
|
729 |
-
'username' => $customer->get_username(),
|
730 |
-
'website' => get_site_url(),
|
731 |
-
),
|
732 |
-
) )
|
733 |
-
);
|
734 |
if ( ! is_wp_error( $response ) ) {
|
735 |
wc_stripe_save_customer( $response->id, $user_id );
|
|
|
|
|
736 |
}
|
737 |
|
738 |
-
return $
|
739 |
}
|
740 |
|
741 |
/**
|
@@ -1012,7 +1003,7 @@ abstract class WC_Payment_Gateway_Stripe extends WC_Payment_Gateway {
|
|
1012 |
* @return WP_Error|bool
|
1013 |
*/
|
1014 |
public function save_payment_method( $id, $order ) {
|
1015 |
-
$token = $this->create_payment_method( $id, wc_stripe_get_customer_id( $order->
|
1016 |
if ( is_wp_error( $token ) ) {
|
1017 |
$this->wp_error = $token;
|
1018 |
$order->add_order_note( sprintf( __( 'Attemp to save payment method failed. Reason: %s', 'woo-stripe-payment' ), $token->get_error_message() ) );
|
@@ -1223,10 +1214,26 @@ abstract class WC_Payment_Gateway_Stripe extends WC_Payment_Gateway {
|
|
1223 |
);
|
1224 |
}
|
1225 |
|
|
|
|
|
|
|
|
|
|
|
1226 |
public function process_pre_order( $order ) {
|
|
|
1227 |
// maybe save payment method
|
1228 |
if ( ! $this->use_saved_source() ) {
|
1229 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1230 |
if ( is_wp_error( $result ) ) {
|
1231 |
wc_add_notice( $result->get_error_message(), 'error' );
|
1232 |
|
@@ -1236,7 +1243,7 @@ abstract class WC_Payment_Gateway_Stripe extends WC_Payment_Gateway {
|
|
1236 |
$this->payment_method_token = $this->get_saved_source_id();
|
1237 |
}
|
1238 |
WC_Pre_Orders_Order::mark_order_as_pre_ordered( $order );
|
1239 |
-
$this->save_zero_total_meta( $order );
|
1240 |
|
1241 |
return array(
|
1242 |
'result' => 'success',
|
@@ -1248,13 +1255,14 @@ abstract class WC_Payment_Gateway_Stripe extends WC_Payment_Gateway {
|
|
1248 |
*
|
1249 |
* @param WC_Order $order
|
1250 |
*/
|
1251 |
-
protected function save_zero_total_meta( $order ) {
|
1252 |
-
$token = $this->get_token( $this->payment_method_token, $order->get_user_id() );
|
1253 |
$order->set_payment_method_title( $token->get_payment_method_title() );
|
1254 |
$order->update_meta_data( WC_Stripe_Constants::MODE, wc_stripe_mode() );
|
1255 |
$order->update_meta_data( WC_Stripe_Constants::PAYMENT_METHOD_TOKEN, $token->get_token() );
|
1256 |
-
|
1257 |
-
|
|
|
1258 |
if ( wcs_stripe_active() && wcs_order_contains_subscription( $order ) ) {
|
1259 |
foreach ( wcs_get_subscriptions_for_order( $order ) as $subscription ) {
|
1260 |
/**
|
285 |
}
|
286 |
}
|
287 |
if ( ! empty( stripe_wc()->scripts()->enqueued_scripts ) ) {
|
288 |
+
wp_enqueue_style( stripe_wc()->scripts()->prefix . 'styles', stripe_wc()->scripts()->assets_url( 'css/stripe.css' ), array(), stripe_wc()->version() );
|
289 |
wp_style_add_data( stripe_wc()->scripts()->prefix . 'styles', 'rtl', 'replace' );
|
290 |
}
|
291 |
}
|
501 |
$result = $this->create_payment_method( $this->get_new_source_token(), $customer_id );
|
502 |
|
503 |
if ( is_wp_error( $result ) ) {
|
504 |
+
throw new Exception( $result->get_error_message() );
|
|
|
|
|
505 |
}
|
506 |
$result->set_user_id( $user_id );
|
507 |
$result->save();
|
513 |
'result' => 'success',
|
514 |
'redirect' => wc_get_account_endpoint_url( 'payment-methods' ),
|
515 |
);
|
516 |
+
} catch ( Exception $e ) {
|
517 |
wc_add_notice( sprintf( __( 'Error saving payment method. Reason: %s', 'woo-stripe-payment' ), $e->getMessage() ), 'error' );
|
518 |
|
519 |
return array( 'result' => 'error' );
|
714 |
* Create a customer in the stripe gateway.
|
715 |
*
|
716 |
* @param int $user_id
|
717 |
+
*
|
718 |
+
* @throws Exception
|
719 |
*/
|
720 |
public function create_customer( $user_id ) {
|
721 |
$customer = WC()->customer;
|
722 |
+
$response = WC_Stripe_Customer_Manager::instance()->create_customer( $customer );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
723 |
if ( ! is_wp_error( $response ) ) {
|
724 |
wc_stripe_save_customer( $response->id, $user_id );
|
725 |
+
} else {
|
726 |
+
throw new Exception( $response->get_error_message() );
|
727 |
}
|
728 |
|
729 |
+
return $response->id;
|
730 |
}
|
731 |
|
732 |
/**
|
1003 |
* @return WP_Error|bool
|
1004 |
*/
|
1005 |
public function save_payment_method( $id, $order ) {
|
1006 |
+
$token = $this->create_payment_method( $id, wc_stripe_get_customer_id( $order->get_customer_id() ) );
|
1007 |
if ( is_wp_error( $token ) ) {
|
1008 |
$this->wp_error = $token;
|
1009 |
$order->add_order_note( sprintf( __( 'Attemp to save payment method failed. Reason: %s', 'woo-stripe-payment' ), $token->get_error_message() ) );
|
1214 |
);
|
1215 |
}
|
1216 |
|
1217 |
+
/**
|
1218 |
+
* @param WC_Order $order
|
1219 |
+
*
|
1220 |
+
* @return array
|
1221 |
+
*/
|
1222 |
public function process_pre_order( $order ) {
|
1223 |
+
$token = null;
|
1224 |
// maybe save payment method
|
1225 |
if ( ! $this->use_saved_source() ) {
|
1226 |
+
// if user not logged in, create a Stripe customer that won't be assigned to a user.
|
1227 |
+
if ( ! $order->get_customer_id() ) {
|
1228 |
+
$customer = WC_Stripe_Customer_Manager::instance()->create_customer( WC()->customer );
|
1229 |
+
if ( is_wp_error( $customer ) ) {
|
1230 |
+
return wc_add_notice( $customer->get_error_message(), 'error' );
|
1231 |
+
}
|
1232 |
+
$order->update_meta_data( WC_Stripe_Constants::CUSTOMER_ID, $customer->id );
|
1233 |
+
$result = $token = $this->create_payment_method( $this->get_new_source_token(), $customer->id );
|
1234 |
+
} else {
|
1235 |
+
$result = $this->save_payment_method( $this->get_new_source_token(), $order );
|
1236 |
+
}
|
1237 |
if ( is_wp_error( $result ) ) {
|
1238 |
wc_add_notice( $result->get_error_message(), 'error' );
|
1239 |
|
1243 |
$this->payment_method_token = $this->get_saved_source_id();
|
1244 |
}
|
1245 |
WC_Pre_Orders_Order::mark_order_as_pre_ordered( $order );
|
1246 |
+
$this->save_zero_total_meta( $order, $token );
|
1247 |
|
1248 |
return array(
|
1249 |
'result' => 'success',
|
1255 |
*
|
1256 |
* @param WC_Order $order
|
1257 |
*/
|
1258 |
+
protected function save_zero_total_meta( $order, $token = null ) {
|
1259 |
+
$token = ! $token ? $this->get_token( $this->payment_method_token, $order->get_user_id() ) : $token;
|
1260 |
$order->set_payment_method_title( $token->get_payment_method_title() );
|
1261 |
$order->update_meta_data( WC_Stripe_Constants::MODE, wc_stripe_mode() );
|
1262 |
$order->update_meta_data( WC_Stripe_Constants::PAYMENT_METHOD_TOKEN, $token->get_token() );
|
1263 |
+
if ( $order->get_customer_id() ) {
|
1264 |
+
$order->update_meta_data( WC_Stripe_Constants::CUSTOMER_ID, wc_stripe_get_customer_id( $order->get_user_id() ) );
|
1265 |
+
}
|
1266 |
if ( wcs_stripe_active() && wcs_order_contains_subscription( $order ) ) {
|
1267 |
foreach ( wcs_get_subscriptions_for_order( $order ) as $subscription ) {
|
1268 |
/**
|
includes/abstract/abstract-wc-payment-token-stripe.php
CHANGED
@@ -99,6 +99,7 @@ abstract class WC_Payment_Token_Stripe extends WC_Payment_Token {
|
|
99 |
$data[ '{' . $k . '}' ] = $this->get_prop( $k );
|
100 |
}
|
101 |
}
|
|
|
102 |
|
103 |
return $data;
|
104 |
}
|
@@ -183,4 +184,12 @@ abstract class WC_Payment_Token_Stripe extends WC_Payment_Token {
|
|
183 |
|
184 |
return $count > 0;
|
185 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
}
|
99 |
$data[ '{' . $k . '}' ] = $this->get_prop( $k );
|
100 |
}
|
101 |
}
|
102 |
+
$data['{short_title}'] = $this->get_basic_payment_method_title();
|
103 |
|
104 |
return $data;
|
105 |
}
|
184 |
|
185 |
return $count > 0;
|
186 |
}
|
187 |
+
|
188 |
+
/**
|
189 |
+
* @return string
|
190 |
+
* @since 3.2.12
|
191 |
+
*/
|
192 |
+
public function get_basic_payment_method_title() {
|
193 |
+
return '';
|
194 |
+
}
|
195 |
}
|
includes/abstract/abstract-wc-stripe-payment.php
CHANGED
@@ -186,14 +186,13 @@ abstract class WC_Stripe_Payment {
|
|
186 |
*/
|
187 |
public function add_order_metadata( &$args, $order ) {
|
188 |
$meta_data = array(
|
189 |
-
'gateway_id'
|
190 |
-
'order_id'
|
191 |
-
'user_id'
|
192 |
-
'
|
193 |
-
'
|
194 |
-
'
|
195 |
-
'
|
196 |
-
'created' => time()
|
197 |
);
|
198 |
if ( has_action( 'woocommerce_order_number' ) ) {
|
199 |
$meta_data['order_number'] = $order->get_order_number();
|
186 |
*/
|
187 |
public function add_order_metadata( &$args, $order ) {
|
188 |
$meta_data = array(
|
189 |
+
'gateway_id' => $this->payment_method->id,
|
190 |
+
'order_id' => $order->get_id(),
|
191 |
+
'user_id' => $order->get_user_id(),
|
192 |
+
'ip_address' => $order->get_customer_ip_address(),
|
193 |
+
'user_agent' => isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : 'unavailable',
|
194 |
+
'partner' => 'PaymentPlugins',
|
195 |
+
'created' => time()
|
|
|
196 |
);
|
197 |
if ( has_action( 'woocommerce_order_number' ) ) {
|
198 |
$meta_data['order_number'] = $order->get_order_number();
|
includes/admin/meta-boxes/class-wc-stripe-admin-order-metaboxes.php
CHANGED
@@ -76,6 +76,9 @@ class WC_Stripe_Admin_Order_Metaboxes {
|
|
76 |
$payment_methods
|
77 |
),
|
78 |
'order_status' => $order->get_status(),
|
|
|
|
|
|
|
79 |
)
|
80 |
);
|
81 |
wp_enqueue_script( 'wc-stripe-admin-modals', stripe_wc()->assets_url( 'js/admin/modals.js' ), array(
|
76 |
$payment_methods
|
77 |
),
|
78 |
'order_status' => $order->get_status(),
|
79 |
+
'messages' => array(
|
80 |
+
'order_status' => __( 'You must create the order before payment can be processed.', 'woo-stripe-payment' )
|
81 |
+
)
|
82 |
)
|
83 |
);
|
84 |
wp_enqueue_script( 'wc-stripe-admin-modals', stripe_wc()->assets_url( 'js/admin/modals.js' ), array(
|
includes/class-stripe.php
CHANGED
@@ -25,7 +25,7 @@ class WC_Stripe_Manager {
|
|
25 |
*
|
26 |
* @var string
|
27 |
*/
|
28 |
-
public $version = '3.2.
|
29 |
|
30 |
/**
|
31 |
*
|
25 |
*
|
26 |
* @var string
|
27 |
*/
|
28 |
+
public $version = '3.2.12';
|
29 |
|
30 |
/**
|
31 |
*
|
includes/class-wc-stripe-customer-manager.php
CHANGED
@@ -1,195 +1,230 @@
|
|
1 |
-
<?php
|
2 |
-
defined( 'ABSPATH' ) || exit();
|
3 |
-
|
4 |
-
/**
|
5 |
-
* Class that manages customer creation and custom updates.
|
6 |
-
*
|
7 |
-
* @since 3.0.0
|
8 |
-
* @package Stripe/Classes
|
9 |
-
* @author PaymentPlugins
|
10 |
-
*
|
11 |
-
*/
|
12 |
-
class WC_Stripe_Customer_Manager {
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
public function
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
}
|
194 |
-
|
195 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) || exit();
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Class that manages customer creation and custom updates.
|
6 |
+
*
|
7 |
+
* @since 3.0.0
|
8 |
+
* @package Stripe/Classes
|
9 |
+
* @author PaymentPlugins
|
10 |
+
*
|
11 |
+
*/
|
12 |
+
class WC_Stripe_Customer_Manager {
|
13 |
+
|
14 |
+
private static $_instance;
|
15 |
+
|
16 |
+
public static function instance() {
|
17 |
+
if ( ! self::$_instance ) {
|
18 |
+
self::$_instance = new self();
|
19 |
+
}
|
20 |
+
|
21 |
+
return self::$_instance;
|
22 |
+
}
|
23 |
+
|
24 |
+
public function __construct() {
|
25 |
+
add_action( 'woocommerce_checkout_update_customer', array( $this, 'checkout_update_customer' ), 10, 2 );
|
26 |
+
add_action( 'wp_loaded', array( $this, 'wp_loaded' ) );
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
*
|
31 |
+
* @param WC_Customer $customer
|
32 |
+
* @param array $data
|
33 |
+
*/
|
34 |
+
public function checkout_update_customer( $customer, $data ) {
|
35 |
+
if ( $this->user_has_id( $customer ) ) {
|
36 |
+
if ( $this->should_update_customer( $customer ) ) {
|
37 |
+
$result = $this->update_customer( $customer );
|
38 |
+
if ( is_wp_error( $result ) ) {
|
39 |
+
wc_add_notice( __( 'Error saving customer. Reason: %s', 'woo-stripe-payment' ), $result->get_error_message() );
|
40 |
+
}
|
41 |
+
}
|
42 |
+
} else {
|
43 |
+
// create the customer
|
44 |
+
$response = $this->create_customer( $customer );
|
45 |
+
if ( ! is_wp_error( $response ) ) {
|
46 |
+
wc_stripe_save_customer( $response->id, $customer->get_id() );
|
47 |
+
} else {
|
48 |
+
wc_add_notice( __( 'Error saving customer. Reason: %s', 'woo-stripe-payment' ), $response->get_error_message() );
|
49 |
+
}
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
*
|
55 |
+
* @param WC_Customer $customer
|
56 |
+
*
|
57 |
+
* @return \Stripe\Customer|WP_Error
|
58 |
+
*/
|
59 |
+
public function create_customer( $customer ) {
|
60 |
+
return WC_Stripe_Gateway::load()->customers->create( apply_filters( 'wc_stripe_customer_args', $this->get_customer_args( $customer ) ) );
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
*
|
65 |
+
* @param WC_Customer $customer
|
66 |
+
*/
|
67 |
+
public function update_customer( $customer ) {
|
68 |
+
return WC_Stripe_Gateway::load()->customers->update(
|
69 |
+
wc_stripe_get_customer_id( $customer->get_id() ),
|
70 |
+
apply_filters( 'wc_stripe_update_customer_args', $this->get_customer_args( $customer, 'update' ) )
|
71 |
+
);
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Check if the Stripe customer has been created for the WC user.
|
76 |
+
* If there is no Stripe customer then
|
77 |
+
* create one and save it to the WC user.
|
78 |
+
*/
|
79 |
+
public function wp_loaded() {
|
80 |
+
$customer = WC()->customer;
|
81 |
+
if ( $customer && $customer->get_id() ) {
|
82 |
+
if ( ! $this->user_has_id( $customer ) ) {
|
83 |
+
$response = $this->create_customer( $customer );
|
84 |
+
if ( ! is_wp_error( $response ) ) {
|
85 |
+
wc_stripe_save_customer( $response->id, $customer->get_id() );
|
86 |
+
}
|
87 |
+
}
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
*
|
93 |
+
* @param WC_Customer $customer
|
94 |
+
*/
|
95 |
+
private function user_has_id( $customer ) {
|
96 |
+
$id = wc_stripe_get_customer_id( $customer->get_id() );
|
97 |
+
|
98 |
+
// this customer may have an ID from another plugin. Check that too.
|
99 |
+
if ( empty( $id ) ) {
|
100 |
+
$id = get_user_option( '_stripe_customer_id', $customer->get_id() );
|
101 |
+
if ( ! empty( $id ) ) {
|
102 |
+
// validate that this customer exists in the Stripe gateway
|
103 |
+
$response = WC_Stripe_Gateway::load()->customers->retrieve( $id );
|
104 |
+
if ( ! is_wp_error( $response ) ) {
|
105 |
+
// id exists so save customer ID to this plugin's format.
|
106 |
+
wc_stripe_save_customer( $id, $customer->get_id() );
|
107 |
+
|
108 |
+
// load this customer's payment methods
|
109 |
+
$this->sync_payment_methods( $id, $customer->get_id() );
|
110 |
+
} else {
|
111 |
+
$id = '';
|
112 |
+
}
|
113 |
+
}
|
114 |
+
}
|
115 |
+
|
116 |
+
return ! empty( $id );
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Syncs the WC database payment methods with the payment methods stored in Stripe.
|
121 |
+
*
|
122 |
+
* @param string $customer_id
|
123 |
+
* @param int $user_id
|
124 |
+
*
|
125 |
+
* @since 3.1.0
|
126 |
+
*/
|
127 |
+
public static function sync_payment_methods( $customer_id, $user_id, $mode = '' ) {
|
128 |
+
$payment_methods = WC_Stripe_Gateway::load()->paymentMethods->mode( $mode )->all( array(
|
129 |
+
'customer' => $customer_id,
|
130 |
+
'type' => 'card',
|
131 |
+
) );
|
132 |
+
|
133 |
+
if ( ! is_wp_error( $payment_methods ) ) {
|
134 |
+
foreach ( $payment_methods->data as $payment_method ) {
|
135 |
+
if ( ! WC_Payment_Token_Stripe::token_exists( $payment_method->id, $user_id ) ) {
|
136 |
+
$payment_gateways = WC()->payment_gateways()->payment_gateways();
|
137 |
+
$gateway_id = null;
|
138 |
+
|
139 |
+
if ( strstr( $payment_method->id, 'pm_' ) || strstr( $payment_method->id, 'src_' ) ) {
|
140 |
+
$gateway_id = 'stripe_cc';
|
141 |
+
} elseif ( strstr( $payment_method->id, 'card_' ) ) {
|
142 |
+
$gateway_id = 'stripe_googlepay';
|
143 |
+
}
|
144 |
+
/**
|
145 |
+
*
|
146 |
+
* @var WC_Payment_Gateway_Stripe_CC $payment_gateway
|
147 |
+
*/
|
148 |
+
$payment_gateway = $payment_gateways[ $gateway_id ];
|
149 |
+
$token = $payment_gateway->get_payment_token( $payment_method->id, $payment_method );
|
150 |
+
$token->set_environment( $payment_method->livemode ? 'live' : 'test' );
|
151 |
+
$token->set_user_id( $user_id );
|
152 |
+
$token->set_customer_id( $customer_id );
|
153 |
+
$token->save();
|
154 |
+
}
|
155 |
+
}
|
156 |
+
} else {
|
157 |
+
wc_stripe_log_info( sprintf( 'Payment methods for customer %s could not be synced. Reason: %s', $customer_id, $payment_methods->get_error_message() ) );
|
158 |
+
}
|
159 |
+
}
|
160 |
+
|
161 |
+
/**
|
162 |
+
* Returns true if the customer should be updated in Stripe.
|
163 |
+
*
|
164 |
+
* @param WC_Customer $customer
|
165 |
+
*
|
166 |
+
* @return bool
|
167 |
+
*/
|
168 |
+
private function should_update_customer( $customer ) {
|
169 |
+
$changes = $customer->get_changes();
|
170 |
+
if ( ! empty( $changes['billing'] ) ) {
|
171 |
+
return array_intersect_key( $changes['billing'], array_flip( $this->get_attribute_keys() ) );
|
172 |
+
}
|
173 |
+
|
174 |
+
return false;
|
175 |
+
}
|
176 |
+
|
177 |
+
/**
|
178 |
+
* Returns an array of user attributes.
|
179 |
+
*
|
180 |
+
* @return array
|
181 |
+
*/
|
182 |
+
private function get_attribute_keys() {
|
183 |
+
return apply_filters( 'wc_stripe_get_customer_attribute_keys', array(
|
184 |
+
'first_name',
|
185 |
+
'last_name',
|
186 |
+
'email',
|
187 |
+
'address_1',
|
188 |
+
'address_2',
|
189 |
+
'country',
|
190 |
+
'state',
|
191 |
+
'postcode'
|
192 |
+
) );
|
193 |
+
}
|
194 |
+
|
195 |
+
/**
|
196 |
+
* Return an array of args used to create or update a customer.
|
197 |
+
*
|
198 |
+
* @param WC_Customer $customer
|
199 |
+
* @param string $context
|
200 |
+
*
|
201 |
+
* @return array
|
202 |
+
* @since 3.2.12
|
203 |
+
*/
|
204 |
+
private function get_customer_args( $customer, $context = 'create' ) {
|
205 |
+
$args = array(
|
206 |
+
'email' => $customer->get_email(),
|
207 |
+
'name' => sprintf( '%s %s', $customer->get_first_name(), $customer->get_last_name() ),
|
208 |
+
'phone' => $customer->get_billing_phone(),
|
209 |
+
'address' => array(
|
210 |
+
'city' => $customer->get_billing_city(),
|
211 |
+
'country' => $customer->get_billing_country(),
|
212 |
+
'line1' => $customer->get_billing_address_1(),
|
213 |
+
'line2' => $customer->get_billing_address_2(),
|
214 |
+
'postal_code' => $customer->get_billing_postcode(),
|
215 |
+
'state' => $customer->get_billing_state()
|
216 |
+
)
|
217 |
+
);
|
218 |
+
if ( 'create' === $context ) {
|
219 |
+
$args['metadata'] = array(
|
220 |
+
'user_id' => $customer->get_id(),
|
221 |
+
'username' => $customer->get_username(),
|
222 |
+
'website' => get_site_url(),
|
223 |
+
);
|
224 |
+
}
|
225 |
+
|
226 |
+
return $args;
|
227 |
+
}
|
228 |
+
}
|
229 |
+
|
230 |
+
WC_Stripe_Customer_Manager::instance();
|
includes/class-wc-stripe-field-manager.php
CHANGED
@@ -91,12 +91,12 @@ class WC_Stripe_Field_Manager {
|
|
91 |
}
|
92 |
ksort( $gateways );
|
93 |
|
94 |
-
if ( count( $gateways ) > 0 ) {
|
95 |
wc_stripe_get_template(
|
96 |
'product/payment-methods.php',
|
97 |
array(
|
98 |
'position' => self::$_product_button_position,
|
99 |
-
'gateways' => $gateways
|
100 |
)
|
101 |
);
|
102 |
}
|
@@ -113,7 +113,7 @@ class WC_Stripe_Field_Manager {
|
|
113 |
$gateways[ $gateway->id ] = $gateway;
|
114 |
}
|
115 |
}
|
116 |
-
if (
|
117 |
wc_stripe_get_template(
|
118 |
'cart/payment-methods.php',
|
119 |
array(
|
@@ -136,7 +136,7 @@ class WC_Stripe_Field_Manager {
|
|
136 |
$gateways[ $gateway->id ] = $gateway;
|
137 |
}
|
138 |
}
|
139 |
-
if (
|
140 |
|
141 |
wc_stripe_get_template(
|
142 |
'mini-cart/payment-methods.php',
|
91 |
}
|
92 |
ksort( $gateways );
|
93 |
|
94 |
+
if ( count( apply_filters( 'wc_stripe_product_payment_methods', $gateways ) ) > 0 ) {
|
95 |
wc_stripe_get_template(
|
96 |
'product/payment-methods.php',
|
97 |
array(
|
98 |
'position' => self::$_product_button_position,
|
99 |
+
'gateways' => $gateways
|
100 |
)
|
101 |
);
|
102 |
}
|
113 |
$gateways[ $gateway->id ] = $gateway;
|
114 |
}
|
115 |
}
|
116 |
+
if ( count( apply_filters( 'wc_stripe_cart_payment_methods', $gateways ) ) > 0 ) {
|
117 |
wc_stripe_get_template(
|
118 |
'cart/payment-methods.php',
|
119 |
array(
|
136 |
$gateways[ $gateway->id ] = $gateway;
|
137 |
}
|
138 |
}
|
139 |
+
if ( count( apply_filters( 'wc_stripe_mini_cart_payment_methods', $gateways ) ) > 0 ) {
|
140 |
|
141 |
wc_stripe_get_template(
|
142 |
'mini-cart/payment-methods.php',
|
includes/class-wc-stripe-frontend-scripts.php
CHANGED
@@ -43,7 +43,7 @@ class WC_Stripe_Frontend_Scripts {
|
|
43 |
$this->register_script( 'form-handler', $this->assets_url( 'js/frontend/form-handler.js' ), array( 'jquery' ) );
|
44 |
|
45 |
// register scripts that aren't part of gateways
|
46 |
-
$this->register_script( 'wc-stripe', $this->assets_url( 'js/frontend/wc-stripe
|
47 |
array(
|
48 |
'jquery',
|
49 |
$this->get_handle( 'external' ),
|
@@ -64,7 +64,7 @@ class WC_Stripe_Frontend_Scripts {
|
|
64 |
wp_add_inline_script( $this->get_handle( 'wc-stripe' ), '(function(){
|
65 |
if(window.navigator.userAgent.match(/MSIE|Trident/)){
|
66 |
var script = document.createElement(\'script\');
|
67 |
-
script.setAttribute(\'src\', \'' . $this->assets_url( 'js/frontend/promise-polyfill.js' ) . '\');
|
68 |
document.head.appendChild(script);
|
69 |
}
|
70 |
}())' );
|
@@ -110,7 +110,7 @@ class WC_Stripe_Frontend_Scripts {
|
|
110 |
if ( ! empty( $data['gateways'] ) ) {
|
111 |
$this->enqueue_script(
|
112 |
'local-payment',
|
113 |
-
$this->assets_url( 'js/frontend/local-payment
|
114 |
array(
|
115 |
$this->get_handle( 'external' ),
|
116 |
$this->get_handle( 'wc-stripe' ),
|
@@ -170,6 +170,9 @@ class WC_Stripe_Frontend_Scripts {
|
|
170 |
* @param string $uri
|
171 |
*/
|
172 |
public function assets_url( $uri = '' ) {
|
|
|
|
|
|
|
173 |
return untrailingslashit( stripe_wc()->assets_url( $uri ) );
|
174 |
}
|
175 |
|
43 |
$this->register_script( 'form-handler', $this->assets_url( 'js/frontend/form-handler.js' ), array( 'jquery' ) );
|
44 |
|
45 |
// register scripts that aren't part of gateways
|
46 |
+
$this->register_script( 'wc-stripe', $this->assets_url( 'js/frontend/wc-stripe.js' ),
|
47 |
array(
|
48 |
'jquery',
|
49 |
$this->get_handle( 'external' ),
|
64 |
wp_add_inline_script( $this->get_handle( 'wc-stripe' ), '(function(){
|
65 |
if(window.navigator.userAgent.match(/MSIE|Trident/)){
|
66 |
var script = document.createElement(\'script\');
|
67 |
+
script.setAttribute(\'src\', \'' . $this->assets_url( 'js/frontend/promise-polyfill.min.js' ) . '\');
|
68 |
document.head.appendChild(script);
|
69 |
}
|
70 |
}())' );
|
110 |
if ( ! empty( $data['gateways'] ) ) {
|
111 |
$this->enqueue_script(
|
112 |
'local-payment',
|
113 |
+
$this->assets_url( 'js/frontend/local-payment.js' ),
|
114 |
array(
|
115 |
$this->get_handle( 'external' ),
|
116 |
$this->get_handle( 'wc-stripe' ),
|
170 |
* @param string $uri
|
171 |
*/
|
172 |
public function assets_url( $uri = '' ) {
|
173 |
+
// if minification scripts required, convert the uri to it's min format.
|
174 |
+
$uri = ( ( $min = $this->get_min() ) ) ? preg_replace( '/([\w-]+)(\.(?<!min\.)(js|css))$/', '$1' . $min . '$2', $uri ) : $uri;
|
175 |
+
|
176 |
return untrailingslashit( stripe_wc()->assets_url( $uri ) );
|
177 |
}
|
178 |
|
includes/class-wc-stripe-redirect-handler.php
CHANGED
@@ -10,7 +10,7 @@ defined( 'ABSPATH' ) || exit();
|
|
10 |
class WC_Stripe_Redirect_Handler {
|
11 |
|
12 |
public static function init() {
|
13 |
-
add_action( '
|
14 |
add_action( 'get_header', array( __CLASS__, 'maybe_restore_cart' ), 100 );
|
15 |
}
|
16 |
|
@@ -18,7 +18,7 @@ class WC_Stripe_Redirect_Handler {
|
|
18 |
* Check if this request is for a local payment redirect.
|
19 |
*/
|
20 |
public static function local_payment_redirect() {
|
21 |
-
if ( isset( $_GET['
|
22 |
self::process_redirect();
|
23 |
}
|
24 |
}
|
10 |
class WC_Stripe_Redirect_Handler {
|
11 |
|
12 |
public static function init() {
|
13 |
+
add_action( 'wp', array( __CLASS__, 'local_payment_redirect' ) );
|
14 |
add_action( 'get_header', array( __CLASS__, 'maybe_restore_cart' ), 100 );
|
15 |
}
|
16 |
|
18 |
* Check if this request is for a local payment redirect.
|
19 |
*/
|
20 |
public static function local_payment_redirect() {
|
21 |
+
if ( isset( $_GET['_stripe_local_payment'], $_GET['key'] ) ) {
|
22 |
self::process_redirect();
|
23 |
}
|
24 |
}
|
includes/controllers/class-wc-stripe-controller-checkout.php
CHANGED
@@ -190,11 +190,10 @@ class WC_Stripe_Controller_Checkout extends WC_Stripe_Rest_Controller {
|
|
190 |
// for email exists errors you want customer to either login or use a different email address.
|
191 |
throw new Exception( $result->get_error_message() );
|
192 |
}
|
193 |
-
$this->customer_id = $result;
|
194 |
|
195 |
// log the customer in
|
196 |
-
wp_set_current_user( $
|
197 |
-
wc_set_customer_auth_cookie( $
|
198 |
|
199 |
// As we are now logged in, cart will need to refresh to receive updated nonces
|
200 |
WC()->session->set( 'reload_checkout', true );
|
@@ -239,7 +238,7 @@ class WC_Stripe_Controller_Checkout extends WC_Stripe_Rest_Controller {
|
|
239 |
* @param WP_Error $errors
|
240 |
*/
|
241 |
public function after_checkout_validation( $data, $errors ) {
|
242 |
-
if (
|
243 |
wc_add_notice(
|
244 |
apply_filters(
|
245 |
'wc_stripe_after_checkout_validation_notice', __( 'Please review your order details then click Place Order.', 'woo-stripe-payment' ),
|
@@ -271,10 +270,10 @@ class WC_Stripe_Controller_Checkout extends WC_Stripe_Rest_Controller {
|
|
271 |
private function get_order_review_url() {
|
272 |
return add_query_arg(
|
273 |
array(
|
274 |
-
'_stripe_order_review' => base64_encode( wp_json_encode( array(
|
275 |
'payment_method' => $this->gateway->id,
|
276 |
'payment_nonce' => $this->gateway->get_payment_source(),
|
277 |
-
) ) ),
|
278 |
),
|
279 |
wc_get_checkout_url()
|
280 |
);
|
190 |
// for email exists errors you want customer to either login or use a different email address.
|
191 |
throw new Exception( $result->get_error_message() );
|
192 |
}
|
|
|
193 |
|
194 |
// log the customer in
|
195 |
+
wp_set_current_user( $result );
|
196 |
+
wc_set_customer_auth_cookie( $result );
|
197 |
|
198 |
// As we are now logged in, cart will need to refresh to receive updated nonces
|
199 |
WC()->session->set( 'reload_checkout', true );
|
238 |
* @param WP_Error $errors
|
239 |
*/
|
240 |
public function after_checkout_validation( $data, $errors ) {
|
241 |
+
if ( $errors->get_error_codes() ) {
|
242 |
wc_add_notice(
|
243 |
apply_filters(
|
244 |
'wc_stripe_after_checkout_validation_notice', __( 'Please review your order details then click Place Order.', 'woo-stripe-payment' ),
|
270 |
private function get_order_review_url() {
|
271 |
return add_query_arg(
|
272 |
array(
|
273 |
+
'_stripe_order_review' => rawurlencode( base64_encode( wp_json_encode( array(
|
274 |
'payment_method' => $this->gateway->id,
|
275 |
'payment_nonce' => $this->gateway->get_payment_source(),
|
276 |
+
) ) ) ),
|
277 |
),
|
278 |
wc_get_checkout_url()
|
279 |
);
|
includes/gateways/settings/googlepay-settings.php
CHANGED
@@ -106,10 +106,11 @@ return array(
|
|
106 |
'title' => __( 'Icon', 'woo-stripe-payment' ),
|
107 |
'type' => 'select',
|
108 |
'options' => array(
|
109 |
-
'
|
110 |
-
'
|
|
|
111 |
),
|
112 |
-
'default' => '
|
113 |
'desc_tip' => true,
|
114 |
'description' => __( '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.', 'woo-stripe-payment' ),
|
115 |
),
|
106 |
'title' => __( 'Icon', 'woo-stripe-payment' ),
|
107 |
'type' => 'select',
|
108 |
'options' => array(
|
109 |
+
'googlepay_round_outline' => __( 'With Rounded Outline', 'woo-stripe-payment' ),
|
110 |
+
'googlepay_outline' => __( 'With Outline', 'woo-stripe-payment' ),
|
111 |
+
'googlepay_standard' => __( 'Standard', 'woo-stripe-payment' ),
|
112 |
),
|
113 |
+
'default' => 'googlepay_round_outline',
|
114 |
'desc_tip' => true,
|
115 |
'description' => __( '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.', 'woo-stripe-payment' ),
|
116 |
),
|
includes/tokens/class-wc-payment-token-stripe-ach.php
CHANGED
@@ -1,85 +1,94 @@
|
|
1 |
-
<?php
|
2 |
-
defined( 'ABSPATH' ) || exit();
|
3 |
-
|
4 |
-
/**
|
5 |
-
*
|
6 |
-
* @since 3.0.5
|
7 |
-
* @package Stripe/Tokens
|
8 |
-
* @author Payment Plugins
|
9 |
-
*
|
10 |
-
*/
|
11 |
-
class WC_Payment_Token_Stripe_ACH extends WC_Payment_Token_Stripe {
|
12 |
-
|
13 |
-
use WC_Payment_Token_Source_Trait;
|
14 |
-
|
15 |
-
protected $type = 'Stripe_ACH';
|
16 |
-
|
17 |
-
protected $stripe_payment_type = 'source';
|
18 |
-
|
19 |
-
protected $stripe_data = array(
|
20 |
-
'bank_name' => '',
|
21 |
-
'routing_number' => '',
|
22 |
-
'last4' => '',
|
23 |
-
);
|
24 |
-
|
25 |
-
/**
|
26 |
-
*
|
27 |
-
* {@inheritDoc}
|
28 |
-
*
|
29 |
-
* @see WC_Payment_Token_Stripe::details_to_props()
|
30 |
-
*/
|
31 |
-
public function details_to_props( $details ) {
|
32 |
-
if ( isset( $details['ach_debit'] ) ) {
|
33 |
-
$bank = $details['ach_debit'];
|
34 |
-
} elseif ( $details instanceof \Stripe\BankAccount ) {
|
35 |
-
$bank = $details;
|
36 |
-
}
|
37 |
-
$this->set_brand( $bank['bank_name'] );
|
38 |
-
$this->set_bank_name( $bank['bank_name'] );
|
39 |
-
$this->set_last4( $bank['last4'] );
|
40 |
-
$this->set_routing_number( $bank['routing_number'] );
|
41 |
-
}
|
42 |
-
|
43 |
-
public function get_bank_name( $context = 'view' ) {
|
44 |
-
return $this->get_prop( 'bank_name', $context );
|
45 |
-
}
|
46 |
-
|
47 |
-
public function get_routing_number( $context = 'view' ) {
|
48 |
-
return $this->get_prop( 'routing_number', $context );
|
49 |
-
}
|
50 |
-
|
51 |
-
public function get_last4( $context = 'view' ) {
|
52 |
-
return $this->get_prop( 'last4', $context );
|
53 |
-
}
|
54 |
-
|
55 |
-
public function set_bank_name( $value ) {
|
56 |
-
$this->set_prop( 'bank_name', $value );
|
57 |
-
}
|
58 |
-
|
59 |
-
public function set_routing_number( $value ) {
|
60 |
-
$this->set_prop( 'routing_number', $value );
|
61 |
-
}
|
62 |
-
|
63 |
-
public function set_last4( $value ) {
|
64 |
-
$this->set_prop( 'last4', $value );
|
65 |
-
}
|
66 |
-
|
67 |
-
public function get_formats() {
|
68 |
-
return array(
|
69 |
-
'type_ending_in' => array(
|
70 |
-
'label' => __( 'Type Ending In', 'woo-stripe-payment' ),
|
71 |
-
'example' => 'Chase ending in 3434',
|
72 |
-
'format' => __( '{bank_name} ending in {last4}', 'woo-stripe-payment' ),
|
73 |
-
),
|
74 |
-
'name_masked_last4' => array(
|
75 |
-
'label' => __( 'Type Ending In', 'woo-stripe-payment' ),
|
76 |
-
'example' => 'Chase **** 3434',
|
77 |
-
'format' => __( '{bank_name} **** {last4}', 'woo-stripe-payment' ),
|
78 |
-
),
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) || exit();
|
3 |
+
|
4 |
+
/**
|
5 |
+
*
|
6 |
+
* @since 3.0.5
|
7 |
+
* @package Stripe/Tokens
|
8 |
+
* @author Payment Plugins
|
9 |
+
*
|
10 |
+
*/
|
11 |
+
class WC_Payment_Token_Stripe_ACH extends WC_Payment_Token_Stripe {
|
12 |
+
|
13 |
+
use WC_Payment_Token_Source_Trait;
|
14 |
+
|
15 |
+
protected $type = 'Stripe_ACH';
|
16 |
+
|
17 |
+
protected $stripe_payment_type = 'source';
|
18 |
+
|
19 |
+
protected $stripe_data = array(
|
20 |
+
'bank_name' => '',
|
21 |
+
'routing_number' => '',
|
22 |
+
'last4' => '',
|
23 |
+
);
|
24 |
+
|
25 |
+
/**
|
26 |
+
*
|
27 |
+
* {@inheritDoc}
|
28 |
+
*
|
29 |
+
* @see WC_Payment_Token_Stripe::details_to_props()
|
30 |
+
*/
|
31 |
+
public function details_to_props( $details ) {
|
32 |
+
if ( isset( $details['ach_debit'] ) ) {
|
33 |
+
$bank = $details['ach_debit'];
|
34 |
+
} elseif ( $details instanceof \Stripe\BankAccount ) {
|
35 |
+
$bank = $details;
|
36 |
+
}
|
37 |
+
$this->set_brand( $bank['bank_name'] );
|
38 |
+
$this->set_bank_name( $bank['bank_name'] );
|
39 |
+
$this->set_last4( $bank['last4'] );
|
40 |
+
$this->set_routing_number( $bank['routing_number'] );
|
41 |
+
}
|
42 |
+
|
43 |
+
public function get_bank_name( $context = 'view' ) {
|
44 |
+
return $this->get_prop( 'bank_name', $context );
|
45 |
+
}
|
46 |
+
|
47 |
+
public function get_routing_number( $context = 'view' ) {
|
48 |
+
return $this->get_prop( 'routing_number', $context );
|
49 |
+
}
|
50 |
+
|
51 |
+
public function get_last4( $context = 'view' ) {
|
52 |
+
return $this->get_prop( 'last4', $context );
|
53 |
+
}
|
54 |
+
|
55 |
+
public function set_bank_name( $value ) {
|
56 |
+
$this->set_prop( 'bank_name', $value );
|
57 |
+
}
|
58 |
+
|
59 |
+
public function set_routing_number( $value ) {
|
60 |
+
$this->set_prop( 'routing_number', $value );
|
61 |
+
}
|
62 |
+
|
63 |
+
public function set_last4( $value ) {
|
64 |
+
$this->set_prop( 'last4', $value );
|
65 |
+
}
|
66 |
+
|
67 |
+
public function get_formats() {
|
68 |
+
return apply_filters( 'wc_stripe_get_token_formats', array(
|
69 |
+
'type_ending_in' => array(
|
70 |
+
'label' => __( 'Type Ending In', 'woo-stripe-payment' ),
|
71 |
+
'example' => 'Chase ending in 3434',
|
72 |
+
'format' => __( '{bank_name} ending in {last4}', 'woo-stripe-payment' ),
|
73 |
+
),
|
74 |
+
'name_masked_last4' => array(
|
75 |
+
'label' => __( 'Type Ending In', 'woo-stripe-payment' ),
|
76 |
+
'example' => 'Chase **** 3434',
|
77 |
+
'format' => __( '{bank_name} **** {last4}', 'woo-stripe-payment' ),
|
78 |
+
),
|
79 |
+
'short_title' => array(
|
80 |
+
'label' => __( 'Gateway Title', 'woo-stripe-payment' ),
|
81 |
+
'example' => $this->get_basic_payment_method_title(),
|
82 |
+
'format' => '{short_title}'
|
83 |
+
)
|
84 |
+
), $this );
|
85 |
+
}
|
86 |
+
|
87 |
+
public function get_html_classes() {
|
88 |
+
return 'wc-stripe-ach';
|
89 |
+
}
|
90 |
+
|
91 |
+
public function get_basic_payment_method_title() {
|
92 |
+
return __( 'Bank Payment', 'woo-stripe-payment' );
|
93 |
+
}
|
94 |
+
}
|
includes/tokens/class-wc-payment-token-stripe-applepay.php
CHANGED
@@ -1,17 +1,21 @@
|
|
1 |
-
<?php
|
2 |
-
defined( 'ABSPATH' ) || exit();
|
3 |
-
|
4 |
-
if ( ! class_exists( 'WC_Payment_Token_Stripe_CC' ) ) {
|
5 |
-
return;
|
6 |
-
}
|
7 |
-
|
8 |
-
/**
|
9 |
-
*
|
10 |
-
* @author PaymentPlugins
|
11 |
-
* @package Stripe/Tokens
|
12 |
-
*
|
13 |
-
*/
|
14 |
-
class WC_Payment_Token_Stripe_ApplePay extends WC_Payment_Token_Stripe_CC {
|
15 |
-
|
16 |
-
protected $type = 'Stripe_ApplePay';
|
17 |
-
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) || exit();
|
3 |
+
|
4 |
+
if ( ! class_exists( 'WC_Payment_Token_Stripe_CC' ) ) {
|
5 |
+
return;
|
6 |
+
}
|
7 |
+
|
8 |
+
/**
|
9 |
+
*
|
10 |
+
* @author PaymentPlugins
|
11 |
+
* @package Stripe/Tokens
|
12 |
+
*
|
13 |
+
*/
|
14 |
+
class WC_Payment_Token_Stripe_ApplePay extends WC_Payment_Token_Stripe_CC {
|
15 |
+
|
16 |
+
protected $type = 'Stripe_ApplePay';
|
17 |
+
|
18 |
+
public function get_basic_payment_method_title() {
|
19 |
+
return __( 'Apple Pay', 'woo-stripe-payment' );
|
20 |
+
}
|
21 |
+
}
|
includes/tokens/class-wc-payment-token-stripe-cc.php
CHANGED
@@ -1,126 +1,135 @@
|
|
1 |
-
<?php
|
2 |
-
defined( 'ABSPATH' ) || exit();
|
3 |
-
|
4 |
-
if ( ! class_exists( 'WC_Payment_Token_Stripe' ) ) {
|
5 |
-
return;
|
6 |
-
}
|
7 |
-
|
8 |
-
/**
|
9 |
-
* @sin 3.0.0
|
10 |
-
*
|
11 |
-
* @author PaymentPlugins
|
12 |
-
* @package Stripe/Tokens
|
13 |
-
*
|
14 |
-
*/
|
15 |
-
class WC_Payment_Token_Stripe_CC extends WC_Payment_Token_Stripe {
|
16 |
-
|
17 |
-
use WC_Payment_Token_Payment_Method_Trait;
|
18 |
-
|
19 |
-
protected $has_expiration = true;
|
20 |
-
|
21 |
-
protected $type = 'Stripe_CC';
|
22 |
-
|
23 |
-
protected $stripe_payment_type = 'payment_method';
|
24 |
-
|
25 |
-
protected $stripe_data = array(
|
26 |
-
'brand' => '',
|
27 |
-
'exp_month' => '',
|
28 |
-
'exp_year' => '',
|
29 |
-
'last4' => '',
|
30 |
-
'masked_number' => ''
|
31 |
-
);
|
32 |
-
|
33 |
-
public function details_to_props( $details ) {
|
34 |
-
if ( isset( $details['card'] ) ) {
|
35 |
-
$card = $details['card'];
|
36 |
-
}
|
37 |
-
if ( $details instanceof \Stripe\Card ) {
|
38 |
-
$card = $details;
|
39 |
-
}
|
40 |
-
$this->set_brand( $card['brand'] );
|
41 |
-
$this->set_last4( $card['last4'] );
|
42 |
-
$this->set_exp_month( $card['exp_month'] );
|
43 |
-
$this->set_exp_year( $card['exp_year'] );
|
44 |
-
$this->set_masked_number( sprintf( '********%s', $card['last4'] ) );
|
45 |
-
}
|
46 |
-
|
47 |
-
public function get_last4( $context = 'view' ) {
|
48 |
-
return $this->get_prop( 'last4', $context );
|
49 |
-
}
|
50 |
-
|
51 |
-
public function get_masked_number( $context = 'view' ) {
|
52 |
-
return $this->get_prop( 'masked_number', $context );
|
53 |
-
}
|
54 |
-
|
55 |
-
public function set_last4( $last4 ) {
|
56 |
-
$this->set_prop( 'last4', $last4 );
|
57 |
-
}
|
58 |
-
|
59 |
-
public function set_masked_number( $value ) {
|
60 |
-
$this->set_prop( 'masked_number', $value );
|
61 |
-
}
|
62 |
-
|
63 |
-
public function get_exp_year( $context = 'view' ) {
|
64 |
-
return $this->get_prop( 'exp_year', $context );
|
65 |
-
}
|
66 |
-
|
67 |
-
public function set_exp_year( $year ) {
|
68 |
-
$this->set_prop( 'exp_year', $year );
|
69 |
-
}
|
70 |
-
|
71 |
-
public function get_exp_month( $context = 'view' ) {
|
72 |
-
return $this->get_prop( 'exp_month', $context );
|
73 |
-
}
|
74 |
-
|
75 |
-
public function set_exp_month( $month ) {
|
76 |
-
$this->set_prop( 'exp_month', str_pad( $month, 2, '0', STR_PAD_LEFT ) );
|
77 |
-
}
|
78 |
-
|
79 |
-
public function get_html_classes() {
|
80 |
-
return sprintf( '%s', str_replace( ' ', '', strtolower( $this->get_prop( 'brand' ) ) ) );
|
81 |
-
}
|
82 |
-
|
83 |
-
public function get_card_type( $context = 'view' ) {
|
84 |
-
return $this->get_brand( $context );
|
85 |
-
}
|
86 |
-
|
87 |
-
public function get_formats() {
|
88 |
-
return apply_filters( 'wc_stripe_get_token_formats', array(
|
89 |
-
'type_ending_in' => array(
|
90 |
-
'label' => __( 'Type Ending In', 'woo-stripe-payment' ),
|
91 |
-
'example' => 'Visa ending in 1111',
|
92 |
-
'format' => __( '{brand} ending in {last4}', 'woo-stripe-payment' ),
|
93 |
-
),
|
94 |
-
'type_masked_number' => array(
|
95 |
-
'label' => __( 'Type Masked Number', 'woo-stripe-payment' ),
|
96 |
-
'example' => 'Visa ********1111',
|
97 |
-
'format' => '{brand} {masked_number}',
|
98 |
-
),
|
99 |
-
'type_dash_masked_number' => array(
|
100 |
-
'label' => __( 'Type Dash Masked Number', 'woo-stripe-payment' ),
|
101 |
-
'example' => 'Visa - ********1111',
|
102 |
-
'format' => '{brand} - {masked_number}',
|
103 |
-
),
|
104 |
-
'type_last4' => array(
|
105 |
-
'label' => __( 'Type Last 4', 'woo-stripe-payment' ),
|
106 |
-
'example' => 'Visa 1111',
|
107 |
-
'format' => '{brand} {last4}',
|
108 |
-
),
|
109 |
-
'type_dash_last4' => array(
|
110 |
-
'label' => __( 'Type Dash & Last 4', 'woo-stripe-payment' ),
|
111 |
-
'example' => 'Visa - 1111',
|
112 |
-
'format' => '{brand} - {last4}',
|
113 |
-
),
|
114 |
-
'last4' => array(
|
115 |
-
'label' => __( 'Last Four', 'woo-stripe-payment' ),
|
116 |
-
'example' => '1111',
|
117 |
-
'format' => '{last4}',
|
118 |
-
),
|
119 |
-
'card_type' => array(
|
120 |
-
'label' => __( 'Card Type', 'woo-stripe-payment' ),
|
121 |
-
'example' => 'Visa',
|
122 |
-
'format' => '{brand}',
|
123 |
-
),
|
124 |
-
|
125 |
-
|
126 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) || exit();
|
3 |
+
|
4 |
+
if ( ! class_exists( 'WC_Payment_Token_Stripe' ) ) {
|
5 |
+
return;
|
6 |
+
}
|
7 |
+
|
8 |
+
/**
|
9 |
+
* @sin 3.0.0
|
10 |
+
*
|
11 |
+
* @author PaymentPlugins
|
12 |
+
* @package Stripe/Tokens
|
13 |
+
*
|
14 |
+
*/
|
15 |
+
class WC_Payment_Token_Stripe_CC extends WC_Payment_Token_Stripe {
|
16 |
+
|
17 |
+
use WC_Payment_Token_Payment_Method_Trait;
|
18 |
+
|
19 |
+
protected $has_expiration = true;
|
20 |
+
|
21 |
+
protected $type = 'Stripe_CC';
|
22 |
+
|
23 |
+
protected $stripe_payment_type = 'payment_method';
|
24 |
+
|
25 |
+
protected $stripe_data = array(
|
26 |
+
'brand' => '',
|
27 |
+
'exp_month' => '',
|
28 |
+
'exp_year' => '',
|
29 |
+
'last4' => '',
|
30 |
+
'masked_number' => ''
|
31 |
+
);
|
32 |
+
|
33 |
+
public function details_to_props( $details ) {
|
34 |
+
if ( isset( $details['card'] ) ) {
|
35 |
+
$card = $details['card'];
|
36 |
+
}
|
37 |
+
if ( $details instanceof \Stripe\Card ) {
|
38 |
+
$card = $details;
|
39 |
+
}
|
40 |
+
$this->set_brand( $card['brand'] );
|
41 |
+
$this->set_last4( $card['last4'] );
|
42 |
+
$this->set_exp_month( $card['exp_month'] );
|
43 |
+
$this->set_exp_year( $card['exp_year'] );
|
44 |
+
$this->set_masked_number( sprintf( '********%s', $card['last4'] ) );
|
45 |
+
}
|
46 |
+
|
47 |
+
public function get_last4( $context = 'view' ) {
|
48 |
+
return $this->get_prop( 'last4', $context );
|
49 |
+
}
|
50 |
+
|
51 |
+
public function get_masked_number( $context = 'view' ) {
|
52 |
+
return $this->get_prop( 'masked_number', $context );
|
53 |
+
}
|
54 |
+
|
55 |
+
public function set_last4( $last4 ) {
|
56 |
+
$this->set_prop( 'last4', $last4 );
|
57 |
+
}
|
58 |
+
|
59 |
+
public function set_masked_number( $value ) {
|
60 |
+
$this->set_prop( 'masked_number', $value );
|
61 |
+
}
|
62 |
+
|
63 |
+
public function get_exp_year( $context = 'view' ) {
|
64 |
+
return $this->get_prop( 'exp_year', $context );
|
65 |
+
}
|
66 |
+
|
67 |
+
public function set_exp_year( $year ) {
|
68 |
+
$this->set_prop( 'exp_year', $year );
|
69 |
+
}
|
70 |
+
|
71 |
+
public function get_exp_month( $context = 'view' ) {
|
72 |
+
return $this->get_prop( 'exp_month', $context );
|
73 |
+
}
|
74 |
+
|
75 |
+
public function set_exp_month( $month ) {
|
76 |
+
$this->set_prop( 'exp_month', str_pad( $month, 2, '0', STR_PAD_LEFT ) );
|
77 |
+
}
|
78 |
+
|
79 |
+
public function get_html_classes() {
|
80 |
+
return sprintf( '%s', str_replace( ' ', '', strtolower( $this->get_prop( 'brand' ) ) ) );
|
81 |
+
}
|
82 |
+
|
83 |
+
public function get_card_type( $context = 'view' ) {
|
84 |
+
return $this->get_brand( $context );
|
85 |
+
}
|
86 |
+
|
87 |
+
public function get_formats() {
|
88 |
+
return apply_filters( 'wc_stripe_get_token_formats', array(
|
89 |
+
'type_ending_in' => array(
|
90 |
+
'label' => __( 'Type Ending In', 'woo-stripe-payment' ),
|
91 |
+
'example' => 'Visa ending in 1111',
|
92 |
+
'format' => __( '{brand} ending in {last4}', 'woo-stripe-payment' ),
|
93 |
+
),
|
94 |
+
'type_masked_number' => array(
|
95 |
+
'label' => __( 'Type Masked Number', 'woo-stripe-payment' ),
|
96 |
+
'example' => 'Visa ********1111',
|
97 |
+
'format' => '{brand} {masked_number}',
|
98 |
+
),
|
99 |
+
'type_dash_masked_number' => array(
|
100 |
+
'label' => __( 'Type Dash Masked Number', 'woo-stripe-payment' ),
|
101 |
+
'example' => 'Visa - ********1111',
|
102 |
+
'format' => '{brand} - {masked_number}',
|
103 |
+
),
|
104 |
+
'type_last4' => array(
|
105 |
+
'label' => __( 'Type Last 4', 'woo-stripe-payment' ),
|
106 |
+
'example' => 'Visa 1111',
|
107 |
+
'format' => '{brand} {last4}',
|
108 |
+
),
|
109 |
+
'type_dash_last4' => array(
|
110 |
+
'label' => __( 'Type Dash & Last 4', 'woo-stripe-payment' ),
|
111 |
+
'example' => 'Visa - 1111',
|
112 |
+
'format' => '{brand} - {last4}',
|
113 |
+
),
|
114 |
+
'last4' => array(
|
115 |
+
'label' => __( 'Last Four', 'woo-stripe-payment' ),
|
116 |
+
'example' => '1111',
|
117 |
+
'format' => '{last4}',
|
118 |
+
),
|
119 |
+
'card_type' => array(
|
120 |
+
'label' => __( 'Card Type', 'woo-stripe-payment' ),
|
121 |
+
'example' => 'Visa',
|
122 |
+
'format' => '{brand}',
|
123 |
+
),
|
124 |
+
'short_title' => array(
|
125 |
+
'label' => __( 'Gateway Title', 'woo-stripe-payment' ),
|
126 |
+
'example' => $this->get_basic_payment_method_title(),
|
127 |
+
'format' => '{short_title}'
|
128 |
+
)
|
129 |
+
), $this );
|
130 |
+
}
|
131 |
+
|
132 |
+
public function get_basic_payment_method_title() {
|
133 |
+
return __( 'Credit Card', 'woo-stripe-payment' );
|
134 |
+
}
|
135 |
+
}
|
includes/tokens/class-wc-payment-token-stripe-googlepay.php
CHANGED
@@ -24,4 +24,8 @@ class WC_Payment_Token_Stripe_GooglePay extends WC_Payment_Token_Stripe_CC {
|
|
24 |
)
|
25 |
) + parent::get_formats();
|
26 |
}
|
|
|
|
|
|
|
|
|
27 |
}
|
24 |
)
|
25 |
) + parent::get_formats();
|
26 |
}
|
27 |
+
|
28 |
+
public function get_basic_payment_method_title() {
|
29 |
+
return __( 'Google Pay', 'woo-stripe-payment' );
|
30 |
+
}
|
31 |
}
|
includes/tokens/class-wc-payment-token-stripe-sepa.php
CHANGED
@@ -58,7 +58,7 @@ class WC_Payment_Token_Stripe_Sepa extends WC_Payment_Token_Stripe_Local {
|
|
58 |
return wp_parse_args( array(
|
59 |
'sepa_last4' => array(
|
60 |
'label' => __( 'Gateway Title', 'woo-stripe-payment' ),
|
61 |
-
'example' => '
|
62 |
'format' => '{gateway_title} ending in {last4}',
|
63 |
)
|
64 |
), parent::get_formats() );
|
58 |
return wp_parse_args( array(
|
59 |
'sepa_last4' => array(
|
60 |
'label' => __( 'Gateway Title', 'woo-stripe-payment' ),
|
61 |
+
'example' => 'Sepa ending in 0005',
|
62 |
'format' => '{gateway_title} ending in {last4}',
|
63 |
)
|
64 |
), parent::get_formats() );
|
includes/traits/wc-stripe-payment-traits.php
CHANGED
@@ -47,12 +47,7 @@ trait WC_Stripe_Payment_Intent_Trait {
|
|
47 |
$args['save_method'] = ! empty( $_POST[ $this->save_source_key ] );
|
48 |
}
|
49 |
|
50 |
-
return sprintf(
|
51 |
-
'#response=%s',
|
52 |
-
base64_encode(
|
53 |
-
wp_json_encode( $args )
|
54 |
-
)
|
55 |
-
);
|
56 |
}
|
57 |
}
|
58 |
|
@@ -102,7 +97,7 @@ trait WC_Stripe_Local_Payment_Intent_Trait {
|
|
102 |
// rand is used to generate some random entropy so that window hash events are triggered.
|
103 |
return sprintf(
|
104 |
'#response=%s',
|
105 |
-
base64_encode(
|
106 |
wp_json_encode(
|
107 |
array(
|
108 |
'client_secret' => $intent->client_secret,
|
@@ -114,7 +109,7 @@ trait WC_Stripe_Local_Payment_Intent_Trait {
|
|
114 |
),
|
115 |
)
|
116 |
)
|
117 |
-
)
|
118 |
);
|
119 |
}
|
120 |
|
47 |
$args['save_method'] = ! empty( $_POST[ $this->save_source_key ] );
|
48 |
}
|
49 |
|
50 |
+
return sprintf( '#response=%s', rawurlencode( base64_encode( wp_json_encode( $args ) ) ) );
|
|
|
|
|
|
|
|
|
|
|
51 |
}
|
52 |
}
|
53 |
|
97 |
// rand is used to generate some random entropy so that window hash events are triggered.
|
98 |
return sprintf(
|
99 |
'#response=%s',
|
100 |
+
rawurlencode( base64_encode(
|
101 |
wp_json_encode(
|
102 |
array(
|
103 |
'client_secret' => $intent->client_secret,
|
109 |
),
|
110 |
)
|
111 |
)
|
112 |
+
) )
|
113 |
);
|
114 |
}
|
115 |
|
includes/wc-stripe-functions.php
CHANGED
@@ -141,7 +141,14 @@ function wc_stripe_get_customer_id( $user_id = '', $mode = '' ) {
|
|
141 |
$user_id = get_current_user_id();
|
142 |
}
|
143 |
|
144 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
}
|
146 |
|
147 |
/**
|
@@ -155,7 +162,7 @@ function wc_stripe_get_customer_id( $user_id = '', $mode = '' ) {
|
|
155 |
function wc_stripe_save_customer( $customer_id, $user_id, $mode = '' ) {
|
156 |
$mode = empty( $mode ) ? wc_stripe_mode() : $mode;
|
157 |
$key = "wc_stripe_customer_{$mode}";
|
158 |
-
|
159 |
}
|
160 |
|
161 |
/**
|
@@ -1145,6 +1152,9 @@ function wc_stripe_get_error_messages() {
|
|
1145 |
array(
|
1146 |
'stripe_cc_generic' => __( 'There was an error processing your credit card.', 'woo-stripe-payment' ),
|
1147 |
'incomplete_number' => __( 'Your card number is incomplete.', 'woo-stripe-payment' ),
|
|
|
|
|
|
|
1148 |
'incorrect_number' => __( 'The card number is incorrect. Check the card\'s number or use a different card.', 'woo-stripe-payment' ),
|
1149 |
'incorrect_cvc' => __( 'The card\'s security code is incorrect. Check the card\'s security code or use a different card.', 'woo-stripe-payment' ),
|
1150 |
'incorrect_zip' => __( 'The card\'s ZIP code is incorrect. Check the card\'s ZIP code or use a different card.', 'woo-stripe-payment' ),
|
141 |
$user_id = get_current_user_id();
|
142 |
}
|
143 |
|
144 |
+
/**
|
145 |
+
* @param string
|
146 |
+
* @param int $user_id
|
147 |
+
* @param string $mode
|
148 |
+
*
|
149 |
+
* @since 3.2.12
|
150 |
+
*/
|
151 |
+
return apply_filters( 'wc_stripe_get_customer_id', get_user_option( "wc_stripe_customer_{$mode}", $user_id ), $user_id, $mode );
|
152 |
}
|
153 |
|
154 |
/**
|
162 |
function wc_stripe_save_customer( $customer_id, $user_id, $mode = '' ) {
|
163 |
$mode = empty( $mode ) ? wc_stripe_mode() : $mode;
|
164 |
$key = "wc_stripe_customer_{$mode}";
|
165 |
+
update_user_option( $user_id, $key, apply_filters( 'wc_stripe_save_customer', $customer_id, $user_id, $mode ) );
|
166 |
}
|
167 |
|
168 |
/**
|
1152 |
array(
|
1153 |
'stripe_cc_generic' => __( 'There was an error processing your credit card.', 'woo-stripe-payment' ),
|
1154 |
'incomplete_number' => __( 'Your card number is incomplete.', 'woo-stripe-payment' ),
|
1155 |
+
'incomplete_expiry' => __( 'Your card\'s expiration date is incomplete.', 'woo-stripe-payment' ),
|
1156 |
+
'incomplete_cvc' => __( 'Your card\'s security code is incomplete.', 'woo-stripe-payment' ),
|
1157 |
+
'incomplete_zip' => __( 'Your card\'s zip code is incomplete.', 'woo-stripe-payment' ),
|
1158 |
'incorrect_number' => __( 'The card number is incorrect. Check the card\'s number or use a different card.', 'woo-stripe-payment' ),
|
1159 |
'incorrect_cvc' => __( 'The card\'s security code is incorrect. Check the card\'s security code or use a different card.', 'woo-stripe-payment' ),
|
1160 |
'incorrect_zip' => __( 'The card\'s ZIP code is incorrect. Check the card\'s ZIP code or use a different card.', 'woo-stripe-payment' ),
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: stripe, ach, klarna, credit card, apple pay, google pay, ideal, sepa, sofo
|
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 5.6
|
6 |
Requires PHP: 5.6
|
7 |
-
Stable tag: 3.2.
|
8 |
Copyright: Payment Plugins
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -58,6 +58,19 @@ 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.11 =
|
62 |
* Added - WC tested up to: 4.9.0
|
63 |
* Added - Compatibility for Cartflows redirect to global checkout when local payment method used.
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 5.6
|
6 |
Requires PHP: 5.6
|
7 |
+
Stable tag: 3.2.12
|
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.12 =
|
62 |
+
* Added - billing_details property to local payment methods
|
63 |
+
* Added - Improved support for multisite. Replaced use of get_user_meta with get_user_option
|
64 |
+
* Added - Filter wc_stripe_get_customer_id
|
65 |
+
* Added - Filter wc_stripe_save_customer
|
66 |
+
* Added - Stripe token object added to filter wc_stripe_get_token_formats
|
67 |
+
* Added - Payment method formats (Credit Card, Apple Pay, Google Pay)
|
68 |
+
* Added - Added address property to customer create and update API call
|
69 |
+
* Added - New GPay rounded corners icon
|
70 |
+
* Added - Additional credit card form error messages for translation.
|
71 |
+
* Added - Guest checkout for Pre-Order products where payment method must be saved.
|
72 |
+
* Updated - Removed stripe customer Id from metadata since it's redundant. Customer ID is already associated with charge object
|
73 |
+
* Updated - Admin Pay for order - display message if order is not created or doesn't have pending payment status
|
74 |
= 3.2.11 =
|
75 |
* Added - WC tested up to: 4.9.0
|
76 |
* Added - Compatibility for Cartflows redirect to global checkout when local payment method used.
|
stripe-payments.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Stripe For WooCommerce
|
4 |
* Plugin URI: https://docs.paymentplugins.com/wc-stripe/config/
|
5 |
* Description: Accept credit cards, Google Pay, Apple Pay, ACH, Klarna and more using Stripe.
|
6 |
-
* Version: 3.2.
|
7 |
* Author: Payment Plugins, support@paymentplugins.com
|
8 |
* Text Domain: woo-stripe-payment
|
9 |
* Domain Path: /i18n/languages/
|
3 |
* Plugin Name: Stripe For WooCommerce
|
4 |
* Plugin URI: https://docs.paymentplugins.com/wc-stripe/config/
|
5 |
* Description: Accept credit cards, Google Pay, Apple Pay, ACH, Klarna and more using Stripe.
|
6 |
+
* Version: 3.2.12
|
7 |
* Author: Payment Plugins, support@paymentplugins.com
|
8 |
* Text Domain: woo-stripe-payment
|
9 |
* Domain Path: /i18n/languages/
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInite75330386e2ebdcb0d6bfb6ef84a7163::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit9cfb6f50dc46731d97046cbb38624809
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
-
call_user_func(\Composer\Autoload\
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInite75330386e2ebdcb0d6bfb6ef84a7163
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInite75330386e2ebdcb0d6bfb6ef84a7163', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInite75330386e2ebdcb0d6bfb6ef84a7163', 'loadClassLoader'));
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
+
call_user_func(\Composer\Autoload\ComposerStaticInite75330386e2ebdcb0d6bfb6ef84a7163::getInitializer($loader));
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'S' =>
|
@@ -23,8 +23,8 @@ class ComposerStaticInit9cfb6f50dc46731d97046cbb38624809
|
|
23 |
public static function getInitializer(ClassLoader $loader)
|
24 |
{
|
25 |
return \Closure::bind(function () use ($loader) {
|
26 |
-
$loader->prefixLengthsPsr4 =
|
27 |
-
$loader->prefixDirsPsr4 =
|
28 |
|
29 |
}, null, ClassLoader::class);
|
30 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInite75330386e2ebdcb0d6bfb6ef84a7163
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'S' =>
|
23 |
public static function getInitializer(ClassLoader $loader)
|
24 |
{
|
25 |
return \Closure::bind(function () use ($loader) {
|
26 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInite75330386e2ebdcb0d6bfb6ef84a7163::$prefixLengthsPsr4;
|
27 |
+
$loader->prefixDirsPsr4 = ComposerStaticInite75330386e2ebdcb0d6bfb6ef84a7163::$prefixDirsPsr4;
|
28 |
|
29 |
}, null, ClassLoader::class);
|
30 |
}
|