Version Description
- Fixed - Capture type on product page checkout
- Fixed - WP 5.4.2 deprecation message for namespaces
- Fixed - PHP 7.4 warning message
- Updated - Error message API uses $.scroll_to_notices when available
- Updated - Apple Pay and Payment Request require phone and email based on required billing fields
- Updated - Webkit autofill text color
- Added - Non numerical check to wc_stripe_add_number_precision function
Download this release
Release Info
Developer | mr.clayton |
Plugin | Payment Plugins for Stripe WooCommerce |
Version | 3.1.5 |
Comparing to | |
See all releases |
Code changes from version 3.1.4 to 3.1.5
- assets/css/stripe.css +19 -10
- assets/js/frontend/wc-stripe.js +9 -5
- assets/js/frontend/wc-stripe.min.js +1 -1
- i18n/languages/woo-stripe-payment.pot +117 -114
- includes/abstract/abstract-wc-payment-gateway-stripe.php +30 -14
- includes/abstract/abstract-wc-payment-token-stripe.php +4 -37
- includes/abstract/abstract-wc-stripe-rest-controller.php +2 -2
- includes/admin/meta-boxes/views/html-product-data.php +1 -1
- includes/class-stripe.php +1 -1
- includes/class-wc-stripe-frontend-scripts.php +2 -1
- includes/controllers/class-wc-stripe-controller-cart.php +1 -1
- includes/controllers/class-wc-stripe-controller-checkout.php +1 -2
- includes/controllers/class-wc-stripe-controller-gateway-settings.php +1 -1
- includes/controllers/class-wc-stripe-controller-googlepay.php +1 -1
- includes/controllers/class-wc-stripe-controller-order-actions.php +1 -1
- includes/controllers/class-wc-stripe-controller-product-data.php +1 -1
- includes/gateways/class-wc-payment-gateway-stripe-multibanco.php +1 -1
- includes/tokens/class-wc-payment-token-stripe-ach.php +2 -0
- includes/tokens/class-wc-payment-token-stripe-cc.php +2 -0
- includes/tokens/class-wc-payment-token-stripe-googlepay.php +3 -0
- includes/tokens/class-wc-payment-token-stripe-local-payment.php +4 -0
- includes/traits/wc-stripe-payment-token-traits.php +65 -0
- includes/wc-stripe-functions.php +8 -5
- includes/wc-stripe-webhook-functions.php +1 -1
- readme.txt +9 -1
- stripe-payments.php +1 -1
- stripe-php-6.40.0/lib/ApiRequestor.php +1 -1
- stripe-php-6.40.0/lib/Util/Util.php +1 -1
- templates/checkout/payment-method.php +0 -31
- templates/checkout/stripe-payment-method.php +9 -8
assets/css/stripe.css
CHANGED
@@ -76,9 +76,6 @@ label.wc-stripe-label-klarna-category{
|
|
76 |
.theme-flatsome div.wc-stripe-saved-methods-container{
|
77 |
margin: 0 0 1em 0;
|
78 |
}
|
79 |
-
.wc-stripe-gateway-desc.has_tokens{
|
80 |
-
margin-bottom: 10px;
|
81 |
-
}
|
82 |
label.wc-stripe-label-payment-type:before,
|
83 |
label.wc-stripe-label-klarna-category:before{
|
84 |
content: "";
|
@@ -544,13 +541,6 @@ ul.payment_methods li[class*=payment_method] > input[name=payment_method] + labe
|
|
544 |
padding-right: 0;
|
545 |
padding-bottom: 0;
|
546 |
}
|
547 |
-
ul.payment_methods li[class*=payment_method] .payment_box{
|
548 |
-
margin-top: 10px;
|
549 |
-
}
|
550 |
-
|
551 |
-
ul.payment_methods li[class*=payment_method_stripe_]:not([class*=stripe_cc]) .wc-stripe-gateway-desc:not(.has_tokens) p{
|
552 |
-
margin: 0;
|
553 |
-
}
|
554 |
ul.payment_methods{
|
555 |
list-style: none;
|
556 |
}
|
@@ -584,4 +574,23 @@ div[id*=wc_stripe_local_payment_stripe_].StripeElement{
|
|
584 |
clear: both;
|
585 |
height: 0;
|
586 |
visibility: hidden;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
587 |
}
|
76 |
.theme-flatsome div.wc-stripe-saved-methods-container{
|
77 |
margin: 0 0 1em 0;
|
78 |
}
|
|
|
|
|
|
|
79 |
label.wc-stripe-label-payment-type:before,
|
80 |
label.wc-stripe-label-klarna-category:before{
|
81 |
content: "";
|
541 |
padding-right: 0;
|
542 |
padding-bottom: 0;
|
543 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
544 |
ul.payment_methods{
|
545 |
list-style: none;
|
546 |
}
|
574 |
clear: both;
|
575 |
height: 0;
|
576 |
visibility: hidden;
|
577 |
+
}
|
578 |
+
.wc-stripe-gateway-desc p{
|
579 |
+
margin: 0;
|
580 |
+
}
|
581 |
+
div.payment_method_stripe_cc,
|
582 |
+
div.payment_method_stripe_sepa,
|
583 |
+
div.payment_method_stripe_ideal,
|
584 |
+
div.payment_method_stripe_fpx,
|
585 |
+
#wc_stripe_local_payment_stripe_klarna,
|
586 |
+
li[class*=payment_method_stripe_] div.wc-stripe_googlepay-container.has_tokens,
|
587 |
+
li[class*=payment_method_stripe_] div.wc-stripe_applepay-container.has_tokens,
|
588 |
+
li[class*=payment_method_stripe_] div.wc-stripe_payment_request-container.has_tokens{
|
589 |
+
margin-top: 10px;
|
590 |
+
}
|
591 |
+
.wc-stripe-gateway-desc{
|
592 |
+
margin-top: 10px;
|
593 |
+
}
|
594 |
+
#wc-stripe-card-element.StripeElement--webkit-autofill{
|
595 |
+
background-color: transparent !important;
|
596 |
}
|
assets/js/frontend/wc-stripe.js
CHANGED
@@ -105,9 +105,13 @@
|
|
105 |
$container.prepend(message);
|
106 |
$container.removeClass('processing').unblock();
|
107 |
$container.find('.input-text, select, input:checkbox').blur();
|
108 |
-
|
109 |
-
|
110 |
-
}
|
|
|
|
|
|
|
|
|
111 |
}
|
112 |
|
113 |
wc_stripe.BaseGateway.prototype.get_first_name = function(prefix) {
|
@@ -288,8 +292,8 @@
|
|
288 |
pending: true
|
289 |
},
|
290 |
requestPayerName: true,
|
291 |
-
requestPayerEmail:
|
292 |
-
requestPayerPhone:
|
293 |
requestShipping: this.needs_shipping()
|
294 |
}
|
295 |
var displayItems = this.get_display_items(),
|
105 |
$container.prepend(message);
|
106 |
$container.removeClass('processing').unblock();
|
107 |
$container.find('.input-text, select, input:checkbox').blur();
|
108 |
+
if ($.scroll_to_notices) {
|
109 |
+
$.scroll_to_notices($container);
|
110 |
+
} else {
|
111 |
+
$('html, body').animate({
|
112 |
+
scrollTop: ($container.offset().top - 100)
|
113 |
+
}, 1000);
|
114 |
+
}
|
115 |
}
|
116 |
|
117 |
wc_stripe.BaseGateway.prototype.get_first_name = function(prefix) {
|
292 |
pending: true
|
293 |
},
|
294 |
requestPayerName: true,
|
295 |
+
requestPayerEmail: $('#billing_email').length > 0,
|
296 |
+
requestPayerPhone: $('#billing_phone').length > 0,
|
297 |
requestShipping: this.needs_shipping()
|
298 |
}
|
299 |
var displayItems = this.get_display_items(),
|
assets/js/frontend/wc-stripe.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(t,e){t.wc_stripe={};var i=null;wc_stripe.BaseGateway=function(t){this.params=t,this.gateway_id=this.params.gateway_id,this.token_selector=this.params.token_selector,this.saved_method_selector=this.params.saved_method_selector,this.payment_intent_selector=this.params.payment_intent_selector,this.payment_token_received=!1,this.stripe=i,this.elements=i.elements(e.extend({},{locale:"auto"},this.get_element_options())),this.initialize()},wc_stripe.BaseGateway.prototype.get_page=function(){return wc_stripe_params_v3.page},wc_stripe.BaseGateway.prototype.set_nonce=function(t){e(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 e('[name="payment_method"]:checked').val()===this.gateway_id},wc_stripe.BaseGateway.prototype.is_saved_method_selected=function(){return this.is_gateway_selected()&&"saved"===e('[name="'+this.gateway_id+'_payment_type_key"]:checked').val()},wc_stripe.BaseGateway.prototype.has_checkout_error=function(){return e("#wc_stripe_checkout_error").length>0&&this.is_gateway_selected()},wc_stripe.BaseGateway.prototype.submit_error=function(t){-1==(t=this.get_error_message(t)).indexOf("</ul>")&&(t='<div class="woocommerce-error">'+t+"</div>"),this.submit_message(t)},wc_stripe.BaseGateway.prototype.submit_error_code=function(t){},wc_stripe.BaseGateway.prototype.get_error_message=function(t){return"object"==typeof t&&t.code&&(t=wc_stripe_messages[t.code]?wc_stripe_messages[t.code]:t.message),t},wc_stripe.BaseGateway.prototype.submit_message=function(t){e(".woocommerce-error, .woocommerce-message, .woocommerce-info").remove();var i=e(this.message_container);i.closest("form").length&&(i=i.closest("form")),i.prepend(t),i.removeClass("processing").unblock(),i.find(".input-text, select, input:checkbox").blur(),e("html, body").animate({scrollTop:i.offset().top-100},1e3)},wc_stripe.BaseGateway.prototype.get_first_name=function(t){return e("#"+t+"_first_name").val()},wc_stripe.BaseGateway.prototype.get_last_name=function(t){return e("#"+t+"_last_name").val()},wc_stripe.BaseGateway.prototype.should_save_method=function(){return e("#"+this.gateway_id+"_save_source_key").is(":checked")},wc_stripe.BaseGateway.prototype.is_add_payment_method_page=function(){return e(document.body).hasClass("woocommerce-add-payment-method")},wc_stripe.BaseGateway.prototype.get_selected_payment_method=function(){return e(this.saved_method_selector).val()},wc_stripe.BaseGateway.prototype.needs_shipping=function(){return"1"===this.params.needs_shipping},wc_stripe.BaseGateway.prototype.get_currency=function(){return e("#wc_stripe_currency").val()},wc_stripe.BaseGateway.prototype.get_country=function(){return e("#wc_stripe_country").val()},wc_stripe.BaseGateway.prototype.get_customer_name=function(t){return e(t+"_first_name").val()+" "+e(t+"_last_name").val()},wc_stripe.BaseGateway.prototype.get_customer_email=function(){return e("#billing_email").val()},wc_stripe.BaseGateway.prototype.get_address_field_hash=function(t){for(var i=["_first_name","_last_name","_address_1","_address_2","_postcode","_city","_state","_country"],a="",n=0;n<i.length;n++)a+=e(t+i[n]).val()+"_";return a},wc_stripe.BaseGateway.prototype.block=function(){e.blockUI({message:null,overlayCSS:{background:"#fff",opacity:.6}})},wc_stripe.BaseGateway.prototype.unblock=function(){e.unblockUI()},wc_stripe.BaseGateway.prototype.get_form=function(){return e(this.token_selector).closest("form")},wc_stripe.BaseGateway.prototype.get_total_price=function(){return e("#wc_stripe_order_total").data("amount")},wc_stripe.BaseGateway.prototype.get_total_price_cents=function(){return e("#wc_stripe_order_total_cents").data("amount")},wc_stripe.BaseGateway.prototype.set_total_price=function(t){e("#wc_stripe_order_total").data("amount",t)},wc_stripe.BaseGateway.prototype.set_total_price_cents=function(t){e("#wc_stripe_order_total_cents").data("amount",t)},wc_stripe.BaseGateway.prototype.set_payment_method=function(t){e('[name="payment_method"][value="'+t+'"]').prop("checked",!0).trigger("click")},wc_stripe.BaseGateway.prototype.set_selected_shipping_methods=function(t){if(t&&e('[name^="shipping_method"]').length)for(var i in t){var a=t[i];e('[name="shipping_method['+i+']"][value="'+a+'"]').prop("checked",!0).trigger("change")}},wc_stripe.BaseGateway.prototype.on_token_received=function(t){this.payment_token_received=!0,e(this.token_selector).val(t.id),this.process_checkout()},wc_stripe.BaseGateway.prototype.createPaymentRequest=function(){try{this.paymentRequest=i.paymentRequest(this.get_payment_request_options())}catch(t){return void this.submit_error(t.message)}this.needs_shipping()&&(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))},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:!0,requestPayerEmail:!0,requestPayerPhone:!0,requestShipping:this.needs_shipping()},e=this.get_display_items(),i=this.get_shipping_options();return e&&(t.displayItems=e),this.needs_shipping()&&i&&(t.shippingOptions=i),t},wc_stripe.BaseGateway.prototype.get_payment_request_update=function(t){var i={currency:this.get_currency().toLowerCase(),total:{amount:parseInt(this.get_total_price_cents()),label:this.params.total_label,pending:!0}},a=this.get_display_items(),n=this.get_shipping_options();return a&&(i.displayItems=a),this.needs_shipping()&&n&&(i.shippingOptions=n),t&&(i=e.extend(!0,{},i,t)),i},wc_stripe.BaseGateway.prototype.get_display_items=function(){return e("#wc_stripe_display_items").data("items")},wc_stripe.BaseGateway.prototype.set_display_items=function(t){e("#wc_stripe_display_items").data("items",t)},wc_stripe.BaseGateway.prototype.get_shipping_options=function(){return e("#wc_stripe_shipping_options").data("items")},wc_stripe.BaseGateway.prototype.set_shipping_options=function(t){e("#wc_stripe_shipping_options").data("items",t)},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(e){try{this.payment_response=e,this.populate_checkout_fields(e),e.complete("success"),this.on_token_received(e.paymentMethod)}catch(e){t.alert(e)}},wc_stripe.BaseGateway.prototype.populate_checkout_fields=function(t){e(this.token_selector).val(t.paymentMethod.id),this.populate_address_fields(t)},wc_stripe.BaseGateway.prototype.populate_address_fields=function(t){var i=this.address_mappings();if(t.payerName&&i.payerName.set(t.payerName),t.payerEmail&&i.payerEmail.set(t.payerEmail),t.payerPhone&&i.payerPhone.set(t.payerPhone),t.shippingAddress){var a=t.shippingAddress;for(var n in a)i[n]&&i[n].set.call(this,a[n],"#shipping")}if(t.paymentMethod.billing_details.address){a=t.paymentMethod.billing_details.address;for(var n in a)i[n]&&i[n].set.call(this,a[n],"#billing")}this.maybe_set_ship_to_different(),e('[name="billing_country"]').trigger("change")},wc_stripe.BaseGateway.prototype.address_mappings=function(){return{payerName:{set:function(t,i){var a=t.split(" ");a.length>0&&e("#billing_first_name").val(a[0]),a.length>1&&e("#billing_last_name").val(a[1])},get:function(t){return e("#billing_first_name").val()+" "+e("#billing_last_name").val()}},payerEmail:{set:function(t){e("#billing_email").val(t)},get:function(){return e("#billing_email").val()}},payerPhone:{set:function(t){e("#billing_phone").val(t)},get:function(){return e("#billing_phone").val()}},recipient:{set:function(t,i){var a=t.split(" ");a.length>0&&e(i+"_first_name").val(a[0]),a.length>1&&e(i+"_last_name").val(a[1])},get:function(t){return e(t+"_first_name").val()+" "+e(t+"_last_name").val()}},country:{set:function(t,i){e(i+"_country").val(t)},get:function(t){return e(t+"_country").val()}},addressLine:{set:function(t,i){t.length>0&&e(i+"_address_1").val(t[0]),t.length>1&&e(i+"_address_2").val(t[1])},get:function(t){return[e(t+"_address_1").val(),e(t+"_address_2").val()]}},line1:{set:function(t,i){e(i+"_address_1").val(t)},get:function(t){return e(t+"_address_1").val()}},line2:{set:function(t,i){e(i+"_address_2").val(t)},get:function(t){return e(t+"_address_2").val()}},region:{set:function(t,i){e(i+"_state").val(t)},get:function(t){e(t+"_state").val()}},state:{set:function(t,i){e(i+"_state").val(t)},get:function(t){e(t+"_state").val()}},city:{set:function(t,i){e(i+"_city").val(t)},get:function(t){e(t+"_city").val()}},postalCode:{set:function(t,i){e(i+"_postcode").val(t)},get:function(t){e(t+"_postcode").val()}},postal_code:{set:function(t,i){e(i+"_postcode").val(t)},get:function(t){e(t+"_postcode").val()}}}},wc_stripe.BaseGateway.prototype.process_checkout=function(){return new Promise(function(i,a){this.block(),e.ajax({url:this.params.routes.checkout,method:"POST",dataType:"json",data:e.extend({},this.serialize_form(this.get_form()),{payment_method:this.gateway_id,page_id:this.get_page()}),beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)}.bind(this)}).done(function(e){e.reload?t.location.reload():"success"===e.result?t.location=e.redirect:(e.messages&&this.submit_error(e.messages),this.unblock())}.bind(this)).fail(function(t,e,i){this.unblock(),this.submit_error(i)}.bind(this))}.bind(this))},wc_stripe.BaseGateway.prototype.serialize_form=function(t){var i=t.find("input").filter(function(t,i){return!e(i).is('[name^="add-to-cart"]')}.bind(this)).serializeArray(),a={};for(var n in i){var s=i[n];a[s.name]=s.value}return a.payment_method=this.gateway_id,a},wc_stripe.BaseGateway.prototype.map_shipping_methods=function(t){var e={};if("default"!==t){var i=t.match(/^(\d):(.+)$/);i.length>1&&(e[i[1]]=i[2])}return e},wc_stripe.BaseGateway.prototype.maybe_set_ship_to_different=function(){e('[name="ship_to_different_address"]').length&&e('[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(t){return new Promise(function(i,a){e.ajax({url:this.params.routes.shipping_address,method:"POST",dataType:"json",data:{address:this.map_address(t.shippingAddress),payment_method:this.gateway_id,page_id:this.get_page()},beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)}.bind(this)}).done(function(e){e.code?(t.updateWith(e.data.newData),a(e.data)):(t.updateWith(e.data.newData),i(e.data))}.bind(this)).fail(function(t,e,i){}.bind(this))}.bind(this))},wc_stripe.BaseGateway.prototype.update_shipping_method=function(t){return new Promise(function(i,a){e.ajax({url:this.params.routes.shipping_method,method:"POST",dataType:"json",data:{shipping_methods:this.map_shipping_methods(t.shippingOption.id),payment_method:this.gateway_id,page_id:this.get_page()},beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)}.bind(this)}).done(function(e){e.code?(t.updateWith(e.data.newData),a(e.data)):(this.set_selected_shipping_methods(e.data.shipping_methods),t.updateWith(e.data.newData),i(e.data))}.bind(this)).fail(function(t,e,i){this.submit_error(i)}.bind(this))}.bind(this))},wc_stripe.CheckoutGateway=function(){this.container=this.message_container="li.payment_method_"+this.gateway_id,this.banner_container="li.banner_payment_method_"+this.gateway_id,e(document.body).on("update_checkout",this.update_checkout.bind(this)),e(document.body).on("updated_checkout",this.updated_checkout.bind(this)),e(document.body).on("checkout_error",this.checkout_error.bind(this)),e(this.token_selector).closest("form").on("checkout_place_order_"+this.gateway_id,this.checkout_place_order.bind(this)),e(document.body).on("wc_stripe_new_method_"+this.gateway_id,this.on_show_new_methods.bind(this)),e(document.body).on("wc_stripe_saved_method_"+this.gateway_id,this.on_show_saved_methods.bind(this)),e(document.body).on("wc_stripe_payment_method_selected",this.on_payment_method_selected.bind(this)),this.banner_enabled()&&e(".woocommerce-billing-fields").length&&e(".wc-stripe-banner-checkout").css("max-width",e(".woocommerce-billing-fields").outerWidth(!0)),this.order_review()},wc_stripe.CheckoutGateway.prototype.order_review=function(){var e=t.location.href.match(/order_review.+payment_method=([\w]+).+payment_nonce=(.+)/);if(e&&e.length>1){var i=e[1],a=e[2];this.gateway_id===i&&(this.payment_token_received=!0,this.set_nonce(a),this.set_use_new_option(!0))}},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!(e('[name="terms"]').length&&!e('[name="terms"]').is(":checked"))},wc_stripe.CheckoutGateway.prototype.get_payment_method=function(){return e('[name="payment_method"]:checked').val()},wc_stripe.CheckoutGateway.prototype.set_use_new_option=function(t){e("#"+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,e(this.token_selector).val(t.id),this.hide_payment_button(),this.show_place_order()},wc_stripe.CheckoutGateway.prototype.block=function(){e("form.checkout").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},wc_stripe.CheckoutGateway.prototype.unblock=function(){e("form.checkout").unblock()},wc_stripe.CheckoutGateway.prototype.hide_place_order=function(){e("#place_order").addClass("wc-stripe-hide")},wc_stripe.CheckoutGateway.prototype.show_place_order=function(){e("#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,e('[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("undefined"==typeof wc_stripe_checkout_fields)return!0;var t=Object.keys(wc_stripe_checkout_fields.billing),i=Object.keys(wc_stripe_checkout_fields.shipping);function a(t,i){for(var a=0;a<t.length;a++){if(i[t[a]].required){var n=e("#"+t[a]).val();if(void 0===n||0==n.length)return void(valid=!1)}}}return valid=!0,a(t,wc_stripe_checkout_fields.billing),this.needs_shipping()&&e("#ship-to-different-address-checkbox").is(":checked")&&a(i,wc_stripe_checkout_fields.shipping),valid=this.is_valid_checkout(),valid},wc_stripe.ProductGateway=function(){this.container="li.payment_method_"+this.gateway_id,this.message_container="div.product",e(document.body).on("wc_stripe_updated_rest_nonce",this.set_rest_nonce.bind(this)),e("form.cart").on("found_variation",this.found_variation.bind(this)),e("form.cart").on("reset_data",this.reset_variation_data.bind(this)),this.buttonWidth=e("div.quantity").outerWidth(!0)+e(".single_add_to_cart_button").outerWidth(),(marginLeft=e(".single_add_to_cart_button").css("marginLeft"))&&(this.buttonWidth+=parseInt(marginLeft.replace("px",""))),e(this.container).css("max-width",this.buttonWidth+"px")},wc_stripe.ProductGateway.prototype.get_quantity=function(){return parseInt(e('[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_product_data();i.price=e.display_price,i.needs_shipping=!e.is_virtual,i.variation=e,this.set_product_data(i),this.enable_payment_button()},wc_stripe.ProductGateway.prototype.reset_variation_data=function(){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 e('[name="variation_id"]').length>0},wc_stripe.ProductGateway.prototype.needs_shipping=function(){return this.get_product_data().needs_shipping},wc_stripe.ProductGateway.prototype.get_product_data=function(){return e("#wc_stripe_product_data").data("product")},wc_stripe.ProductGateway.prototype.set_product_data=function(t){e("#wc_stripe_product_data").data("product",t)},wc_stripe.ProductGateway.prototype.add_to_cart=function(){return new Promise(function(t,i){this.block(),e.ajax({url:this.params.routes.add_to_cart,method:"POST",dataType:"json",data:{product_id:e("#product_id").val(),variation_id:this.is_variable_product()?e('[name="variation_id"]').val():0,qty:e('[name="quantity"]').val(),payment_method:this.gateway_id,page_id:this.get_page()},beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)}.bind(this)}).done(function(a,n,s){this.unblock(),e(document.body).triggerHandler("wc_stripe_updated_rest_nonce",s.getResponseHeader("X-WP-Nonce")),a.code?(this.submit_error(a.message),i(a)):(this.set_total_price(a.data.total),this.set_total_price_cents(a.data.totalCents),this.set_display_items(a.data.displayItems),t(a.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(i,a){e.ajax({url:this.params.routes.cart_calculation,method:"POST",dataType:"json",data:{product_id:e("#product_id").val(),variation_id:this.is_variable_product()&&t?t:0,qty:e('[name="quantity"]').val(),payment_method:this.gateway_id},beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)}.bind(this)}).done(function(t,a,n){e(document.body).triggerHandler("wc_stripe_updated_rest_nonce",n.getResponseHeader("X-WP-Nonce")),t.code?this.cart_calculation_error=!0:(this.set_total_price(t.data.total),this.set_total_price_cents(t.data.totalCents),this.set_display_items(t.data.displayItems),i(t.data))}.bind(this)).fail(function(t,e,i){}.bind(this))}.bind(this))},wc_stripe.CartGateway=function(){this.container="li.payment_method_"+this.gateway_id,this.message_container="div.woocommerce",e(document.body).on("updated_wc_div",this.updated_html.bind(this)),e(document.body).on("updated_cart_totals",this.updated_html.bind(this))},wc_stripe.CartGateway.prototype.needs_shipping=function(){return 1===e("#wc_stripe_needs_shipping").data("value")},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.add_cart_totals_class=function(){e(".cart_totals").addClass("stripe_cart_gateway_active")},wc_stripe.GooglePay=function(){};const a={apiVersion:2,apiVersionMinor:0},n={type:"CARD",parameters:{allowedAuthMethods:["PAN_ONLY"],allowedCardNetworks:["AMEX","DISCOVER","INTERAC","JCB","MASTERCARD","VISA"]}};wc_stripe.GooglePay.prototype.address_mappings=function(t){return{name:{set:function(t,i){var a=t.split(" ");e(i+"_first_name").val(a[0]),e(i+"_last_name").val(a[1])},get:function(t){return e(t+"_first_name").val()+e(t+"_last_name").val()}},postalCode:{set:function(t,i){e(i+"_postcode").val(t)},get:function(t){return e(t+"_postcode").val()}},countryCode:{set:function(t,i){e(i+"_country").val(t)},get:function(t){return e(t+"_country").val()}},phoneNumber:{set:function(t,i){e("#billing_phone").val(t)},get:function(){return"#billing_phone".val()}},address1:{set:function(t,i){e(i+"_address_1").val(t)},get:function(t){return e(t+"_address_1").val()}},address2:{set:function(t,i){e(i+"_address_2").val(t)},get:function(t){return e(t+"_address_2").val()}},locality:{set:function(t,i){e(i+"_city").val(t)},get:function(t){return e(t+"_city").val()}},administrativeArea:{set:function(t,i){e(i+"_state").val(t)},get:function(t){return e(t+"_state").val()}}}},wc_stripe.GooglePay.prototype.serialize_form=function(t){return e.extend({},wc_stripe.BaseGateway.prototype.serialize_form.apply(this,arguments),{order_review:!this.dynamic_price_enabled()})},wc_stripe.GooglePay.prototype.populate_address_fields=function(t){var i=t.paymentMethodData.info.billingAddress,a=this.address_mappings();for(var n in i)a[n]&&a[n].set.call(this,i[n],"#billing");if(t.shippingAddress)for(var n in t.shippingAddress)a[n]&&a[n].set.call(this,t.shippingAddress[n],"#shipping");t.email&&e("#billing_email").val(t.email),this.maybe_set_ship_to_different(),e('[name="billing_country"]').trigger("change")},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(t){return new Promise(function(i,a){e.when(e.ajax({url:this.params.routes.payment_data,dataType:"json",method:"POST",data:{shipping_address:this.map_address(t.shippingAddress),shipping_methods:this.map_shipping_methods(t.shippingOptionData.id),shipping_method_id:t.shippingOptionData.id,page_id:this.get_page()},beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)}.bind(this)})).done(function(t){t.code?a(t.data.data):i(t.data)}.bind(this)).fail(function(){a()}.bind(this))}.bind(this))},wc_stripe.GooglePay.prototype.on_payment_data_changed=function(t){return new Promise(function(e,i){this.update_payment_data(t).then(function(i){e(i.paymentRequestUpdate),this.set_selected_shipping_methods(i.shipping_methods),this.payment_data_updated(i,t)}.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_googlepay_display_items=function(){return e("#googlepay_display_items").data("items")},wc_stripe.GooglePay.prototype.set_googlepay_display_items=function(t){e("#googlepay_display_items").data("items",t)},wc_stripe.GooglePay.prototype.get_shipping_options=function(){return e("#googlepay_shipping_options").data("items")},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.dynamic_price_enabled=function(){return"1"===this.params.dynamic_price},wc_stripe.GooglePay.prototype.get_payment_options=function(){var t={environment:this.params.environment,merchantInfo:this.get_merchant_info()};return this.dynamic_price_enabled()&&(this.needs_shipping()&&this.get_total_price_cents()>0?t.paymentDataCallbacks={onPaymentDataChanged:this.on_payment_data_changed.bind(this),onPaymentAuthorized:function(t){return new Promise(function(t,e){t({transactionState:"SUCCESS"})}.bind(this))}.bind(this)}:t.paymentDataCallbacks={onPaymentAuthorized:function(t){return new Promise(function(t,e){t({transactionState:"SUCCESS"})}.bind(this))}}),t},wc_stripe.GooglePay.prototype.build_payment_request=function(){var t=e.extend({},a,{emailRequired:!0,merchantInfo:this.get_merchant_info(),allowedPaymentMethods:[e.extend({type:"CARD",tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{gateway:"stripe","stripe:version":"2018-10-31","stripe:publishableKey":this.params.api_key}}},n)],shippingAddressRequired:this.needs_shipping()&&this.get_total_price_cents()>0,transactionInfo:{currencyCode:this.get_currency(),totalPriceStatus:"ESTIMATED",totalPrice:this.get_total_price().toString(),displayItems:this.get_googlepay_display_items(),totalPriceLabel:this.params.total_price_label}});return t.allowedPaymentMethods[0].parameters.billingAddressRequired=!0,t.allowedPaymentMethods[0].parameters.billingAddressParameters={format:"FULL",phoneNumberRequired:e("#billing_phone").length>0},this.dynamic_price_enabled()&&(this.needs_shipping()&&this.get_total_price_cents()>0?(t.shippingAddressParameters={},t.shippingOptionRequired=!0,t.shippingOptionParameters={shippingOptions:this.get_shipping_options()},t.callbackIntents=["SHIPPING_ADDRESS","SHIPPING_OPTION","PAYMENT_AUTHORIZATION"]):t.callbackIntents=["PAYMENT_AUTHORIZATION"]),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 i=e.extend({},a);i.allowedPaymentMethods=[n],this.paymentsClient.isReadyToPay(i).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=e(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.populate_address_fields(t),this.on_token_received(e)}.bind(this)).catch(function(t){"CANCELED"!==t.statusCode&&(t.statusMessage&&t.statusMessage.indexOf("paymentDataRequest.callbackIntent")>-1?this.submit_error_code("DEVELOPER_ERROR_WHITELIST"):this.submit_error(t.statusMessage))}.bind(this))},wc_stripe.ApplePay=function(){},wc_stripe.ApplePay.prototype.initialize=function(){e(document.body).on("click",".apple-pay-button",this.start.bind(this)),this.createPaymentRequest(),this.canMakePayment()},wc_stripe.ApplePay.prototype.create_button=function(){this.$button&&this.$button.remove(),this.$button=e(this.params.button),this.append_button()},wc_stripe.ApplePay.prototype.canMakePayment=function(){return new Promise(function(t,i){this.paymentRequest.canMakePayment().then(function(i){i&&i.applePay&&(this.can_pay=!0,this.create_button(),e(this.container).show(),t(i))}.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.canMakePayment(),this.paymentRequestButton=this.createPaymentRequestButton(),this.paymentRequestButton.on("click",this.button_click.bind(this))},wc_stripe.PaymentRequest.prototype.button_click=function(t){},wc_stripe.PaymentRequest.prototype.createPaymentRequestButton=function(){return 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(t,i){this.paymentRequest.canMakePayment().then(function(i){i&&!i.applePay&&(this.can_pay=!0,this.create_button(),e(this.container).show(),t(i))}.bind(this))}.bind(this))},wc_stripe.PaymentRequest.prototype.create_button=function(){this.paymentRequestButton.mount("#wc-stripe-payment-request-container")};try{i=Stripe(wc_stripe_params_v3.api_key,{stripeAccount:wc_stripe_params_v3.account})}catch(e){return t.alert(e),void console.log(e)}}(window,jQuery);
|
1 |
+
!function(t,e){t.wc_stripe={};var i=null;wc_stripe.BaseGateway=function(t){this.params=t,this.gateway_id=this.params.gateway_id,this.token_selector=this.params.token_selector,this.saved_method_selector=this.params.saved_method_selector,this.payment_intent_selector=this.params.payment_intent_selector,this.payment_token_received=!1,this.stripe=i,this.elements=i.elements(e.extend({},{locale:"auto"},this.get_element_options())),this.initialize()},wc_stripe.BaseGateway.prototype.get_page=function(){return wc_stripe_params_v3.page},wc_stripe.BaseGateway.prototype.set_nonce=function(t){e(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 e('[name="payment_method"]:checked').val()===this.gateway_id},wc_stripe.BaseGateway.prototype.is_saved_method_selected=function(){return this.is_gateway_selected()&&"saved"===e('[name="'+this.gateway_id+'_payment_type_key"]:checked').val()},wc_stripe.BaseGateway.prototype.has_checkout_error=function(){return e("#wc_stripe_checkout_error").length>0&&this.is_gateway_selected()},wc_stripe.BaseGateway.prototype.submit_error=function(t){-1==(t=this.get_error_message(t)).indexOf("</ul>")&&(t='<div class="woocommerce-error">'+t+"</div>"),this.submit_message(t)},wc_stripe.BaseGateway.prototype.submit_error_code=function(t){},wc_stripe.BaseGateway.prototype.get_error_message=function(t){return"object"==typeof t&&t.code&&(t=wc_stripe_messages[t.code]?wc_stripe_messages[t.code]:t.message),t},wc_stripe.BaseGateway.prototype.submit_message=function(t){e(".woocommerce-error, .woocommerce-message, .woocommerce-info").remove();var i=e(this.message_container);i.closest("form").length&&(i=i.closest("form")),i.prepend(t),i.removeClass("processing").unblock(),i.find(".input-text, select, input:checkbox").blur(),e.scroll_to_notices?e.scroll_to_notices(i):e("html, body").animate({scrollTop:i.offset().top-100},1e3)},wc_stripe.BaseGateway.prototype.get_first_name=function(t){return e("#"+t+"_first_name").val()},wc_stripe.BaseGateway.prototype.get_last_name=function(t){return e("#"+t+"_last_name").val()},wc_stripe.BaseGateway.prototype.should_save_method=function(){return e("#"+this.gateway_id+"_save_source_key").is(":checked")},wc_stripe.BaseGateway.prototype.is_add_payment_method_page=function(){return e(document.body).hasClass("woocommerce-add-payment-method")},wc_stripe.BaseGateway.prototype.get_selected_payment_method=function(){return e(this.saved_method_selector).val()},wc_stripe.BaseGateway.prototype.needs_shipping=function(){return"1"===this.params.needs_shipping},wc_stripe.BaseGateway.prototype.get_currency=function(){return e("#wc_stripe_currency").val()},wc_stripe.BaseGateway.prototype.get_country=function(){return e("#wc_stripe_country").val()},wc_stripe.BaseGateway.prototype.get_customer_name=function(t){return e(t+"_first_name").val()+" "+e(t+"_last_name").val()},wc_stripe.BaseGateway.prototype.get_customer_email=function(){return e("#billing_email").val()},wc_stripe.BaseGateway.prototype.get_address_field_hash=function(t){for(var i=["_first_name","_last_name","_address_1","_address_2","_postcode","_city","_state","_country"],a="",n=0;n<i.length;n++)a+=e(t+i[n]).val()+"_";return a},wc_stripe.BaseGateway.prototype.block=function(){e.blockUI({message:null,overlayCSS:{background:"#fff",opacity:.6}})},wc_stripe.BaseGateway.prototype.unblock=function(){e.unblockUI()},wc_stripe.BaseGateway.prototype.get_form=function(){return e(this.token_selector).closest("form")},wc_stripe.BaseGateway.prototype.get_total_price=function(){return e("#wc_stripe_order_total").data("amount")},wc_stripe.BaseGateway.prototype.get_total_price_cents=function(){return e("#wc_stripe_order_total_cents").data("amount")},wc_stripe.BaseGateway.prototype.set_total_price=function(t){e("#wc_stripe_order_total").data("amount",t)},wc_stripe.BaseGateway.prototype.set_total_price_cents=function(t){e("#wc_stripe_order_total_cents").data("amount",t)},wc_stripe.BaseGateway.prototype.set_payment_method=function(t){e('[name="payment_method"][value="'+t+'"]').prop("checked",!0).trigger("click")},wc_stripe.BaseGateway.prototype.set_selected_shipping_methods=function(t){if(t&&e('[name^="shipping_method"]').length)for(var i in t){var a=t[i];e('[name="shipping_method['+i+']"][value="'+a+'"]').prop("checked",!0).trigger("change")}},wc_stripe.BaseGateway.prototype.on_token_received=function(t){this.payment_token_received=!0,e(this.token_selector).val(t.id),this.process_checkout()},wc_stripe.BaseGateway.prototype.createPaymentRequest=function(){try{this.paymentRequest=i.paymentRequest(this.get_payment_request_options())}catch(t){return void this.submit_error(t.message)}this.needs_shipping()&&(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))},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:!0,requestPayerEmail:e("#billing_email").length>0,requestPayerPhone:e("#billing_phone").length>0,requestShipping:this.needs_shipping()},i=this.get_display_items(),a=this.get_shipping_options();return i&&(t.displayItems=i),this.needs_shipping()&&a&&(t.shippingOptions=a),t},wc_stripe.BaseGateway.prototype.get_payment_request_update=function(t){var i={currency:this.get_currency().toLowerCase(),total:{amount:parseInt(this.get_total_price_cents()),label:this.params.total_label,pending:!0}},a=this.get_display_items(),n=this.get_shipping_options();return a&&(i.displayItems=a),this.needs_shipping()&&n&&(i.shippingOptions=n),t&&(i=e.extend(!0,{},i,t)),i},wc_stripe.BaseGateway.prototype.get_display_items=function(){return e("#wc_stripe_display_items").data("items")},wc_stripe.BaseGateway.prototype.set_display_items=function(t){e("#wc_stripe_display_items").data("items",t)},wc_stripe.BaseGateway.prototype.get_shipping_options=function(){return e("#wc_stripe_shipping_options").data("items")},wc_stripe.BaseGateway.prototype.set_shipping_options=function(t){e("#wc_stripe_shipping_options").data("items",t)},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(e){try{this.payment_response=e,this.populate_checkout_fields(e),e.complete("success"),this.on_token_received(e.paymentMethod)}catch(e){t.alert(e)}},wc_stripe.BaseGateway.prototype.populate_checkout_fields=function(t){e(this.token_selector).val(t.paymentMethod.id),this.populate_address_fields(t)},wc_stripe.BaseGateway.prototype.populate_address_fields=function(t){var i=this.address_mappings();if(t.payerName&&i.payerName.set(t.payerName),t.payerEmail&&i.payerEmail.set(t.payerEmail),t.payerPhone&&i.payerPhone.set(t.payerPhone),t.shippingAddress){var a=t.shippingAddress;for(var n in a)i[n]&&i[n].set.call(this,a[n],"#shipping")}if(t.paymentMethod.billing_details.address){a=t.paymentMethod.billing_details.address;for(var n in a)i[n]&&i[n].set.call(this,a[n],"#billing")}this.maybe_set_ship_to_different(),e('[name="billing_country"]').trigger("change")},wc_stripe.BaseGateway.prototype.address_mappings=function(){return{payerName:{set:function(t,i){var a=t.split(" ");a.length>0&&e("#billing_first_name").val(a[0]),a.length>1&&e("#billing_last_name").val(a[1])},get:function(t){return e("#billing_first_name").val()+" "+e("#billing_last_name").val()}},payerEmail:{set:function(t){e("#billing_email").val(t)},get:function(){return e("#billing_email").val()}},payerPhone:{set:function(t){e("#billing_phone").val(t)},get:function(){return e("#billing_phone").val()}},recipient:{set:function(t,i){var a=t.split(" ");a.length>0&&e(i+"_first_name").val(a[0]),a.length>1&&e(i+"_last_name").val(a[1])},get:function(t){return e(t+"_first_name").val()+" "+e(t+"_last_name").val()}},country:{set:function(t,i){e(i+"_country").val(t)},get:function(t){return e(t+"_country").val()}},addressLine:{set:function(t,i){t.length>0&&e(i+"_address_1").val(t[0]),t.length>1&&e(i+"_address_2").val(t[1])},get:function(t){return[e(t+"_address_1").val(),e(t+"_address_2").val()]}},line1:{set:function(t,i){e(i+"_address_1").val(t)},get:function(t){return e(t+"_address_1").val()}},line2:{set:function(t,i){e(i+"_address_2").val(t)},get:function(t){return e(t+"_address_2").val()}},region:{set:function(t,i){e(i+"_state").val(t)},get:function(t){e(t+"_state").val()}},state:{set:function(t,i){e(i+"_state").val(t)},get:function(t){e(t+"_state").val()}},city:{set:function(t,i){e(i+"_city").val(t)},get:function(t){e(t+"_city").val()}},postalCode:{set:function(t,i){e(i+"_postcode").val(t)},get:function(t){e(t+"_postcode").val()}},postal_code:{set:function(t,i){e(i+"_postcode").val(t)},get:function(t){e(t+"_postcode").val()}}}},wc_stripe.BaseGateway.prototype.process_checkout=function(){return new Promise(function(i,a){this.block(),e.ajax({url:this.params.routes.checkout,method:"POST",dataType:"json",data:e.extend({},this.serialize_form(this.get_form()),{payment_method:this.gateway_id,page_id:this.get_page()}),beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)}.bind(this)}).done(function(e){e.reload?t.location.reload():"success"===e.result?t.location=e.redirect:(e.messages&&this.submit_error(e.messages),this.unblock())}.bind(this)).fail(function(t,e,i){this.unblock(),this.submit_error(i)}.bind(this))}.bind(this))},wc_stripe.BaseGateway.prototype.serialize_form=function(t){var i=t.find("input").filter(function(t,i){return!e(i).is('[name^="add-to-cart"]')}.bind(this)).serializeArray(),a={};for(var n in i){var s=i[n];a[s.name]=s.value}return a.payment_method=this.gateway_id,a},wc_stripe.BaseGateway.prototype.map_shipping_methods=function(t){var e={};if("default"!==t){var i=t.match(/^(\d):(.+)$/);i.length>1&&(e[i[1]]=i[2])}return e},wc_stripe.BaseGateway.prototype.maybe_set_ship_to_different=function(){e('[name="ship_to_different_address"]').length&&e('[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(t){return new Promise(function(i,a){e.ajax({url:this.params.routes.shipping_address,method:"POST",dataType:"json",data:{address:this.map_address(t.shippingAddress),payment_method:this.gateway_id,page_id:this.get_page()},beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)}.bind(this)}).done(function(e){e.code?(t.updateWith(e.data.newData),a(e.data)):(t.updateWith(e.data.newData),i(e.data))}.bind(this)).fail(function(t,e,i){}.bind(this))}.bind(this))},wc_stripe.BaseGateway.prototype.update_shipping_method=function(t){return new Promise(function(i,a){e.ajax({url:this.params.routes.shipping_method,method:"POST",dataType:"json",data:{shipping_methods:this.map_shipping_methods(t.shippingOption.id),payment_method:this.gateway_id,page_id:this.get_page()},beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)}.bind(this)}).done(function(e){e.code?(t.updateWith(e.data.newData),a(e.data)):(this.set_selected_shipping_methods(e.data.shipping_methods),t.updateWith(e.data.newData),i(e.data))}.bind(this)).fail(function(t,e,i){this.submit_error(i)}.bind(this))}.bind(this))},wc_stripe.CheckoutGateway=function(){this.container=this.message_container="li.payment_method_"+this.gateway_id,this.banner_container="li.banner_payment_method_"+this.gateway_id,e(document.body).on("update_checkout",this.update_checkout.bind(this)),e(document.body).on("updated_checkout",this.updated_checkout.bind(this)),e(document.body).on("checkout_error",this.checkout_error.bind(this)),e(this.token_selector).closest("form").on("checkout_place_order_"+this.gateway_id,this.checkout_place_order.bind(this)),e(document.body).on("wc_stripe_new_method_"+this.gateway_id,this.on_show_new_methods.bind(this)),e(document.body).on("wc_stripe_saved_method_"+this.gateway_id,this.on_show_saved_methods.bind(this)),e(document.body).on("wc_stripe_payment_method_selected",this.on_payment_method_selected.bind(this)),this.banner_enabled()&&e(".woocommerce-billing-fields").length&&e(".wc-stripe-banner-checkout").css("max-width",e(".woocommerce-billing-fields").outerWidth(!0)),this.order_review()},wc_stripe.CheckoutGateway.prototype.order_review=function(){var e=t.location.href.match(/order_review.+payment_method=([\w]+).+payment_nonce=(.+)/);if(e&&e.length>1){var i=e[1],a=e[2];this.gateway_id===i&&(this.payment_token_received=!0,this.set_nonce(a),this.set_use_new_option(!0))}},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!(e('[name="terms"]').length&&!e('[name="terms"]').is(":checked"))},wc_stripe.CheckoutGateway.prototype.get_payment_method=function(){return e('[name="payment_method"]:checked').val()},wc_stripe.CheckoutGateway.prototype.set_use_new_option=function(t){e("#"+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,e(this.token_selector).val(t.id),this.hide_payment_button(),this.show_place_order()},wc_stripe.CheckoutGateway.prototype.block=function(){e("form.checkout").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},wc_stripe.CheckoutGateway.prototype.unblock=function(){e("form.checkout").unblock()},wc_stripe.CheckoutGateway.prototype.hide_place_order=function(){e("#place_order").addClass("wc-stripe-hide")},wc_stripe.CheckoutGateway.prototype.show_place_order=function(){e("#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,e('[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("undefined"==typeof wc_stripe_checkout_fields)return!0;var t=Object.keys(wc_stripe_checkout_fields.billing),i=Object.keys(wc_stripe_checkout_fields.shipping);function a(t,i){for(var a=0;a<t.length;a++){if(i[t[a]].required){var n=e("#"+t[a]).val();if(void 0===n||0==n.length)return void(valid=!1)}}}return valid=!0,a(t,wc_stripe_checkout_fields.billing),this.needs_shipping()&&e("#ship-to-different-address-checkbox").is(":checked")&&a(i,wc_stripe_checkout_fields.shipping),valid=this.is_valid_checkout(),valid},wc_stripe.ProductGateway=function(){this.container="li.payment_method_"+this.gateway_id,this.message_container="div.product",e(document.body).on("wc_stripe_updated_rest_nonce",this.set_rest_nonce.bind(this)),e("form.cart").on("found_variation",this.found_variation.bind(this)),e("form.cart").on("reset_data",this.reset_variation_data.bind(this)),this.buttonWidth=e("div.quantity").outerWidth(!0)+e(".single_add_to_cart_button").outerWidth(),(marginLeft=e(".single_add_to_cart_button").css("marginLeft"))&&(this.buttonWidth+=parseInt(marginLeft.replace("px",""))),e(this.container).css("max-width",this.buttonWidth+"px")},wc_stripe.ProductGateway.prototype.get_quantity=function(){return parseInt(e('[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_product_data();i.price=e.display_price,i.needs_shipping=!e.is_virtual,i.variation=e,this.set_product_data(i),this.enable_payment_button()},wc_stripe.ProductGateway.prototype.reset_variation_data=function(){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 e('[name="variation_id"]').length>0},wc_stripe.ProductGateway.prototype.needs_shipping=function(){return this.get_product_data().needs_shipping},wc_stripe.ProductGateway.prototype.get_product_data=function(){return e("#wc_stripe_product_data").data("product")},wc_stripe.ProductGateway.prototype.set_product_data=function(t){e("#wc_stripe_product_data").data("product",t)},wc_stripe.ProductGateway.prototype.add_to_cart=function(){return new Promise(function(t,i){this.block(),e.ajax({url:this.params.routes.add_to_cart,method:"POST",dataType:"json",data:{product_id:e("#product_id").val(),variation_id:this.is_variable_product()?e('[name="variation_id"]').val():0,qty:e('[name="quantity"]').val(),payment_method:this.gateway_id,page_id:this.get_page()},beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)}.bind(this)}).done(function(a,n,s){this.unblock(),e(document.body).triggerHandler("wc_stripe_updated_rest_nonce",s.getResponseHeader("X-WP-Nonce")),a.code?(this.submit_error(a.message),i(a)):(this.set_total_price(a.data.total),this.set_total_price_cents(a.data.totalCents),this.set_display_items(a.data.displayItems),t(a.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(i,a){e.ajax({url:this.params.routes.cart_calculation,method:"POST",dataType:"json",data:{product_id:e("#product_id").val(),variation_id:this.is_variable_product()&&t?t:0,qty:e('[name="quantity"]').val(),payment_method:this.gateway_id},beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)}.bind(this)}).done(function(t,a,n){e(document.body).triggerHandler("wc_stripe_updated_rest_nonce",n.getResponseHeader("X-WP-Nonce")),t.code?this.cart_calculation_error=!0:(this.set_total_price(t.data.total),this.set_total_price_cents(t.data.totalCents),this.set_display_items(t.data.displayItems),i(t.data))}.bind(this)).fail(function(t,e,i){}.bind(this))}.bind(this))},wc_stripe.CartGateway=function(){this.container="li.payment_method_"+this.gateway_id,this.message_container="div.woocommerce",e(document.body).on("updated_wc_div",this.updated_html.bind(this)),e(document.body).on("updated_cart_totals",this.updated_html.bind(this))},wc_stripe.CartGateway.prototype.needs_shipping=function(){return 1===e("#wc_stripe_needs_shipping").data("value")},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.add_cart_totals_class=function(){e(".cart_totals").addClass("stripe_cart_gateway_active")},wc_stripe.GooglePay=function(){};const a={apiVersion:2,apiVersionMinor:0},n={type:"CARD",parameters:{allowedAuthMethods:["PAN_ONLY"],allowedCardNetworks:["AMEX","DISCOVER","INTERAC","JCB","MASTERCARD","VISA"]}};wc_stripe.GooglePay.prototype.address_mappings=function(t){return{name:{set:function(t,i){var a=t.split(" ");e(i+"_first_name").val(a[0]),e(i+"_last_name").val(a[1])},get:function(t){return e(t+"_first_name").val()+e(t+"_last_name").val()}},postalCode:{set:function(t,i){e(i+"_postcode").val(t)},get:function(t){return e(t+"_postcode").val()}},countryCode:{set:function(t,i){e(i+"_country").val(t)},get:function(t){return e(t+"_country").val()}},phoneNumber:{set:function(t,i){e("#billing_phone").val(t)},get:function(){return"#billing_phone".val()}},address1:{set:function(t,i){e(i+"_address_1").val(t)},get:function(t){return e(t+"_address_1").val()}},address2:{set:function(t,i){e(i+"_address_2").val(t)},get:function(t){return e(t+"_address_2").val()}},locality:{set:function(t,i){e(i+"_city").val(t)},get:function(t){return e(t+"_city").val()}},administrativeArea:{set:function(t,i){e(i+"_state").val(t)},get:function(t){return e(t+"_state").val()}}}},wc_stripe.GooglePay.prototype.serialize_form=function(t){return e.extend({},wc_stripe.BaseGateway.prototype.serialize_form.apply(this,arguments),{order_review:!this.dynamic_price_enabled()})},wc_stripe.GooglePay.prototype.populate_address_fields=function(t){var i=t.paymentMethodData.info.billingAddress,a=this.address_mappings();for(var n in i)a[n]&&a[n].set.call(this,i[n],"#billing");if(t.shippingAddress)for(var n in t.shippingAddress)a[n]&&a[n].set.call(this,t.shippingAddress[n],"#shipping");t.email&&e("#billing_email").val(t.email),this.maybe_set_ship_to_different(),e('[name="billing_country"]').trigger("change")},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(t){return new Promise(function(i,a){e.when(e.ajax({url:this.params.routes.payment_data,dataType:"json",method:"POST",data:{shipping_address:this.map_address(t.shippingAddress),shipping_methods:this.map_shipping_methods(t.shippingOptionData.id),shipping_method_id:t.shippingOptionData.id,page_id:this.get_page()},beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)}.bind(this)})).done(function(t){t.code?a(t.data.data):i(t.data)}.bind(this)).fail(function(){a()}.bind(this))}.bind(this))},wc_stripe.GooglePay.prototype.on_payment_data_changed=function(t){return new Promise(function(e,i){this.update_payment_data(t).then(function(i){e(i.paymentRequestUpdate),this.set_selected_shipping_methods(i.shipping_methods),this.payment_data_updated(i,t)}.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_googlepay_display_items=function(){return e("#googlepay_display_items").data("items")},wc_stripe.GooglePay.prototype.set_googlepay_display_items=function(t){e("#googlepay_display_items").data("items",t)},wc_stripe.GooglePay.prototype.get_shipping_options=function(){return e("#googlepay_shipping_options").data("items")},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.dynamic_price_enabled=function(){return"1"===this.params.dynamic_price},wc_stripe.GooglePay.prototype.get_payment_options=function(){var t={environment:this.params.environment,merchantInfo:this.get_merchant_info()};return this.dynamic_price_enabled()&&(this.needs_shipping()&&this.get_total_price_cents()>0?t.paymentDataCallbacks={onPaymentDataChanged:this.on_payment_data_changed.bind(this),onPaymentAuthorized:function(t){return new Promise(function(t,e){t({transactionState:"SUCCESS"})}.bind(this))}.bind(this)}:t.paymentDataCallbacks={onPaymentAuthorized:function(t){return new Promise(function(t,e){t({transactionState:"SUCCESS"})}.bind(this))}}),t},wc_stripe.GooglePay.prototype.build_payment_request=function(){var t=e.extend({},a,{emailRequired:!0,merchantInfo:this.get_merchant_info(),allowedPaymentMethods:[e.extend({type:"CARD",tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{gateway:"stripe","stripe:version":"2018-10-31","stripe:publishableKey":this.params.api_key}}},n)],shippingAddressRequired:this.needs_shipping()&&this.get_total_price_cents()>0,transactionInfo:{currencyCode:this.get_currency(),totalPriceStatus:"ESTIMATED",totalPrice:this.get_total_price().toString(),displayItems:this.get_googlepay_display_items(),totalPriceLabel:this.params.total_price_label}});return t.allowedPaymentMethods[0].parameters.billingAddressRequired=!0,t.allowedPaymentMethods[0].parameters.billingAddressParameters={format:"FULL",phoneNumberRequired:e("#billing_phone").length>0},this.dynamic_price_enabled()&&(this.needs_shipping()&&this.get_total_price_cents()>0?(t.shippingAddressParameters={},t.shippingOptionRequired=!0,t.shippingOptionParameters={shippingOptions:this.get_shipping_options()},t.callbackIntents=["SHIPPING_ADDRESS","SHIPPING_OPTION","PAYMENT_AUTHORIZATION"]):t.callbackIntents=["PAYMENT_AUTHORIZATION"]),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 i=e.extend({},a);i.allowedPaymentMethods=[n],this.paymentsClient.isReadyToPay(i).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=e(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.populate_address_fields(t),this.on_token_received(e)}.bind(this)).catch(function(t){"CANCELED"!==t.statusCode&&(t.statusMessage&&t.statusMessage.indexOf("paymentDataRequest.callbackIntent")>-1?this.submit_error_code("DEVELOPER_ERROR_WHITELIST"):this.submit_error(t.statusMessage))}.bind(this))},wc_stripe.ApplePay=function(){},wc_stripe.ApplePay.prototype.initialize=function(){e(document.body).on("click",".apple-pay-button",this.start.bind(this)),this.createPaymentRequest(),this.canMakePayment()},wc_stripe.ApplePay.prototype.create_button=function(){this.$button&&this.$button.remove(),this.$button=e(this.params.button),this.append_button()},wc_stripe.ApplePay.prototype.canMakePayment=function(){return new Promise(function(t,i){this.paymentRequest.canMakePayment().then(function(i){i&&i.applePay&&(this.can_pay=!0,this.create_button(),e(this.container).show(),t(i))}.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.canMakePayment(),this.paymentRequestButton=this.createPaymentRequestButton(),this.paymentRequestButton.on("click",this.button_click.bind(this))},wc_stripe.PaymentRequest.prototype.button_click=function(t){},wc_stripe.PaymentRequest.prototype.createPaymentRequestButton=function(){return 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(t,i){this.paymentRequest.canMakePayment().then(function(i){i&&!i.applePay&&(this.can_pay=!0,this.create_button(),e(this.container).show(),t(i))}.bind(this))}.bind(this))},wc_stripe.PaymentRequest.prototype.create_button=function(){this.paymentRequestButton.mount("#wc-stripe-payment-request-container")};try{i=Stripe(wc_stripe_params_v3.api_key,{stripeAccount:wc_stripe_params_v3.account})}catch(e){return t.alert(e),void console.log(e)}}(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.1.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woo-stripe-payment\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"POT-Creation-Date: 2020-06-
|
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"
|
@@ -98,28 +98,28 @@ msgstr ""
|
|
98 |
msgid " & billing country is <strong>%s</strong>"
|
99 |
msgstr ""
|
100 |
|
101 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
102 |
#: includes/gateways/class-wc-payment-gateway-stripe-ach.php:114
|
103 |
msgid "Error processing payment. Reason: %s"
|
104 |
msgstr ""
|
105 |
|
106 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
107 |
msgid "Charge %s is pending. Payment Method: %s. Payment will be completed once charge.succeeded webhook received from Stripe."
|
108 |
msgstr ""
|
109 |
|
110 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
111 |
msgid "Order %s successful in Stripe. Charge: %s. Payment Method: %s"
|
112 |
msgstr ""
|
113 |
|
114 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
115 |
msgid "charge"
|
116 |
msgstr ""
|
117 |
|
118 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
119 |
msgid "authorization"
|
120 |
msgstr ""
|
121 |
|
122 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
123 |
#: includes/controllers/class-wc-stripe-controller-cart.php:135
|
124 |
#: includes/controllers/class-wc-stripe-controller-cart.php:184
|
125 |
#: includes/controllers/class-wc-stripe-controller-googlepay.php:129
|
@@ -127,119 +127,114 @@ msgstr ""
|
|
127 |
msgid "Total"
|
128 |
msgstr ""
|
129 |
|
130 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
131 |
msgid "User must be logged in."
|
132 |
msgstr ""
|
133 |
|
134 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
135 |
msgid "Error saving your payment method. Reason: %s"
|
136 |
msgstr ""
|
137 |
|
138 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
139 |
msgid "Error saving payment method. Reason: %s"
|
140 |
msgstr ""
|
141 |
|
142 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
143 |
msgid "Order refunded in Stripe. Amount: %s"
|
144 |
msgstr ""
|
145 |
|
146 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
147 |
msgid "Order amount captured in Stripe. Amount: %s"
|
148 |
msgstr ""
|
149 |
|
150 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
151 |
msgid "Error capturing charge in Stripe. Reason: %s"
|
152 |
msgstr ""
|
153 |
|
154 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
155 |
msgid "Error voiding charge. Reason: %s"
|
156 |
msgstr ""
|
157 |
|
158 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
159 |
msgid "Charge voided in Stripe."
|
160 |
msgstr ""
|
161 |
|
162 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
163 |
msgid "n/a"
|
164 |
msgstr ""
|
165 |
|
166 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
167 |
#: includes/admin/meta-boxes/views/html-order-pay.php:42
|
168 |
msgid "New Card"
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
172 |
#: includes/admin/meta-boxes/views/html-order-pay.php:30
|
173 |
msgid "Saved Cards"
|
174 |
msgstr ""
|
175 |
|
176 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
177 |
msgid "Attemp to save payment method failed. Reason: %s"
|
178 |
msgstr ""
|
179 |
|
180 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
181 |
msgid "We were not able to save your payment method. To prevent billing issues with your subscription, please add a payment method to the subscription."
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
185 |
msgid "We were not able to save your payment method. Reason: %s"
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
189 |
msgid "Payment Method Token"
|
190 |
msgstr ""
|
191 |
|
192 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
193 |
msgid "Recurring payment for order failed. Reason: %s"
|
194 |
msgstr ""
|
195 |
|
196 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
197 |
msgid "Recurring payment captured in Stripe. Payment method: %s"
|
198 |
msgstr ""
|
199 |
|
200 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
201 |
msgid "Recurring payment authorized in Stripe. Payment method: %s"
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
205 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
206 |
msgid "Customer must manually complete payment for payment method %s"
|
207 |
msgstr ""
|
208 |
|
209 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
210 |
msgid "Error saving payment method for subscription. Reason: %s"
|
211 |
msgstr ""
|
212 |
|
213 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
214 |
#: includes/abstract/abstract-wc-stripe-payment.php:175
|
215 |
msgid "Order %s from %s"
|
216 |
msgstr ""
|
217 |
|
218 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
219 |
msgid "Pre-order payment for order failed. Reason: %s"
|
220 |
msgstr ""
|
221 |
|
222 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
223 |
msgid "Pre-order payment captured in Stripe. Payment method: %s"
|
224 |
msgstr ""
|
225 |
|
226 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
227 |
msgid "Pre-order payment authorized in Stripe. Payment method: %s"
|
228 |
msgstr ""
|
229 |
|
230 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
231 |
msgid "Cannot process payment"
|
232 |
msgstr ""
|
233 |
|
234 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
235 |
msgid "Increase your conversion rate by offering %1$s on your Product and Cart pages, or at the top of the checkout page. <br/><strong>Note:</strong> you can control which products display %s by going to the product edit page."
|
236 |
msgstr ""
|
237 |
|
238 |
-
#: includes/abstract/abstract-wc-payment-token-stripe.php:167
|
239 |
-
#: includes/abstract/abstract-wc-payment-token-stripe.php:173
|
240 |
-
msgid "Error deleting Stripe card. Token Id: %s"
|
241 |
-
msgstr ""
|
242 |
-
|
243 |
#: includes/abstract/abstract-wc-stripe-payment.php:103
|
244 |
msgid "Transaction Id cannot be empty."
|
245 |
msgstr ""
|
@@ -474,6 +469,10 @@ msgstr ""
|
|
474 |
msgid "Above add to cart"
|
475 |
msgstr ""
|
476 |
|
|
|
|
|
|
|
|
|
477 |
#: includes/admin/meta-boxes/views/html-product-data.php:59
|
478 |
msgid "Save"
|
479 |
msgstr ""
|
@@ -639,7 +638,7 @@ msgstr ""
|
|
639 |
msgid "Your payment is being processed and your order status will be updated once the funds are received."
|
640 |
msgstr ""
|
641 |
|
642 |
-
#: includes/class-wc-stripe-frontend-scripts.php:
|
643 |
msgid "No matches found"
|
644 |
msgstr ""
|
645 |
|
@@ -671,11 +670,11 @@ msgstr ""
|
|
671 |
msgid "Quantity must be greater than zero."
|
672 |
msgstr ""
|
673 |
|
674 |
-
#: includes/controllers/class-wc-stripe-controller-checkout.php:
|
675 |
msgid "Some required fields were missing. Please click %shere%s to complete your payment."
|
676 |
msgstr ""
|
677 |
|
678 |
-
#: includes/controllers/class-wc-stripe-controller-checkout.php:
|
679 |
msgid "Please review your order details then click Place Order."
|
680 |
msgstr ""
|
681 |
|
@@ -771,17 +770,17 @@ msgid "Bank Payment"
|
|
771 |
msgstr ""
|
772 |
|
773 |
#: includes/gateways/class-wc-payment-gateway-stripe-ach-v2.php:126
|
774 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-ach.php:
|
775 |
msgid "Saved Banks"
|
776 |
msgstr ""
|
777 |
|
778 |
#: includes/gateways/class-wc-payment-gateway-stripe-ach-v2.php:130
|
779 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-ach.php:
|
780 |
msgid "New Bank"
|
781 |
msgstr ""
|
782 |
|
783 |
#: includes/gateways/class-wc-payment-gateway-stripe-ach-v2.php:171
|
784 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-ach.php:
|
785 |
msgid "You must set the API mode to live in order to enable the Plaid development environment."
|
786 |
msgstr ""
|
787 |
|
@@ -843,7 +842,6 @@ msgstr ""
|
|
843 |
#: includes/gateways/class-wc-payment-gateway-stripe-eps.php:24
|
844 |
#: includes/gateways/class-wc-payment-gateway-stripe-eps.php:27
|
845 |
#: includes/gateways/class-wc-payment-gateway-stripe-eps.php:30
|
846 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-multibanco.php:27
|
847 |
msgid "EPS"
|
848 |
msgstr ""
|
849 |
|
@@ -982,6 +980,7 @@ msgid "Your purchase is not approved."
|
|
982 |
msgstr ""
|
983 |
|
984 |
#: includes/gateways/class-wc-payment-gateway-stripe-multibanco.php:24
|
|
|
985 |
#: includes/gateways/class-wc-payment-gateway-stripe-multibanco.php:30
|
986 |
msgid "Multibanco"
|
987 |
msgstr ""
|
@@ -1546,45 +1545,45 @@ msgstr ""
|
|
1546 |
msgid "The height of the button. Max height is 64"
|
1547 |
msgstr ""
|
1548 |
|
1549 |
-
#: includes/tokens/class-wc-payment-token-stripe-ach.php:
|
1550 |
-
#: includes/tokens/class-wc-payment-token-stripe-ach.php:
|
1551 |
-
#: includes/tokens/class-wc-payment-token-stripe-cc.php:
|
1552 |
msgid "Type Ending In"
|
1553 |
msgstr ""
|
1554 |
|
1555 |
-
#: includes/tokens/class-wc-payment-token-stripe-ach.php:
|
1556 |
msgid "{bank_name} ending in {last4}"
|
1557 |
msgstr ""
|
1558 |
|
1559 |
-
#: includes/tokens/class-wc-payment-token-stripe-ach.php:
|
1560 |
msgid "{bank_name} **** {last4}"
|
1561 |
msgstr ""
|
1562 |
|
1563 |
-
#: includes/tokens/class-wc-payment-token-stripe-cc.php:
|
1564 |
msgid "{brand} ending in {last4}"
|
1565 |
msgstr ""
|
1566 |
|
1567 |
-
#: includes/tokens/class-wc-payment-token-stripe-cc.php:
|
1568 |
msgid "Type Masked Number"
|
1569 |
msgstr ""
|
1570 |
|
1571 |
-
#: includes/tokens/class-wc-payment-token-stripe-cc.php:
|
1572 |
msgid "Type Dash Masked Number"
|
1573 |
msgstr ""
|
1574 |
|
1575 |
-
#: includes/tokens/class-wc-payment-token-stripe-cc.php:
|
1576 |
msgid "Type Last 4"
|
1577 |
msgstr ""
|
1578 |
|
1579 |
-
#: includes/tokens/class-wc-payment-token-stripe-cc.php:
|
1580 |
msgid "Type Dash & Last 4"
|
1581 |
msgstr ""
|
1582 |
|
1583 |
-
#: includes/tokens/class-wc-payment-token-stripe-cc.php:
|
1584 |
msgid "Last Four"
|
1585 |
msgstr ""
|
1586 |
|
1587 |
-
#: includes/tokens/class-wc-payment-token-stripe-cc.php:
|
1588 |
msgid "Card Type"
|
1589 |
msgstr ""
|
1590 |
|
@@ -1592,6 +1591,10 @@ msgstr ""
|
|
1592 |
msgid "Gateway Title"
|
1593 |
msgstr ""
|
1594 |
|
|
|
|
|
|
|
|
|
1595 |
#: includes/updates/update-3.1.0.php:31
|
1596 |
#: includes/updates/update-3.1.0.php:60
|
1597 |
msgid "Stripe For WooCommerce Update"
|
@@ -1613,218 +1616,218 @@ msgstr ""
|
|
1613 |
msgid "Kind Regards,"
|
1614 |
msgstr ""
|
1615 |
|
1616 |
-
#: includes/wc-stripe-functions.php:
|
1617 |
msgid "Bootstrap form"
|
1618 |
msgstr ""
|
1619 |
|
1620 |
-
#: includes/wc-stripe-functions.php:
|
1621 |
msgid "Simple form"
|
1622 |
msgstr ""
|
1623 |
|
1624 |
-
#: includes/wc-stripe-functions.php:
|
1625 |
msgid "Minimalist form"
|
1626 |
msgstr ""
|
1627 |
|
1628 |
-
#: includes/wc-stripe-functions.php:
|
1629 |
msgid "Inline Form"
|
1630 |
msgstr ""
|
1631 |
|
1632 |
-
#: includes/wc-stripe-functions.php:
|
1633 |
msgid "Rounded Form"
|
1634 |
msgstr ""
|
1635 |
|
1636 |
-
#: includes/wc-stripe-functions.php:
|
1637 |
msgid "There was an error processing your credit card."
|
1638 |
msgstr ""
|
1639 |
|
1640 |
-
#: includes/wc-stripe-functions.php:
|
1641 |
msgid "Your card number is incomplete."
|
1642 |
msgstr ""
|
1643 |
|
1644 |
-
#: includes/wc-stripe-functions.php:
|
1645 |
msgid "The card number is incorrect. Check the card's number or use a different card."
|
1646 |
msgstr ""
|
1647 |
|
1648 |
-
#: includes/wc-stripe-functions.php:
|
1649 |
msgid "The card's security code is incorrect. Check the card's security code or use a different card."
|
1650 |
msgstr ""
|
1651 |
|
1652 |
-
#: includes/wc-stripe-functions.php:
|
1653 |
msgid "The card's ZIP code is incorrect. Check the card's ZIP code or use a different card."
|
1654 |
msgstr ""
|
1655 |
|
1656 |
-
#: includes/wc-stripe-functions.php:
|
1657 |
-
#: includes/wc-stripe-functions.php:
|
1658 |
msgid "The card number is invalid. Check the card details or use a different card."
|
1659 |
msgstr ""
|
1660 |
|
1661 |
-
#: includes/wc-stripe-functions.php:
|
1662 |
msgid "This value provided to the field contains characters that are unsupported by the field."
|
1663 |
msgstr ""
|
1664 |
|
1665 |
-
#: includes/wc-stripe-functions.php:
|
1666 |
msgid "The card's security code is invalid. Check the card's security code or use a different card."
|
1667 |
msgstr ""
|
1668 |
|
1669 |
-
#: includes/wc-stripe-functions.php:
|
1670 |
msgid "The card's expiration month is incorrect. Check the expiration date or use a different card."
|
1671 |
msgstr ""
|
1672 |
|
1673 |
-
#: includes/wc-stripe-functions.php:
|
1674 |
msgid "The card's expiration year is incorrect. Check the expiration date or use a different card."
|
1675 |
msgstr ""
|
1676 |
|
1677 |
-
#: includes/wc-stripe-functions.php:
|
1678 |
msgid "The card's address is incorrect. Check the card's address or use a different card."
|
1679 |
msgstr ""
|
1680 |
|
1681 |
-
#: includes/wc-stripe-functions.php:
|
1682 |
msgid "The card has expired. Check the expiration date or use a different card."
|
1683 |
msgstr ""
|
1684 |
|
1685 |
-
#: includes/wc-stripe-functions.php:
|
1686 |
msgid "The card has been declined."
|
1687 |
msgstr ""
|
1688 |
|
1689 |
-
#: includes/wc-stripe-functions.php:
|
1690 |
msgid "Your card's expiration year is in the past."
|
1691 |
msgstr ""
|
1692 |
|
1693 |
-
#: includes/wc-stripe-functions.php:
|
1694 |
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."
|
1695 |
msgstr ""
|
1696 |
|
1697 |
-
#: includes/wc-stripe-functions.php:
|
1698 |
msgid "The specified amount is greater than the maximum amount allowed. Use a lower amount and try again."
|
1699 |
msgstr ""
|
1700 |
|
1701 |
-
#: includes/wc-stripe-functions.php:
|
1702 |
msgid "The specified amount is less than the minimum amount allowed. Use a higher amount and try again."
|
1703 |
msgstr ""
|
1704 |
|
1705 |
-
#: includes/wc-stripe-functions.php:
|
1706 |
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."
|
1707 |
msgstr ""
|
1708 |
|
1709 |
-
#: includes/wc-stripe-functions.php:
|
1710 |
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."
|
1711 |
msgstr ""
|
1712 |
|
1713 |
-
#: includes/wc-stripe-functions.php:
|
1714 |
msgid "The bank account provided can not be used to charge, either because it is not verified yet or it is not supported."
|
1715 |
msgstr ""
|
1716 |
|
1717 |
-
#: includes/wc-stripe-functions.php:
|
1718 |
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."
|
1719 |
msgstr ""
|
1720 |
|
1721 |
-
#: includes/wc-stripe-functions.php:
|
1722 |
msgid "The bank account provided cannot be used for payouts. A different bank account must be used."
|
1723 |
msgstr ""
|
1724 |
|
1725 |
-
#: includes/wc-stripe-functions.php:
|
1726 |
msgid "Your Connect platform is attempting to share an unverified bank account with a connected account."
|
1727 |
msgstr ""
|
1728 |
|
1729 |
-
#: includes/wc-stripe-functions.php:
|
1730 |
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."
|
1731 |
msgstr ""
|
1732 |
|
1733 |
-
#: includes/wc-stripe-functions.php:
|
1734 |
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."
|
1735 |
msgstr ""
|
1736 |
|
1737 |
-
#: includes/wc-stripe-functions.php:
|
1738 |
msgid "The charge you're attempting to capture has already been captured. Update the request with an uncaptured charge ID."
|
1739 |
msgstr ""
|
1740 |
|
1741 |
-
#: includes/wc-stripe-functions.php:
|
1742 |
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."
|
1743 |
msgstr ""
|
1744 |
|
1745 |
-
#: includes/wc-stripe-functions.php:
|
1746 |
msgid "The charge you're attempting to refund has been charged back. Check the disputes documentation to learn how to respond to the dispute."
|
1747 |
msgstr ""
|
1748 |
|
1749 |
-
#: includes/wc-stripe-functions.php:
|
1750 |
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."
|
1751 |
msgstr ""
|
1752 |
|
1753 |
-
#: includes/wc-stripe-functions.php:
|
1754 |
msgid "The charge cannot be captured as the authorization has expired. Auth and capture charges must be captured within seven days."
|
1755 |
msgstr ""
|
1756 |
|
1757 |
-
#: includes/wc-stripe-functions.php:
|
1758 |
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."
|
1759 |
msgstr ""
|
1760 |
|
1761 |
-
#: includes/wc-stripe-functions.php:
|
1762 |
msgid "The email address is invalid (e.g., not properly formatted). Check that the email address is properly formatted and only includes allowed characters."
|
1763 |
msgstr ""
|
1764 |
|
1765 |
-
#: includes/wc-stripe-functions.php:
|
1766 |
msgid "The idempotency key provided is currently being used in another request. This occurs if your integration is making duplicate requests simultaneously."
|
1767 |
msgstr ""
|
1768 |
|
1769 |
-
#: includes/wc-stripe-functions.php:
|
1770 |
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."
|
1771 |
msgstr ""
|
1772 |
|
1773 |
-
#: includes/wc-stripe-functions.php:
|
1774 |
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."
|
1775 |
msgstr ""
|
1776 |
|
1777 |
-
#: includes/wc-stripe-functions.php:
|
1778 |
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."
|
1779 |
msgstr ""
|
1780 |
|
1781 |
-
#: includes/wc-stripe-functions.php:
|
1782 |
msgid "The ZIP code provided was incorrect."
|
1783 |
msgstr ""
|
1784 |
|
1785 |
-
#: includes/wc-stripe-functions.php:
|
1786 |
msgid "An error occurred while processing the card. Try again later or with a different payment method."
|
1787 |
msgstr ""
|
1788 |
|
1789 |
-
#: includes/wc-stripe-functions.php:
|
1790 |
msgid "The card does not support this type of purchase."
|
1791 |
msgstr ""
|
1792 |
|
1793 |
-
#: includes/wc-stripe-functions.php:1129
|
1794 |
#: includes/wc-stripe-functions.php:1132
|
1795 |
-
#: includes/wc-stripe-functions.php:
|
|
|
1796 |
msgid "The card has been declined for an unknown reason."
|
1797 |
msgstr ""
|
1798 |
|
1799 |
-
#: includes/wc-stripe-functions.php:
|
1800 |
msgid "The customer has exceeded the balance or credit limit available on their card."
|
1801 |
msgstr ""
|
1802 |
|
1803 |
-
#: includes/wc-stripe-functions.php:
|
1804 |
msgid "The card does not support the specified currency."
|
1805 |
msgstr ""
|
1806 |
|
1807 |
-
#: includes/wc-stripe-functions.php:
|
1808 |
msgid "The payment has been declined as Stripe suspects it is fraudulent."
|
1809 |
msgstr ""
|
1810 |
|
1811 |
-
#: includes/wc-stripe-functions.php:
|
1812 |
msgid "The PIN entered is incorrect. "
|
1813 |
msgstr ""
|
1814 |
|
1815 |
-
#: includes/wc-stripe-functions.php:
|
1816 |
msgid "The card has insufficient funds to complete the purchase."
|
1817 |
msgstr ""
|
1818 |
|
1819 |
-
#: includes/wc-stripe-functions.php:
|
1820 |
msgid "Please select a payment method before proceeding."
|
1821 |
msgstr ""
|
1822 |
|
1823 |
-
#: includes/wc-stripe-functions.php:
|
1824 |
msgid "Please enter your IBAN before proceeding."
|
1825 |
msgstr ""
|
1826 |
|
1827 |
-
#: includes/wc-stripe-functions.php:
|
1828 |
msgid "Please select a bank before proceeding"
|
1829 |
msgstr ""
|
1830 |
|
2 |
# This file is distributed under the same license as the Stripe For WooCommerce plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Stripe For WooCommerce 3.1.5\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woo-stripe-payment\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2020-06-21T15:23:09+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"
|
98 |
msgid " & billing country is <strong>%s</strong>"
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:349
|
102 |
#: includes/gateways/class-wc-payment-gateway-stripe-ach.php:114
|
103 |
msgid "Error processing payment. Reason: %s"
|
104 |
msgstr ""
|
105 |
|
106 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:356
|
107 |
msgid "Charge %s is pending. Payment Method: %s. Payment will be completed once charge.succeeded webhook received from Stripe."
|
108 |
msgstr ""
|
109 |
|
110 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:364
|
111 |
msgid "Order %s successful in Stripe. Charge: %s. Payment Method: %s"
|
112 |
msgstr ""
|
113 |
|
114 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:364
|
115 |
msgid "charge"
|
116 |
msgstr ""
|
117 |
|
118 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:364
|
119 |
msgid "authorization"
|
120 |
msgstr ""
|
121 |
|
122 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:407
|
123 |
#: includes/controllers/class-wc-stripe-controller-cart.php:135
|
124 |
#: includes/controllers/class-wc-stripe-controller-cart.php:184
|
125 |
#: includes/controllers/class-wc-stripe-controller-googlepay.php:129
|
127 |
msgid "Total"
|
128 |
msgstr ""
|
129 |
|
130 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:465
|
131 |
msgid "User must be logged in."
|
132 |
msgstr ""
|
133 |
|
134 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:477
|
135 |
msgid "Error saving your payment method. Reason: %s"
|
136 |
msgstr ""
|
137 |
|
138 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:491
|
139 |
msgid "Error saving payment method. Reason: %s"
|
140 |
msgstr ""
|
141 |
|
142 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:508
|
143 |
msgid "Order refunded in Stripe. Amount: %s"
|
144 |
msgstr ""
|
145 |
|
146 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:537
|
147 |
msgid "Order amount captured in Stripe. Amount: %s"
|
148 |
msgstr ""
|
149 |
|
150 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:541
|
151 |
msgid "Error capturing charge in Stripe. Reason: %s"
|
152 |
msgstr ""
|
153 |
|
154 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:561
|
155 |
msgid "Error voiding charge. Reason: %s"
|
156 |
msgstr ""
|
157 |
|
158 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:563
|
159 |
msgid "Charge voided in Stripe."
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:723
|
163 |
msgid "n/a"
|
164 |
msgstr ""
|
165 |
|
166 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:746
|
167 |
#: includes/admin/meta-boxes/views/html-order-pay.php:42
|
168 |
msgid "New Card"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:750
|
172 |
#: includes/admin/meta-boxes/views/html-order-pay.php:30
|
173 |
msgid "Saved Cards"
|
174 |
msgstr ""
|
175 |
|
176 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:911
|
177 |
msgid "Attemp to save payment method failed. Reason: %s"
|
178 |
msgstr ""
|
179 |
|
180 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:931
|
181 |
msgid "We were not able to save your payment method. To prevent billing issues with your subscription, please add a payment method to the subscription."
|
182 |
msgstr ""
|
183 |
|
184 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:933
|
185 |
msgid "We were not able to save your payment method. Reason: %s"
|
186 |
msgstr ""
|
187 |
|
188 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:965
|
189 |
msgid "Payment Method Token"
|
190 |
msgstr ""
|
191 |
|
192 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:984
|
193 |
msgid "Recurring payment for order failed. Reason: %s"
|
194 |
msgstr ""
|
195 |
|
196 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:996
|
197 |
msgid "Recurring payment captured in Stripe. Payment method: %s"
|
198 |
msgstr ""
|
199 |
|
200 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:998
|
201 |
msgid "Recurring payment authorized in Stripe. Payment method: %s"
|
202 |
msgstr ""
|
203 |
|
204 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1001
|
205 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1249
|
206 |
msgid "Customer must manually complete payment for payment method %s"
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1017
|
210 |
msgid "Error saving payment method for subscription. Reason: %s"
|
211 |
msgstr ""
|
212 |
|
213 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1075
|
214 |
#: includes/abstract/abstract-wc-stripe-payment.php:175
|
215 |
msgid "Order %s from %s"
|
216 |
msgstr ""
|
217 |
|
218 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1236
|
219 |
msgid "Pre-order payment for order failed. Reason: %s"
|
220 |
msgstr ""
|
221 |
|
222 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1244
|
223 |
msgid "Pre-order payment captured in Stripe. Payment method: %s"
|
224 |
msgstr ""
|
225 |
|
226 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1246
|
227 |
msgid "Pre-order payment authorized in Stripe. Payment method: %s"
|
228 |
msgstr ""
|
229 |
|
230 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1320
|
231 |
msgid "Cannot process payment"
|
232 |
msgstr ""
|
233 |
|
234 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1328
|
235 |
msgid "Increase your conversion rate by offering %1$s on your Product and Cart pages, or at the top of the checkout page. <br/><strong>Note:</strong> you can control which products display %s by going to the product edit page."
|
236 |
msgstr ""
|
237 |
|
|
|
|
|
|
|
|
|
|
|
238 |
#: includes/abstract/abstract-wc-stripe-payment.php:103
|
239 |
msgid "Transaction Id cannot be empty."
|
240 |
msgstr ""
|
469 |
msgid "Above add to cart"
|
470 |
msgstr ""
|
471 |
|
472 |
+
#: includes/admin/meta-boxes/views/html-product-data.php:54
|
473 |
+
msgid "The location of the payment buttons in relation to the Add to Cart button."
|
474 |
+
msgstr ""
|
475 |
+
|
476 |
#: includes/admin/meta-boxes/views/html-product-data.php:59
|
477 |
msgid "Save"
|
478 |
msgstr ""
|
638 |
msgid "Your payment is being processed and your order status will be updated once the funds are received."
|
639 |
msgstr ""
|
640 |
|
641 |
+
#: includes/class-wc-stripe-frontend-scripts.php:65
|
642 |
msgid "No matches found"
|
643 |
msgstr ""
|
644 |
|
670 |
msgid "Quantity must be greater than zero."
|
671 |
msgstr ""
|
672 |
|
673 |
+
#: includes/controllers/class-wc-stripe-controller-checkout.php:183
|
674 |
msgid "Some required fields were missing. Please click %shere%s to complete your payment."
|
675 |
msgstr ""
|
676 |
|
677 |
+
#: includes/controllers/class-wc-stripe-controller-checkout.php:216
|
678 |
msgid "Please review your order details then click Place Order."
|
679 |
msgstr ""
|
680 |
|
770 |
msgstr ""
|
771 |
|
772 |
#: includes/gateways/class-wc-payment-gateway-stripe-ach-v2.php:126
|
773 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-ach.php:203
|
774 |
msgid "Saved Banks"
|
775 |
msgstr ""
|
776 |
|
777 |
#: includes/gateways/class-wc-payment-gateway-stripe-ach-v2.php:130
|
778 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-ach.php:207
|
779 |
msgid "New Bank"
|
780 |
msgstr ""
|
781 |
|
782 |
#: includes/gateways/class-wc-payment-gateway-stripe-ach-v2.php:171
|
783 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-ach.php:243
|
784 |
msgid "You must set the API mode to live in order to enable the Plaid development environment."
|
785 |
msgstr ""
|
786 |
|
842 |
#: includes/gateways/class-wc-payment-gateway-stripe-eps.php:24
|
843 |
#: includes/gateways/class-wc-payment-gateway-stripe-eps.php:27
|
844 |
#: includes/gateways/class-wc-payment-gateway-stripe-eps.php:30
|
|
|
845 |
msgid "EPS"
|
846 |
msgstr ""
|
847 |
|
980 |
msgstr ""
|
981 |
|
982 |
#: includes/gateways/class-wc-payment-gateway-stripe-multibanco.php:24
|
983 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-multibanco.php:27
|
984 |
#: includes/gateways/class-wc-payment-gateway-stripe-multibanco.php:30
|
985 |
msgid "Multibanco"
|
986 |
msgstr ""
|
1545 |
msgid "The height of the button. Max height is 64"
|
1546 |
msgstr ""
|
1547 |
|
1548 |
+
#: includes/tokens/class-wc-payment-token-stripe-ach.php:68
|
1549 |
+
#: includes/tokens/class-wc-payment-token-stripe-ach.php:73
|
1550 |
+
#: includes/tokens/class-wc-payment-token-stripe-cc.php:86
|
1551 |
msgid "Type Ending In"
|
1552 |
msgstr ""
|
1553 |
|
1554 |
+
#: includes/tokens/class-wc-payment-token-stripe-ach.php:70
|
1555 |
msgid "{bank_name} ending in {last4}"
|
1556 |
msgstr ""
|
1557 |
|
1558 |
+
#: includes/tokens/class-wc-payment-token-stripe-ach.php:75
|
1559 |
msgid "{bank_name} **** {last4}"
|
1560 |
msgstr ""
|
1561 |
|
1562 |
+
#: includes/tokens/class-wc-payment-token-stripe-cc.php:88
|
1563 |
msgid "{brand} ending in {last4}"
|
1564 |
msgstr ""
|
1565 |
|
1566 |
+
#: includes/tokens/class-wc-payment-token-stripe-cc.php:91
|
1567 |
msgid "Type Masked Number"
|
1568 |
msgstr ""
|
1569 |
|
1570 |
+
#: includes/tokens/class-wc-payment-token-stripe-cc.php:96
|
1571 |
msgid "Type Dash Masked Number"
|
1572 |
msgstr ""
|
1573 |
|
1574 |
+
#: includes/tokens/class-wc-payment-token-stripe-cc.php:101
|
1575 |
msgid "Type Last 4"
|
1576 |
msgstr ""
|
1577 |
|
1578 |
+
#: includes/tokens/class-wc-payment-token-stripe-cc.php:106
|
1579 |
msgid "Type Dash & Last 4"
|
1580 |
msgstr ""
|
1581 |
|
1582 |
+
#: includes/tokens/class-wc-payment-token-stripe-cc.php:111
|
1583 |
msgid "Last Four"
|
1584 |
msgstr ""
|
1585 |
|
1586 |
+
#: includes/tokens/class-wc-payment-token-stripe-cc.php:116
|
1587 |
msgid "Card Type"
|
1588 |
msgstr ""
|
1589 |
|
1591 |
msgid "Gateway Title"
|
1592 |
msgstr ""
|
1593 |
|
1594 |
+
#: includes/traits/wc-stripe-payment-token-traits.php:25
|
1595 |
+
msgid "Error deleting Stripe card. Token Id: %s"
|
1596 |
+
msgstr ""
|
1597 |
+
|
1598 |
#: includes/updates/update-3.1.0.php:31
|
1599 |
#: includes/updates/update-3.1.0.php:60
|
1600 |
msgid "Stripe For WooCommerce Update"
|
1616 |
msgid "Kind Regards,"
|
1617 |
msgstr ""
|
1618 |
|
1619 |
+
#: includes/wc-stripe-functions.php:747
|
1620 |
msgid "Bootstrap form"
|
1621 |
msgstr ""
|
1622 |
|
1623 |
+
#: includes/wc-stripe-functions.php:781
|
1624 |
msgid "Simple form"
|
1625 |
msgstr ""
|
1626 |
|
1627 |
+
#: includes/wc-stripe-functions.php:814
|
1628 |
msgid "Minimalist form"
|
1629 |
msgstr ""
|
1630 |
|
1631 |
+
#: includes/wc-stripe-functions.php:848
|
1632 |
msgid "Inline Form"
|
1633 |
msgstr ""
|
1634 |
|
1635 |
+
#: includes/wc-stripe-functions.php:884
|
1636 |
msgid "Rounded Form"
|
1637 |
msgstr ""
|
1638 |
|
1639 |
+
#: includes/wc-stripe-functions.php:1092
|
1640 |
msgid "There was an error processing your credit card."
|
1641 |
msgstr ""
|
1642 |
|
1643 |
+
#: includes/wc-stripe-functions.php:1093
|
1644 |
msgid "Your card number is incomplete."
|
1645 |
msgstr ""
|
1646 |
|
1647 |
+
#: includes/wc-stripe-functions.php:1094
|
1648 |
msgid "The card number is incorrect. Check the card's number or use a different card."
|
1649 |
msgstr ""
|
1650 |
|
1651 |
+
#: includes/wc-stripe-functions.php:1095
|
1652 |
msgid "The card's security code is incorrect. Check the card's security code or use a different card."
|
1653 |
msgstr ""
|
1654 |
|
1655 |
+
#: includes/wc-stripe-functions.php:1096
|
1656 |
msgid "The card's ZIP code is incorrect. Check the card's ZIP code or use a different card."
|
1657 |
msgstr ""
|
1658 |
|
1659 |
+
#: includes/wc-stripe-functions.php:1097
|
1660 |
+
#: includes/wc-stripe-functions.php:1102
|
1661 |
msgid "The card number is invalid. Check the card details or use a different card."
|
1662 |
msgstr ""
|
1663 |
|
1664 |
+
#: includes/wc-stripe-functions.php:1098
|
1665 |
msgid "This value provided to the field contains characters that are unsupported by the field."
|
1666 |
msgstr ""
|
1667 |
|
1668 |
+
#: includes/wc-stripe-functions.php:1099
|
1669 |
msgid "The card's security code is invalid. Check the card's security code or use a different card."
|
1670 |
msgstr ""
|
1671 |
|
1672 |
+
#: includes/wc-stripe-functions.php:1100
|
1673 |
msgid "The card's expiration month is incorrect. Check the expiration date or use a different card."
|
1674 |
msgstr ""
|
1675 |
|
1676 |
+
#: includes/wc-stripe-functions.php:1101
|
1677 |
msgid "The card's expiration year is incorrect. Check the expiration date or use a different card."
|
1678 |
msgstr ""
|
1679 |
|
1680 |
+
#: includes/wc-stripe-functions.php:1103
|
1681 |
msgid "The card's address is incorrect. Check the card's address or use a different card."
|
1682 |
msgstr ""
|
1683 |
|
1684 |
+
#: includes/wc-stripe-functions.php:1104
|
1685 |
msgid "The card has expired. Check the expiration date or use a different card."
|
1686 |
msgstr ""
|
1687 |
|
1688 |
+
#: includes/wc-stripe-functions.php:1105
|
1689 |
msgid "The card has been declined."
|
1690 |
msgstr ""
|
1691 |
|
1692 |
+
#: includes/wc-stripe-functions.php:1106
|
1693 |
msgid "Your card's expiration year is in the past."
|
1694 |
msgstr ""
|
1695 |
|
1696 |
+
#: includes/wc-stripe-functions.php:1107
|
1697 |
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."
|
1698 |
msgstr ""
|
1699 |
|
1700 |
+
#: includes/wc-stripe-functions.php:1108
|
1701 |
msgid "The specified amount is greater than the maximum amount allowed. Use a lower amount and try again."
|
1702 |
msgstr ""
|
1703 |
|
1704 |
+
#: includes/wc-stripe-functions.php:1109
|
1705 |
msgid "The specified amount is less than the minimum amount allowed. Use a higher amount and try again."
|
1706 |
msgstr ""
|
1707 |
|
1708 |
+
#: includes/wc-stripe-functions.php:1110
|
1709 |
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."
|
1710 |
msgstr ""
|
1711 |
|
1712 |
+
#: includes/wc-stripe-functions.php:1111
|
1713 |
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."
|
1714 |
msgstr ""
|
1715 |
|
1716 |
+
#: includes/wc-stripe-functions.php:1112
|
1717 |
msgid "The bank account provided can not be used to charge, either because it is not verified yet or it is not supported."
|
1718 |
msgstr ""
|
1719 |
|
1720 |
+
#: includes/wc-stripe-functions.php:1113
|
1721 |
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."
|
1722 |
msgstr ""
|
1723 |
|
1724 |
+
#: includes/wc-stripe-functions.php:1114
|
1725 |
msgid "The bank account provided cannot be used for payouts. A different bank account must be used."
|
1726 |
msgstr ""
|
1727 |
|
1728 |
+
#: includes/wc-stripe-functions.php:1115
|
1729 |
msgid "Your Connect platform is attempting to share an unverified bank account with a connected account."
|
1730 |
msgstr ""
|
1731 |
|
1732 |
+
#: includes/wc-stripe-functions.php:1116
|
1733 |
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."
|
1734 |
msgstr ""
|
1735 |
|
1736 |
+
#: includes/wc-stripe-functions.php:1117
|
1737 |
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."
|
1738 |
msgstr ""
|
1739 |
|
1740 |
+
#: includes/wc-stripe-functions.php:1118
|
1741 |
msgid "The charge you're attempting to capture has already been captured. Update the request with an uncaptured charge ID."
|
1742 |
msgstr ""
|
1743 |
|
1744 |
+
#: includes/wc-stripe-functions.php:1119
|
1745 |
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."
|
1746 |
msgstr ""
|
1747 |
|
1748 |
+
#: includes/wc-stripe-functions.php:1120
|
1749 |
msgid "The charge you're attempting to refund has been charged back. Check the disputes documentation to learn how to respond to the dispute."
|
1750 |
msgstr ""
|
1751 |
|
1752 |
+
#: includes/wc-stripe-functions.php:1121
|
1753 |
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."
|
1754 |
msgstr ""
|
1755 |
|
1756 |
+
#: includes/wc-stripe-functions.php:1122
|
1757 |
msgid "The charge cannot be captured as the authorization has expired. Auth and capture charges must be captured within seven days."
|
1758 |
msgstr ""
|
1759 |
|
1760 |
+
#: includes/wc-stripe-functions.php:1123
|
1761 |
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."
|
1762 |
msgstr ""
|
1763 |
|
1764 |
+
#: includes/wc-stripe-functions.php:1124
|
1765 |
msgid "The email address is invalid (e.g., not properly formatted). Check that the email address is properly formatted and only includes allowed characters."
|
1766 |
msgstr ""
|
1767 |
|
1768 |
+
#: includes/wc-stripe-functions.php:1125
|
1769 |
msgid "The idempotency key provided is currently being used in another request. This occurs if your integration is making duplicate requests simultaneously."
|
1770 |
msgstr ""
|
1771 |
|
1772 |
+
#: includes/wc-stripe-functions.php:1126
|
1773 |
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."
|
1774 |
msgstr ""
|
1775 |
|
1776 |
+
#: includes/wc-stripe-functions.php:1127
|
1777 |
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."
|
1778 |
msgstr ""
|
1779 |
|
1780 |
+
#: includes/wc-stripe-functions.php:1128
|
1781 |
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."
|
1782 |
msgstr ""
|
1783 |
|
1784 |
+
#: includes/wc-stripe-functions.php:1129
|
1785 |
msgid "The ZIP code provided was incorrect."
|
1786 |
msgstr ""
|
1787 |
|
1788 |
+
#: includes/wc-stripe-functions.php:1130
|
1789 |
msgid "An error occurred while processing the card. Try again later or with a different payment method."
|
1790 |
msgstr ""
|
1791 |
|
1792 |
+
#: includes/wc-stripe-functions.php:1131
|
1793 |
msgid "The card does not support this type of purchase."
|
1794 |
msgstr ""
|
1795 |
|
|
|
1796 |
#: includes/wc-stripe-functions.php:1132
|
1797 |
+
#: includes/wc-stripe-functions.php:1135
|
1798 |
+
#: includes/wc-stripe-functions.php:1137
|
1799 |
msgid "The card has been declined for an unknown reason."
|
1800 |
msgstr ""
|
1801 |
|
1802 |
+
#: includes/wc-stripe-functions.php:1133
|
1803 |
msgid "The customer has exceeded the balance or credit limit available on their card."
|
1804 |
msgstr ""
|
1805 |
|
1806 |
+
#: includes/wc-stripe-functions.php:1134
|
1807 |
msgid "The card does not support the specified currency."
|
1808 |
msgstr ""
|
1809 |
|
1810 |
+
#: includes/wc-stripe-functions.php:1136
|
1811 |
msgid "The payment has been declined as Stripe suspects it is fraudulent."
|
1812 |
msgstr ""
|
1813 |
|
1814 |
+
#: includes/wc-stripe-functions.php:1138
|
1815 |
msgid "The PIN entered is incorrect. "
|
1816 |
msgstr ""
|
1817 |
|
1818 |
+
#: includes/wc-stripe-functions.php:1139
|
1819 |
msgid "The card has insufficient funds to complete the purchase."
|
1820 |
msgstr ""
|
1821 |
|
1822 |
+
#: includes/wc-stripe-functions.php:1140
|
1823 |
msgid "Please select a payment method before proceeding."
|
1824 |
msgstr ""
|
1825 |
|
1826 |
+
#: includes/wc-stripe-functions.php:1141
|
1827 |
msgid "Please enter your IBAN before proceeding."
|
1828 |
msgstr ""
|
1829 |
|
1830 |
+
#: includes/wc-stripe-functions.php:1142
|
1831 |
msgid "Please select a bank before proceeding"
|
1832 |
msgstr ""
|
1833 |
|
includes/abstract/abstract-wc-payment-gateway-stripe.php
CHANGED
@@ -229,7 +229,7 @@ abstract class WC_Payment_Gateway_Stripe extends WC_Payment_Gateway {
|
|
229 |
*/
|
230 |
public function product_fields() {
|
231 |
global $product;
|
232 |
-
$this->enqueue_frontend_scripts ();
|
233 |
wc_stripe_token_field ( $this );
|
234 |
wc_stripe_get_template ( 'product/' . $this->template_name, array(
|
235 |
'gateway' => $this, 'product' => $product
|
@@ -237,7 +237,7 @@ abstract class WC_Payment_Gateway_Stripe extends WC_Payment_Gateway {
|
|
237 |
}
|
238 |
|
239 |
public function cart_fields() {
|
240 |
-
$this->enqueue_frontend_scripts ();
|
241 |
wc_stripe_token_field ( $this );
|
242 |
wc_stripe_get_template ( 'cart/' . $this->template_name, array(
|
243 |
'gateway' => $this
|
@@ -249,19 +249,31 @@ abstract class WC_Payment_Gateway_Stripe extends WC_Payment_Gateway {
|
|
249 |
*
|
250 |
* @param WC_Stripe_Frontend_Scripts $scripts
|
251 |
*/
|
252 |
-
public function enqueue_frontend_scripts() {
|
253 |
global $wp;
|
254 |
-
if (
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
}
|
266 |
if (! empty ( wc_stripe ()->scripts ()->enqueued_scripts )) {
|
267 |
wc_stripe ()->scripts ()->enqueue_script ( 'form-handler' );
|
@@ -804,6 +816,10 @@ abstract class WC_Payment_Gateway_Stripe extends WC_Payment_Gateway {
|
|
804 |
return false;
|
805 |
}
|
806 |
}
|
|
|
|
|
|
|
|
|
807 |
return is_user_logged_in () && is_checkout () && $this->is_active ( 'save_card_enabled' );
|
808 |
}
|
809 |
|
229 |
*/
|
230 |
public function product_fields() {
|
231 |
global $product;
|
232 |
+
$this->enqueue_frontend_scripts ( 'product' );
|
233 |
wc_stripe_token_field ( $this );
|
234 |
wc_stripe_get_template ( 'product/' . $this->template_name, array(
|
235 |
'gateway' => $this, 'product' => $product
|
237 |
}
|
238 |
|
239 |
public function cart_fields() {
|
240 |
+
$this->enqueue_frontend_scripts ( 'cart' );
|
241 |
wc_stripe_token_field ( $this );
|
242 |
wc_stripe_get_template ( 'cart/' . $this->template_name, array(
|
243 |
'gateway' => $this
|
249 |
*
|
250 |
* @param WC_Stripe_Frontend_Scripts $scripts
|
251 |
*/
|
252 |
+
public function enqueue_frontend_scripts($page = '') {
|
253 |
global $wp;
|
254 |
+
if ($page) {
|
255 |
+
if ('product' === $page) {
|
256 |
+
$this->enqueue_product_scripts ( wc_stripe ()->scripts () );
|
257 |
+
} elseif ('cart' === $page) {
|
258 |
+
$this->enqueue_cart_scripts ( wc_stripe ()->scripts () );
|
259 |
+
} elseif ('checkout' === $page) {
|
260 |
+
$this->enqueue_checkout_scripts ( wc_stripe ()->scripts () );
|
261 |
+
} else {
|
262 |
+
$this->enqueue_frontend_scripts ();
|
263 |
+
}
|
264 |
+
} else {
|
265 |
+
if (is_add_payment_method_page ()) {
|
266 |
+
$this->enqueue_add_payment_method_scripts ( wc_stripe ()->scripts () );
|
267 |
+
}
|
268 |
+
if (is_checkout ()) {
|
269 |
+
$this->enqueue_checkout_scripts ( wc_stripe ()->scripts () );
|
270 |
+
}
|
271 |
+
if (is_cart ()) {
|
272 |
+
$this->enqueue_cart_scripts ( wc_stripe ()->scripts () );
|
273 |
+
}
|
274 |
+
if (is_product ()) {
|
275 |
+
$this->enqueue_product_scripts ( wc_stripe ()->scripts () );
|
276 |
+
}
|
277 |
}
|
278 |
if (! empty ( wc_stripe ()->scripts ()->enqueued_scripts )) {
|
279 |
wc_stripe ()->scripts ()->enqueue_script ( 'form-handler' );
|
816 |
return false;
|
817 |
}
|
818 |
}
|
819 |
+
// @since 3.1.5
|
820 |
+
if (wc_stripe_pre_orders_active () && WC_Pre_Orders_Cart::cart_contains_pre_order ()) {
|
821 |
+
return ! WC_Pre_Orders_Product::product_is_charged_upon_release ( WC_Pre_Orders_Cart::get_pre_order_product () );
|
822 |
+
}
|
823 |
return is_user_logged_in () && is_checkout () && $this->is_active ( 'save_card_enabled' );
|
824 |
}
|
825 |
|
includes/abstract/abstract-wc-payment-token-stripe.php
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
<?php
|
2 |
defined ( 'ABSPATH' ) || exit ();
|
3 |
|
|
|
|
|
4 |
/**
|
5 |
*
|
6 |
* @since 3.0.0
|
@@ -155,48 +157,13 @@ abstract class WC_Payment_Token_Stripe extends WC_Payment_Token {
|
|
155 |
*
|
156 |
* @since 3.1.0
|
157 |
*/
|
158 |
-
public function delete_from_stripe()
|
159 |
-
$customer_id = wc_stripe_get_customer_id ( $this->get_user_id (), $this->get_environment () );
|
160 |
-
$gateway = WC_Stripe_Gateway::load ();
|
161 |
-
|
162 |
-
if ('payment_method' == $this->stripe_payment_type) {
|
163 |
-
try {
|
164 |
-
$payment_method = $gateway->fetch_payment_method ( $this->get_token () );
|
165 |
-
$gateway->delete_payment_method ( $payment_method );
|
166 |
-
} catch ( \Stripe\Error\Base $e ) {
|
167 |
-
wc_stripe_log_error ( sprintf ( __ ( 'Error deleting Stripe card. Token Id: %s', 'woo-stripe-payment' ), $this->get_token () ) );
|
168 |
-
}
|
169 |
-
} elseif ('source' == $this->stripe_payment_type) {
|
170 |
-
try {
|
171 |
-
$gateway->delete_card ( $this->get_token (), $customer_id, $this->get_environment () );
|
172 |
-
} catch ( \Stripe\Error\Base $e ) {
|
173 |
-
wc_stripe_log_error ( sprintf ( __ ( 'Error deleting Stripe card. Token Id: %s', 'woo-stripe-payment' ), $this->get_token () ) );
|
174 |
-
}
|
175 |
-
}
|
176 |
-
}
|
177 |
|
178 |
/**
|
179 |
*
|
180 |
* @since 3.1.0
|
181 |
*/
|
182 |
-
public function save_payment_method()
|
183 |
-
$gateway = WC_Stripe_Gateway::load ();
|
184 |
-
|
185 |
-
if ('payment_method' == $this->stripe_payment_type) {
|
186 |
-
|
187 |
-
$payment_method = $gateway->fetch_payment_method ( $this->get_token () );
|
188 |
-
|
189 |
-
if (is_wp_error ( $payment_method )) {
|
190 |
-
return $payment_method;
|
191 |
-
}
|
192 |
-
|
193 |
-
return $gateway->attach_payment_method ( $payment_method, [
|
194 |
-
'customer' => $this->get_customer_id ()
|
195 |
-
] );
|
196 |
-
} elseif ('source' == $this->stripe_payment_type) {
|
197 |
-
return $gateway->create_customer_source ( $this->get_customer_id (), $this->get_token () );
|
198 |
-
}
|
199 |
-
}
|
200 |
|
201 |
public static function token_exists($token_id, $user_id) {
|
202 |
global $wpdb;
|
1 |
<?php
|
2 |
defined ( 'ABSPATH' ) || exit ();
|
3 |
|
4 |
+
require_once ( WC_STRIPE_PLUGIN_FILE_PATH . 'includes/traits/wc-stripe-payment-token-traits.php' );
|
5 |
+
|
6 |
/**
|
7 |
*
|
8 |
* @since 3.0.0
|
157 |
*
|
158 |
* @since 3.1.0
|
159 |
*/
|
160 |
+
public abstract function delete_from_stripe();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
|
162 |
/**
|
163 |
*
|
164 |
* @since 3.1.0
|
165 |
*/
|
166 |
+
public abstract function save_payment_method();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
|
168 |
public static function token_exists($token_id, $user_id) {
|
169 |
global $wpdb;
|
includes/abstract/abstract-wc-stripe-rest-controller.php
CHANGED
@@ -34,11 +34,11 @@ abstract class WC_Stripe_Rest_Controller {
|
|
34 |
abstract public function register_routes();
|
35 |
|
36 |
public function rest_uri($uri = '') {
|
37 |
-
$rest_uri = wc_stripe ()->rest_api->rest_uri () . ( ! empty ( $this->namespace ) ?
|
38 |
if ($uri) {
|
39 |
$rest_uri = trailingslashit ( $rest_uri ) . $uri;
|
40 |
}
|
41 |
-
return $rest_uri;
|
42 |
}
|
43 |
|
44 |
public function rest_url($uri = '') {
|
34 |
abstract public function register_routes();
|
35 |
|
36 |
public function rest_uri($uri = '') {
|
37 |
+
$rest_uri = wc_stripe ()->rest_api->rest_uri () . ( ! empty ( $this->namespace ) ? $this->namespace : '' );
|
38 |
if ($uri) {
|
39 |
$rest_uri = trailingslashit ( $rest_uri ) . $uri;
|
40 |
}
|
41 |
+
return trim ( $rest_uri, '/' );
|
42 |
}
|
43 |
|
44 |
public function rest_url($uri = '') {
|
includes/admin/meta-boxes/views/html-product-data.php
CHANGED
@@ -51,7 +51,7 @@
|
|
51 |
'top' => __ ( 'Above add to cart', 'woo-stripe-payment' )
|
52 |
],
|
53 |
'desc_tip' => true,
|
54 |
-
'description' => __('The location of the payment buttons in relation to the Add to Cart button.', '
|
55 |
] );
|
56 |
?>
|
57 |
</div>
|
51 |
'top' => __ ( 'Above add to cart', 'woo-stripe-payment' )
|
52 |
],
|
53 |
'desc_tip' => true,
|
54 |
+
'description' => __('The location of the payment buttons in relation to the Add to Cart button.', 'woo-stripe-payment')
|
55 |
] );
|
56 |
?>
|
57 |
</div>
|
includes/class-stripe.php
CHANGED
@@ -24,7 +24,7 @@ class WC_Stripe_Manager {
|
|
24 |
*
|
25 |
* @var string
|
26 |
*/
|
27 |
-
public $version = '3.1.
|
28 |
|
29 |
/**
|
30 |
*
|
24 |
*
|
25 |
* @var string
|
26 |
*/
|
27 |
+
public $version = '3.1.5';
|
28 |
|
29 |
/**
|
30 |
*
|
includes/class-wc-stripe-frontend-scripts.php
CHANGED
@@ -47,7 +47,8 @@ class WC_Stripe_Frontend_Scripts {
|
|
47 |
|
48 |
// register scripts that aren't part of gateways
|
49 |
$this->register_script ( 'wc-stripe', $this->assets_url ( 'js/frontend/wc-stripe' . $this->get_min () . '.js' ), [
|
50 |
-
'jquery', $this->get_handle ( 'external' )
|
|
|
51 |
] );
|
52 |
|
53 |
$this->register_script ( 'form-handler', $this->assets_url ( 'js/frontend/form-handler.js' ), [
|
47 |
|
48 |
// register scripts that aren't part of gateways
|
49 |
$this->register_script ( 'wc-stripe', $this->assets_url ( 'js/frontend/wc-stripe' . $this->get_min () . '.js' ), [
|
50 |
+
'jquery', $this->get_handle ( 'external' ),
|
51 |
+
'woocommerce'
|
52 |
] );
|
53 |
|
54 |
$this->register_script ( 'form-handler', $this->assets_url ( 'js/frontend/form-handler.js' ), [
|
includes/controllers/class-wc-stripe-controller-cart.php
CHANGED
@@ -12,7 +12,7 @@ class WC_Stripe_Controller_Cart extends WC_Stripe_Rest_Controller {
|
|
12 |
|
13 |
use WC_Stripe_Controller_Cart_Trait;
|
14 |
|
15 |
-
protected $namespace = 'cart
|
16 |
|
17 |
public function register_routes() {
|
18 |
register_rest_route ( $this->rest_uri (), 'shipping-method', [
|
12 |
|
13 |
use WC_Stripe_Controller_Cart_Trait;
|
14 |
|
15 |
+
protected $namespace = 'cart';
|
16 |
|
17 |
public function register_routes() {
|
18 |
register_rest_route ( $this->rest_uri (), 'shipping-method', [
|
includes/controllers/class-wc-stripe-controller-checkout.php
CHANGED
@@ -75,9 +75,8 @@ class WC_Stripe_Controller_Checkout extends WC_Stripe_Rest_Controller {
|
|
75 |
return add_query_arg ( 'wc_stripe_product_checkout', $order->get_payment_method (), $url );
|
76 |
}, 10, 2 );
|
77 |
|
78 |
-
// $option = new WC_Stripe_Product_Gateway_Option ( wc_get_product ( $request->get_param ( 'product_id' ) ), $gateway );
|
79 |
$option = new WC_Stripe_Product_Gateway_Option ( current ( WC ()->cart->get_cart () )[ 'data' ], $gateway );
|
80 |
-
$gateway->
|
81 |
}
|
82 |
$checkout->process_checkout ();
|
83 |
} catch ( Exception $e ) {
|
75 |
return add_query_arg ( 'wc_stripe_product_checkout', $order->get_payment_method (), $url );
|
76 |
}, 10, 2 );
|
77 |
|
|
|
78 |
$option = new WC_Stripe_Product_Gateway_Option ( current ( WC ()->cart->get_cart () )[ 'data' ], $gateway );
|
79 |
+
$gateway->settings[ 'charge_type' ] = $option->get_option ( 'charge_type' );
|
80 |
}
|
81 |
$checkout->process_checkout ();
|
82 |
} catch ( Exception $e ) {
|
includes/controllers/class-wc-stripe-controller-gateway-settings.php
CHANGED
@@ -9,7 +9,7 @@ defined ( 'ABSPATH' ) || exit ();
|
|
9 |
*/
|
10 |
class WC_Stripe_Controller_Gateway_Settings extends WC_Stripe_Rest_Controller {
|
11 |
|
12 |
-
protected $namespace = 'gateway-settings
|
13 |
|
14 |
public function register_routes() {
|
15 |
register_rest_route ( $this->rest_uri (), 'apple-domain', [
|
9 |
*/
|
10 |
class WC_Stripe_Controller_Gateway_Settings extends WC_Stripe_Rest_Controller {
|
11 |
|
12 |
+
protected $namespace = 'gateway-settings';
|
13 |
|
14 |
public function register_routes() {
|
15 |
register_rest_route ( $this->rest_uri (), 'apple-domain', [
|
includes/controllers/class-wc-stripe-controller-googlepay.php
CHANGED
@@ -13,7 +13,7 @@ class WC_Stripe_Controller_GooglePay extends WC_Stripe_Rest_Controller {
|
|
13 |
|
14 |
use WC_Stripe_Controller_Cart_Trait;
|
15 |
|
16 |
-
protected $namespace = 'googlepay
|
17 |
|
18 |
/**
|
19 |
*
|
13 |
|
14 |
use WC_Stripe_Controller_Cart_Trait;
|
15 |
|
16 |
+
protected $namespace = 'googlepay';
|
17 |
|
18 |
/**
|
19 |
*
|
includes/controllers/class-wc-stripe-controller-order-actions.php
CHANGED
@@ -9,7 +9,7 @@ defined ( 'ABSPATH' ) || exit ();
|
|
9 |
*/
|
10 |
class WC_Stripe_Controller_Order_Actions extends WC_Stripe_Rest_Controller {
|
11 |
|
12 |
-
protected $namespace = 'order~action
|
13 |
|
14 |
public function register_routes() {
|
15 |
register_rest_route ( $this->rest_uri (), 'capture', array(
|
9 |
*/
|
10 |
class WC_Stripe_Controller_Order_Actions extends WC_Stripe_Rest_Controller {
|
11 |
|
12 |
+
protected $namespace = 'order~action';
|
13 |
|
14 |
public function register_routes() {
|
15 |
register_rest_route ( $this->rest_uri (), 'capture', array(
|
includes/controllers/class-wc-stripe-controller-product-data.php
CHANGED
@@ -10,7 +10,7 @@ defined ( 'ABSPATH' ) || exit ();
|
|
10 |
*/
|
11 |
class WC_Stripe_Controller_Product_Data extends WC_Stripe_Rest_Controller {
|
12 |
|
13 |
-
protected $namespace = 'product
|
14 |
|
15 |
public function register_routes() {
|
16 |
register_rest_route ( $this->rest_uri (), 'gateway', [
|
10 |
*/
|
11 |
class WC_Stripe_Controller_Product_Data extends WC_Stripe_Rest_Controller {
|
12 |
|
13 |
+
protected $namespace = 'product';
|
14 |
|
15 |
public function register_routes() {
|
16 |
register_rest_route ( $this->rest_uri (), 'gateway', [
|
includes/gateways/class-wc-payment-gateway-stripe-multibanco.php
CHANGED
@@ -24,7 +24,7 @@ class WC_Payment_Gateway_Stripe_Multibanco extends WC_Payment_Gateway_Stripe_Loc
|
|
24 |
$this->tab_title = __ ( 'Multibanco', 'woo-stripe-payment' );
|
25 |
$this->template_name = 'local-payment.php';
|
26 |
$this->token_type = 'Stripe_Local';
|
27 |
-
$this->method_title = __ ( '
|
28 |
$this->method_description = __ ( 'Multibanco gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
|
29 |
$this->icon = wc_stripe ()->assets_url ( 'img/multibanco.svg' );
|
30 |
$this->order_button_text = $this->get_order_button_text ( __ ( 'Multibanco', 'woo-stripe-payment' ) );
|
24 |
$this->tab_title = __ ( 'Multibanco', 'woo-stripe-payment' );
|
25 |
$this->template_name = 'local-payment.php';
|
26 |
$this->token_type = 'Stripe_Local';
|
27 |
+
$this->method_title = __ ( 'Multibanco', 'woo-stripe-payment' );
|
28 |
$this->method_description = __ ( 'Multibanco gateway that integrates with your Stripe account.', 'woo-stripe-payment' );
|
29 |
$this->icon = wc_stripe ()->assets_url ( 'img/multibanco.svg' );
|
30 |
$this->order_button_text = $this->get_order_button_text ( __ ( 'Multibanco', 'woo-stripe-payment' ) );
|
includes/tokens/class-wc-payment-token-stripe-ach.php
CHANGED
@@ -9,6 +9,8 @@ defined ( 'ABSPATH' ) || exit ();
|
|
9 |
*
|
10 |
*/
|
11 |
class WC_Payment_Token_Stripe_ACH extends WC_Payment_Token_Stripe {
|
|
|
|
|
12 |
|
13 |
protected $type = 'Stripe_ACH';
|
14 |
|
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 |
|
includes/tokens/class-wc-payment-token-stripe-cc.php
CHANGED
@@ -12,6 +12,8 @@ if (! class_exists ( 'WC_Payment_Token_Stripe' )) {
|
|
12 |
*
|
13 |
*/
|
14 |
class WC_Payment_Token_Stripe_CC extends WC_Payment_Token_Stripe {
|
|
|
|
|
15 |
|
16 |
protected $has_expiration = true;
|
17 |
|
12 |
*
|
13 |
*/
|
14 |
class WC_Payment_Token_Stripe_CC extends WC_Payment_Token_Stripe {
|
15 |
+
|
16 |
+
use WC_Payment_Token_Payment_Method_Trait;
|
17 |
|
18 |
protected $has_expiration = true;
|
19 |
|
includes/tokens/class-wc-payment-token-stripe-googlepay.php
CHANGED
@@ -11,8 +11,11 @@ if (! class_exists ( 'WC_Payment_Token_Stripe_CC' )) {
|
|
11 |
*
|
12 |
*/
|
13 |
class WC_Payment_Token_Stripe_GooglePay extends WC_Payment_Token_Stripe_CC {
|
|
|
|
|
14 |
|
15 |
protected $type = 'Stripe_GooglePay';
|
16 |
|
17 |
protected $stripe_payment_type = 'source';
|
|
|
18 |
}
|
11 |
*
|
12 |
*/
|
13 |
class WC_Payment_Token_Stripe_GooglePay extends WC_Payment_Token_Stripe_CC {
|
14 |
+
|
15 |
+
use WC_Payment_Token_Source_Trait;
|
16 |
|
17 |
protected $type = 'Stripe_GooglePay';
|
18 |
|
19 |
protected $stripe_payment_type = 'source';
|
20 |
+
|
21 |
}
|
includes/tokens/class-wc-payment-token-stripe-local-payment.php
CHANGED
@@ -34,4 +34,8 @@ class WC_Payment_Token_Stripe_Local extends WC_Payment_Token_Stripe {
|
|
34 |
]
|
35 |
];
|
36 |
}
|
|
|
|
|
|
|
|
|
37 |
}
|
34 |
]
|
35 |
];
|
36 |
}
|
37 |
+
|
38 |
+
public function save_payment_method() {}
|
39 |
+
|
40 |
+
public function delete_from_stripe() {}
|
41 |
}
|
includes/traits/wc-stripe-payment-token-traits.php
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined ( 'ABSPATH' ) || exit ();
|
3 |
+
|
4 |
+
/**
|
5 |
+
*
|
6 |
+
* @author PaymentPlugins
|
7 |
+
* @since 3.1.5
|
8 |
+
* @package Stripe/Trait
|
9 |
+
*
|
10 |
+
*/
|
11 |
+
trait WC_Payment_Token_Source_Trait{
|
12 |
+
|
13 |
+
public function save_payment_method() {
|
14 |
+
$gateway = WC_Stripe_Gateway::load ();
|
15 |
+
|
16 |
+
return $gateway->create_customer_source ( $this->get_customer_id (), $this->get_token () );
|
17 |
+
}
|
18 |
+
|
19 |
+
public function delete_from_stripe() {
|
20 |
+
$customer_id = wc_stripe_get_customer_id ( $this->get_user_id (), $this->get_environment () );
|
21 |
+
|
22 |
+
try {
|
23 |
+
WC_Stripe_Gateway::load ()->delete_card ( $this->get_token (), $customer_id, $this->get_environment () );
|
24 |
+
} catch ( \Stripe\Error\Base $e ) {
|
25 |
+
wc_stripe_log_error ( sprintf ( __ ( 'Error deleting Stripe card. Token Id: %s', 'woo-stripe-payment' ), $this->get_token () ) );
|
26 |
+
}
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
*
|
32 |
+
* @author PaymentPlugins
|
33 |
+
* @since 3.1.5
|
34 |
+
* @package Stripe/Trait
|
35 |
+
*
|
36 |
+
*/
|
37 |
+
trait WC_Payment_Token_Payment_Method_Trait{
|
38 |
+
|
39 |
+
public function save_payment_method() {
|
40 |
+
$gateway = WC_Stripe_Gateway::load ();
|
41 |
+
|
42 |
+
$payment_method = $gateway->fetch_payment_method ( $this->get_token () );
|
43 |
+
|
44 |
+
if (is_wp_error ( $payment_method )) {
|
45 |
+
return $payment_method;
|
46 |
+
}
|
47 |
+
|
48 |
+
return $gateway->attach_payment_method ( $payment_method, [
|
49 |
+
'customer' => $this->get_customer_id ()
|
50 |
+
] );
|
51 |
+
}
|
52 |
+
|
53 |
+
public function delete_from_stripe() {
|
54 |
+
$customer_id = wc_stripe_get_customer_id ( $this->get_user_id (), $this->get_environment () );
|
55 |
+
$gateway = WC_Stripe_Gateway::load ();
|
56 |
+
|
57 |
+
$payment_method = $gateway->fetch_payment_method ( $this->get_token () );
|
58 |
+
|
59 |
+
if (is_wp_error ( $payment_method )) {
|
60 |
+
return $payment_method;
|
61 |
+
}
|
62 |
+
|
63 |
+
return $gateway->delete_payment_method ( $payment_method );
|
64 |
+
}
|
65 |
+
}
|
includes/wc-stripe-functions.php
CHANGED
@@ -716,6 +716,9 @@ function wc_stripe_payment_complete_order_status($order_status, $order_id, $orde
|
|
716 |
* @return number
|
717 |
*/
|
718 |
function wc_stripe_add_number_precision($value, $currency = '', $round = true) {
|
|
|
|
|
|
|
719 |
$currency = empty ( $currency ) ? get_woocommerce_currency () : $currency;
|
720 |
$currencies = wc_stripe_get_currencies ();
|
721 |
$exp = isset ( $currencies[ $currency ] ) ? $currencies[ $currency ] : 2;
|
@@ -755,7 +758,7 @@ function wc_stripe_get_custom_forms() {
|
|
755 |
'fontSize' => '0px'
|
756 |
],
|
757 |
':-webkit-autofill' => [
|
758 |
-
'color' => '#
|
759 |
]
|
760 |
],
|
761 |
'invalid' => [
|
@@ -788,7 +791,7 @@ function wc_stripe_get_custom_forms() {
|
|
788 |
'color' => '#CFD7DF'
|
789 |
],
|
790 |
':-webkit-autofill' => [
|
791 |
-
'color' => '#
|
792 |
]
|
793 |
],
|
794 |
'invalid' => [
|
@@ -822,7 +825,7 @@ function wc_stripe_get_custom_forms() {
|
|
822 |
'fontSize' => '0px'
|
823 |
],
|
824 |
':-webkit-autofill' => [
|
825 |
-
'color' => '#
|
826 |
]
|
827 |
],
|
828 |
'invalid' => [
|
@@ -861,7 +864,7 @@ function wc_stripe_get_custom_forms() {
|
|
861 |
'color' => '#CFD7DF'
|
862 |
],
|
863 |
':-webkit-autofill' => [
|
864 |
-
'color' => '#
|
865 |
]
|
866 |
],
|
867 |
'invalid' => [
|
@@ -897,7 +900,7 @@ function wc_stripe_get_custom_forms() {
|
|
897 |
'color' => '#CFD7DF'
|
898 |
],
|
899 |
':-webkit-autofill' => [
|
900 |
-
'color' => '#
|
901 |
]
|
902 |
],
|
903 |
'invalid' => [
|
716 |
* @return number
|
717 |
*/
|
718 |
function wc_stripe_add_number_precision($value, $currency = '', $round = true) {
|
719 |
+
if (! is_numeric ( $value )) {
|
720 |
+
$value = 0;
|
721 |
+
}
|
722 |
$currency = empty ( $currency ) ? get_woocommerce_currency () : $currency;
|
723 |
$currencies = wc_stripe_get_currencies ();
|
724 |
$exp = isset ( $currencies[ $currency ] ) ? $currencies[ $currency ] : 2;
|
758 |
'fontSize' => '0px'
|
759 |
],
|
760 |
':-webkit-autofill' => [
|
761 |
+
'color' => '#495057'
|
762 |
]
|
763 |
],
|
764 |
'invalid' => [
|
791 |
'color' => '#CFD7DF'
|
792 |
],
|
793 |
':-webkit-autofill' => [
|
794 |
+
'color' => '#32325D'
|
795 |
]
|
796 |
],
|
797 |
'invalid' => [
|
825 |
'fontSize' => '0px'
|
826 |
],
|
827 |
':-webkit-autofill' => [
|
828 |
+
'color' => '#495057'
|
829 |
]
|
830 |
],
|
831 |
'invalid' => [
|
864 |
'color' => '#CFD7DF'
|
865 |
],
|
866 |
':-webkit-autofill' => [
|
867 |
+
'color' => '#819efc'
|
868 |
]
|
869 |
],
|
870 |
'invalid' => [
|
900 |
'color' => '#CFD7DF'
|
901 |
],
|
902 |
':-webkit-autofill' => [
|
903 |
+
'color' => '#fff'
|
904 |
]
|
905 |
],
|
906 |
'invalid' => [
|
includes/wc-stripe-webhook-functions.php
CHANGED
@@ -65,7 +65,7 @@ function wc_stripe_process_charge_succeeded($charge, $request) {
|
|
65 |
// @todo in future version, action scheduler will be used to trigger the event after it is received.
|
66 |
if ($payment_method->has_order_lock ( $order )) {
|
67 |
sleep ( 1 );
|
68 |
-
// for the
|
69 |
// during the sleep operation.
|
70 |
$order->read_meta_data ( true );
|
71 |
}
|
65 |
// @todo in future version, action scheduler will be used to trigger the event after it is received.
|
66 |
if ($payment_method->has_order_lock ( $order )) {
|
67 |
sleep ( 1 );
|
68 |
+
// for the order to read it's metadata from the db as it may have changed
|
69 |
// during the sleep operation.
|
70 |
$order->read_meta_data ( true );
|
71 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: stripe, ach, klarna, credit card, apple pay, google pay, ideal, sepa, sofo
|
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 5.4
|
6 |
Requires PHP: 5.4
|
7 |
-
Stable tag: 3.1.
|
8 |
Copyright: Payment Plugins
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -57,6 +57,14 @@ If you're site is not loading over https, then Stripe won't render the Payment R
|
|
57 |
8. Edit payment gateways on the product page
|
58 |
|
59 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
= 3.1.4 =
|
61 |
* Updated - WC 4.2.0 support
|
62 |
* Added - Validation for local payment methods to ensure payment option cannot be empty
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 5.4
|
6 |
Requires PHP: 5.4
|
7 |
+
Stable tag: 3.1.5
|
8 |
Copyright: Payment Plugins
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
57 |
8. Edit payment gateways on the product page
|
58 |
|
59 |
== Changelog ==
|
60 |
+
= 3.1.5 =
|
61 |
+
* Fixed - Capture type on product page checkout
|
62 |
+
* Fixed - WP 5.4.2 deprecation message for namespaces
|
63 |
+
* Fixed - PHP 7.4 warning message
|
64 |
+
* Updated - Error message API uses $.scroll_to_notices when available
|
65 |
+
* Updated - Apple Pay and Payment Request require phone and email based on required billing fields
|
66 |
+
* Updated - Webkit autofill text color
|
67 |
+
* Added - Non numerical check to wc_stripe_add_number_precision function
|
68 |
= 3.1.4 =
|
69 |
* Updated - WC 4.2.0 support
|
70 |
* Added - Validation for local payment methods to ensure payment option cannot be empty
|
stripe-payments.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Stripe For WooCommerce
|
4 |
* Plugin URI: https://docs.paymentplugins.com/wc-stripe/config/
|
5 |
* Description: Accept credit cards, Google Pay, Apple Pay, ACH, Klarna and more using Stripe.
|
6 |
-
* Version: 3.1.
|
7 |
* Author: Payment Plugins, support@paymentplugins.com
|
8 |
* Text Domain: woo-stripe-payment
|
9 |
* Domain Path: /i18n/languages/
|
3 |
* Plugin Name: Stripe For WooCommerce
|
4 |
* Plugin URI: https://docs.paymentplugins.com/wc-stripe/config/
|
5 |
* Description: Accept credit cards, Google Pay, Apple Pay, ACH, Klarna and more using Stripe.
|
6 |
+
* Version: 3.1.5
|
7 |
* Author: Payment Plugins, support@paymentplugins.com
|
8 |
* Text Domain: woo-stripe-payment
|
9 |
* Domain Path: /i18n/languages/
|
stripe-php-6.40.0/lib/ApiRequestor.php
CHANGED
@@ -399,7 +399,7 @@ class ApiRequestor
|
|
399 |
$hasFile
|
400 |
);
|
401 |
|
402 |
-
if (
|
403 |
self::$requestTelemetry = new RequestTelemetry(
|
404 |
$rheaders['request-id'],
|
405 |
Util\Util::currentTimeMillis() - $requestStartMs
|
399 |
$hasFile
|
400 |
);
|
401 |
|
402 |
+
if (isset($rheaders['request-id'])) {
|
403 |
self::$requestTelemetry = new RequestTelemetry(
|
404 |
$rheaders['request-id'],
|
405 |
Util\Util::currentTimeMillis() - $requestStartMs
|
stripe-php-6.40.0/lib/Util/Util.php
CHANGED
@@ -42,7 +42,7 @@ abstract class Util
|
|
42 |
$results = [];
|
43 |
foreach ($values as $k => $v) {
|
44 |
// FIXME: this is an encapsulation violation
|
45 |
-
if ($k[0] == '_') {
|
46 |
continue;
|
47 |
}
|
48 |
if ($v instanceof StripeObject) {
|
42 |
$results = [];
|
43 |
foreach ($values as $k => $v) {
|
44 |
// FIXME: this is an encapsulation violation
|
45 |
+
if (is_array($k) && $k[0] == '_') {
|
46 |
continue;
|
47 |
}
|
48 |
if ($v instanceof StripeObject) {
|
templates/checkout/payment-method.php
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* @version 3.0.0
|
4 |
-
*
|
5 |
-
* @var WC_Payment_Gateway_Stripe $gateway
|
6 |
-
*/
|
7 |
-
?>
|
8 |
-
<?php if(($desc = $gateway->get_description())):?>
|
9 |
-
<div class="wc-stripe-gateway-desc<?php if($tokens):?> has_tokens<?php endif;?>">
|
10 |
-
<?php echo wpautop( wptexturize( $desc ) )?>
|
11 |
-
</div>
|
12 |
-
<?php endif;?>
|
13 |
-
<?php if($tokens):?>
|
14 |
-
<input type="radio" class="wc-stripe-payment-type"
|
15 |
-
id="<?php echo $gateway->id?>_use_new"
|
16 |
-
name="<?php echo $gateway->payment_type_key?>" value="new" />
|
17 |
-
<label for="<?php echo $gateway->id?>_use_new"
|
18 |
-
class="wc-stripe-label-payment-type"><?php echo $gateway->get_new_method_label()?></label>
|
19 |
-
<?php endif;?>
|
20 |
-
<div class="wc-<?php echo $gateway->id?>-container">
|
21 |
-
<div class="wc-<?php echo $gateway->id?>-new-method-container"
|
22 |
-
<?php if($tokens):?> style="display: none" <?php endif;?>>
|
23 |
-
<?php wc_stripe_get_template('checkout/' . $gateway->template_name, array('gateway' => $gateway))?>
|
24 |
-
</div>
|
25 |
-
<?php
|
26 |
-
if ($tokens) :
|
27 |
-
$gateway->saved_payment_methods ( $tokens );
|
28 |
-
|
29 |
-
endif;
|
30 |
-
?>
|
31 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/checkout/stripe-payment-method.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* @version 3.
|
4 |
*
|
5 |
* @var WC_Payment_Gateway_Stripe $gateway
|
6 |
*/
|
@@ -10,14 +10,15 @@
|
|
10 |
<?php echo wpautop( wptexturize( $desc ) )?>
|
11 |
</div>
|
12 |
<?php endif;?>
|
13 |
-
|
14 |
-
<
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
|
|
19 |
<?php endif;?>
|
20 |
-
<div class="wc-<?php echo $gateway->id?>-container">
|
21 |
<div class="wc-<?php echo $gateway->id?>-new-method-container"
|
22 |
<?php if($tokens):?> style="display: none" <?php endif;?>>
|
23 |
<?php wc_stripe_get_template('checkout/' . $gateway->template_name, array('gateway' => $gateway))?>
|
1 |
<?php
|
2 |
/**
|
3 |
+
* @version 3.1.5
|
4 |
*
|
5 |
* @var WC_Payment_Gateway_Stripe $gateway
|
6 |
*/
|
10 |
<?php echo wpautop( wptexturize( $desc ) )?>
|
11 |
</div>
|
12 |
<?php endif;?>
|
13 |
+
|
14 |
+
<div class="wc-<?php echo $gateway->id?>-container wc-stripe-gateway-container<?php if($tokens):?> has_tokens<?php endif;?>">
|
15 |
+
<?php if($tokens):?>
|
16 |
+
<input type="radio" class="wc-stripe-payment-type"
|
17 |
+
id="<?php echo $gateway->id?>_use_new"
|
18 |
+
name="<?php echo $gateway->payment_type_key?>" value="new" />
|
19 |
+
<label for="<?php echo $gateway->id?>_use_new"
|
20 |
+
class="wc-stripe-label-payment-type"><?php echo $gateway->get_new_method_label()?></label>
|
21 |
<?php endif;?>
|
|
|
22 |
<div class="wc-<?php echo $gateway->id?>-new-method-container"
|
23 |
<?php if($tokens):?> style="display: none" <?php endif;?>>
|
24 |
<?php wc_stripe_get_template('checkout/' . $gateway->template_name, array('gateway' => $gateway))?>
|