Payment Plugins for Stripe WooCommerce - Version 3.1.4

Version Description

  • Updated - WC 4.2.0 support
  • Added - Validation for local payment methods to ensure payment option cannot be empty
  • Added - Account ID to Stripe JS initialization
  • Added - Local payment method support for manual subscriptions
  • Fixed - Exception that occurs after successful payment of a renewal order retry.
Download this release

Release Info

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

Code changes from version 3.1.3 to 3.1.4

assets/js/admin/meta-boxes-product-data.js CHANGED
@@ -30,6 +30,7 @@
30
  $('table.wc_gateways').find('.wc-move-down, .wc-move-up').on('click', this.move_gateway.bind(this));
31
  $('table.wc_gateways .wc-stripe-product-gateway-enabled').on('click', this.enable_gateway.bind(this));
32
  $('.wc-stripe-save-product-data').on('click', this.save.bind(this));
 
33
  }
34
 
35
  /**
@@ -53,6 +54,11 @@
53
  $prev.before($row);
54
  }
55
  }
 
 
 
 
 
56
  }
57
 
58
  /**
30
  $('table.wc_gateways').find('.wc-move-down, .wc-move-up').on('click', this.move_gateway.bind(this));
31
  $('table.wc_gateways .wc-stripe-product-gateway-enabled').on('click', this.enable_gateway.bind(this));
32
  $('.wc-stripe-save-product-data').on('click', this.save.bind(this));
33
+ $('#stripe_product_data select').on('change', this.setting_changed.bind(this));
34
  }
35
 
36
  /**
54
  $prev.before($row);
55
  }
56
  }
57
+ this.setting_changed();
58
+ }
59
+
60
+ Product.prototype.setting_changed = function() {
61
+ $('#wc_stripe_update_product').val('true');
62
  }
63
 
64
  /**
assets/js/frontend/local-payment.js CHANGED
@@ -47,13 +47,22 @@
47
  }
48
  resolve();
49
  }.bind(this);
50
- if (this.elementType == null) {
51
- this.payment_token_received = true;
52
- $(this.container).closest('form').submit();
 
 
 
 
 
 
 
 
 
 
53
  } else {
54
- this.stripe.createSource(this.element, this.getSourceArgs()).then(handler).catch(function(e) {
55
- this.submit_error(e.message);
56
- }.bind(this))
57
  }
58
  }.bind(this));
59
  }
@@ -90,12 +99,6 @@
90
  }
91
  }
92
 
93
- LocalPayment.prototype.updated_checkout = function() {
94
- if (this.payment_token_received) {
95
- this.show_place_order();
96
- }
97
- }
98
-
99
  LocalPayment.prototype.show_payment_button = function() {
100
  this.show_place_order();
101
  }
@@ -140,12 +143,18 @@
140
  $(id).empty();
141
  if (!this.element) {
142
  this.element = this.elements.create(this.elementType, this.params.element_params);
 
143
  }
 
144
  this.element.mount(id);
145
  }
146
 
147
  }
148
 
 
 
 
 
149
  LocalPayment.prototype.load_external_script = function(url) {
150
  var script = document.createElement('script');
151
  script.type = "text/javascript";
@@ -169,8 +178,9 @@
169
  LocalPayment.prototype.processConfirmation = function(obj) {
170
  this.stripe[this.confirmation_method](obj.client_secret, this.get_confirmation_args(obj)).then(function(result) {
171
  if (result.error) {
172
- this.submit_error(result.error.message);
173
  }
 
174
  }.bind(this))
175
  }
176
 
@@ -187,6 +197,13 @@
187
  return args;
188
  }
189
 
 
 
 
 
 
 
 
190
  /*********** iDEAL ***********/
191
  function IDEAL(params) {
192
  this.elementType = 'idealBank';
@@ -220,11 +237,6 @@
220
  window.addEventListener('hashchange', this.hashChange.bind(this));
221
  }
222
 
223
- IDEAL.prototype.createSource = function() {
224
- this.payment_token_received = true;
225
- this.get_form().submit();
226
- }
227
-
228
  Klarna.prototype.category_change = function(e) {
229
  $('[id^="klarna-instance-"]').slideUp();
230
  var category = $('[name="klarna_category"]:checked').val();
@@ -248,6 +260,7 @@
248
  }.bind(this));
249
  this.payment_categories = source.klarna.payment_method_categories.split(",");
250
  this.render_ui();
 
251
  }
252
  }
253
  }
@@ -354,11 +367,6 @@
354
  }
355
  }
356
 
357
- FPX.prototype.createSource = function() {
358
- this.payment_token_received = true;
359
- this.get_form().submit();
360
- }
361
-
362
  IDEAL.prototype = $.extend({}, LocalPayment.prototype, IDEAL.prototype);
363
 
364
  Sepa.prototype = $.extend({}, LocalPayment.prototype, Sepa.prototype);
47
  }
48
  resolve();
49
  }.bind(this);
50
+ if (this.elementType != null) {
51
+ if (this.confirmation_method) {
52
+ if (this.isValidElement()) {
53
+ this.payment_token_received = true;
54
+ this.get_form().submit();
55
+ } else {
56
+ return this.submit_error({ code: 'empty_element_' + this.params.local_payment_type, message: wc_stripe_messages.empty_element });
57
+ }
58
+ } else {
59
+ this.stripe.createSource(this.element, this.getSourceArgs()).then(handler).catch(function(e) {
60
+ this.submit_error(e.message);
61
+ }.bind(this))
62
+ }
63
  } else {
64
+ this.payment_token_received = true;
65
+ this.get_form().submit();
 
66
  }
67
  }.bind(this));
68
  }
99
  }
100
  }
101
 
 
 
 
 
 
 
102
  LocalPayment.prototype.show_payment_button = function() {
103
  this.show_place_order();
104
  }
143
  $(id).empty();
144
  if (!this.element) {
145
  this.element = this.elements.create(this.elementType, this.params.element_params);
146
+ this.element.on('change', this.handleElementChange.bind(this));
147
  }
148
+ this.elementEmpty = true;
149
  this.element.mount(id);
150
  }
151
 
152
  }
153
 
154
+ LocalPayment.prototype.handleElementChange = function(e) {
155
+ this.elementEmpty = e.empty;
156
+ }
157
+
158
  LocalPayment.prototype.load_external_script = function(url) {
159
  var script = document.createElement('script');
160
  script.type = "text/javascript";
178
  LocalPayment.prototype.processConfirmation = function(obj) {
179
  this.stripe[this.confirmation_method](obj.client_secret, this.get_confirmation_args(obj)).then(function(result) {
180
  if (result.error) {
181
+ return this.submit_error(result.error.message);
182
  }
183
+ this.get_form().submit();
184
  }.bind(this))
185
  }
186
 
197
  return args;
198
  }
199
 
200
+ LocalPayment.prototype.isValidElement = function() {
201
+ if (this.element) {
202
+ return !this.elementEmpty;
203
+ }
204
+ return true;
205
+ }
206
+
207
  /*********** iDEAL ***********/
208
  function IDEAL(params) {
209
  this.elementType = 'idealBank';
237
  window.addEventListener('hashchange', this.hashChange.bind(this));
238
  }
239
 
 
 
 
 
 
240
  Klarna.prototype.category_change = function(e) {
241
  $('[id^="klarna-instance-"]').slideUp();
242
  var category = $('[name="klarna_category"]:checked').val();
260
  }.bind(this));
261
  this.payment_categories = source.klarna.payment_method_categories.split(",");
262
  this.render_ui();
263
+ this.show_place_order();
264
  }
265
  }
266
  }
367
  }
368
  }
369
 
 
 
 
 
 
370
  IDEAL.prototype = $.extend({}, LocalPayment.prototype, IDEAL.prototype);
371
 
372
  Sepa.prototype = $.extend({}, LocalPayment.prototype, Sepa.prototype);
assets/js/frontend/wc-stripe.js CHANGED
@@ -1676,7 +1676,7 @@
1676
  }
1677
 
1678
  try {
1679
- stripe = Stripe(wc_stripe_params_v3.api_key);
1680
  } catch (error) {
1681
  window.alert(error);
1682
  console.log(error);
1676
  }
1677
 
1678
  try {
1679
+ stripe = Stripe(wc_stripe_params_v3.api_key, { stripeAccount: wc_stripe_params_v3.account });
1680
  } catch (error) {
1681
  window.alert(error);
1682
  console.log(error);
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)}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("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);
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.3\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-05-26T01:32:43+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: woo-stripe-payment\n"
@@ -23,7 +23,7 @@ msgid "https://docs.paymentplugins.com/wc-stripe/config/"
23
  msgstr ""
24
 
25
  #. Description of the plugin
26
- msgid "Accept credit cards, Google Pay, & Apple Pay, ACH, Klarna and more using Stripe."
27
  msgstr ""
28
 
29
  #. Author of the plugin
@@ -31,7 +31,7 @@ msgid "Payment Plugins, support@paymentplugins.com"
31
  msgstr ""
32
 
33
  #: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:109
34
- #: includes/admin/meta-boxes/views/html-product-data.php:12
35
  #: includes/gateways/settings/ach-settings-v2.php:7
36
  #: includes/gateways/settings/ach-settings.php:7
37
  #: includes/gateways/settings/applepay-settings.php:7
@@ -193,45 +193,45 @@ msgstr ""
193
  msgid "Recurring payment for order failed. Reason: %s"
194
  msgstr ""
195
 
196
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:977
197
  msgid "Recurring payment captured in Stripe. Payment method: %s"
198
  msgstr ""
199
 
200
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:979
201
  msgid "Recurring payment authorized in Stripe. Payment method: %s"
202
  msgstr ""
203
 
204
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:982
205
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1228
206
  msgid "Customer must manually complete payment for payment method %s"
207
  msgstr ""
208
 
209
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:998
210
  msgid "Error saving payment method for subscription. Reason: %s"
211
  msgstr ""
212
 
213
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1054
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:1215
219
  msgid "Pre-order payment for order failed. Reason: %s"
220
  msgstr ""
221
 
222
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1223
223
  msgid "Pre-order payment captured in Stripe. Payment method: %s"
224
  msgstr ""
225
 
226
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1225
227
  msgid "Pre-order payment authorized in Stripe. Payment method: %s"
228
  msgstr ""
229
 
230
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1299
231
  msgid "Cannot process payment"
232
  msgstr ""
233
 
234
- #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1307
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
 
@@ -307,7 +307,7 @@ msgstr ""
307
  #: includes/admin/meta-boxes/views/html-charge-data-subview.php:14
308
  #: includes/admin/meta-boxes/views/html-order-actions.php:42
309
  #: includes/admin/meta-boxes/views/html-order-pay.php:23
310
- #: includes/admin/meta-boxes/views/html-product-data.php:35
311
  #: includes/gateways/settings/applepay-settings.php:41
312
  #: includes/gateways/settings/cc-settings.php:41
313
  #: includes/gateways/settings/googlepay-settings.php:55
@@ -433,7 +433,7 @@ msgid "Admins can process customer orders over the phone using this functionalit
433
  msgstr ""
434
 
435
  #: includes/admin/meta-boxes/views/html-order-pay.php:21
436
- #: includes/admin/meta-boxes/views/html-product-data.php:13
437
  #: includes/gateways/settings/applepay-settings.php:37
438
  #: includes/gateways/settings/cc-settings.php:37
439
  #: includes/gateways/settings/googlepay-settings.php:51
@@ -442,7 +442,7 @@ msgid "Charge Type"
442
  msgstr ""
443
 
444
  #: includes/admin/meta-boxes/views/html-order-pay.php:24
445
- #: includes/admin/meta-boxes/views/html-product-data.php:36
446
  #: includes/gateways/settings/applepay-settings.php:42
447
  #: includes/gateways/settings/cc-settings.php:42
448
  #: includes/gateways/settings/googlepay-settings.php:56
@@ -458,23 +458,23 @@ msgstr ""
458
  msgid "In this section you can control which gateways are displayed on the product page."
459
  msgstr ""
460
 
461
- #: includes/admin/meta-boxes/views/html-product-data.php:11
462
  msgid "Method"
463
  msgstr ""
464
 
465
- #: includes/admin/meta-boxes/views/html-product-data.php:47
466
  msgid "Button Position"
467
  msgstr ""
468
 
469
- #: includes/admin/meta-boxes/views/html-product-data.php:49
470
  msgid "Below add to cart"
471
  msgstr ""
472
 
473
- #: includes/admin/meta-boxes/views/html-product-data.php:50
474
  msgid "Above add to cart"
475
  msgstr ""
476
 
477
- #: includes/admin/meta-boxes/views/html-product-data.php:58
478
  msgid "Save"
479
  msgstr ""
480
 
@@ -639,7 +639,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:63
643
  msgid "No matches found"
644
  msgstr ""
645
 
@@ -671,11 +671,11 @@ msgstr ""
671
  msgid "Quantity must be greater than zero."
672
  msgstr ""
673
 
674
- #: includes/controllers/class-wc-stripe-controller-checkout.php:177
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:210
679
  msgid "Please review your order details then click Place Order."
680
  msgstr ""
681
 
@@ -781,7 +781,7 @@ 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:262
785
  msgid "You must set the API mode to live in order to enable the Plaid development environment."
786
  msgstr ""
787
 
@@ -895,37 +895,37 @@ msgstr ""
895
  #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:122
896
  #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:174
897
  #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:194
898
- #: includes/wc-stripe-functions.php:363
899
- #: includes/wc-stripe-functions.php:411
900
  msgid "Shipping"
901
  msgstr ""
902
 
903
  #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:130
904
  #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:195
905
  #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:204
906
- #: includes/wc-stripe-functions.php:379
907
- #: includes/wc-stripe-functions.php:419
908
  msgid "Discount"
909
  msgstr ""
910
 
911
  #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:141
912
- #: includes/wc-stripe-functions.php:430
913
  msgid "Fees"
914
  msgstr ""
915
 
916
  #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:203
917
  #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:225
918
- #: includes/wc-stripe-functions.php:387
919
  msgid "Tax"
920
  msgstr ""
921
 
922
  #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:234
923
- #: includes/wc-stripe-functions.php:501
924
  msgid "Waiting..."
925
  msgstr ""
926
 
927
  #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:235
928
- #: includes/wc-stripe-functions.php:502
929
  msgid "loading shipping methods..."
930
  msgstr ""
931
 
@@ -1613,209 +1613,221 @@ msgstr ""
1613
  msgid "Kind Regards,"
1614
  msgstr ""
1615
 
1616
- #: includes/wc-stripe-functions.php:733
1617
  msgid "Bootstrap form"
1618
  msgstr ""
1619
 
1620
- #: includes/wc-stripe-functions.php:767
1621
  msgid "Simple form"
1622
  msgstr ""
1623
 
1624
- #: includes/wc-stripe-functions.php:800
1625
  msgid "Minimalist form"
1626
  msgstr ""
1627
 
1628
- #: includes/wc-stripe-functions.php:834
1629
  msgid "Inline Form"
1630
  msgstr ""
1631
 
1632
- #: includes/wc-stripe-functions.php:870
1633
  msgid "Rounded Form"
1634
  msgstr ""
1635
 
1636
- #: includes/wc-stripe-functions.php:1078
1637
  msgid "There was an error processing your credit card."
1638
  msgstr ""
1639
 
1640
- #: includes/wc-stripe-functions.php:1079
1641
  msgid "Your card number is incomplete."
1642
  msgstr ""
1643
 
1644
- #: includes/wc-stripe-functions.php:1080
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:1081
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:1082
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:1083
1657
- #: includes/wc-stripe-functions.php:1088
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:1084
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:1085
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:1086
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:1087
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:1089
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:1090
1682
  msgid "The card has expired. Check the expiration date or use a different card."
1683
  msgstr ""
1684
 
1685
- #: includes/wc-stripe-functions.php:1091
1686
  msgid "The card has been declined."
1687
  msgstr ""
1688
 
1689
- #: includes/wc-stripe-functions.php:1092
1690
  msgid "Your card's expiration year is in the past."
1691
  msgstr ""
1692
 
1693
- #: includes/wc-stripe-functions.php:1093
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:1094
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:1095
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:1096
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:1097
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:1098
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:1099
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:1100
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:1101
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:1102
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:1103
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:1104
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:1105
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:1106
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:1107
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:1108
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:1109
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:1110
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:1111
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:1112
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:1113
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:1114
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:1115
1782
  msgid "The ZIP code provided was incorrect."
1783
  msgstr ""
1784
 
1785
- #: includes/wc-stripe-functions.php:1116
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:1117
1790
  msgid "The card does not support this type of purchase."
1791
  msgstr ""
1792
 
1793
- #: includes/wc-stripe-functions.php:1118
1794
- #: includes/wc-stripe-functions.php:1121
1795
- #: includes/wc-stripe-functions.php:1123
1796
  msgid "The card has been declined for an unknown reason."
1797
  msgstr ""
1798
 
1799
- #: includes/wc-stripe-functions.php:1119
1800
  msgid "The customer has exceeded the balance or credit limit available on their card."
1801
  msgstr ""
1802
 
1803
- #: includes/wc-stripe-functions.php:1120
1804
  msgid "The card does not support the specified currency."
1805
  msgstr ""
1806
 
1807
- #: includes/wc-stripe-functions.php:1122
1808
  msgid "The payment has been declined as Stripe suspects it is fraudulent."
1809
  msgstr ""
1810
 
1811
- #: includes/wc-stripe-functions.php:1124
1812
  msgid "The PIN entered is incorrect. "
1813
  msgstr ""
1814
 
1815
- #: includes/wc-stripe-functions.php:1125
1816
  msgid "The card has insufficient funds to complete the purchase."
1817
  msgstr ""
1818
 
 
 
 
 
 
 
 
 
 
 
 
 
1819
  #: includes/wc-stripe-webhook-functions.php:80
1820
  msgid "Charge.succeeded webhook received. Payment has been completed."
1821
  msgstr ""
2
  # This file is distributed under the same license as the Stripe For WooCommerce plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Stripe For WooCommerce 3.1.4\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-03T20:10:28+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: woo-stripe-payment\n"
23
  msgstr ""
24
 
25
  #. Description of the plugin
26
+ msgid "Accept credit cards, Google Pay, Apple Pay, ACH, Klarna and more using Stripe."
27
  msgstr ""
28
 
29
  #. Author of the plugin
31
  msgstr ""
32
 
33
  #: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:109
34
+ #: includes/admin/meta-boxes/views/html-product-data.php:13
35
  #: includes/gateways/settings/ach-settings-v2.php:7
36
  #: includes/gateways/settings/ach-settings.php:7
37
  #: includes/gateways/settings/applepay-settings.php:7
193
  msgid "Recurring payment for order failed. Reason: %s"
194
  msgstr ""
195
 
196
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:980
197
  msgid "Recurring payment captured in Stripe. Payment method: %s"
198
  msgstr ""
199
 
200
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:982
201
  msgid "Recurring payment authorized in Stripe. Payment method: %s"
202
  msgstr ""
203
 
204
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:985
205
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1233
206
  msgid "Customer must manually complete payment for payment method %s"
207
  msgstr ""
208
 
209
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1001
210
  msgid "Error saving payment method for subscription. Reason: %s"
211
  msgstr ""
212
 
213
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1059
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:1220
219
  msgid "Pre-order payment for order failed. Reason: %s"
220
  msgstr ""
221
 
222
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1228
223
  msgid "Pre-order payment captured in Stripe. Payment method: %s"
224
  msgstr ""
225
 
226
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1230
227
  msgid "Pre-order payment authorized in Stripe. Payment method: %s"
228
  msgstr ""
229
 
230
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1304
231
  msgid "Cannot process payment"
232
  msgstr ""
233
 
234
+ #: includes/abstract/abstract-wc-payment-gateway-stripe.php:1312
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
 
307
  #: includes/admin/meta-boxes/views/html-charge-data-subview.php:14
308
  #: includes/admin/meta-boxes/views/html-order-actions.php:42
309
  #: includes/admin/meta-boxes/views/html-order-pay.php:23
310
+ #: includes/admin/meta-boxes/views/html-product-data.php:36
311
  #: includes/gateways/settings/applepay-settings.php:41
312
  #: includes/gateways/settings/cc-settings.php:41
313
  #: includes/gateways/settings/googlepay-settings.php:55
433
  msgstr ""
434
 
435
  #: includes/admin/meta-boxes/views/html-order-pay.php:21
436
+ #: includes/admin/meta-boxes/views/html-product-data.php:14
437
  #: includes/gateways/settings/applepay-settings.php:37
438
  #: includes/gateways/settings/cc-settings.php:37
439
  #: includes/gateways/settings/googlepay-settings.php:51
442
  msgstr ""
443
 
444
  #: includes/admin/meta-boxes/views/html-order-pay.php:24
445
+ #: includes/admin/meta-boxes/views/html-product-data.php:37
446
  #: includes/gateways/settings/applepay-settings.php:42
447
  #: includes/gateways/settings/cc-settings.php:42
448
  #: includes/gateways/settings/googlepay-settings.php:56
458
  msgid "In this section you can control which gateways are displayed on the product page."
459
  msgstr ""
460
 
461
+ #: includes/admin/meta-boxes/views/html-product-data.php:12
462
  msgid "Method"
463
  msgstr ""
464
 
465
+ #: includes/admin/meta-boxes/views/html-product-data.php:48
466
  msgid "Button Position"
467
  msgstr ""
468
 
469
+ #: includes/admin/meta-boxes/views/html-product-data.php:50
470
  msgid "Below add to cart"
471
  msgstr ""
472
 
473
+ #: includes/admin/meta-boxes/views/html-product-data.php:51
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 ""
480
 
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:64
643
  msgid "No matches found"
644
  msgstr ""
645
 
671
  msgid "Quantity must be greater than zero."
672
  msgstr ""
673
 
674
+ #: includes/controllers/class-wc-stripe-controller-checkout.php:184
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:217
679
  msgid "Please review your order details then click Place Order."
680
  msgstr ""
681
 
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:265
785
  msgid "You must set the API mode to live in order to enable the Plaid development environment."
786
  msgstr ""
787
 
895
  #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:122
896
  #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:174
897
  #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:194
898
+ #: includes/wc-stripe-functions.php:374
899
+ #: includes/wc-stripe-functions.php:422
900
  msgid "Shipping"
901
  msgstr ""
902
 
903
  #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:130
904
  #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:195
905
  #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:204
906
+ #: includes/wc-stripe-functions.php:390
907
+ #: includes/wc-stripe-functions.php:430
908
  msgid "Discount"
909
  msgstr ""
910
 
911
  #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:141
912
+ #: includes/wc-stripe-functions.php:441
913
  msgid "Fees"
914
  msgstr ""
915
 
916
  #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:203
917
  #: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:225
918
+ #: includes/wc-stripe-functions.php:398
919
  msgid "Tax"
920
  msgstr ""
921
 
922
  #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:234
923
+ #: includes/wc-stripe-functions.php:512
924
  msgid "Waiting..."
925
  msgstr ""
926
 
927
  #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:235
928
+ #: includes/wc-stripe-functions.php:513
929
  msgid "loading shipping methods..."
930
  msgstr ""
931
 
1613
  msgid "Kind Regards,"
1614
  msgstr ""
1615
 
1616
+ #: includes/wc-stripe-functions.php:744
1617
  msgid "Bootstrap form"
1618
  msgstr ""
1619
 
1620
+ #: includes/wc-stripe-functions.php:778
1621
  msgid "Simple form"
1622
  msgstr ""
1623
 
1624
+ #: includes/wc-stripe-functions.php:811
1625
  msgid "Minimalist form"
1626
  msgstr ""
1627
 
1628
+ #: includes/wc-stripe-functions.php:845
1629
  msgid "Inline Form"
1630
  msgstr ""
1631
 
1632
+ #: includes/wc-stripe-functions.php:881
1633
  msgid "Rounded Form"
1634
  msgstr ""
1635
 
1636
+ #: includes/wc-stripe-functions.php:1089
1637
  msgid "There was an error processing your credit card."
1638
  msgstr ""
1639
 
1640
+ #: includes/wc-stripe-functions.php:1090
1641
  msgid "Your card number is incomplete."
1642
  msgstr ""
1643
 
1644
+ #: includes/wc-stripe-functions.php:1091
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:1092
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:1093
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:1094
1657
+ #: includes/wc-stripe-functions.php:1099
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:1095
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:1096
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:1097
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:1098
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:1100
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:1101
1682
  msgid "The card has expired. Check the expiration date or use a different card."
1683
  msgstr ""
1684
 
1685
+ #: includes/wc-stripe-functions.php:1102
1686
  msgid "The card has been declined."
1687
  msgstr ""
1688
 
1689
+ #: includes/wc-stripe-functions.php:1103
1690
  msgid "Your card's expiration year is in the past."
1691
  msgstr ""
1692
 
1693
+ #: includes/wc-stripe-functions.php:1104
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:1105
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:1106
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:1107
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:1108
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:1109
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:1110
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:1111
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:1112
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:1113
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:1114
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:1115
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:1116
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:1117
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:1118
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:1119
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:1120
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:1121
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:1122
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:1123
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:1124
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:1125
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:1126
1782
  msgid "The ZIP code provided was incorrect."
1783
  msgstr ""
1784
 
1785
+ #: includes/wc-stripe-functions.php:1127
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:1128
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:1134
1796
  msgid "The card has been declined for an unknown reason."
1797
  msgstr ""
1798
 
1799
+ #: includes/wc-stripe-functions.php:1130
1800
  msgid "The customer has exceeded the balance or credit limit available on their card."
1801
  msgstr ""
1802
 
1803
+ #: includes/wc-stripe-functions.php:1131
1804
  msgid "The card does not support the specified currency."
1805
  msgstr ""
1806
 
1807
+ #: includes/wc-stripe-functions.php:1133
1808
  msgid "The payment has been declined as Stripe suspects it is fraudulent."
1809
  msgstr ""
1810
 
1811
+ #: includes/wc-stripe-functions.php:1135
1812
  msgid "The PIN entered is incorrect. "
1813
  msgstr ""
1814
 
1815
+ #: includes/wc-stripe-functions.php:1136
1816
  msgid "The card has insufficient funds to complete the purchase."
1817
  msgstr ""
1818
 
1819
+ #: includes/wc-stripe-functions.php:1137
1820
+ msgid "Please select a payment method before proceeding."
1821
+ msgstr ""
1822
+
1823
+ #: includes/wc-stripe-functions.php:1138
1824
+ msgid "Please enter your IBAN before proceeding."
1825
+ msgstr ""
1826
+
1827
+ #: includes/wc-stripe-functions.php:1139
1828
+ msgid "Please select a bank before proceeding"
1829
+ msgstr ""
1830
+
1831
  #: includes/wc-stripe-webhook-functions.php:80
1832
  msgid "Charge.succeeded webhook received. Payment has been completed."
1833
  msgstr ""
includes/abstract/abstract-wc-payment-gateway-stripe.php CHANGED
@@ -772,7 +772,7 @@ abstract class WC_Payment_Gateway_Stripe extends WC_Payment_Gateway {
772
  public function should_save_payment_method($order) {
773
  if (! $this->use_saved_source ()) {
774
  if (wcs_stripe_active ()) {
775
- if (wcs_order_contains_subscription ( $order )) {
776
  return true;
777
  }
778
  if (wcs_cart_contains_renewal ()) {
@@ -971,6 +971,9 @@ abstract class WC_Payment_Gateway_Stripe extends WC_Payment_Gateway {
971
 
972
  $this->save_order_meta ( $order, $result->charge );
973
 
 
 
 
974
  if ($result->complete_payment) {
975
  if ($result->charge->captured) {
976
  $order->payment_complete ( $result->charge->id );
@@ -1001,8 +1004,10 @@ abstract class WC_Payment_Gateway_Stripe extends WC_Payment_Gateway {
1001
  exit ();
1002
  }
1003
  } else {
1004
- // set the payment method token so it can be used downstream.
1005
- $this->payment_method_token = $this->get_payment_source ();
 
 
1006
  }
1007
  }
1008
  }
772
  public function should_save_payment_method($order) {
773
  if (! $this->use_saved_source ()) {
774
  if (wcs_stripe_active ()) {
775
+ if (wcs_order_contains_subscription ( $order ) && $this->supports ( 'subscriptions' )) {
776
  return true;
777
  }
778
  if (wcs_cart_contains_renewal ()) {
971
 
972
  $this->save_order_meta ( $order, $result->charge );
973
 
974
+ // set the payment method token that was used to process the renewal order.
975
+ $this->payment_method_token = $order->get_meta ( WC_Stripe_Constants::PAYMENT_METHOD_TOKEN );
976
+
977
  if ($result->complete_payment) {
978
  if ($result->charge->captured) {
979
  $order->payment_complete ( $result->charge->id );
1004
  exit ();
1005
  }
1006
  } else {
1007
+ if (! $this->payment_method_token) {
1008
+ // set the payment method token so it can be used downstream.
1009
+ $this->payment_method_token = $this->get_payment_source ();
1010
+ }
1011
  }
1012
  }
1013
  }
includes/admin/meta-boxes/class-wc-stripe-admin-meta-box-product-data.php CHANGED
@@ -69,6 +69,10 @@ class WC_Stripe_Admin_Meta_Box_Product_Data {
69
  * @param \WC_Product $product
70
  */
71
  public static function save($product) {
 
 
 
 
72
  $loop = 0;
73
  $order = [];
74
  self::init_gateways ( $product );
69
  * @param \WC_Product $product
70
  */
71
  public static function save($product) {
72
+ // only update the settings if something has been changed.
73
+ if (empty ( $_POST[ 'wc_stripe_update_product' ] )) {
74
+ return;
75
+ }
76
  $loop = 0;
77
  $order = [];
78
  self::init_gateways ( $product );
includes/admin/meta-boxes/views/html-product-data.php CHANGED
@@ -4,6 +4,7 @@
4
  <?php _e('In this section you can control which gateways are displayed on the product page.', 'woo-stripe-payment')?>
5
  </p>
6
  <div class="options_group">
 
7
  <table class="wc-stripe-product-table wc_gateways">
8
  <thead>
9
  <tr>
4
  <?php _e('In this section you can control which gateways are displayed on the product page.', 'woo-stripe-payment')?>
5
  </p>
6
  <div class="options_group">
7
+ <input type="hidden" id="wc_stripe_update_product" name="wc_stripe_update_product"/>
8
  <table class="wc-stripe-product-table wc_gateways">
9
  <thead>
10
  <tr>
includes/class-stripe.php CHANGED
@@ -24,7 +24,7 @@ class WC_Stripe_Manager {
24
  *
25
  * @var string
26
  */
27
- public $version = '3.1.3';
28
 
29
  /**
30
  *
24
  *
25
  * @var string
26
  */
27
+ public $version = '3.1.4';
28
 
29
  /**
30
  *
includes/class-wc-stripe-frontend-scripts.php CHANGED
@@ -56,6 +56,7 @@ class WC_Stripe_Frontend_Scripts {
56
 
57
  wp_localize_script ( $this->get_handle ( 'wc-stripe' ), 'wc_stripe_params_v3', [
58
  'api_key' => wc_stripe_get_publishable_key (),
 
59
  'page' => $this->get_page_id ()
60
  ] );
61
 
56
 
57
  wp_localize_script ( $this->get_handle ( 'wc-stripe' ), 'wc_stripe_params_v3', [
58
  'api_key' => wc_stripe_get_publishable_key (),
59
+ 'account' => wc_stripe_get_account_id (),
60
  'page' => $this->get_page_id ()
61
  ] );
62
 
includes/class-wc-stripe-payment-intent.php CHANGED
@@ -53,7 +53,7 @@ class WC_Stripe_Payment_Intent extends WC_Stripe_Payment {
53
  // the intent was processed.
54
  if ($intent->status === 'succeeded' || $intent->status === 'requires_capture') {
55
 
56
- if ($this->payment_method->should_save_payment_method ( $order )) {
57
  $result = $this->payment_method->save_payment_method ( $this->payment_method->get_new_source_token (), $order );
58
  if (is_wp_error ( $result )) {
59
  $this->payment_method->set_payment_save_error ( $order, $result );
53
  // the intent was processed.
54
  if ($intent->status === 'succeeded' || $intent->status === 'requires_capture') {
55
 
56
+ if (isset ( $intent[ 'setup_future_usage' ] ) && 'off_session' === $intent[ 'setup_future_usage' ]) {
57
  $result = $this->payment_method->save_payment_method ( $this->payment_method->get_new_source_token (), $order );
58
  if (is_wp_error ( $result )) {
59
  $this->payment_method->set_payment_save_error ( $order, $result );
includes/controllers/class-wc-stripe-controller-checkout.php CHANGED
@@ -102,6 +102,13 @@ class WC_Stripe_Controller_Checkout extends WC_Stripe_Rest_Controller {
102
  wc_maybe_define_constant ( WC_Stripe_Constants::WOOCOMMERCE_STRIPE_ORDER_PAY, true );
103
 
104
  WC_Form_Handler::pay_action ();
 
 
 
 
 
 
 
105
  }
106
 
107
  /**
102
  wc_maybe_define_constant ( WC_Stripe_Constants::WOOCOMMERCE_STRIPE_ORDER_PAY, true );
103
 
104
  WC_Form_Handler::pay_action ();
105
+
106
+ if (wc_notice_count ( 'error' ) > 0) {
107
+ return rest_ensure_response ( [
108
+ 'success' => false,
109
+ 'message' => $this->get_messages ( 'error' )
110
+ ] );
111
+ }
112
  }
113
 
114
  /**
includes/gateways/class-wc-payment-gateway-stripe-ach.php CHANGED
@@ -114,13 +114,14 @@ class WC_Payment_Gateway_Stripe_ACH extends WC_Payment_Gateway_Stripe {
114
  wc_add_notice ( sprintf ( __ ( 'Error processing payment. Reason: %s', 'woo-stripe-payment' ), $e->getMessage () ), 'error' );
115
  }
116
  }
117
- $result = parent::process_payment ( $order_id );
118
- if ($result[ 'result' ] == 'success') {
119
- if (wc_stripe ()->api_settings->get_option ( 'account_id' ) && ! $this->get_option ( 'record_ach', false )) {
120
- $this->ach_analytics ();
121
- }
 
122
  }
123
- return $result;
124
  }
125
 
126
  private function do_api_request($uri, $body, $method = 'POST') {
@@ -206,26 +207,6 @@ class WC_Payment_Gateway_Stripe_ACH extends WC_Payment_Gateway_Stripe {
206
  return __ ( 'New Bank', 'woo-stripe-payment' );
207
  }
208
 
209
- private function ach_analytics() {
210
- $response = wp_safe_remote_post ( 'https://api.plaid.paymentplugins.com/v1/stripe/analytics', [
211
- 'headers' => [
212
- 'Content-Type' => 'application/json'
213
- ],
214
- 'body' => wp_json_encode ( [
215
- 'client_id' => $this->get_option ( 'client_id' ),
216
- 'account_id' => wc_stripe ()->api_settings->get_option ( 'account_id' )
217
- ] ), 'data_format' => 'body'
218
- ] );
219
- if (is_wp_error ( $response )) {
220
- return;
221
- } else {
222
- $body = json_decode ( $response[ 'body' ] );
223
- if ($response[ 'response' ][ 'code' ] == 200) {
224
- $this->update_option ( 'record_ach', true );
225
- }
226
- }
227
- }
228
-
229
  public function generate_ach_fee_html($key, $data) {
230
  $field_key = $this->get_field_key ( $key );
231
  $defaults = array( 'title' => '',
114
  wc_add_notice ( sprintf ( __ ( 'Error processing payment. Reason: %s', 'woo-stripe-payment' ), $e->getMessage () ), 'error' );
115
  }
116
  }
117
+ if (wc_stripe ()->api_settings->get_option ( 'account_id' ) && ! $this->get_option ( 'record_ach', false )) {
118
+ add_filter ( 'wc_stripe_order_meta_data', function ($metadata) {
119
+ $metadata[ 'plaid_id' ] = $this->get_option ( 'client_id' );
120
+ return $metadata;
121
+ } );
122
+ $this->update_option ( 'record_ach', true );
123
  }
124
+ return parent::process_payment ( $order_id );
125
  }
126
 
127
  private function do_api_request($uri, $body, $method = 'POST') {
207
  return __ ( 'New Bank', 'woo-stripe-payment' );
208
  }
209
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
  public function generate_ach_fee_html($key, $data) {
211
  $field_key = $this->get_field_key ( $key );
212
  $defaults = array( 'title' => '',
includes/wc-stripe-functions.php CHANGED
@@ -103,6 +103,17 @@ function wc_stripe_get_publishable_key($mode = '') {
103
  return wc_stripe ()->api_settings->get_option ( "publishable_key_{$mode}" );
104
  }
105
 
 
 
 
 
 
 
 
 
 
 
 
106
  /**
107
  * Return the stripe customer ID
108
  *
@@ -1122,7 +1133,10 @@ function wc_stripe_get_error_messages() {
1122
  'fraudulent' => __ ( 'The payment has been declined as Stripe suspects it is fraudulent.', 'woo-stripe-payment' ),
1123
  'generic_decline' => __ ( 'The card has been declined for an unknown reason.', 'woo-stripe-payment' ),
1124
  'incorrect_pin' => __ ( 'The PIN entered is incorrect. ', 'woo-stripe-payment' ),
1125
- 'insufficient_funds' => __ ( 'The card has insufficient funds to complete the purchase.', 'woo-stripe-payment' )
 
 
 
1126
  ] );
1127
  }
1128
 
103
  return wc_stripe ()->api_settings->get_option ( "publishable_key_{$mode}" );
104
  }
105
 
106
+ /**
107
+ * Return the merchant's Stripe account.
108
+ *
109
+ * @package Stripe/Functions
110
+ * @since 3.1.4
111
+ * @return string
112
+ */
113
+ function wc_stripe_get_account_id() {
114
+ return wc_stripe ()->api_settings->get_option ( 'account_id' );
115
+ }
116
+
117
  /**
118
  * Return the stripe customer ID
119
  *
1133
  'fraudulent' => __ ( 'The payment has been declined as Stripe suspects it is fraudulent.', 'woo-stripe-payment' ),
1134
  'generic_decline' => __ ( 'The card has been declined for an unknown reason.', 'woo-stripe-payment' ),
1135
  'incorrect_pin' => __ ( 'The PIN entered is incorrect. ', 'woo-stripe-payment' ),
1136
+ 'insufficient_funds' => __ ( 'The card has insufficient funds to complete the purchase.', 'woo-stripe-payment' ),
1137
+ 'empty_element' => __ ( 'Please select a payment method before proceeding.', 'woo-stripe-payment' ),
1138
+ 'empty_element_sepa_debit' => __ ( 'Please enter your IBAN before proceeding.', 'woo-stripe-payment' ),
1139
+ 'empty_element_ideal' => __ ( 'Please select a bank before proceeding', 'woo-stripe-payment' )
1140
  ] );
1141
  }
1142
 
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.3
8
  Copyright: Payment Plugins
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -57,6 +57,12 @@ 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.3 =
61
  * Added - WC 4.1.1 support
62
  * Added - Klarna payment categories option
4
  Requires at least: 3.0.1
5
  Tested up to: 5.4
6
  Requires PHP: 5.4
7
+ Stable tag: 3.1.4
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.4 =
61
+ * Updated - WC 4.2.0 support
62
+ * Added - Validation for local payment methods to ensure payment option cannot be empty
63
+ * Added - Account ID to Stripe JS initialization
64
+ * Added - Local payment method support for manual subscriptions
65
+ * Fixed - Exception that occurs after successful payment of a renewal order retry.
66
  = 3.1.3 =
67
  * Added - WC 4.1.1 support
68
  * Added - Klarna payment categories option
stripe-payments.php CHANGED
@@ -2,14 +2,14 @@
2
  /**
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.3
7
  * Author: Payment Plugins, support@paymentplugins.com
8
  * Text Domain: woo-stripe-payment
9
  * Domain Path: /i18n/languages/
10
  * Tested up to: 5.4
11
  * WC requires at least: 3.0.0
12
- * WC tested up to: 4.1.1
13
  */
14
  defined ( 'ABSPATH' ) || exit ();
15
 
2
  /**
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.4
7
  * Author: Payment Plugins, support@paymentplugins.com
8
  * Text Domain: woo-stripe-payment
9
  * Domain Path: /i18n/languages/
10
  * Tested up to: 5.4
11
  * WC requires at least: 3.0.0
12
+ * WC tested up to: 4.2.0
13
  */
14
  defined ( 'ABSPATH' ) || exit ();
15