WooCommerce Stripe Payment Gateway - Version 4.1.10

Version Description

  • 2018-09-17 =
  • Fix - When 3DS card redirect status is "not_required", charge the 3DS source.
  • Fix - Payment Request not validating quantity before payment sheet shows.
  • Fix - Test mode info not showing when description field is left blank.
  • Add - Filter for Payment Request localized parameters wc_stripe_payment_request_params.
  • Update - Stripe API version to 2018-09-06.

See changelog for all versions.

=

Download this release

Release Info

Developer royho
Plugin Icon 128x128 WooCommerce Stripe Payment Gateway
Version 4.1.10
Comparing to
See all releases

Code changes from version 4.1.9 to 4.1.10

assets/js/stripe-admin.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(e){"use strict";var t={isTestMode:function(){return e("#woocommerce_stripe_testmode").is(":checked")},getSecretKey:function(){return t.isTestMode()?e("#woocommerce_stripe_test_secret_key").val():e("#woocommerce_stripe_secret_key").val()},init:function(){e(document.body).on("change","#woocommerce_stripe_testmode",function(){var t=e("#woocommerce_stripe_test_secret_key").parents("tr").eq(0),o=e("#woocommerce_stripe_test_publishable_key").parents("tr").eq(0),c=e("#woocommerce_stripe_secret_key").parents("tr").eq(0),r=e("#woocommerce_stripe_publishable_key").parents("tr").eq(0);e(this).is(":checked")?(t.show(),o.show(),c.hide(),r.hide()):(t.hide(),o.hide(),c.show(),r.show())}),e("#woocommerce_stripe_testmode").change(),e("#woocommerce_stripe_stripe_checkout").change(function(){e(this).is(":checked")?e("#woocommerce_stripe_stripe_checkout_image, #woocommerce_stripe_stripe_checkout_description").closest("tr").show():e("#woocommerce_stripe_stripe_checkout_image, #woocommerce_stripe_stripe_checkout_description").closest("tr").hide()}).change(),e("#woocommerce_stripe_payment_request").change(function(){e(this).is(":checked")?e("#woocommerce_stripe_payment_request_button_theme, #woocommerce_stripe_payment_request_button_type, #woocommerce_stripe_payment_request_button_height").closest("tr").show():e("#woocommerce_stripe_payment_request_button_theme, #woocommerce_stripe_payment_request_button_type, #woocommerce_stripe_payment_request_button_height").closest("tr").hide()}).change()}};t.init()});
1
+ jQuery(function(r){"use strict";var e={isTestMode:function(){return r("#woocommerce_stripe_testmode").is(":checked")},getSecretKey:function(){return e.isTestMode()?r("#woocommerce_stripe_test_secret_key").val():r("#woocommerce_stripe_secret_key").val()},init:function(){r(document.body).on("change","#woocommerce_stripe_testmode",function(){var e=r("#woocommerce_stripe_test_secret_key").parents("tr").eq(0),t=r("#woocommerce_stripe_test_publishable_key").parents("tr").eq(0),o=r("#woocommerce_stripe_secret_key").parents("tr").eq(0),c=r("#woocommerce_stripe_publishable_key").parents("tr").eq(0);r(this).is(":checked")?(e.show(),t.show(),o.hide(),c.hide()):(e.hide(),t.hide(),o.show(),c.show())}),r("#woocommerce_stripe_testmode").change(),r("#woocommerce_stripe_stripe_checkout").change(function(){r(this).is(":checked")?r("#woocommerce_stripe_stripe_checkout_image, #woocommerce_stripe_stripe_checkout_description").closest("tr").show():r("#woocommerce_stripe_stripe_checkout_image, #woocommerce_stripe_stripe_checkout_description").closest("tr").hide()}).change(),r("#woocommerce_stripe_payment_request").change(function(){r(this).is(":checked")?r("#woocommerce_stripe_payment_request_button_theme, #woocommerce_stripe_payment_request_button_type, #woocommerce_stripe_payment_request_button_height").closest("tr").show():r("#woocommerce_stripe_payment_request_button_theme, #woocommerce_stripe_payment_request_button_type, #woocommerce_stripe_payment_request_button_height").closest("tr").hide()}).change()}};e.init()});
assets/js/stripe-payment-request.js CHANGED
@@ -347,6 +347,8 @@ jQuery( function( $ ) {
347
348
// Check the availability of the Payment Request API first.
349
paymentRequest.canMakePayment().then( function( result ) {
350
if ( result ) {
351
paymentRequestType = result.applePay ? 'apple_pay' : 'payment_request_api';
352
@@ -362,6 +364,9 @@ jQuery( function( $ ) {
362
} else if ( addToCartButton.is( '.wc-variation-selection-needed' ) ) {
363
window.alert( wc_add_to_cart_variation_params.i18n_make_a_selection_text );
364
}
365
} else {
366
wc_stripe_payment_request.addToCart();
367
}
@@ -380,16 +385,22 @@ jQuery( function( $ ) {
380
} );
381
} );
382
383
- $( '.quantity' ).on( 'change', '.qty', function() {
384
$( '#wc-stripe-payment-request-button' ).block( { message: null } );
385
386
$.when( wc_stripe_payment_request.getSelectedProductData() ).then( function( response ) {
387
- $.when( paymentRequest.update( {
388
- total: response.total,
389
- displayItems: response.displayItems
390
- } ) ).then( function() {
391
$( '#wc-stripe-payment-request-button' ).unblock();
392
- } );
393
} );
394
} );
395
}
347
348
// Check the availability of the Payment Request API first.
349
paymentRequest.canMakePayment().then( function( result ) {
350
+ var paymentRequestError = [];
351
+
352
if ( result ) {
353
paymentRequestType = result.applePay ? 'apple_pay' : 'payment_request_api';
354
364
} else if ( addToCartButton.is( '.wc-variation-selection-needed' ) ) {
365
window.alert( wc_add_to_cart_variation_params.i18n_make_a_selection_text );
366
}
367
+ } else if ( 0 < paymentRequestError.length ) {
368
+ e.preventDefault();
369
+ window.alert( paymentRequestError );
370
} else {
371
wc_stripe_payment_request.addToCart();
372
}
385
} );
386
} );
387
388
+ $( '.quantity' ).on( 'keyup', '.qty', function() {
389
$( '#wc-stripe-payment-request-button' ).block( { message: null } );
390
+ paymentRequestError = [];
391
392
$.when( wc_stripe_payment_request.getSelectedProductData() ).then( function( response ) {
393
+ if ( response.error ) {
394
+ paymentRequestError = [ response.error ];
395
$( '#wc-stripe-payment-request-button' ).unblock();
396
+ } else {
397
+ $.when( paymentRequest.update( {
398
+ total: response.total,
399
+ displayItems: response.displayItems
400
+ } ) ).then( function() {
401
+ $( '#wc-stripe-payment-request-button' ).unblock();
402
+ } );
403
+ }
404
} );
405
} );
406
}
assets/js/stripe-payment-request.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(t){"use strict";var e,a=Stripe(wc_stripe_payment_request_params.stripe.key),n={getAjaxURL:function(t){return wc_stripe_payment_request_params.ajax_url.toString().replace("%%endpoint%%","wc_stripe_"+t)},getCartDetails:function(){var e={security:wc_stripe_payment_request_params.nonce.payment};t.ajax({type:"POST",data:e,url:n.getAjaxURL("get_cart_details"),success:function(t){n.startPaymentRequest(t)}})},getAttributes:function(){var e={},a=0,n=0;return t(".variations_form").find(".variations select").each(function(){var r=t(this).data("attribute_name")||t(this).attr("name"),i=t(this).val()||"";i.length>0&&n++,a++,e[r]=i}),{count:a,chosenCount:n,data:e}},processSource:function(e,a){var r=n.getOrderData(e,a);return t.ajax({type:"POST",data:r,dataType:"json",url:n.getAjaxURL("create_order")})},getOrderData:function(t,e){var a=t.source,n=a.owner.email,r=a.owner.phone,i=a.owner.address,s=a.owner.name,p=t.shippingAddress,o={_wpnonce:wc_stripe_payment_request_params.nonce.checkout,billing_first_name:null!==s?s.split(" ").slice(0,1).join(" "):"",billing_last_name:null!==s?s.split(" ").slice(1).join(" "):"",billing_company:"",billing_email:null!==n?n:t.payerEmail,billing_phone:null!==r?r:t.payerPhone.replace("/[() -]/g",""),billing_country:null!==i?i.country:"",billing_address_1:null!==i?i.line1:"",billing_address_2:null!==i?i.line2:"",billing_city:null!==i?i.city:"",billing_state:null!==i?i.state:"",billing_postcode:null!==i?i.postal_code:"",shipping_first_name:"",shipping_last_name:"",shipping_company:"",shipping_country:"",shipping_address_1:"",shipping_address_2:"",shipping_city:"",shipping_state:"",shipping_postcode:"",shipping_method:[null===t.shippingOption?null:t.shippingOption.id],order_comments:"",payment_method:"stripe",ship_to_different_address:1,terms:1,stripe_source:a.id,payment_request_type:e};return p&&(o.shipping_first_name=p.recipient.split(" ").slice(0,1).join(" "),o.shipping_last_name=p.recipient.split(" ").slice(1).join(" "),o.shipping_company=p.organization,o.shipping_country=p.country,o.shipping_address_1=void 0===p.addressLine[0]?"":p.addressLine[0],o.shipping_address_2=void 0===p.addressLine[1]?"":p.addressLine[1],o.shipping_city=p.city,o.shipping_state=p.region,o.shipping_postcode=p.postalCode),o},getErrorMessageHTML:function(e){return t('<div class="woocommerce-error" />').text(e)},abortPayment:function(e,a){if(e.complete("fail"),t(".woocommerce-error").remove(),wc_stripe_payment_request_params.is_product_page){var n=t(".product");n.before(a),t("html, body").animate({scrollTop:n.prev(".woocommerce-error").offset().top},600)}else{var r=t(".shop_table.cart").closest("form");r.before(a),t("html, body").animate({scrollTop:r.prev(".woocommerce-error").offset().top},600)}},completePayment:function(t,e){n.block(),t.complete("success"),window.location=e},block:function(){t.blockUI({message:null,overlayCSS:{background:"#fff",opacity:.6}})},updateShippingOptions:function(a,r){var i={security:wc_stripe_payment_request_params.nonce.shipping,country:r.country,state:r.region,postcode:r.postalCode,city:r.city,address:void 0===r.addressLine[0]?"":r.addressLine[0],address_2:void 0===r.addressLine[1]?"":r.addressLine[1],payment_request_type:e};return t.ajax({type:"POST",data:i,url:n.getAjaxURL("get_shipping_options")})},updateShippingDetails:function(a,r){var i={security:wc_stripe_payment_request_params.nonce.update_shipping,shipping_method:[r.id],payment_request_type:e};return t.ajax({type:"POST",data:i,url:n.getAjaxURL("update_shipping_method")})},addToCart:function(){var e=t(".single_add_to_cart_button").val();t(".single_variation_wrap").length&&(e=t(".single_variation_wrap").find('input[name="product_id"]').val());var a={security:wc_stripe_payment_request_params.nonce.add_to_cart,product_id:e,qty:t(".quantity .qty").val(),attributes:t(".variations_form").length?n.getAttributes().data:[]};return t.ajax({type:"POST",data:a,url:n.getAjaxURL("add_to_cart")})},clearCart:function(){var e={security:wc_stripe_payment_request_params.nonce.clear_cart};return t.ajax({type:"POST",data:e,url:n.getAjaxURL("clear_cart"),success:function(t){}})},getRequestOptionsFromLocal:function(){return{total:wc_stripe_payment_request_params.product.total,currency:wc_stripe_payment_request_params.checkout.currency_code,country:wc_stripe_payment_request_params.checkout.country_code,requestPayerName:!0,requestPayerEmail:!0,requestPayerPhone:!0,requestShipping:wc_stripe_payment_request_params.product.requestShipping,displayItems:wc_stripe_payment_request_params.product.displayItems}},startPaymentRequest:function(r){var i,s;wc_stripe_payment_request_params.is_product_page?(s=n.getRequestOptionsFromLocal(),i=s):(s={total:r.order_data.total,currency:r.order_data.currency,country:r.order_data.country_code,requestPayerName:!0,requestPayerEmail:!0,requestPayerPhone:!0,requestShipping:!!r.shipping_required,displayItems:r.order_data.displayItems},i=r.order_data);var p=a.paymentRequest(s),o=a.elements({locale:wc_stripe_payment_request_params.button.locale}).create("paymentRequestButton",{paymentRequest:p,style:{paymentRequestButton:{type:wc_stripe_payment_request_params.button.type,theme:wc_stripe_payment_request_params.button.theme,height:wc_stripe_payment_request_params.button.height+"px"}}});p.canMakePayment().then(function(a){if(a){if(e=a.applePay?"apple_pay":"payment_request_api",wc_stripe_payment_request_params.is_product_page){var r=t(".single_add_to_cart_button");o.on("click",function(t){r.is(".disabled")?(t.preventDefault(),r.is(".wc-variation-is-unavailable")?window.alert(wc_add_to_cart_variation_params.i18n_unavailable_text):r.is(".wc-variation-selection-needed")&&window.alert(wc_add_to_cart_variation_params.i18n_make_a_selection_text)):n.addToCart()}),t(document.body).on("woocommerce_variation_has_changed",function(){t("#wc-stripe-payment-request-button").block({message:null}),t.when(n.getSelectedProductData()).then(function(e){t.when(p.update({total:e.total,displayItems:e.displayItems})).then(function(){t("#wc-stripe-payment-request-button").unblock()})})}),t(".quantity").on("change",".qty",function(){t("#wc-stripe-payment-request-button").block({message:null}),t.when(n.getSelectedProductData()).then(function(e){t.when(p.update({total:e.total,displayItems:e.displayItems})).then(function(){t("#wc-stripe-payment-request-button").unblock()})})})}t("#wc-stripe-payment-request-button").length&&(o.mount("#wc-stripe-payment-request-button"),t("#wc-stripe-payment-request-button-separator").show())}else t("#wc-stripe-payment-request-button").hide(),t("#wc-stripe-payment-request-button-separator").hide()}),p.on("shippingaddresschange",function(e){t.when(n.updateShippingOptions(i,e.shippingAddress)).then(function(t){e.updateWith({status:t.result,shippingOptions:t.shipping_options,total:t.total,displayItems:t.displayItems})})}),p.on("shippingoptionchange",function(e){t.when(n.updateShippingDetails(i,e.shippingOption)).then(function(t){"success"===t.result&&e.updateWith({status:"success",total:t.total,displayItems:t.displayItems}),"fail"===t.result&&e.updateWith({status:"fail"})})}),p.on("source",function(a){"no"===wc_stripe_payment_request_params.stripe.allow_prepaid_card&&"prepaid"===a.source.card.funding?n.abortPayment(a,n.getErrorMessageHTML(wc_stripe_payment_request_params.i18n.no_prepaid_card)):t.when(n.processSource(a,e)).then(function(t){"success"===t.result?n.completePayment(a,t.redirect):n.abortPayment(a,t.messages)})})},getSelectedProductData:function(){var e=t(".single_add_to_cart_button").val();t(".single_variation_wrap").length&&(e=t(".single_variation_wrap").find('input[name="product_id"]').val());var a={security:wc_stripe_payment_request_params.nonce.get_selected_product_data,product_id:e,qty:t(".quantity .qty").val(),attributes:t(".variations_form").length?n.getAttributes().data:[]};return t.ajax({type:"POST",data:a,url:n.getAjaxURL("get_selected_product_data")})},init:function(){wc_stripe_payment_request_params.is_product_page?n.startPaymentRequest(""):n.getCartDetails()}};n.init(),t(document.body).on("updated_cart_totals",function(){n.init()}),t(document.body).on("updated_checkout",function(){n.init()})});
1
+ jQuery(function(i){"use strict";var s,p=Stripe(wc_stripe_payment_request_params.stripe.key),o={getAjaxURL:function(t){return wc_stripe_payment_request_params.ajax_url.toString().replace("%%endpoint%%","wc_stripe_"+t)},getCartDetails:function(){var t={security:wc_stripe_payment_request_params.nonce.payment};i.ajax({type:"POST",data:t,url:o.getAjaxURL("get_cart_details"),success:function(t){o.startPaymentRequest(t)}})},getAttributes:function(){var t=i(".variations_form").find(".variations select"),a={},n=0,r=0;return t.each(function(){var t=i(this).data("attribute_name")||i(this).attr("name"),e=i(this).val()||"";0<e.length&&r++,n++,a[t]=e}),{count:n,chosenCount:r,data:a}},processSource:function(t,e){var a=o.getOrderData(t,e);return i.ajax({type:"POST",data:a,dataType:"json",url:o.getAjaxURL("create_order")})},getOrderData:function(t,e){var a=t.source,n=a.owner.email,r=a.owner.phone,i=a.owner.address,s=a.owner.name,p=t.shippingAddress,o={_wpnonce:wc_stripe_payment_request_params.nonce.checkout,billing_first_name:null!==s?s.split(" ").slice(0,1).join(" "):"",billing_last_name:null!==s?s.split(" ").slice(1).join(" "):"",billing_company:"",billing_email:null!==n?n:t.payerEmail,billing_phone:null!==r?r:t.payerPhone.replace("/[() -]/g",""),billing_country:null!==i?i.country:"",billing_address_1:null!==i?i.line1:"",billing_address_2:null!==i?i.line2:"",billing_city:null!==i?i.city:"",billing_state:null!==i?i.state:"",billing_postcode:null!==i?i.postal_code:"",shipping_first_name:"",shipping_last_name:"",shipping_company:"",shipping_country:"",shipping_address_1:"",shipping_address_2:"",shipping_city:"",shipping_state:"",shipping_postcode:"",shipping_method:[null===t.shippingOption?null:t.shippingOption.id],order_comments:"",payment_method:"stripe",ship_to_different_address:1,terms:1,stripe_source:a.id,payment_request_type:e};return p&&(o.shipping_first_name=p.recipient.split(" ").slice(0,1).join(" "),o.shipping_last_name=p.recipient.split(" ").slice(1).join(" "),o.shipping_company=p.organization,o.shipping_country=p.country,o.shipping_address_1=void 0===p.addressLine[0]?"":p.addressLine[0],o.shipping_address_2=void 0===p.addressLine[1]?"":p.addressLine[1],o.shipping_city=p.city,o.shipping_state=p.region,o.shipping_postcode=p.postalCode),o},getErrorMessageHTML:function(t){return i('<div class="woocommerce-error" />').text(t)},abortPayment:function(t,e){if(t.complete("fail"),i(".woocommerce-error").remove(),wc_stripe_payment_request_params.is_product_page){var a=i(".product");a.before(e),i("html, body").animate({scrollTop:a.prev(".woocommerce-error").offset().top},600)}else{var n=i(".shop_table.cart").closest("form");n.before(e),i("html, body").animate({scrollTop:n.prev(".woocommerce-error").offset().top},600)}},completePayment:function(t,e){o.block(),t.complete("success"),window.location=e},block:function(){i.blockUI({message:null,overlayCSS:{background:"#fff",opacity:.6}})},updateShippingOptions:function(t,e){var a={security:wc_stripe_payment_request_params.nonce.shipping,country:e.country,state:e.region,postcode:e.postalCode,city:e.city,address:void 0===e.addressLine[0]?"":e.addressLine[0],address_2:void 0===e.addressLine[1]?"":e.addressLine[1],payment_request_type:s};return i.ajax({type:"POST",data:a,url:o.getAjaxURL("get_shipping_options")})},updateShippingDetails:function(t,e){var a={security:wc_stripe_payment_request_params.nonce.update_shipping,shipping_method:[e.id],payment_request_type:s};return i.ajax({type:"POST",data:a,url:o.getAjaxURL("update_shipping_method")})},addToCart:function(){var t=i(".single_add_to_cart_button").val();i(".single_variation_wrap").length&&(t=i(".single_variation_wrap").find('input[name="product_id"]').val());var e={security:wc_stripe_payment_request_params.nonce.add_to_cart,product_id:t,qty:i(".quantity .qty").val(),attributes:i(".variations_form").length?o.getAttributes().data:[]};return i.ajax({type:"POST",data:e,url:o.getAjaxURL("add_to_cart")})},clearCart:function(){var t={security:wc_stripe_payment_request_params.nonce.clear_cart};return i.ajax({type:"POST",data:t,url:o.getAjaxURL("clear_cart"),success:function(t){}})},getRequestOptionsFromLocal:function(){return{total:wc_stripe_payment_request_params.product.total,currency:wc_stripe_payment_request_params.checkout.currency_code,country:wc_stripe_payment_request_params.checkout.country_code,requestPayerName:!0,requestPayerEmail:!0,requestPayerPhone:!0,requestShipping:wc_stripe_payment_request_params.product.requestShipping,displayItems:wc_stripe_payment_request_params.product.displayItems}},startPaymentRequest:function(t){var a,e;a=wc_stripe_payment_request_params.is_product_page?e=o.getRequestOptionsFromLocal():(e={total:t.order_data.total,currency:t.order_data.currency,country:t.order_data.country_code,requestPayerName:!0,requestPayerEmail:!0,requestPayerPhone:!0,requestShipping:!!t.shipping_required,displayItems:t.order_data.displayItems},t.order_data);var n=p.paymentRequest(e),r=p.elements({locale:wc_stripe_payment_request_params.button.locale}).create("paymentRequestButton",{paymentRequest:n,style:{paymentRequestButton:{type:wc_stripe_payment_request_params.button.type,theme:wc_stripe_payment_request_params.button.theme,height:wc_stripe_payment_request_params.button.height+"px"}}});n.canMakePayment().then(function(t){var e=[];if(t){if(s=t.applePay?"apple_pay":"payment_request_api",wc_stripe_payment_request_params.is_product_page){var a=i(".single_add_to_cart_button");r.on("click",function(t){a.is(".disabled")?(t.preventDefault(),a.is(".wc-variation-is-unavailable")?window.alert(wc_add_to_cart_variation_params.i18n_unavailable_text):a.is(".wc-variation-selection-needed")&&window.alert(wc_add_to_cart_variation_params.i18n_make_a_selection_text)):0<e.length?(t.preventDefault(),window.alert(e)):o.addToCart()}),i(document.body).on("woocommerce_variation_has_changed",function(){i("#wc-stripe-payment-request-button").block({message:null}),i.when(o.getSelectedProductData()).then(function(t){i.when(n.update({total:t.total,displayItems:t.displayItems})).then(function(){i("#wc-stripe-payment-request-button").unblock()})})}),i(".quantity").on("keyup",".qty",function(){i("#wc-stripe-payment-request-button").block({message:null}),e=[],i.when(o.getSelectedProductData()).then(function(t){t.error?(e=[t.error],i("#wc-stripe-payment-request-button").unblock()):i.when(n.update({total:t.total,displayItems:t.displayItems})).then(function(){i("#wc-stripe-payment-request-button").unblock()})})})}i("#wc-stripe-payment-request-button").length&&(r.mount("#wc-stripe-payment-request-button"),i("#wc-stripe-payment-request-button-separator").show())}else i("#wc-stripe-payment-request-button").hide(),i("#wc-stripe-payment-request-button-separator").hide()}),n.on("shippingaddresschange",function(e){i.when(o.updateShippingOptions(a,e.shippingAddress)).then(function(t){e.updateWith({status:t.result,shippingOptions:t.shipping_options,total:t.total,displayItems:t.displayItems})})}),n.on("shippingoptionchange",function(e){i.when(o.updateShippingDetails(a,e.shippingOption)).then(function(t){"success"===t.result&&e.updateWith({status:"success",total:t.total,displayItems:t.displayItems}),"fail"===t.result&&e.updateWith({status:"fail"})})}),n.on("source",function(e){"no"===wc_stripe_payment_request_params.stripe.allow_prepaid_card&&"prepaid"===e.source.card.funding?o.abortPayment(e,o.getErrorMessageHTML(wc_stripe_payment_request_params.i18n.no_prepaid_card)):i.when(o.processSource(e,s)).then(function(t){"success"===t.result?o.completePayment(e,t.redirect):o.abortPayment(e,t.messages)})})},getSelectedProductData:function(){var t=i(".single_add_to_cart_button").val();i(".single_variation_wrap").length&&(t=i(".single_variation_wrap").find('input[name="product_id"]').val());var e={security:wc_stripe_payment_request_params.nonce.get_selected_product_data,product_id:t,qty:i(".quantity .qty").val(),attributes:i(".variations_form").length?o.getAttributes().data:[]};return i.ajax({type:"POST",data:e,url:o.getAjaxURL("get_selected_product_data")})},init:function(){wc_stripe_payment_request_params.is_product_page?o.startPaymentRequest(""):o.getCartDetails()}};o.init(),i(document.body).on("updated_cart_totals",function(){o.init()}),i(document.body).on("updated_checkout",function(){o.init()})});
assets/js/stripe.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(e){"use strict";var r,t,o,n=Stripe(wc_stripe_params.key),s=Object.keys(wc_stripe_params.elements_options).length?wc_stripe_params.elements_options:{},a=Object.keys(wc_stripe_params.sepa_elements_options).length?wc_stripe_params.sepa_elements_options:{},i=n.elements(s),c=i.create("iban",a),p={getAjaxURL:function(e){return wc_stripe_params.ajaxurl.toString().replace("%%endpoint%%","wc_stripe_"+e)},unmountElements:function(){"yes"===wc_stripe_params.inline_cc_form?r.unmount("#stripe-card-element"):(r.unmount("#stripe-card-element"),t.unmount("#stripe-exp-element"),o.unmount("#stripe-cvc-element"))},mountElements:function(){e("#stripe-card-element").length&&("yes"===wc_stripe_params.inline_cc_form?r.mount("#stripe-card-element"):(r.mount("#stripe-card-element"),t.mount("#stripe-exp-element"),o.mount("#stripe-cvc-element")))},createElements:function(){var n={base:{iconColor:"#666EE8",color:"#31325F",fontSize:"15px","::placeholder":{color:"#CFD7E0"}}},s={focus:"focused",empty:"empty",invalid:"invalid"};n=wc_stripe_params.elements_styling?wc_stripe_params.elements_styling:n,s=wc_stripe_params.elements_classes?wc_stripe_params.elements_classes:s,"yes"===wc_stripe_params.inline_cc_form?(r=i.create("card",{style:n,hidePostalCode:!0})).addEventListener("change",function(r){p.onCCFormChange(),r.error&&e(document.body).trigger("stripeError",r)}):(r=i.create("cardNumber",{style:n,classes:s}),t=i.create("cardExpiry",{style:n,classes:s}),o=i.create("cardCvc",{style:n,classes:s}),r.addEventListener("change",function(r){p.onCCFormChange(),p.updateCardBrand(r.brand),r.error&&e(document.body).trigger("stripeError",r)}),t.addEventListener("change",function(r){p.onCCFormChange(),r.error&&e(document.body).trigger("stripeError",r)}),o.addEventListener("change",function(r){p.onCCFormChange(),r.error&&e(document.body).trigger("stripeError",r)})),"yes"===wc_stripe_params.is_checkout?e(document.body).on("updated_checkout",function(){r&&p.unmountElements(),p.mountElements(),e("#stripe-iban-element").length&&c.mount("#stripe-iban-element")}):(e("form#add_payment_method").length||e("form#order_review").length)&&(p.mountElements(),e("#stripe-iban-element").length&&c.mount("#stripe-iban-element"))},updateCardBrand:function(r){var t={visa:"stripe-visa-brand",mastercard:"stripe-mastercard-brand",amex:"stripe-amex-brand",discover:"stripe-discover-brand",diners:"stripe-diners-brand",jcb:"stripe-jcb-brand",unknown:"stripe-credit-card-brand"},o=e(".stripe-card-brand"),n="stripe-credit-card-brand";r in t&&(n=t[r]),e.each(t,function(e,r){o.removeClass(r)}),o.addClass(n)},init:function(){"yes"!==wc_stripe_params.is_change_payment_page&&"yes"!==wc_stripe_params.is_pay_for_order_page||e(document.body).trigger("wc-credit-card-form-init"),this.stripe_checkout_submit=!1,e("form.woocommerce-checkout").length&&(this.form=e("form.woocommerce-checkout")),e("form.woocommerce-checkout").on("checkout_place_order_stripe checkout_place_order_stripe_bancontact checkout_place_order_stripe_sofort checkout_place_order_stripe_giropay checkout_place_order_stripe_ideal checkout_place_order_stripe_alipay checkout_place_order_stripe_sepa",this.onSubmit),e("form#order_review").length&&(this.form=e("form#order_review")),e("form#order_review, form#add_payment_method").on("submit",this.onSubmit),e("form#add_payment_method").length&&(this.form=e("form#add_payment_method")),e("form.woocommerce-checkout").on("change",this.reset),e(document).on("stripeError",this.onError).on("checkout_error",this.reset),c.on("change",this.onSepaError),p.createElements(),"yes"===wc_stripe_params.is_stripe_checkout&&e(document.body).on("click",".wc-stripe-checkout-button",function(){return p.openModal(),!1})},isStripeChosen:function(){return e("#payment_method_stripe, #payment_method_stripe_bancontact, #payment_method_stripe_sofort, #payment_method_stripe_giropay, #payment_method_stripe_ideal, #payment_method_stripe_alipay, #payment_method_stripe_sepa, #payment_method_stripe_eps, #payment_method_stripe_multibanco").is(":checked")||e("#payment_method_stripe").is(":checked")&&"new"===e('input[name="wc-stripe-payment-token"]:checked').val()||e("#payment_method_stripe_sepa").is(":checked")&&"new"===e('input[name="wc-stripe-payment-token"]:checked').val()},isStripeSaveCardChosen:function(){return e("#payment_method_stripe").is(":checked")&&e('input[name="wc-stripe-payment-token"]').is(":checked")&&"new"!==e('input[name="wc-stripe-payment-token"]:checked').val()||e("#payment_method_stripe_sepa").is(":checked")&&e('input[name="wc-stripe_sepa-payment-token"]').is(":checked")&&"new"!==e('input[name="wc-stripe_sepa-payment-token"]:checked').val()},isStripeCardChosen:function(){return e("#payment_method_stripe").is(":checked")},isBancontactChosen:function(){return e("#payment_method_stripe_bancontact").is(":checked")},isGiropayChosen:function(){return e("#payment_method_stripe_giropay").is(":checked")},isIdealChosen:function(){return e("#payment_method_stripe_ideal").is(":checked")},isSofortChosen:function(){return e("#payment_method_stripe_sofort").is(":checked")},isAlipayChosen:function(){return e("#payment_method_stripe_alipay").is(":checked")},isSepaChosen:function(){return e("#payment_method_stripe_sepa").is(":checked")},isP24Chosen:function(){return e("#payment_method_stripe_p24").is(":checked")},isEpsChosen:function(){return e("#payment_method_stripe_eps").is(":checked")},isMultibancoChosen:function(){return e("#payment_method_stripe_multibanco").is(":checked")},hasSource:function(){return 0<e("input.stripe-source").length},hasToken:function(){return 0<e("input.stripe_token").length},isMobile:function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},isStripeModalNeeded:function(e){var r=p.form.find("input.stripe_token");return(!p.stripe_submit||!r)&&!!p.isStripeChosen()},block:function(){p.isMobile()||p.form.block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(){p.form.unblock()},getSelectedPaymentElement:function(){return e('.payment_methods input[name="payment_method"]:checked')},openModal:function(){var r=p.form,t=e("#stripe-payment-data");p.reset();StripeCheckout.open({key:wc_stripe_params.key,billingAddress:t.data("billing-address"),zipCode:t.data("verify-zip"),amount:t.data("amount"),name:t.data("name"),description:t.data("description"),currency:t.data("currency"),image:t.data("image"),locale:t.data("locale"),email:e("#billing_email").val()||t.data("email"),panelLabel:t.data("panel-label"),allowRememberMe:t.data("allow-remember-me"),token:function(e){if(r.find("input.stripe_source").remove(),"token"===e.object)n.createSource({type:"card",token:e.id}).then(p.sourceResponse);else if("source"===e.object){var t={source:e};p.sourceResponse(t)}},closed:p.onClose()})},resetModal:function(){p.reset(),p.stripe_checkout_submit=!1},onClose:function(){p.unblock()},getOwnerDetails:function(){var r=e("#billing_first_name").length?e("#billing_first_name").val():wc_stripe_params.billing_first_name,t=e("#billing_last_name").length?e("#billing_last_name").val():wc_stripe_params.billing_last_name,o={owner:{name:"",address:{},email:"",phone:""}};return o.owner.name=r,o.owner.name=r&&t?r+" "+t:e("#stripe-payment-data").data("full-name"),o.owner.email=e("#billing_email").val(),o.owner.phone=e("#billing_phone").val(),(void 0===o.owner.phone||0>=o.owner.phone.length)&&delete o.owner.phone,(void 0===o.owner.email||0>=o.owner.email.length)&&(e("#stripe-payment-data").data("email").length?o.owner.email=e("#stripe-payment-data").data("email"):delete o.owner.email),(void 0===o.owner.name||0>=o.owner.name.length)&&delete o.owner.name,e("#billing_address_1").length>0?(o.owner.address.line1=e("#billing_address_1").val(),o.owner.address.line2=e("#billing_address_2").val(),o.owner.address.state=e("#billing_state").val(),o.owner.address.city=e("#billing_city").val(),o.owner.address.postal_code=e("#billing_postcode").val(),o.owner.address.country=e("#billing_country").val()):wc_stripe_params.billing_address_1&&(o.owner.address.line1=wc_stripe_params.billing_address_1,o.owner.address.line2=wc_stripe_params.billing_address_2,o.owner.address.state=wc_stripe_params.billing_state,o.owner.address.city=wc_stripe_params.billing_city,o.owner.address.postal_code=wc_stripe_params.billing_postcode,o.owner.address.country=wc_stripe_params.billing_country),o},createSource:function(){var t=p.getOwnerDetails(),o="card";if(p.isBancontactChosen()&&(o="bancontact"),p.isSepaChosen()&&(o="sepa_debit"),p.isIdealChosen()&&(o="ideal"),p.isSofortChosen()&&(o="sofort"),p.isGiropayChosen()&&(o="giropay"),p.isAlipayChosen()&&(o="alipay"),"card"===o)n.createSource(r,t).then(p.sourceResponse);else{switch(o){case"bancontact":case"giropay":case"ideal":case"sofort":case"alipay":t.amount=e("#stripe-"+o+"-payment-data").data("amount"),t.currency=e("#stripe-"+o+"-payment-data").data("currency"),t.redirect={return_url:wc_stripe_params.return_url},wc_stripe_params.statement_descriptor&&(t.statement_descriptor=wc_stripe_params.statement_descriptor)}switch(o){case"sepa_debit":t.currency=e("#stripe-"+o+"-payment-data").data("currency"),t.mandate={notification_method:wc_stripe_params.sepa_mandate_notification};break;case"ideal":t.ideal={bank:e("#stripe-ideal-bank").val()};break;case"alipay":t.currency=e("#stripe-"+o+"-payment-data").data("currency"),t.amount=e("#stripe-"+o+"-payment-data").data("amount");break;case"sofort":t.sofort={country:e("#billing_country").val()}}t.type=o,"sepa_debit"===o?n.createSource(c,t).then(p.sourceResponse):n.createSource(t).then(p.sourceResponse)}},sourceResponse:function(r){r.error?e(document.body).trigger("stripeError",r):"no"===wc_stripe_params.allow_prepaid_card&&"card"===r.source.type&&"prepaid"===r.source.card.funding?(r.error={message:wc_stripe_params.no_prepaid_card_msg},"yes"===wc_stripe_params.is_stripe_checkout?p.submitError('<ul class="woocommerce-error"><li>'+wc_stripe_params.no_prepaid_card_msg+"</li></ul>"):e(document.body).trigger("stripeError",r)):p.processStripeResponse(r.source)},processStripeResponse:function(r){p.reset(),p.form.append("<input type='hidden' class='stripe-source' name='stripe_source' value='"+r.id+"'/>"),e("form#add_payment_method").length&&e(p.form).off("submit",p.form.onSubmit),p.form.submit()},onSubmit:function(r){if(p.isStripeChosen()){if(!(p.isStripeSaveCardChosen()||p.hasSource()||p.hasToken())){if(r.preventDefault(),p.block(),"yes"===wc_stripe_params.is_stripe_checkout&&p.isStripeModalNeeded()&&p.isStripeCardChosen())return"yes"===wc_stripe_params.is_checkout||(p.openModal(),!1);if(p.isBancontactChosen()||p.isGiropayChosen()||p.isIdealChosen()||p.isAlipayChosen()||p.isSofortChosen()||p.isP24Chosen()||p.isEpsChosen()||p.isMultibancoChosen()){if(e("form#order_review").length)return e("form#order_review").off("submit",this.onSubmit),p.form.submit(),!1;if(e("form.woocommerce-checkout").length)return!0;if(e("form#add_payment_method").length)return e("form#add_payment_method").off("submit",this.onSubmit),p.form.submit(),!1}return p.createSource(),!1}return e("form#add_payment_method").length?(r.preventDefault(),"yes"===wc_stripe_params.is_stripe_checkout&&p.isStripeModalNeeded()&&p.isStripeCardChosen()?(p.openModal(),!1):(p.block(),p.createSource(),!1)):void 0}},onCCFormChange:function(){p.reset()},reset:function(){e(".wc-stripe-error, .stripe-source, .stripe_token").remove(),"yes"===wc_stripe_params.is_stripe_checkout&&(p.stripe_submit=!1)},onSepaError:function(r){var t=p.getSelectedPaymentElement().parents("li").eq(0).find(".stripe-source-errors");r.error?(console.log(r.error.message),e(t).html('<ul class="woocommerce_error woocommerce-error wc-stripe-error"><li>'+r.error.message+"</li></ul>")):e(t).html("")},onError:function(r,t){var o=t.error.message,n=p.getSelectedPaymentElement().parents("li").eq(0).find(".stripe-source-errors");if(p.isSepaChosen()&&"invalid_owner_name"===t.error.code&&wc_stripe_params.hasOwnProperty(t.error.code)){var s='<ul class="woocommerce-error"><li>'+wc_stripe_params[t.error.code]+"</li></ul>";return p.submitError(s)}"invalid_request_error"!==t.error.type&&"api_connection_error"!==t.error.type&&"api_error"!==t.error.type&&"authentication_error"!==t.error.type&&"rate_limit_error"!==t.error.type||(o=wc_stripe_params.invalid_request_error),"card_error"===t.error.type&&wc_stripe_params.hasOwnProperty(t.error.code)&&(o=wc_stripe_params[t.error.code]),"validation_error"===t.error.type&&wc_stripe_params.hasOwnProperty(t.error.code)&&(o=wc_stripe_params[t.error.code]),p.reset(),e(".woocommerce-NoticeGroup-checkout").remove(),console.log(t.error.message),e(n).html('<ul class="woocommerce_error woocommerce-error wc-stripe-error"><li>'+o+"</li></ul>"),e(".wc-stripe-error").length&&e("html, body").animate({scrollTop:e(".wc-stripe-error").offset().top-200},200),p.unblock()},submitError:function(r){e(".woocommerce-NoticeGroup-checkout, .woocommerce-error, .woocommerce-message").remove(),p.form.prepend('<div class="woocommerce-NoticeGroup woocommerce-NoticeGroup-checkout">'+r+"</div>"),p.form.removeClass("processing").unblock(),p.form.find(".input-text, select, input:checkbox").blur();var t="";e("#add_payment_method").length&&(t=e("#add_payment_method")),e("#order_review").length&&(t=e("#order_review")),e("form.checkout").length&&(t=e("form.checkout")),t.length&&e("html, body").animate({scrollTop:t.offset().top-100},500),e(document.body).trigger("checkout_error"),p.unblock()}};p.init()});
1
+ jQuery(function(s){"use strict";var t,o,n,a=Stripe(wc_stripe_params.key),e=Object.keys(wc_stripe_params.elements_options).length?wc_stripe_params.elements_options:{},r=Object.keys(wc_stripe_params.sepa_elements_options).length?wc_stripe_params.sepa_elements_options:{},i=a.elements(e),c=i.create("iban",r),p={getAjaxURL:function(e){return wc_stripe_params.ajaxurl.toString().replace("%%endpoint%%","wc_stripe_"+e)},unmountElements:function(){"yes"===wc_stripe_params.inline_cc_form?t.unmount("#stripe-card-element"):(t.unmount("#stripe-card-element"),o.unmount("#stripe-exp-element"),n.unmount("#stripe-cvc-element"))},mountElements:function(){s("#stripe-card-element").length&&("yes"===wc_stripe_params.inline_cc_form?t.mount("#stripe-card-element"):(t.mount("#stripe-card-element"),o.mount("#stripe-exp-element"),n.mount("#stripe-cvc-element")))},createElements:function(){var e={base:{iconColor:"#666EE8",color:"#31325F",fontSize:"15px","::placeholder":{color:"#CFD7E0"}}},r={focus:"focused",empty:"empty",invalid:"invalid"};e=wc_stripe_params.elements_styling?wc_stripe_params.elements_styling:e,r=wc_stripe_params.elements_classes?wc_stripe_params.elements_classes:r,"yes"===wc_stripe_params.inline_cc_form?(t=i.create("card",{style:e,hidePostalCode:!0})).addEventListener("change",function(e){p.onCCFormChange(),e.error&&s(document.body).trigger("stripeError",e)}):(t=i.create("cardNumber",{style:e,classes:r}),o=i.create("cardExpiry",{style:e,classes:r}),n=i.create("cardCvc",{style:e,classes:r}),t.addEventListener("change",function(e){p.onCCFormChange(),p.updateCardBrand(e.brand),e.error&&s(document.body).trigger("stripeError",e)}),o.addEventListener("change",function(e){p.onCCFormChange(),e.error&&s(document.body).trigger("stripeError",e)}),n.addEventListener("change",function(e){p.onCCFormChange(),e.error&&s(document.body).trigger("stripeError",e)})),"yes"===wc_stripe_params.is_checkout?s(document.body).on("updated_checkout",function(){t&&p.unmountElements(),p.mountElements(),s("#stripe-iban-element").length&&c.mount("#stripe-iban-element")}):(s("form#add_payment_method").length||s("form#order_review").length)&&(p.mountElements(),s("#stripe-iban-element").length&&c.mount("#stripe-iban-element"))},updateCardBrand:function(e){var r={visa:"stripe-visa-brand",mastercard:"stripe-mastercard-brand",amex:"stripe-amex-brand",discover:"stripe-discover-brand",diners:"stripe-diners-brand",jcb:"stripe-jcb-brand",unknown:"stripe-credit-card-brand"},t=s(".stripe-card-brand"),o="stripe-credit-card-brand";e in r&&(o=r[e]),s.each(r,function(e,r){t.removeClass(r)}),t.addClass(o)},init:function(){"yes"!==wc_stripe_params.is_change_payment_page&&"yes"!==wc_stripe_params.is_pay_for_order_page||s(document.body).trigger("wc-credit-card-form-init"),this.stripe_checkout_submit=!1,s("form.woocommerce-checkout").length&&(this.form=s("form.woocommerce-checkout")),s("form.woocommerce-checkout").on("checkout_place_order_stripe checkout_place_order_stripe_bancontact checkout_place_order_stripe_sofort checkout_place_order_stripe_giropay checkout_place_order_stripe_ideal checkout_place_order_stripe_alipay checkout_place_order_stripe_sepa",this.onSubmit),s("form#order_review").length&&(this.form=s("form#order_review")),s("form#order_review, form#add_payment_method").on("submit",this.onSubmit),s("form#add_payment_method").length&&(this.form=s("form#add_payment_method")),s("form.woocommerce-checkout").on("change",this.reset),s(document).on("stripeError",this.onError).on("checkout_error",this.reset),c.on("change",this.onSepaError),p.createElements(),"yes"===wc_stripe_params.is_stripe_checkout&&s(document.body).on("click",".wc-stripe-checkout-button",function(){return p.openModal(),!1})},isStripeChosen:function(){return s("#payment_method_stripe, #payment_method_stripe_bancontact, #payment_method_stripe_sofort, #payment_method_stripe_giropay, #payment_method_stripe_ideal, #payment_method_stripe_alipay, #payment_method_stripe_sepa, #payment_method_stripe_eps, #payment_method_stripe_multibanco").is(":checked")||s("#payment_method_stripe").is(":checked")&&"new"===s('input[name="wc-stripe-payment-token"]:checked').val()||s("#payment_method_stripe_sepa").is(":checked")&&"new"===s('input[name="wc-stripe-payment-token"]:checked').val()},isStripeSaveCardChosen:function(){return s("#payment_method_stripe").is(":checked")&&s('input[name="wc-stripe-payment-token"]').is(":checked")&&"new"!==s('input[name="wc-stripe-payment-token"]:checked').val()||s("#payment_method_stripe_sepa").is(":checked")&&s('input[name="wc-stripe_sepa-payment-token"]').is(":checked")&&"new"!==s('input[name="wc-stripe_sepa-payment-token"]:checked').val()},isStripeCardChosen:function(){return s("#payment_method_stripe").is(":checked")},isBancontactChosen:function(){return s("#payment_method_stripe_bancontact").is(":checked")},isGiropayChosen:function(){return s("#payment_method_stripe_giropay").is(":checked")},isIdealChosen:function(){return s("#payment_method_stripe_ideal").is(":checked")},isSofortChosen:function(){return s("#payment_method_stripe_sofort").is(":checked")},isAlipayChosen:function(){return s("#payment_method_stripe_alipay").is(":checked")},isSepaChosen:function(){return s("#payment_method_stripe_sepa").is(":checked")},isP24Chosen:function(){return s("#payment_method_stripe_p24").is(":checked")},isEpsChosen:function(){return s("#payment_method_stripe_eps").is(":checked")},isMultibancoChosen:function(){return s("#payment_method_stripe_multibanco").is(":checked")},hasSource:function(){return 0<s("input.stripe-source").length},hasToken:function(){return 0<s("input.stripe_token").length},isMobile:function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},isStripeModalNeeded:function(e){var r=p.form.find("input.stripe_token");return(!p.stripe_submit||!r)&&!!p.isStripeChosen()},block:function(){p.isMobile()||p.form.block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(){p.form.unblock()},getSelectedPaymentElement:function(){return s('.payment_methods input[name="payment_method"]:checked')},openModal:function(){var t=p.form,e=s("#stripe-payment-data");p.reset();StripeCheckout.open({key:wc_stripe_params.key,billingAddress:e.data("billing-address"),zipCode:e.data("verify-zip"),amount:e.data("amount"),name:e.data("name"),description:e.data("description"),currency:e.data("currency"),image:e.data("image"),locale:e.data("locale"),email:s("#billing_email").val()||e.data("email"),panelLabel:e.data("panel-label"),allowRememberMe:e.data("allow-remember-me"),token:function(e){if(t.find("input.stripe_source").remove(),"token"===e.object)a.createSource({type:"card",token:e.id}).then(p.sourceResponse);else if("source"===e.object){var r={source:e};p.sourceResponse(r)}},closed:p.onClose()})},resetModal:function(){p.reset(),p.stripe_checkout_submit=!1},onClose:function(){p.unblock()},getOwnerDetails:function(){var e=s("#billing_first_name").length?s("#billing_first_name").val():wc_stripe_params.billing_first_name,r=s("#billing_last_name").length?s("#billing_last_name").val():wc_stripe_params.billing_last_name,t={owner:{name:"",address:{},email:"",phone:""}};return t.owner.name=e,t.owner.name=e&&r?e+" "+r:s("#stripe-payment-data").data("full-name"),t.owner.email=s("#billing_email").val(),t.owner.phone=s("#billing_phone").val(),(void 0===t.owner.phone||t.owner.phone.length<=0)&&delete t.owner.phone,(void 0===t.owner.email||t.owner.email.length<=0)&&(s("#stripe-payment-data").data("email").length?t.owner.email=s("#stripe-payment-data").data("email"):delete t.owner.email),(void 0===t.owner.name||t.owner.name.length<=0)&&delete t.owner.name,0<s("#billing_address_1").length?(t.owner.address.line1=s("#billing_address_1").val(),t.owner.address.line2=s("#billing_address_2").val(),t.owner.address.state=s("#billing_state").val(),t.owner.address.city=s("#billing_city").val(),t.owner.address.postal_code=s("#billing_postcode").val(),t.owner.address.country=s("#billing_country").val()):wc_stripe_params.billing_address_1&&(t.owner.address.line1=wc_stripe_params.billing_address_1,t.owner.address.line2=wc_stripe_params.billing_address_2,t.owner.address.state=wc_stripe_params.billing_state,t.owner.address.city=wc_stripe_params.billing_city,t.owner.address.postal_code=wc_stripe_params.billing_postcode,t.owner.address.country=wc_stripe_params.billing_country),t},createSource:function(){var e=p.getOwnerDetails(),r="card";if(p.isBancontactChosen()&&(r="bancontact"),p.isSepaChosen()&&(r="sepa_debit"),p.isIdealChosen()&&(r="ideal"),p.isSofortChosen()&&(r="sofort"),p.isGiropayChosen()&&(r="giropay"),p.isAlipayChosen()&&(r="alipay"),"card"===r)a.createSource(t,e).then(p.sourceResponse);else{switch(r){case"bancontact":case"giropay":case"ideal":case"sofort":case"alipay":e.amount=s("#stripe-"+r+"-payment-data").data("amount"),e.currency=s("#stripe-"+r+"-payment-data").data("currency"),e.redirect={return_url:wc_stripe_params.return_url},wc_stripe_params.statement_descriptor&&(e.statement_descriptor=wc_stripe_params.statement_descriptor)}switch(r){case"sepa_debit":e.currency=s("#stripe-"+r+"-payment-data").data("currency"),e.mandate={notification_method:wc_stripe_params.sepa_mandate_notification};break;case"ideal":e.ideal={bank:s("#stripe-ideal-bank").val()};break;case"alipay":e.currency=s("#stripe-"+r+"-payment-data").data("currency"),e.amount=s("#stripe-"+r+"-payment-data").data("amount");break;case"sofort":e.sofort={country:s("#billing_country").val()}}"sepa_debit"===(e.type=r)?a.createSource(c,e).then(p.sourceResponse):a.createSource(e).then(p.sourceResponse)}},sourceResponse:function(e){e.error?s(document.body).trigger("stripeError",e):"no"===wc_stripe_params.allow_prepaid_card&&"card"===e.source.type&&"prepaid"===e.source.card.funding?(e.error={message:wc_stripe_params.no_prepaid_card_msg},"yes"===wc_stripe_params.is_stripe_checkout?p.submitError('<ul class="woocommerce-error"><li>'+wc_stripe_params.no_prepaid_card_msg+"</li></ul>"):s(document.body).trigger("stripeError",e)):p.processStripeResponse(e.source)},processStripeResponse:function(e){p.reset(),p.form.append("<input type='hidden' class='stripe-source' name='stripe_source' value='"+e.id+"'/>"),s("form#add_payment_method").length&&s(p.form).off("submit",p.form.onSubmit),p.form.submit()},onSubmit:function(e){if(p.isStripeChosen()){if(p.isStripeSaveCardChosen()||p.hasSource()||p.hasToken())return s("form#add_payment_method").length?(e.preventDefault(),"yes"===wc_stripe_params.is_stripe_checkout&&p.isStripeModalNeeded()&&p.isStripeCardChosen()?p.openModal():(p.block(),p.createSource()),!1):void 0;if(e.preventDefault(),p.block(),"yes"===wc_stripe_params.is_stripe_checkout&&p.isStripeModalNeeded()&&p.isStripeCardChosen())return"yes"===wc_stripe_params.is_checkout||(p.openModal(),!1);if(p.isBancontactChosen()||p.isGiropayChosen()||p.isIdealChosen()||p.isAlipayChosen()||p.isSofortChosen()||p.isP24Chosen()||p.isEpsChosen()||p.isMultibancoChosen()){if(s("form#order_review").length)return s("form#order_review").off("submit",this.onSubmit),p.form.submit(),!1;if(s("form.woocommerce-checkout").length)return!0;if(s("form#add_payment_method").length)return s("form#add_payment_method").off("submit",this.onSubmit),p.form.submit(),!1}return p.createSource(),!1}},onCCFormChange:function(){p.reset()},reset:function(){s(".wc-stripe-error, .stripe-source, .stripe_token").remove(),"yes"===wc_stripe_params.is_stripe_checkout&&(p.stripe_submit=!1)},onSepaError:function(e){var r=p.getSelectedPaymentElement().parents("li").eq(0).find(".stripe-source-errors");e.error?(console.log(e.error.message),s(r).html('<ul class="woocommerce_error woocommerce-error wc-stripe-error"><li>'+e.error.message+"</li></ul>")):s(r).html("")},onError:function(e,r){var t=r.error.message,o=p.getSelectedPaymentElement().parents("li").eq(0).find(".stripe-source-errors");if(p.isSepaChosen()&&"invalid_owner_name"===r.error.code&&wc_stripe_params.hasOwnProperty(r.error.code)){var n='<ul class="woocommerce-error"><li>'+wc_stripe_params[r.error.code]+"</li></ul>";return p.submitError(n)}"invalid_request_error"!==r.error.type&&"api_connection_error"!==r.error.type&&"api_error"!==r.error.type&&"authentication_error"!==r.error.type&&"rate_limit_error"!==r.error.type||(t=wc_stripe_params.invalid_request_error),"card_error"===r.error.type&&wc_stripe_params.hasOwnProperty(r.error.code)&&(t=wc_stripe_params[r.error.code]),"validation_error"===r.error.type&&wc_stripe_params.hasOwnProperty(r.error.code)&&(t=wc_stripe_params[r.error.code]),p.reset(),s(".woocommerce-NoticeGroup-checkout").remove(),console.log(r.error.message),s(o).html('<ul class="woocommerce_error woocommerce-error wc-stripe-error"><li>'+t+"</li></ul>"),s(".wc-stripe-error").length&&s("html, body").animate({scrollTop:s(".wc-stripe-error").offset().top-200},200),p.unblock()},submitError:function(e){s(".woocommerce-NoticeGroup-checkout, .woocommerce-error, .woocommerce-message").remove(),p.form.prepend('<div class="woocommerce-NoticeGroup woocommerce-NoticeGroup-checkout">'+e+"</div>"),p.form.removeClass("processing").unblock(),p.form.find(".input-text, select, input:checkbox").blur();var r="";s("#add_payment_method").length&&(r=s("#add_payment_method")),s("#order_review").length&&(r=s("#order_review")),s("form.checkout").length&&(r=s("form.checkout")),r.length&&s("html, body").animate({scrollTop:r.offset().top-100},500),s(document.body).trigger("checkout_error"),p.unblock()}};p.init()});
changelog.txt CHANGED
@@ -1,5 +1,12 @@
1
*** Changelog ***
2
3
= 4.1.9 - 2018-08-27 =
4
* Fix - Don't display admin notices to user that cannot manage woocommerce.
5
* Fix - Fatal error when clicking on order link that doesn't exist.
1
*** Changelog ***
2
3
+ = 4.1.10 - 2018-09-17 =
4
+ * Fix - When 3DS card redirect status is "not_required", charge the 3DS source.
5
+ * Fix - Payment Request not validating quantity before payment sheet shows.
6
+ * Fix - Test mode info not showing when description field is left blank.
7
+ * Add - Filter for Payment Request localized parameters `wc_stripe_payment_request_params`.
8
+ * Update - Stripe API version to 2018-09-06.
9
+
10
= 4.1.9 - 2018-08-27 =
11
* Fix - Don't display admin notices to user that cannot manage woocommerce.
12
* Fix - Fatal error when clicking on order link that doesn't exist.
includes/class-wc-gateway-stripe.php CHANGED
@@ -111,13 +111,13 @@ class WC_Gateway_Stripe extends WC_Stripe_Payment_Gateway {
111
* Constructor
112
*/
113
public function __construct() {
114
- $this->retry_interval = 1;
115
- $this->id = 'stripe';
116
- $this->method_title = __( 'Stripe', 'woocommerce-gateway-stripe' );
117
/* translators: 1) link to Stripe register page 2) link to Stripe api keys page */
118
- $this->method_description = sprintf( __( 'Stripe works by adding payment fields on the checkout and then sending the details to Stripe for verification. <a href="%1$s" target="_blank">Sign up</a> for a Stripe account, and <a href="%2$s" target="_blank">get your Stripe account keys</a>.', 'woocommerce-gateway-stripe' ), 'https://dashboard.stripe.com/register', 'https://dashboard.stripe.com/account/apikeys' );
119
- $this->has_fields = true;
120
- $this->supports = array(
121
'products',
122
'refunds',
123
'tokenization',
@@ -264,7 +264,7 @@ class WC_Gateway_Stripe extends WC_Stripe_Payment_Gateway {
264
$display_tokenization = $this->supports( 'tokenization' ) && is_checkout() && $this->saved_cards;
265
$total = WC()->cart->total;
266
$user_email = '';
267
- $description = $this->get_description() ? $this->get_description() : '';
268
$firstname = '';
269
$lastname = '';
270
@@ -288,7 +288,7 @@ class WC_Gateway_Stripe extends WC_Stripe_Payment_Gateway {
288
289
} elseif ( function_exists( 'wcs_order_contains_subscription' ) && isset( $_GET['change_payment_method'] ) ) {
290
$pay_button_text = __( 'Change Payment Method', 'woocommerce-gateway-stripe' );
291
- $total = '';
292
} else {
293
$pay_button_text = '';
294
}
@@ -312,16 +312,15 @@ class WC_Gateway_Stripe extends WC_Stripe_Payment_Gateway {
312
data-three-d-secure="' . esc_attr( $this->three_d_secure ? 'true' : 'false' ) . '"
313
data-allow-remember-me="' . esc_attr( apply_filters( 'wc_stripe_allow_remember_me', true ) ? 'true' : 'false' ) . '">';
314
315
- if ( $description ) {
316
- if ( $this->testmode ) {
317
- /* translators: link to Stripe testing page */
318
- $description .= ' ' . sprintf( __( 'TEST MODE ENABLED. In test mode, you can use the card number 4242424242424242 with any CVC and a valid expiration date or check the <a href="%s" target="_blank">Testing Stripe documentation</a> for more card numbers.', 'woocommerce-gateway-stripe' ), 'https://stripe.com/docs/testing' );
319
- $description = trim( $description );
320
- }
321
-
322
- echo apply_filters( 'wc_stripe_description', wpautop( wp_kses_post( $description ) ), $this->id );
323
}
324
325
if ( $display_tokenization ) {
326
$this->tokenization_script();
327
$this->saved_payment_methods();
@@ -696,12 +695,11 @@ class WC_Gateway_Stripe extends WC_Stripe_Payment_Gateway {
696
}
697
698
$prepared_source = $this->prepare_source( get_current_user_id(), $force_save_source );
699
- $source_object = $prepared_source->source_object;
700
701
// Check if we don't allow prepaid credit cards.
702
- if ( ! apply_filters( 'wc_stripe_allow_prepaid_card', true ) && $this->is_prepaid_card( $source_object ) ) {
703
$localized_message = __( 'Sorry, we\'re not accepting prepaid cards at this time. Your credit card has not been charge. Please try with alternative payment method.', 'woocommerce-gateway-stripe' );
704
- throw new WC_Stripe_Exception( print_r( $source_object, true ), $localized_message );
705
}
706
707
if ( empty( $prepared_source->source ) ) {
@@ -725,8 +723,8 @@ class WC_Gateway_Stripe extends WC_Stripe_Payment_Gateway {
725
* Note that if we need to save source, the original source must be first
726
* attached to a customer in Stripe before it can be charged.
727
*/
728
- if ( $this->is_3ds_required( $source_object ) ) {
729
- $response = $this->create_3ds_source( $order, $source_object );
730
731
if ( ! empty( $response->error ) ) {
732
$localized_message = $response->error->message;
@@ -755,6 +753,9 @@ class WC_Gateway_Stripe extends WC_Stripe_Payment_Gateway {
755
'result' => 'success',
756
'redirect' => esc_url_raw( $response->redirect->url ),
757
);
758
}
759
}
760
@@ -763,7 +764,7 @@ class WC_Gateway_Stripe extends WC_Stripe_Payment_Gateway {
763
/* If we're doing a retry and source is chargeable, we need to pass
764
* a different idempotency key and retry for success.
765
*/
766
- if ( $this->need_update_idempotency_key( $source_object, $previous_error ) ) {
767
add_filter( 'wc_stripe_idempotency_key', array( $this, 'change_idempotency_key' ), 10, 2 );
768
}
769
111
* Constructor
112
*/
113
public function __construct() {
114
+ $this->retry_interval = 1;
115
+ $this->id = 'stripe';
116
+ $this->method_title = __( 'Stripe', 'woocommerce-gateway-stripe' );
117
/* translators: 1) link to Stripe register page 2) link to Stripe api keys page */
118
+ $this->method_description = sprintf( __( 'Stripe works by adding payment fields on the checkout and then sending the details to Stripe for verification. <a href="%1$s" target="_blank">Sign up</a> for a Stripe account, and <a href="%2$s" target="_blank">get your Stripe account keys</a>.', 'woocommerce-gateway-stripe' ), 'https://dashboard.stripe.com/register', 'https://dashboard.stripe.com/account/apikeys' );
119
+ $this->has_fields = true;
120
+ $this->supports = array(
121
'products',
122
'refunds',
123
'tokenization',
264
$display_tokenization = $this->supports( 'tokenization' ) && is_checkout() && $this->saved_cards;
265
$total = WC()->cart->total;
266
$user_email = '';
267
+ $description = ! empty( $this->get_description() ) ? $this->get_description() : '';
268
$firstname = '';
269
$lastname = '';
270
288
289
} elseif ( function_exists( 'wcs_order_contains_subscription' ) && isset( $_GET['change_payment_method'] ) ) {
290
$pay_button_text = __( 'Change Payment Method', 'woocommerce-gateway-stripe' );
291
+ $total = '';
292
} else {
293
$pay_button_text = '';
294
}
312
data-three-d-secure="' . esc_attr( $this->three_d_secure ? 'true' : 'false' ) . '"
313
data-allow-remember-me="' . esc_attr( apply_filters( 'wc_stripe_allow_remember_me', true ) ? 'true' : 'false' ) . '">';
314
315
+ if ( $this->testmode ) {
316
+ /* translators: link to Stripe testing page */
317
+ $description .= ' ' . sprintf( __( 'TEST MODE ENABLED. In test mode, you can use the card number 4242424242424242 with any CVC and a valid expiration date or check the <a href="%s" target="_blank">Testing Stripe documentation</a> for more card numbers.', 'woocommerce-gateway-stripe' ), 'https://stripe.com/docs/testing' );
318
}
319
320
+ $description = trim( $description );
321
+
322
+ echo apply_filters( 'wc_stripe_description', wpautop( wp_kses_post( $description ) ), $this->id );
323
+
324
if ( $display_tokenization ) {
325
$this->tokenization_script();
326
$this->saved_payment_methods();
695
}
696
697
$prepared_source = $this->prepare_source( get_current_user_id(), $force_save_source );
698
699
// Check if we don't allow prepaid credit cards.
700
+ if ( ! apply_filters( 'wc_stripe_allow_prepaid_card', true ) && $this->is_prepaid_card( $prepared_source->source_object ) ) {
701
$localized_message = __( 'Sorry, we\'re not accepting prepaid cards at this time. Your credit card has not been charge. Please try with alternative payment method.', 'woocommerce-gateway-stripe' );
702
+ throw new WC_Stripe_Exception( print_r( $prepared_source->source_object, true ), $localized_message );
703
}
704
705
if ( empty( $prepared_source->source ) ) {
723
* Note that if we need to save source, the original source must be first
724
* attached to a customer in Stripe before it can be charged.
725
*/
726
+ if ( $this->is_3ds_required( $prepared_source->source_object ) ) {
727
+ $response = $this->create_3ds_source( $order, $prepared_source->source_object );
728
729
if ( ! empty( $response->error ) ) {
730
$localized_message = $response->error->message;
753
'result' => 'success',
754
'redirect' => esc_url_raw( $response->redirect->url ),
755
);
756
+ } elseif ( 'not_required' === $response->redirect->status && 'chargeable' === $response->status ) {
757
+ // Override the original source object with 3DS.
758
+ $prepared_source->source_object = $response;
759
}
760
}
761
764
/* If we're doing a retry and source is chargeable, we need to pass
765
* a different idempotency key and retry for success.
766
*/
767
+ if ( $this->need_update_idempotency_key( $prepared_source->source_object, $previous_error ) ) {
768
add_filter( 'wc_stripe_idempotency_key', array( $this, 'change_idempotency_key' ), 10, 2 );
769
}
770
includes/class-wc-stripe-api.php CHANGED
@@ -13,8 +13,8 @@ class WC_Stripe_API {
13
/**
14
* Stripe API Endpoint
15
*/
16
- const ENDPOINT = 'https://api.stripe.com/v1/';
17
- const STRIPE_API_VERSION = '2018-05-21';
18
19
/**
20
* Secret API Key.
@@ -78,12 +78,15 @@ class WC_Stripe_API {
78
$user_agent = self::get_user_agent();
79
$app_info = $user_agent['application'];
80
81
- return apply_filters( 'woocommerce_stripe_request_headers', array(
82
- 'Authorization' => 'Basic ' . base64_encode( self::get_secret_key() . ':' ),
83
- 'Stripe-Version' => self::STRIPE_API_VERSION,
84
- 'User-Agent' => $app_info['name'] . '/' . $app_info['version'] . ' (' . $app_info['url'] . ')',
85
- 'X-Stripe-Client-User-Agent' => json_encode( $user_agent ),
86
- ) );
87
}
88
89
/**
@@ -121,16 +124,25 @@ class WC_Stripe_API {
121
);
122
123
if ( is_wp_error( $response ) || empty( $response['body'] ) ) {
124
- WC_Stripe_Logger::log( 'Error Response: ' . print_r( $response, true ) . PHP_EOL . PHP_EOL . 'Failed request: ' . print_r( array(
125
- 'api' => $api,
126
- 'request' => $request,
127
- 'idempotency_key' => $idempotency_key,
128
- ), true ) );
129
throw new WC_Stripe_Exception( print_r( $response, true ), __( 'There was a problem connecting to the Stripe API endpoint.', 'woocommerce-gateway-stripe' ) );
130
}
131
132
if ( $with_headers ) {
133
- return array( 'headers' => wp_remote_retrieve_headers( $response ), 'body' => json_decode( $response['body'] ) );
134
}
135
136
return json_decode( $response['body'] );
13
/**
14
* Stripe API Endpoint
15
*/
16
+ const ENDPOINT = 'https://api.stripe.com/v1/';
17
+ const STRIPE_API_VERSION = '2018-09-06';
18
19
/**
20
* Secret API Key.
78
$user_agent = self::get_user_agent();
79
$app_info = $user_agent['application'];
80
81
+ return apply_filters(
82
+ 'woocommerce_stripe_request_headers',
83
+ array(
84
+ 'Authorization' => 'Basic ' . base64_encode( self::get_secret_key() . ':' ),
85
+ 'Stripe-Version' => self::STRIPE_API_VERSION,
86
+ 'User-Agent' => $app_info['name'] . '/' . $app_info['version'] . ' (' . $app_info['url'] . ')',
87
+ 'X-Stripe-Client-User-Agent' => json_encode( $user_agent ),
88
+ )
89
+ );
90
}
91
92
/**
124
);
125
126
if ( is_wp_error( $response ) || empty( $response['body'] ) ) {
127
+ WC_Stripe_Logger::log(
128
+ 'Error Response: ' . print_r( $response, true ) . PHP_EOL . PHP_EOL . 'Failed request: ' . print_r(
129
+ array(
130
+ 'api' => $api,
131
+ 'request' => $request,
132
+ 'idempotency_key' => $idempotency_key,
133
+ ),
134
+ true
135
+ )
136
+ );
137
+
138
throw new WC_Stripe_Exception( print_r( $response, true ), __( 'There was a problem connecting to the Stripe API endpoint.', 'woocommerce-gateway-stripe' ) );
139
}
140
141
if ( $with_headers ) {
142
+ return array(
143
+ 'headers' => wp_remote_retrieve_headers( $response ),
144
+ 'body' => json_decode( $response['body'] ),
145
+ );
146
}
147
148
return json_decode( $response['body'] );
includes/payment-methods/class-wc-gateway-stripe-sepa.php CHANGED
@@ -75,6 +75,7 @@ class WC_Gateway_Stripe_Sepa extends WC_Stripe_Payment_Gateway {
75
$this->method_title = __( 'Stripe SEPA Direct Debit', 'woocommerce-gateway-stripe' );
76
/* translators: link */
77
$this->method_description = sprintf( __( 'All other general Stripe settings can be adjusted <a href="%s">here</a>.', 'woocommerce-gateway-stripe' ), admin_url( 'admin.php?page=wc-settings&tab=checkout&section=stripe' ) );
78
$this->supports = array(
79
'products',
80
'refunds',
@@ -243,7 +244,7 @@ class WC_Gateway_Stripe_Sepa extends WC_Stripe_Payment_Gateway {
243
public function payment_fields() {
244
$total = WC()->cart->total;
245
$display_tokenization = $this->supports( 'tokenization' ) && is_checkout() && $this->saved_cards;
246
- $description = $this->get_description() ? $this->get_description() : '';
247
248
// If paying from order, we need to get total from order not cart.
249
if ( isset( $_GET['pay_for_order'] ) && ! empty( $_GET['key'] ) ) {
@@ -260,14 +261,14 @@ class WC_Gateway_Stripe_Sepa extends WC_Stripe_Payment_Gateway {
260
data-amount="' . esc_attr( WC_Stripe_Helper::get_stripe_amount( $total ) ) . '"
261
data-currency="' . esc_attr( strtolower( get_woocommerce_currency() ) ) . '">';
262
263
- if ( $description ) {
264
- if ( $this->testmode ) {
265
- $description .= ' ' . __( 'TEST MODE ENABLED. In test mode, you can use IBAN number DE89370400440532013000.', 'woocommerce-gateway-stripe' );
266
- $description = trim( $description );
267
- }
268
- echo apply_filters( 'wc_stripe_description', wpautop( wp_kses_post( $description ) ), $this->id );
269
}
270
271
if ( $display_tokenization ) {
272
$this->tokenization_script();
273
$this->saved_payment_methods();
75
$this->method_title = __( 'Stripe SEPA Direct Debit', 'woocommerce-gateway-stripe' );
76
/* translators: link */
77
$this->method_description = sprintf( __( 'All other general Stripe settings can be adjusted <a href="%s">here</a>.', 'woocommerce-gateway-stripe' ), admin_url( 'admin.php?page=wc-settings&tab=checkout&section=stripe' ) );
78
+ $this->has_fields = true;
79
$this->supports = array(
80
'products',
81
'refunds',
244
public function payment_fields() {
245
$total = WC()->cart->total;
246
$display_tokenization = $this->supports( 'tokenization' ) && is_checkout() && $this->saved_cards;
247
+ $description = ! empty( $this->get_description() ) ? $this->get_description() : '';
248
249
// If paying from order, we need to get total from order not cart.
250
if ( isset( $_GET['pay_for_order'] ) && ! empty( $_GET['key'] ) ) {
261
data-amount="' . esc_attr( WC_Stripe_Helper::get_stripe_amount( $total ) ) . '"
262
data-currency="' . esc_attr( strtolower( get_woocommerce_currency() ) ) . '">';
263
264
+ if ( $this->testmode ) {
265
+ $description .= ' ' . __( 'TEST MODE ENABLED. In test mode, you can use IBAN number DE89370400440532013000.', 'woocommerce-gateway-stripe' );
266
}
267
268
+ $description = trim( $description );
269
+
270
+ echo apply_filters( 'wc_stripe_description', wpautop( wp_kses_post( $description ) ), $this->id );
271
+
272
if ( $display_tokenization ) {
273
$this->tokenization_script();
274
$this->saved_payment_methods();
includes/payment-methods/class-wc-stripe-payment-request.php CHANGED
@@ -279,7 +279,7 @@ class WC_Stripe_Payment_Request {
279
'pending' => true,
280
);
281
282
- $data['shippingOptions'] = array(
283
'id' => 'pending',
284
'label' => __( 'Pending', 'woocommerce-gateway-stripe' ),
285
'detail' => '',
@@ -288,7 +288,7 @@ class WC_Stripe_Payment_Request {
288
}
289
290
$data['displayItems'] = $items;
291
- $data['total'] = array(
292
'label' => apply_filters( 'wc_stripe_payment_request_total_label', $this->total_label ),
293
'amount' => WC_Stripe_Helper::get_stripe_amount( WC_Stripe_Helper::is_pre_30() ? $product->price : $product->get_price() ),
294
'pending' => true,
@@ -406,16 +406,19 @@ class WC_Stripe_Payment_Request {
406
* @return array
407
*/
408
public function supported_product_types() {
409
- return apply_filters( 'wc_stripe_payment_request_supported_types', array(
410
- 'simple',
411
- 'variable',
412
- 'variation',
413
- 'subscription',
414
- 'booking',
415
- 'bundle',
416
- 'composite',
417
- 'mix-and-match',
418
- ) );
419
}
420
421
/**
@@ -481,49 +484,47 @@ class WC_Stripe_Payment_Request {
481
482
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
483
484
wp_register_script( 'stripe', 'https://js.stripe.com/v3/', '', '3.0', true );
485
wp_register_script( 'wc_stripe_payment_request', plugins_url( 'assets/js/stripe-payment-request' . $suffix . '.js', WC_STRIPE_MAIN_FILE ), array( 'jquery', 'stripe' ), WC_STRIPE_VERSION, true );
486
487
- wp_localize_script(
488
- 'wc_stripe_payment_request',
489
- 'wc_stripe_payment_request_params',
490
- array(
491
- 'ajax_url' => WC_AJAX::get_endpoint( '%%endpoint%%' ),
492
- 'stripe' => array(
493
- 'key' => $this->publishable_key,
494
- 'allow_prepaid_card' => apply_filters( 'wc_stripe_allow_prepaid_card', true ) ? 'yes' : 'no',
495
- ),
496
- 'nonce' => array(
497
- 'payment' => wp_create_nonce( 'wc-stripe-payment-request' ),
498
- 'shipping' => wp_create_nonce( 'wc-stripe-payment-request-shipping' ),
499
- 'update_shipping' => wp_create_nonce( 'wc-stripe-update-shipping-method' ),
500
- 'checkout' => wp_create_nonce( 'woocommerce-process_checkout' ),
501
- 'add_to_cart' => wp_create_nonce( 'wc-stripe-add-to-cart' ),
502
- 'get_selected_product_data' => wp_create_nonce( 'wc-stripe-get-selected-product-data' ),
503
- 'log_errors' => wp_create_nonce( 'wc-stripe-log-errors' ),
504
- 'clear_cart' => wp_create_nonce( 'wc-stripe-clear-cart' ),
505
- ),
506
- 'i18n' => array(
507
- 'no_prepaid_card' => __( 'Sorry, we\'re not accepting prepaid cards at this time.', 'woocommerce-gateway-stripe' ),
508
- /* translators: Do not translate the [option] placeholder */
509
- 'unknown_shipping' => __( 'Unknown shipping option "[option]".', 'woocommerce-gateway-stripe' ),
510
- ),
511
- 'checkout' => array(
512
- 'url' => wc_get_checkout_url(),
513
- 'currency_code' => strtolower( get_woocommerce_currency() ),
514
- 'country_code' => substr( get_option( 'woocommerce_default_country' ), 0, 2 ),
515
- 'needs_shipping' => WC()->cart->needs_shipping() ? 'yes' : 'no',
516
- ),
517
- 'button' => array(
518
- 'type' => $this->get_button_type(),
519
- 'theme' => $this->get_button_theme(),
520
- 'height' => $this->get_button_height(),
521
- 'locale' => apply_filters( 'wc_stripe_payment_request_button_locale', substr( get_locale(), 0, 2 ) ), // Default format is en_US.
522
- ),
523
- 'is_product_page' => is_product(),
524
- 'product' => $this->get_product_data(),
525
- )
526
- );
527
528
wp_enqueue_script( 'wc_stripe_payment_request' );
529
}
@@ -679,8 +680,8 @@ class WC_Stripe_Payment_Request {
679
$data = array(
680
'shipping_required' => WC()->cart->needs_shipping(),
681
'order_data' => array(
682
- 'currency' => strtolower( $currency ),
683
- 'country_code' => substr( get_option( 'woocommerce_default_country' ), 0, 2 ),
684
),
685
);
686
@@ -701,14 +702,17 @@ class WC_Stripe_Payment_Request {
701
702
try {
703
// Set the shipping package.
704
- $posted = filter_input_array( INPUT_POST, array(
705
- 'country' => FILTER_SANITIZE_STRING,
706
- 'state' => FILTER_SANITIZE_STRING,
707
- 'postcode' => FILTER_SANITIZE_STRING,
708
- 'city' => FILTER_SANITIZE_STRING,
709
- 'address' => FILTER_SANITIZE_STRING,
710
- 'address_2' => FILTER_SANITIZE_STRING,
711
- ) );
712
713
$this->calculate_shipping( apply_filters( 'wc_stripe_payment_request_shipping_posted_values', $posted ) );
714
@@ -724,10 +728,10 @@ class WC_Stripe_Payment_Request {
724
725
foreach ( $package['rates'] as $key => $rate ) {
726
$data['shipping_options'][] = array(
727
- 'id' => $rate->id,
728
- 'label' => $rate->label,
729
- 'detail' => '',
730
- 'amount' => WC_Stripe_Helper::get_stripe_amount( $rate->cost ),
731
);
732
}
733
}
@@ -742,12 +746,12 @@ class WC_Stripe_Payment_Request {
742
743
WC()->cart->calculate_totals();
744
745
- $data += $this->build_display_items();
746
$data['result'] = 'success';
747
748
wp_send_json( $data );
749
} catch ( Exception $e ) {
750
- $data += $this->build_display_items();
751
$data['result'] = 'invalid_shipping_address';
752
753
wp_send_json( $data );
@@ -777,8 +781,8 @@ class WC_Stripe_Payment_Request {
777
778
WC()->cart->calculate_totals();
779
780
- $data = array();
781
- $data += $this->build_display_items();
782
$data['result'] = 'success';
783
784
wp_send_json( $data );
@@ -794,75 +798,89 @@ class WC_Stripe_Payment_Request {
794
public function ajax_get_selected_product_data() {
795
check_ajax_referer( 'wc-stripe-get-selected-product-data', 'security' );
796
797
- $product_id = absint( $_POST['product_id'] );
798
- $qty = ! isset( $_POST['qty'] ) ? 1 : absint( $_POST['qty'] );
799
-
800
- $product = wc_get_product( $product_id );
801
-
802
- if ( 'variable' === ( WC_Stripe_Helper::is_pre_30() ? $product->product_type : $product->get_type() ) && isset( $_POST['attributes'] ) ) {
803
- $attributes = array_map( 'wc_clean', $_POST['attributes'] );
804
805
- if ( WC_Stripe_Helper::is_pre_30() ) {
806
- $variation_id = $product->get_matching_variation( $attributes );
807
- } else {
808
- $data_store = WC_Data_Store::load( 'product' );
809
- $variation_id = $data_store->find_matching_product_variation( $product, $attributes );
810
}
811
812
- if ( ! empty( $variation_id ) ) {
813
- $product = wc_get_product( $variation_id );
814
}
815
- } elseif ( 'simple' === ( WC_Stripe_Helper::is_pre_30() ? $product->product_type : $product->get_type() ) ) {
816
- $product = wc_get_product( $product_id );
817
- }
818
819
- $total = $qty * ( WC_Stripe_Helper::is_pre_30() ? $product->price : $product->get_price() );
820
821
- $quantity_label = 1 < $qty ? ' (x' . $qty . ')' : '';
822
823
- $data = array();
824
- $items = array();
825
826
- $items[] = array(
827
- 'label' => ( WC_Stripe_Helper::is_pre_30() ? $product->name : $product->get_name() ) . $quantity_label,
828
- 'amount' => WC_Stripe_Helper::get_stripe_amount( $total ),
829
- );
830
831
- if ( wc_tax_enabled() ) {
832
$items[] = array(
833
- 'label' => __( 'Tax', 'woocommerce-gateway-stripe' ),
834
- 'amount' => 0,
835
- 'pending' => true,
836
);
837
- }
838
839
- if ( wc_shipping_enabled() && $product->needs_shipping() ) {
840
- $items[] = array(
841
- 'label' => __( 'Shipping', 'woocommerce-gateway-stripe' ),
842
- 'amount' => 0,
843
- 'pending' => true,
844
- );
845
846
- $data['shippingOptions'] = array(
847
- 'id' => 'pending',
848
- 'label' => __( 'Pending', 'woocommerce-gateway-stripe' ),
849
- 'detail' => '',
850
- 'amount' => 0,
851
- );
852
- }
853
854
- $data['displayItems'] = $items;
855
- $data['total'] = array(
856
- 'label' => $this->total_label,
857
- 'amount' => WC_Stripe_Helper::get_stripe_amount( $total ),
858
- 'pending' => true,
859
- );
860
861
- $data['requestShipping'] = ( wc_shipping_enabled() && $product->needs_shipping() );
862
- $data['currency'] = strtolower( get_woocommerce_currency() );
863
- $data['country_code'] = substr( get_option( 'woocommerce_default_country' ), 0, 2 );
864
865
- wp_send_json( $data );
866
}
867
868
/**
@@ -882,9 +900,8 @@ class WC_Stripe_Payment_Request {
882
WC()->shipping->reset_shipping();
883
884
$product_id = absint( $_POST['product_id'] );
885
- $qty = ! isset( $_POST['qty'] ) ? 1 : absint( $_POST['qty'] );
886
-
887
- $product = wc_get_product( $product_id );
888
889
// First empty the cart to prevent wrong calculation.
890
WC()->cart->empty_cart();
@@ -895,7 +912,7 @@ class WC_Stripe_Payment_Request {
895
if ( WC_Stripe_Helper::is_pre_30() ) {
896
$variation_id = $product->get_matching_variation( $attributes );
897
} else {
898
- $data_store = WC_Data_Store::load( 'product' );
899
$variation_id = $data_store->find_matching_product_variation( $product, $attributes );
900
}
901
@@ -908,8 +925,8 @@ class WC_Stripe_Payment_Request {
908
909
WC()->cart->calculate_totals();
910
911
- $data = array();
912
- $data += $this->build_display_items();
913
$data['result'] = 'success';
914
915
wp_send_json( $data );
@@ -987,24 +1004,20 @@ class WC_Stripe_Payment_Request {
987
* @param array $address
988
*/
989
protected function calculate_shipping( $address = array() ) {
990
- global $states;
991
-
992
$country = $address['country'];
993
$state = $address['state'];
994
$postcode = $address['postcode'];
995
$city = $address['city'];
996
$address_1 = $address['address'];
997
$address_2 = $address['address_2'];
998
-
999
- $country_class = new WC_Countries();
1000
- $country_class->load_country_states();
1001
1002
/**
1003
* In some versions of Chrome, state can be a full name. So we need
1004
* to convert that to abbreviation as WC is expecting that.
1005
*/
1006
- if ( 2 < strlen( $state ) ) {
1007
- $state = array_search( ucfirst( strtolower( $state ) ), $states[ $country ] );
1008
}
1009
1010
WC()->shipping->reset_shipping();
@@ -1069,10 +1082,10 @@ class WC_Stripe_Payment_Request {
1069
1070
foreach ( $shipping_methods as $method ) {
1071
$shipping[] = array(
1072
- 'id' => $method['id'],
1073
- 'label' => $method['label'],
1074
- 'detail' => '',
1075
- 'amount' => WC_Stripe_Helper::get_stripe_amount( $method['amount']['value'] ),
1076
);
1077
}
1078
@@ -1098,7 +1111,7 @@ class WC_Stripe_Payment_Request {
1098
if ( ! apply_filters( 'wc_stripe_payment_request_hide_itemization', true ) ) {
1099
foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
1100
$amount = $cart_item['line_subtotal'];
1101
- $subtotal += $cart_item['line_subtotal'];
1102
$quantity_label = 1 < $cart_item['quantity'] ? ' (x' . $cart_item['quantity'] . ')' : '';
1103
1104
$product_name = WC_Stripe_Helper::is_pre_30() ? $cart_item['data']->post->post_title : $cart_item['data']->get_name();
@@ -1165,7 +1178,7 @@ class WC_Stripe_Payment_Request {
1165
1166
return array(
1167
'displayItems' => $items,
1168
- 'total' => array(
1169
'label' => $this->total_label,
1170
'amount' => max( 0, apply_filters( 'woocommerce_stripe_calculated_total', WC_Stripe_Helper::get_stripe_amount( $order_total ), $order_total, WC()->cart ) ),
1171
'pending' => false,
279
'pending' => true,
280
);
281
282
+ $data['shippingOptions'] = array(
283
'id' => 'pending',
284
'label' => __( 'Pending', 'woocommerce-gateway-stripe' ),
285
'detail' => '',
288
}
289
290
$data['displayItems'] = $items;
291
+ $data['total'] = array(
292
'label' => apply_filters( 'wc_stripe_payment_request_total_label', $this->total_label ),
293
'amount' => WC_Stripe_Helper::get_stripe_amount( WC_Stripe_Helper::is_pre_30() ? $product->price : $product->get_price() ),
294
'pending' => true,
406
* @return array
407
*/
408
public function supported_product_types() {
409
+ return apply_filters(
410
+ 'wc_stripe_payment_request_supported_types',
411
+ array(
412
+ 'simple',
413
+ 'variable',
414
+ 'variation',
415
+ 'subscription',
416
+ 'booking',
417
+ 'bundle',
418
+ 'composite',
419
+ 'mix-and-match',
420
+ )
421
+ );
422
}
423
424
/**
484
485
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
486
487
+ $stripe_params = array(
488
+ 'ajax_url' => WC_AJAX::get_endpoint( '%%endpoint%%' ),
489
+ 'stripe' => array(
490
+ 'key' => $this->publishable_key,
491
+ 'allow_prepaid_card' => apply_filters( 'wc_stripe_allow_prepaid_card', true ) ? 'yes' : 'no',
492
+ ),
493
+ 'nonce' => array(
494
+ 'payment' => wp_create_nonce( 'wc-stripe-payment-request' ),
495
+ 'shipping' => wp_create_nonce( 'wc-stripe-payment-request-shipping' ),
496
+ 'update_shipping' => wp_create_nonce( 'wc-stripe-update-shipping-method' ),
497
+ 'checkout' => wp_create_nonce( 'woocommerce-process_checkout' ),
498
+ 'add_to_cart' => wp_create_nonce( 'wc-stripe-add-to-cart' ),
499
+ 'get_selected_product_data' => wp_create_nonce( 'wc-stripe-get-selected-product-data' ),
500
+ 'log_errors' => wp_create_nonce( 'wc-stripe-log-errors' ),
501
+ 'clear_cart' => wp_create_nonce( 'wc-stripe-clear-cart' ),
502
+ ),
503
+ 'i18n' => array(
504
+ 'no_prepaid_card' => __( 'Sorry, we\'re not accepting prepaid cards at this time.', 'woocommerce-gateway-stripe' ),
505
+ /* translators: Do not translate the [option] placeholder */
506
+ 'unknown_shipping' => __( 'Unknown shipping option "[option]".', 'woocommerce-gateway-stripe' ),
507
+ ),
508
+ 'checkout' => array(
509
+ 'url' => wc_get_checkout_url(),
510
+ 'currency_code' => strtolower( get_woocommerce_currency() ),
511
+ 'country_code' => substr( get_option( 'woocommerce_default_country' ), 0, 2 ),
512
+ 'needs_shipping' => WC()->cart->needs_shipping() ? 'yes' : 'no',
513
+ ),
514
+ 'button' => array(
515
+ 'type' => $this->get_button_type(),
516
+ 'theme' => $this->get_button_theme(),
517
+ 'height' => $this->get_button_height(),
518
+ 'locale' => apply_filters( 'wc_stripe_payment_request_button_locale', substr( get_locale(), 0, 2 ) ), // Default format is en_US.
519
+ ),
520
+ 'is_product_page' => is_product(),
521
+ 'product' => $this->get_product_data(),
522
+ );
523
+
524
wp_register_script( 'stripe', 'https://js.stripe.com/v3/', '', '3.0', true );
525
wp_register_script( 'wc_stripe_payment_request', plugins_url( 'assets/js/stripe-payment-request' . $suffix . '.js', WC_STRIPE_MAIN_FILE ), array( 'jquery', 'stripe' ), WC_STRIPE_VERSION, true );
526
527
+ wp_localize_script( 'wc_stripe_payment_request', 'wc_stripe_payment_request_params', apply_filters( 'wc_stripe_payment_request_params', $stripe_params ) );
528
529
wp_enqueue_script( 'wc_stripe_payment_request' );
530
}
680
$data = array(
681
'shipping_required' => WC()->cart->needs_shipping(),
682
'order_data' => array(
683
+ 'currency' => strtolower( $currency ),
684
+ 'country_code' => substr( get_option( 'woocommerce_default_country' ), 0, 2 ),
685
),
686
);
687
702
703
try {
704
// Set the shipping package.
705
+ $posted = filter_input_array(
706
+ INPUT_POST,
707
+ array(
708
+ 'country' => FILTER_SANITIZE_STRING,
709
+ 'state' => FILTER_SANITIZE_STRING,
710
+ 'postcode' => FILTER_SANITIZE_STRING,
711
+ 'city' => FILTER_SANITIZE_STRING,
712
+ 'address' => FILTER_SANITIZE_STRING,
713
+ 'address_2' => FILTER_SANITIZE_STRING,
714
+ )
715
+ );
716
717
$this->calculate_shipping( apply_filters( 'wc_stripe_payment_request_shipping_posted_values', $posted ) );
718
728
729
foreach ( $package['rates'] as $key => $rate ) {
730
$data['shipping_options'][] = array(
731
+ 'id' => $rate->id,
732
+ 'label' => $rate->label,
733
+ 'detail' => '',
734
+ 'amount' => WC_Stripe_Helper::get_stripe_amount( $rate->cost ),
735
);
736
}
737
}
746
747
WC()->cart->calculate_totals();
748
749
+ $data += $this->build_display_items();
750
$data['result'] = 'success';
751
752
wp_send_json( $data );
753
} catch ( Exception $e ) {
754
+ $data += $this->build_display_items();
755
$data['result'] = 'invalid_shipping_address';
756
757
wp_send_json( $data );
781
782
WC()->cart->calculate_totals();
783
784
+ $data = array();
785
+ $data += $this->build_display_items();
786
$data['result'] = 'success';
787
788
wp_send_json( $data );
798
public function ajax_get_selected_product_data() {
799
check_ajax_referer( 'wc-stripe-get-selected-product-data', 'security' );
800
801
+ try {
802
+ $product_id = absint( $_POST['product_id'] );
803
+ $qty = ! isset( $_POST['qty'] ) ? 1 : apply_filters( 'woocommerce_add_to_cart_quantity', absint( $_POST['qty'] ), $product_id );
804
+ $product = wc_get_product( $product_id );
805
+ $variation_id = null;
806
+
807
+ if ( 'variable' === ( WC_Stripe_Helper::is_pre_30() ? $product->product_type : $product->get_type() ) && isset( $_POST['attributes'] ) ) {
808
+ $attributes = array_map( 'wc_clean', $_POST['attributes'] );
809
+
810
+ if ( WC_Stripe_Helper::is_pre_30() ) {
811
+ $variation_id = $product->get_matching_variation( $attributes );
812
+ } else {
813
+ $data_store = WC_Data_Store::load( 'product' );
814
+ $variation_id = $data_store->find_matching_product_variation( $product, $attributes );
815
+ }
816
817
+ if ( ! empty( $variation_id ) ) {
818
+ $product = wc_get_product( $variation_id );
819
+ }
820
+ } elseif ( 'simple' === ( WC_Stripe_Helper::is_pre_30() ? $product->product_type : $product->get_type() ) ) {
821
+ $product = wc_get_product( $product_id );
822
}
823
824
+ // Force quantity to 1 if sold individually and check for existing item in cart.
825
+ if ( $product->is_sold_individually() ) {
826
+ $qty = apply_filters( 'wc_stripe_payment_request_add_to_cart_sold_individually_quantity', 1, $qty, $product_id, $variation_id );
827
}
828
829
+ if ( ! $product->has_enough_stock( $qty ) ) {
830
+ /* translators: 1: product name 2: quantity in stock */
831
+ throw new Exception( sprintf( __( 'You cannot add that amount of "%1$s"; to the cart because there is not enough stock (%2$s remaining).', 'woocommerce-gateway-stripe' ), $product->get_name(), wc_format_stock_quantity_for_display( $product->get_stock_quantity(), $product ) ) );
832
+ }
833
834
+ $total = $qty * ( WC_Stripe_Helper::is_pre_30() ? $product->price : $product->get_price() );
835
836
+ $quantity_label = 1 < $qty ? ' (x' . $qty . ')' : '';
837
838
+ $data = array();
839
+ $items = array();
840
841
$items[] = array(
842
+ 'label' => ( WC_Stripe_Helper::is_pre_30() ? $product->name : $product->get_name() ) . $quantity_label,
843
+ 'amount' => WC_Stripe_Helper::get_stripe_amount( $total ),
844
);
845
846
+ if ( wc_tax_enabled() ) {
847
+ $items[] = array(
848
+ 'label' => __( 'Tax', 'woocommerce-gateway-stripe' ),
849
+ 'amount' => 0,
850
+ 'pending' => true,
851
+ );
852
+ }
853
854
+ if ( wc_shipping_enabled() && $product->needs_shipping() ) {
855
+ $items[] = array(
856
+ 'label' => __( 'Shipping', 'woocommerce-gateway-stripe' ),
857
+ 'amount' => 0,
858
+ 'pending' => true,
859
+ );
860
861
+ $data['shippingOptions'] = array(
862
+ 'id' => 'pending',
863
+ 'label' => __( 'Pending', 'woocommerce-gateway-stripe' ),
864
+ 'detail' => '',
865
+ 'amount' => 0,
866
+ );
867
+ }
868
869
+ $data['displayItems'] = $items;
870
+ $data['total'] = array(
871
+ 'label' => $this->total_label,
872
+ 'amount' => WC_Stripe_Helper::get_stripe_amount( $total ),
873
+ 'pending' => true,
874
+ );
875
876
+ $data['requestShipping'] = ( wc_shipping_enabled() && $product->needs_shipping() );
877
+ $data['currency'] = strtolower( get_woocommerce_currency() );
878
+ $data['country_code'] = substr( get_option( 'woocommerce_default_country' ), 0, 2 );
879
+
880
+ wp_send_json( $data );
881
+ } catch ( Exception $e ) {
882
+ wp_send_json( array( 'error' => strip_tags( $e->getMessage() ) ) );
883
+ }
884
}
885
886
/**
900
WC()->shipping->reset_shipping();
901
902
$product_id = absint( $_POST['product_id'] );
903
+ $qty = ! isset( $_POST['qty'] ) ? 1 : absint( $_POST['qty'] );
904
+ $product = wc_get_product( $product_id );
905
906
// First empty the cart to prevent wrong calculation.
907
WC()->cart->empty_cart();
912
if ( WC_Stripe_Helper::is_pre_30() ) {
913
$variation_id = $product->get_matching_variation( $attributes );
914
} else {
915
+ $data_store = WC_Data_Store::load( 'product' );
916
$variation_id = $data_store->find_matching_product_variation( $product, $attributes );
917
}
918
925
926
WC()->cart->calculate_totals();
927
928
+ $data = array();
929
+ $data += $this->build_display_items();
930
$data['result'] = 'success';
931
932
wp_send_json( $data );
1004
* @param array $address
1005
*/
1006
protected function calculate_shipping( $address = array() ) {
1007
$country = $address['country'];
1008
$state = $address['state'];
1009
$postcode = $address['postcode'];
1010
$city = $address['city'];
1011
$address_1 = $address['address'];
1012
$address_2 = $address['address_2'];
1013
+ $wc_states = WC()->countries->get_states( $country );
1014
1015
/**
1016
* In some versions of Chrome, state can be a full name. So we need
1017
* to convert that to abbreviation as WC is expecting that.
1018
*/
1019
+ if ( 2 < strlen( $state ) && ! empty( $wc_states ) ) {
1020
+ $state = array_search( ucwords( strtolower( $state ) ), $wc_states );
1021
}
1022
1023
WC()->shipping->reset_shipping();
1082
1083
foreach ( $shipping_methods as $method ) {
1084
$shipping[] = array(
1085
+ 'id' => $method['id'],
1086
+ 'label' => $method['label'],
1087
+ 'detail' => '',
1088
+ 'amount' => WC_Stripe_Helper::get_stripe_amount( $method['amount']['value'] ),
1089
);
1090
}
1091
1111
if ( ! apply_filters( 'wc_stripe_payment_request_hide_itemization', true ) ) {
1112
foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
1113
$amount = $cart_item['line_subtotal'];
1114
+ $subtotal += $cart_item['line_subtotal'];
1115
$quantity_label = 1 < $cart_item['quantity'] ? ' (x' . $cart_item['quantity'] . ')' : '';
1116
1117
$product_name = WC_Stripe_Helper::is_pre_30() ? $cart_item['data']->post->post_title : $cart_item['data']->get_name();
1178
1179
return array(
1180
'displayItems' => $items,
1181
+ 'total' => array(
1182
'label' => $this->total_label,
1183
'amount' => max( 0, apply_filters( 'woocommerce_stripe_calculated_total', WC_Stripe_Helper::get_stripe_amount( $order_total ), $order_total, WC()->cart ) ),
1184
'pending' => false,
languages/woocommerce-gateway-stripe.pot CHANGED
@@ -1,43 +1,39 @@
1
- # Copyright (C) 2018 WooCommerce
2
- # This file is distributed under the same license as the WooCommerce Stripe Gateway package.
3
msgid ""
4
msgstr ""
5
"Project-Id-Version: WooCommerce Stripe Gateway 4.1.9\n"
6
- "Report-Msgid-Bugs-To: "
7
- "https://github.com/woocommerce/woocommerce-gateway-stripe/issues\n"
8
- "POT-Creation-Date: 2018-08-27 16:21:18+00:00\n"
9
"MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=utf-8\n"
11
"Content-Transfer-Encoding: 8bit\n"
12
"PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n"
13
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
- "Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
15
- "X-Generator: grunt-wp-i18n1.0.1\n"
16
17
- #: includes/abstracts/abstract-wc-stripe-payment-gateway.php:22
18
#. translators: 1) webhook url
19
- msgid ""
20
- "You must add the following webhook endpoint <strong "
21
- "style=\"background-color:#ddd;\">&nbsp;%s&nbsp;</strong> to your <a "
22
- "href=\"https://dashboard.stripe.com/account/webhooks\" "
23
- "target=\"_blank\">Stripe account settings</a>. This will enable you to "
24
- "receive notifications on the charge statuses."
25
msgstr ""
26
27
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:37
28
msgid "Save payment information to my account for future purchases."
29
msgstr ""
30
31
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:254
32
#: includes/compat/class-wc-stripe-sepa-subs-compat.php:175
33
#: includes/compat/class-wc-stripe-subs-compat.php:190
34
- #. translators: 1) dollar amount
35
- #. translators: minimum amount
36
msgid "Sorry, the minimum allowed order total is %1$s to use this payment method."
37
msgstr ""
38
39
- #: includes/abstracts/abstract-wc-stripe-payment-gateway.php:350
40
#. translators: 1) blog name 2) order number
41
msgid "%1$s - Order %2$s"
42
msgstr ""
43
@@ -49,39 +45,41 @@ msgstr ""
49
msgid "customer_email"
50
msgstr ""
51
52
- #: includes/abstracts/abstract-wc-stripe-payment-gateway.php:452
53
#. translators: transaction id
54
msgid "Stripe charge awaiting payment: %s."
55
msgstr ""
56
57
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:459
58
#: includes/class-wc-stripe-order-handler.php:249
59
#: includes/class-wc-stripe-webhook-handler.php:314
60
#: includes/class-wc-stripe-webhook-handler.php:362
61
- #. translators: transaction id
62
msgid "Stripe charge complete (Charge ID: %s)"
63
msgstr ""
64
65
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:464
66
- #: includes/class-wc-gateway-stripe.php:708
67
#: includes/compat/class-wc-stripe-sepa-subs-compat.php:134
68
#: includes/compat/class-wc-stripe-subs-compat.php:96
69
msgid "Payment processing failed. Please retry."
70
msgstr ""
71
72
- #: includes/abstracts/abstract-wc-stripe-payment-gateway.php:476
73
#. translators: transaction id
74
- msgid ""
75
- "Stripe charge authorized (Charge ID: %s). Process order to take payment, or "
76
- "cancel to remove the pre-authorization."
77
msgstr ""
78
79
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:702
80
msgid "Invalid payment method. Please input a new card number."
81
msgstr ""
82
83
- #: includes/abstracts/abstract-wc-stripe-payment-gateway.php:974
84
#. translators: 1) dollar amount 2) transaction id 3) refund message
85
msgid "Refunded %1$s - Refund ID: %2$s - Reason: %3$s"
86
msgstr ""
87
@@ -93,53 +91,44 @@ msgstr ""
93
msgid "There was a problem adding the card."
94
msgstr ""
95
96
- #: includes/admin/class-wc-stripe-admin-notices.php:118
97
#. translators: 1) int version 2) int version
98
- msgid ""
99
- "WooCommerce Stripe - The minimum PHP version required for this plugin is "
100
- "%1$s. You are running %2$s."
101
msgstr ""
102
103
- #: includes/admin/class-wc-stripe-admin-notices.php:129
104
#. translators: 1) int version 2) int version
105
- msgid ""
106
- "WooCommerce Stripe - The minimum WooCommerce version required for this "
107
- "plugin is %1$s. You are running %2$s."
108
msgstr ""
109
110
#: includes/admin/class-wc-stripe-admin-notices.php:139
111
msgid "WooCommerce Stripe - cURL is not installed."
112
msgstr ""
113
114
- #: includes/admin/class-wc-stripe-admin-notices.php:149
115
#. translators: 1) link
116
- msgid ""
117
- "Stripe is almost ready. To get started, <a href=\"%s\">set your Stripe "
118
- "account keys</a>."
119
msgstr ""
120
121
- #: includes/admin/class-wc-stripe-admin-notices.php:161
122
#. translators: 1) link
123
- msgid ""
124
- "Stripe is in test mode however your test keys may not be valid. Test keys "
125
- "start with pk_test and sk_test or rk_test. Please go to your settings and, "
126
- "<a href=\"%s\">set your Stripe account keys</a>."
127
msgstr ""
128
129
- #: includes/admin/class-wc-stripe-admin-notices.php:171
130
#. translators: 1) link
131
- msgid ""
132
- "Stripe is in live mode however your test keys may not be valid. Live keys "
133
- "start with pk_live and sk_live or rk_live. Please go to your settings and, "
134
- "<a href=\"%s\">set your Stripe account keys</a>."
135
msgstr ""
136
137
- #: includes/admin/class-wc-stripe-admin-notices.php:180
138
#. translators: 1) link
139
- msgid ""
140
- "Stripe is enabled, but a SSL certificate is not detected. Your checkout may "
141
- "not be secure! Please ensure your server has a valid <a href=\"%1$s\" "
142
- "target=\"_blank\">SSL certificate</a>"
143
msgstr ""
144
145
#: includes/admin/class-wc-stripe-admin-notices.php:203
@@ -194,11 +183,7 @@ msgid "N/A"
194
msgstr ""
195
196
#: includes/admin/class-wc-stripe-privacy.php:83
197
- msgid ""
198
- "By using this extension, you may be storing personal data or sharing data "
199
- "with an external service. <a href=\"%s\" target=\"_blank\">Learn more about "
200
- "how this works, including what you may want to include in your privacy "
201
- "policy.</a>"
202
msgstr ""
203
204
#: includes/admin/class-wc-stripe-privacy.php:106
@@ -231,15 +216,11 @@ msgstr ""
231
232
#: includes/admin/class-wc-stripe-privacy.php:332
233
#: includes/admin/class-wc-stripe-privacy.php:367
234
- msgid ""
235
- "Order ID %d is less than set retention days. Personal data retained. "
236
- "(Stripe)"
237
msgstr ""
238
239
#: includes/admin/class-wc-stripe-privacy.php:336
240
- msgid ""
241
- "Order ID %d contains an active Subscription. Personal data retained. "
242
- "(Stripe)"
243
msgstr ""
244
245
#: includes/admin/class-wc-stripe-privacy.php:351
@@ -255,9 +236,7 @@ msgid "Relevant Payer Geography: China"
255
msgstr ""
256
257
#: includes/admin/stripe-alipay-settings.php:13
258
- msgid ""
259
- "<a href=\"https://stripe.com/payments/payment-methods-guide#alipay\" "
260
- "target=\"_blank\">Payment Method Guide</a>"
261
msgstr ""
262
263
#: includes/admin/stripe-alipay-settings.php:17
@@ -269,10 +248,7 @@ msgstr ""
269
#: includes/admin/stripe-p24-settings.php:13
270
#: includes/admin/stripe-sepa-settings.php:17
271
#: includes/admin/stripe-sofort-settings.php:17
272
- msgid ""
273
- "Must be activated from your Stripe Dashboard Settings <a "
274
- "href=\"https://dashboard.stripe.com/account/payments/settings\" "
275
- "target=\"_blank\">here</a>"
276
msgstr ""
277
278
#: includes/admin/stripe-alipay-settings.php:21
@@ -369,9 +345,7 @@ msgid "Relevant Payer Geography: Belgium"
369
msgstr ""
370
371
#: includes/admin/stripe-bancontact-settings.php:13
372
- msgid ""
373
- "<a href=\"https://stripe.com/payments/payment-methods-guide#bancontact\" "
374
- "target=\"_blank\">Payment Method Guide</a>"
375
msgstr ""
376
377
#: includes/admin/stripe-bancontact-settings.php:22
@@ -411,9 +385,7 @@ msgid "Relevant Payer Geography: Germany"
411
msgstr ""
412
413
#: includes/admin/stripe-giropay-settings.php:13
414
- msgid ""
415
- "<a href=\"https://stripe.com/payments/payment-methods-guide#giropay\" "
416
- "target=\"_blank\">Payment Method Guide</a>"
417
msgstr ""
418
419
#: includes/admin/stripe-giropay-settings.php:22
@@ -433,9 +405,7 @@ msgid "Relevant Payer Geography: The Netherlands"
433
msgstr ""
434
435
#: includes/admin/stripe-ideal-settings.php:13
436
- msgid ""
437
- "<a href=\"https://stripe.com/payments/payment-methods-guide#ideal\" "
438
- "target=\"_blank\">Payment Method Guide</a>"
439
msgstr ""
440
441
#: includes/admin/stripe-ideal-settings.php:22
@@ -483,16 +453,11 @@ msgid "You will be redirected to P24."
483
msgstr ""
484
485
#: includes/admin/stripe-sepa-settings.php:9
486
- msgid ""
487
- "Relevant Payer Geography: France, Germany, Spain, Belgium, Netherlands, "
488
- "Luxembourg, Italy, Portugal, Austria, Ireland"
489
msgstr ""
490
491
#: includes/admin/stripe-sepa-settings.php:13
492
- msgid ""
493
- "<a "
494
- "href=\"https://stripe.com/payments/payment-methods-guide#sepa-direct-debit\""
495
- " target=\"_blank\">Payment Method Guide</a>"
496
msgstr ""
497
498
#: includes/admin/stripe-sepa-settings.php:22
@@ -519,8 +484,9 @@ msgstr ""
519
msgid "Pay with your credit card via Stripe."
520
msgstr ""
521
522
- #: includes/admin/stripe-settings.php:36
523
#. translators: webhook URL
524
msgid "Test mode"
525
msgstr ""
526
@@ -558,10 +524,7 @@ msgid "Inline Credit Card Form"
558
msgstr ""
559
560
#: includes/admin/stripe-settings.php:74
561
- msgid ""
562
- "Choose the style you want to show for your credit card form. When "
563
- "unchecked, the credit card form will display separate credit card number "
564
- "field, expiry date field and cvc field."
565
msgstr ""
566
567
#: includes/admin/stripe-settings.php:79
@@ -569,10 +532,7 @@ msgid "Statement Descriptor"
569
msgstr ""
570
571
#: includes/admin/stripe-settings.php:81
572
- msgid ""
573
- "This may be up to 22 characters. The statement description must contain at "
574
- "least one letter, may not include ><\"' characters, and will appear on your "
575
- "customer's statement in capital letters."
576
msgstr ""
577
578
#: includes/admin/stripe-settings.php:86
@@ -584,10 +544,7 @@ msgid "Capture charge immediately"
584
msgstr ""
585
586
#: includes/admin/stripe-settings.php:89
587
- msgid ""
588
- "Whether or not to immediately capture the charge. When unchecked, the "
589
- "charge issues an authorization and will need to be captured later. "
590
- "Uncaptured charges expire in 7 days."
591
msgstr ""
592
593
#: includes/admin/stripe-settings.php:94
@@ -599,11 +556,7 @@ msgid "Require 3D Secure when applicable"
599
msgstr ""
600
601
#: includes/admin/stripe-settings.php:97
602
- msgid ""
603
- "Some payment methods have 3D Secure feature. This is an extra security "
604
- "layer for your store. Choose how to handle payments when 3D Secure is "
605
- "recommended. Enabling would require customers to use 3D Secure when "
606
- "recommended."
607
msgstr ""
608
609
#: includes/admin/stripe-settings.php:102
@@ -615,11 +568,7 @@ msgid "Enable Stripe Checkout"
615
msgstr ""
616
617
#: includes/admin/stripe-settings.php:105
618
- msgid ""
619
- "If enabled, this option shows a \"pay\" button and modal credit card form "
620
- "on the checkout, instead of credit card fields directly on the page. We "
621
- "recommend you leave this disabled and use the embedded form as that is the "
622
- "preferred method."
623
msgstr ""
624
625
#: includes/admin/stripe-settings.php:110
@@ -627,10 +576,7 @@ msgid "Stripe Checkout Image"
627
msgstr ""
628
629
#: includes/admin/stripe-settings.php:111
630
- msgid ""
631
- "Optionally enter the URL to a 128x128px image of your brand or product. "
632
- "e.g. "
633
- "<code>https://yoursite.com/wp-content/uploads/2013/09/yourimage.jpg</code>"
634
msgstr ""
635
636
#: includes/admin/stripe-settings.php:117
@@ -645,17 +591,14 @@ msgstr ""
645
msgid "Payment Request Buttons"
646
msgstr ""
647
648
- #: includes/admin/stripe-settings.php:126
649
#. translators: 1) br tag 2) opening anchor tag 3) closing anchor tag
650
- msgid ""
651
- "Enable Payment Request Buttons. (Apple Pay/Chrome Payment Request API) "
652
- "%1$sBy using Apple Pay, you agree to %2$s and %3$s's terms of service."
653
msgstr ""
654
655
#: includes/admin/stripe-settings.php:128
656
- msgid ""
657
- "If enabled, users will be able to pay using Apple Pay or Chrome Payment "
658
- "Request if supported by the browser."
659
msgstr ""
660
661
#: includes/admin/stripe-settings.php:133
@@ -715,9 +658,7 @@ msgid "Button Height"
715
msgstr ""
716
717
#: includes/admin/stripe-settings.php:162
718
- msgid ""
719
- "Enter the height you would like the button to be in pixels. Width will "
720
- "always be 100%."
721
msgstr ""
722
723
#: includes/admin/stripe-settings.php:167
@@ -729,9 +670,7 @@ msgid "Enable Payment via Saved Cards"
729
msgstr ""
730
731
#: includes/admin/stripe-settings.php:170
732
- msgid ""
733
- "If enabled, users will be able to pay with a saved card during checkout. "
734
- "Card details are saved on Stripe servers, not on your store."
735
msgstr ""
736
737
#: includes/admin/stripe-settings.php:175
@@ -751,9 +690,7 @@ msgid "Relevant Payer Geography: Germany, Austria"
751
msgstr ""
752
753
#: includes/admin/stripe-sofort-settings.php:13
754
- msgid ""
755
- "<a href=\"https://stripe.com/payments/payment-methods-guide#sofort\" "
756
- "target=\"_blank\">Payment Method Guide</a>"
757
msgstr ""
758
759
#: includes/admin/stripe-sofort-settings.php:22
@@ -768,24 +705,20 @@ msgstr ""
768
msgid "You will be redirected to SOFORT."
769
msgstr ""
770
771
- #: includes/class-wc-gateway-stripe.php:118
772
#. translators: 1) link to Stripe register page 2) link to Stripe api keys page
773
- msgid ""
774
- "Stripe works by adding payment fields on the checkout and then sending the "
775
- "details to Stripe for verification. <a href=\"%1$s\" target=\"_blank\">Sign "
776
- "up</a> for a Stripe account, and <a href=\"%2$s\" target=\"_blank\">get "
777
- "your Stripe account keys</a>."
778
msgstr ""
779
780
#: includes/class-wc-gateway-stripe.php:162
781
msgid "Continue to payment"
782
msgstr ""
783
784
- #: includes/class-wc-gateway-stripe.php:224
785
#. translators: 1) Opening anchor tag 2) closing anchor tag
786
- msgid ""
787
- "If your billing address has been changed for saved payment methods, be sure "
788
- "to remove any %1$ssaved payment methods%2$s on file and re-add them."
789
msgstr ""
790
791
#: includes/class-wc-gateway-stripe.php:284
@@ -796,101 +729,93 @@ msgstr ""
796
msgid "Change Payment Method"
797
msgstr ""
798
799
- #: includes/class-wc-gateway-stripe.php:318
800
#. translators: link to Stripe testing page
801
- msgid ""
802
- "TEST MODE ENABLED. In test mode, you can use the card number "
803
- "4242424242424242 with any CVC and a valid expiration date or check the <a "
804
- "href=\"%s\" target=\"_blank\">Testing Stripe documentation</a> for more "
805
- "card numbers."
806
msgstr ""
807
808
- #: includes/class-wc-gateway-stripe.php:361
809
msgid "Credit or debit card"
810
msgstr ""
811
812
- #: includes/class-wc-gateway-stripe.php:369
813
msgid "Card Number"
814
msgstr ""
815
816
- #: includes/class-wc-gateway-stripe.php:380
817
msgid "Expiry Date"
818
msgstr ""
819
820
- #: includes/class-wc-gateway-stripe.php:388
821
msgid "Card Code (CVC)"
822
msgstr ""
823
824
- #: includes/class-wc-gateway-stripe.php:473
825
msgid "Please accept the terms and conditions first"
826
msgstr ""
827
828
- #: includes/class-wc-gateway-stripe.php:474
829
msgid "Please fill in required checkout fields first"
830
msgstr ""
831
832
- #: includes/class-wc-gateway-stripe.php:494
833
- #: includes/class-wc-gateway-stripe.php:703
834
#: includes/compat/class-wc-stripe-subs-compat.php:91
835
- msgid ""
836
- "Sorry, we're not accepting prepaid cards at this time. Your credit card has "
837
- "not been charge. Please try with alternative payment method."
838
msgstr ""
839
840
- #: includes/class-wc-gateway-stripe.php:495
841
msgid "Please enter your IBAN account name."
842
msgstr ""
843
844
- #: includes/class-wc-gateway-stripe.php:496
845
msgid "Please enter your IBAN account number."
846
msgstr ""
847
848
- #: includes/class-wc-gateway-stripe.php:508
849
msgid "Billing First Name and Last Name are required."
850
msgstr ""
851
852
- #: includes/class-wc-gateway-stripe.php:592
853
msgid "Place Order"
854
msgstr ""
855
856
- #: includes/class-wc-gateway-stripe.php:790
857
#: includes/class-wc-stripe-order-handler.php:144
858
#: includes/class-wc-stripe-webhook-handler.php:187
859
- #: includes/payment-methods/class-wc-gateway-stripe-sepa.php:346
860
msgid "This card is no longer available and has been removed."
861
msgstr ""
862
863
- #: includes/class-wc-gateway-stripe.php:809
864
#: includes/class-wc-stripe-order-handler.php:162
865
#: includes/class-wc-stripe-webhook-handler.php:206
866
#: includes/compat/class-wc-stripe-sepa-subs-compat.php:222
867
#: includes/compat/class-wc-stripe-subs-compat.php:237
868
- #: includes/payment-methods/class-wc-gateway-stripe-sepa.php:366
869
- msgid ""
870
- "Sorry, we are unable to process your payment at this time. Please retry "
871
- "later."
872
msgstr ""
873
874
- #: includes/class-wc-gateway-stripe.php:886
875
#. translators: error message
876
msgid "This represents the fee Stripe collects for the transaction."
877
msgstr ""
878
879
- #: includes/class-wc-gateway-stripe.php:887
880
msgid "Stripe Fee:"
881
msgstr ""
882
883
- #: includes/class-wc-gateway-stripe.php:923
884
- msgid ""
885
- "This represents the net total that will be credited to your Stripe bank "
886
- "account. This may be in the currency that is set in your Stripe account."
887
msgstr ""
888
889
- #: includes/class-wc-gateway-stripe.php:924
890
msgid "Stripe Payout:"
891
msgstr ""
892
893
- #: includes/class-wc-stripe-api.php:129 includes/class-wc-stripe-api.php:160
894
msgid "There was a problem connecting to the Stripe API endpoint."
895
msgstr ""
896
@@ -898,9 +823,10 @@ msgstr ""
898
msgid "Unable to verify domain - missing secret key."
899
msgstr ""
900
901
#: includes/class-wc-stripe-apple-pay-registration.php:148
902
#: includes/class-wc-stripe-apple-pay-registration.php:157
903
- #. translators: error message
904
msgid "Unable to verify domain - %s"
905
msgstr ""
906
@@ -912,11 +838,10 @@ msgstr ""
912
msgid "Unable to copy domain association file to domain root."
913
msgstr ""
914
915
- #: includes/class-wc-stripe-apple-pay-registration.php:243
916
#. translators: 1) HTML anchor open tag 2) HTML anchor closing tag
917
- msgid ""
918
- "Apple Pay domain verification failed. Please check the %1$slog%2$s to see "
919
- "the issue. (Logging must be enabled to see recorded logs)"
920
msgstr ""
921
922
#: includes/class-wc-stripe-customer.php:119
@@ -1000,13 +925,15 @@ msgstr ""
1000
msgid "The billing country is not accepted by SOFORT. Please try another country."
1001
msgstr ""
1002
1003
- #: includes/class-wc-stripe-order-handler.php:194
1004
#. translators: error message
1005
msgid "Stripe payment failed: %s"
1006
msgstr ""
1007
1008
- #: includes/class-wc-stripe-order-handler.php:246
1009
#. translators: error message
1010
msgid "Unable to capture charge! %s"
1011
msgstr ""
1012
@@ -1014,21 +941,21 @@ msgstr ""
1014
msgid "SEPA IBAN"
1015
msgstr ""
1016
1017
- #: includes/class-wc-stripe-sepa-payment-token.php:41
1018
#. translators: last 4 digits of IBAN account
1019
msgid "SEPA IBAN ending in %s"
1020
msgstr ""
1021
1022
- #: includes/class-wc-stripe-webhook-handler.php:264
1023
#. translators: 1) The URL to the order.
1024
- msgid ""
1025
- "A dispute was created for this order. Response is needed. Please go to your "
1026
- "<a href=\"%s\" title=\"Stripe Dashboard\" target=\"_blank\">Stripe "
1027
- "Dashboard</a> to review this dispute."
1028
msgstr ""
1029
1030
- #: includes/class-wc-stripe-webhook-handler.php:309
1031
#. translators: partial captured amount
1032
msgid "This charge was partially captured via Stripe Dashboard in the amount of: %s"
1033
msgstr ""
1034
@@ -1049,21 +976,21 @@ msgstr ""
1049
msgid "Pre-Authorization Released via Stripe Dashboard"
1050
msgstr ""
1051
1052
- #: includes/class-wc-stripe-webhook-handler.php:478
1053
#. translators: 1) dollar amount 2) transaction id 3) refund message
1054
msgid "Refunded %1$s - Refund ID: %2$s - %3$s"
1055
msgstr ""
1056
1057
- #: includes/class-wc-stripe-webhook-handler.php:500
1058
#. translators: 1) The URL to the order. 2) The reason type.
1059
- msgid ""
1060
- "A review has been opened for this order. Action is needed. Please go to "
1061
- "your <a href=\"%1$s\" title=\"Stripe Dashboard\" target=\"_blank\">Stripe "
1062
- "Dashboard</a> to review the issue. Reason: (%2$s)"
1063
msgstr ""
1064
1065
- #: includes/class-wc-stripe-webhook-handler.php:524
1066
#. translators: 1) The reason type.
1067
msgid "The opened review for this order is now closed. Reason: (%s)"
1068
msgstr ""
1069
@@ -1071,8 +998,9 @@ msgstr ""
1071
msgid "Unable to store payment details. Please try again."
1072
msgstr ""
1073
1074
- #: includes/compat/class-wc-stripe-pre-orders-compat.php:120
1075
#. translators: error message
1076
msgid "Stripe Transaction Failed (%s)"
1077
msgstr ""
1078
@@ -1081,34 +1009,33 @@ msgstr ""
1081
msgid "Customer not found"
1082
msgstr ""
1083
1084
#: includes/compat/class-wc-stripe-sepa-subs-compat.php:345
1085
#: includes/compat/class-wc-stripe-subs-compat.php:389
1086
- #. translators: error message
1087
msgid "A \"Stripe Customer ID\" value is required."
1088
msgstr ""
1089
1090
#: includes/compat/class-wc-stripe-sepa-subs-compat.php:347
1091
#: includes/compat/class-wc-stripe-subs-compat.php:391
1092
- msgid ""
1093
- "Invalid customer ID. A valid \"Stripe Customer ID\" must begin with "
1094
- "\"cus_\"."
1095
msgstr ""
1096
1097
#: includes/compat/class-wc-stripe-sepa-subs-compat.php:356
1098
#: includes/compat/class-wc-stripe-subs-compat.php:400
1099
- msgid ""
1100
- "Invalid source ID. A valid source \"Stripe Source ID\" must begin with "
1101
- "\"src_\" or \"card_\"."
1102
msgstr ""
1103
1104
- #: includes/compat/class-wc-stripe-sepa-subs-compat.php:427
1105
#. translators: 1) last 4 digits of SEPA Direct Debit
1106
msgid "Via SEPA Direct Debit ending in %1$s"
1107
msgstr ""
1108
1109
#: includes/compat/class-wc-stripe-subs-compat.php:482
1110
#: includes/compat/class-wc-stripe-subs-compat.php:497
1111
- #. translators: 1) card brand 2) last 4 digits
1112
msgid "Via %1$s card ending in %2$s"
1113
msgstr ""
1114
@@ -1117,6 +1044,8 @@ msgstr ""
1117
msgid "Stripe Alipay"
1118
msgstr ""
1119
1120
#: includes/payment-methods/class-wc-gateway-stripe-alipay.php:62
1121
#: includes/payment-methods/class-wc-gateway-stripe-bancontact.php:62
1122
#: includes/payment-methods/class-wc-gateway-stripe-eps.php:62
@@ -1126,7 +1055,6 @@ msgstr ""
1126
#: includes/payment-methods/class-wc-gateway-stripe-p24.php:62
1127
#: includes/payment-methods/class-wc-gateway-stripe-sepa.php:77
1128
#: includes/payment-methods/class-wc-gateway-stripe-sofort.php:62
1129
- #. translators: link
1130
msgid "All other general Stripe settings can be adjusted <a href=\"%s\">here</a>."
1131
msgstr ""
1132
@@ -1200,26 +1128,18 @@ msgstr ""
1200
msgid "Stripe SEPA Direct Debit"
1201
msgstr ""
1202
1203
- #: includes/payment-methods/class-wc-gateway-stripe-sepa.php:208
1204
#. translators: statement descriptor
1205
- msgid ""
1206
- "By providing your IBAN and confirming this payment, you are authorizing %s "
1207
- "and Stripe, our payment service provider, to send instructions to your bank "
1208
- "to debit your account and your bank to debit your account in accordance "
1209
- "with those instructions. You are entitled to a refund from your bank under "
1210
- "the terms and conditions of your agreement with your bank. A refund must be "
1211
- "claimed within 8 weeks starting from the date on which your account was "
1212
- "debited."
1213
msgstr ""
1214
1215
- #: includes/payment-methods/class-wc-gateway-stripe-sepa.php:224
1216
msgid "IBAN."
1217
msgstr ""
1218
1219
#: includes/payment-methods/class-wc-gateway-stripe-sepa.php:265
1220
- msgid ""
1221
- "TEST MODE ENABLED. In test mode, you can use IBAN number "
1222
- "DE89370400440532013000."
1223
msgstr ""
1224
1225
#: includes/payment-methods/class-wc-gateway-stripe-sofort.php:60
@@ -1228,53 +1148,104 @@ msgid "Stripe SOFORT"
1228
msgstr ""
1229
1230
#: includes/payment-methods/class-wc-stripe-payment-request.php:269
1231
- #: includes/payment-methods/class-wc-stripe-payment-request.php:833
1232
- #: includes/payment-methods/class-wc-stripe-payment-request.php:1133
1233
msgid "Tax"
1234
msgstr ""
1235
1236
#: includes/payment-methods/class-wc-stripe-payment-request.php:277
1237
- #: includes/payment-methods/class-wc-stripe-payment-request.php:841
1238
- #: includes/payment-methods/class-wc-stripe-payment-request.php:1140
1239
msgid "Shipping"
1240
msgstr ""
1241
1242
#: includes/payment-methods/class-wc-stripe-payment-request.php:284
1243
- #: includes/payment-methods/class-wc-stripe-payment-request.php:848
1244
msgid "Pending"
1245
msgstr ""
1246
1247
- #: includes/payment-methods/class-wc-stripe-payment-request.php:507
1248
msgid "Sorry, we're not accepting prepaid cards at this time."
1249
msgstr ""
1250
1251
- #: includes/payment-methods/class-wc-stripe-payment-request.php:509
1252
#. translators: Do not translate the [option] placeholder
1253
msgid "Unknown shipping option \"[option]\"."
1254
msgstr ""
1255
1256
- #: includes/payment-methods/class-wc-stripe-payment-request.php:631
1257
msgid "OR"
1258
msgstr ""
1259
1260
- #: includes/payment-methods/class-wc-stripe-payment-request.php:722
1261
- #: includes/payment-methods/class-wc-stripe-payment-request.php:735
1262
msgid "Unable to find shipping method for address."
1263
msgstr ""
1264
1265
- #: includes/payment-methods/class-wc-stripe-payment-request.php:968
1266
msgid "Empty cart"
1267
msgstr ""
1268
1269
- #: includes/payment-methods/class-wc-stripe-payment-request.php:1147
1270
msgid "Discount"
1271
msgstr ""
1272
1273
- #: woocommerce-gateway-stripe.php:30
1274
#. translators: 1. URL link.
1275
- msgid ""
1276
- "Stripe requires WooCommerce to be installed and active. You can download %s "
1277
- "here."
1278
msgstr ""
1279
1280
#: woocommerce-gateway-stripe.php:196
@@ -1288,7 +1259,6 @@ msgstr ""
1288
#: woocommerce-gateway-stripe.php:198
1289
msgid "Support"
1290
msgstr ""
1291
-
1292
#. Plugin Name of the plugin/theme
1293
msgid "WooCommerce Stripe Gateway"
1294
msgstr ""
@@ -1307,4 +1277,4 @@ msgstr ""
1307
1308
#. Author URI of the plugin/theme
1309
msgid "https://woocommerce.com/"
1310
- msgstr ""
1
+ # <!=Copyright (C) 2018 WooCommerce
2
+ # This file is distributed under the same license as the WooCommerce Stripe Gateway package.=!>
3
msgid ""
4
msgstr ""
5
"Project-Id-Version: WooCommerce Stripe Gateway 4.1.9\n"
6
+ "Report-Msgid-Bugs-To: https://docs.woocommerce.com\n"
7
+ "POT-Creation-Date: 2018-09-13 17:20:49+00:00\n"
8
"MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
"Content-Transfer-Encoding: 8bit\n"
11
"PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n"
12
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
15
#. translators: 1) webhook url
16
+
17
+ #: includes/abstracts/abstract-wc-stripe-payment-gateway.php:22
18
+ msgid "You must add the following webhook endpoint <strong style=\"background-color:#ddd;\">&nbsp;%s&nbsp;</strong> to your <a href=\"https://dashboard.stripe.com/account/webhooks\" target=\"_blank\">Stripe account settings</a>. This will enable you to receive notifications on the charge statuses."
19
msgstr ""
20
21
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:37
22
msgid "Save payment information to my account for future purchases."
23
msgstr ""
24
25
+ #. translators: 1) dollar amount
26
+ #. translators: minimum amount
27
+
28
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:254
29
#: includes/compat/class-wc-stripe-sepa-subs-compat.php:175
30
#: includes/compat/class-wc-stripe-subs-compat.php:190
31
msgid "Sorry, the minimum allowed order total is %1$s to use this payment method."
32
msgstr ""
33
34
#. translators: 1) blog name 2) order number
35
+
36
+ #: includes/abstracts/abstract-wc-stripe-payment-gateway.php:350
37
msgid "%1$s - Order %2$s"
38
msgstr ""
39
45
msgid "customer_email"
46
msgstr ""
47
48
#. translators: transaction id
49
+
50
+ #: includes/abstracts/abstract-wc-stripe-payment-gateway.php:452
51
msgid "Stripe charge awaiting payment: %s."
52
msgstr ""
53
54
+ #. translators: transaction id
55
+
56
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:459
57
#: includes/class-wc-stripe-order-handler.php:249
58
#: includes/class-wc-stripe-webhook-handler.php:314
59
#: includes/class-wc-stripe-webhook-handler.php:362
60
msgid "Stripe charge complete (Charge ID: %s)"
61
msgstr ""
62
63
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:464
64
+ #: includes/class-wc-gateway-stripe.php:706
65
#: includes/compat/class-wc-stripe-sepa-subs-compat.php:134
66
#: includes/compat/class-wc-stripe-subs-compat.php:96
67
msgid "Payment processing failed. Please retry."
68
msgstr ""
69
70
#. translators: transaction id
71
+
72
+ #: includes/abstracts/abstract-wc-stripe-payment-gateway.php:476
73
+ msgid "Stripe charge authorized (Charge ID: %s). Process order to take payment, or cancel to remove the pre-authorization."
74
msgstr ""
75
76
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:702
77
msgid "Invalid payment method. Please input a new card number."
78
msgstr ""
79
80
#. translators: 1) dollar amount 2) transaction id 3) refund message
81
+
82
+ #: includes/abstracts/abstract-wc-stripe-payment-gateway.php:974
83
msgid "Refunded %1$s - Refund ID: %2$s - Reason: %3$s"
84
msgstr ""
85
91
msgid "There was a problem adding the card."
92
msgstr ""
93
94
#. translators: 1) int version 2) int version
95
+
96
+ #: includes/admin/class-wc-stripe-admin-notices.php:118
97
+ msgid "WooCommerce Stripe - The minimum PHP version required for this plugin is %1$s. You are running %2$s."
98
msgstr ""
99
100
#. translators: 1) int version 2) int version
101
+
102
+ #: includes/admin/class-wc-stripe-admin-notices.php:129
103
+ msgid "WooCommerce Stripe - The minimum WooCommerce version required for this plugin is %1$s. You are running %2$s."
104
msgstr ""
105
106
#: includes/admin/class-wc-stripe-admin-notices.php:139
107
msgid "WooCommerce Stripe - cURL is not installed."
108
msgstr ""
109
110
#. translators: 1) link
111
+
112
+ #: includes/admin/class-wc-stripe-admin-notices.php:149
113
+ msgid "Stripe is almost ready. To get started, <a href=\"%s\">set your Stripe account keys</a>."
114
msgstr ""
115
116
#. translators: 1) link
117
+
118
+ #: includes/admin/class-wc-stripe-admin-notices.php:161
119
+ msgid "Stripe is in test mode however your test keys may not be valid. Test keys start with pk_test and sk_test or rk_test. Please go to your settings and, <a href=\"%s\">set your Stripe account keys</a>."
120
msgstr ""
121
122
#. translators: 1) link
123
+
124
+ #: includes/admin/class-wc-stripe-admin-notices.php:171
125
+ msgid "Stripe is in live mode however your test keys may not be valid. Live keys start with pk_live and sk_live or rk_live. Please go to your settings and, <a href=\"%s\">set your Stripe account keys</a>."
126
msgstr ""
127
128
#. translators: 1) link
129
+
130
+ #: includes/admin/class-wc-stripe-admin-notices.php:180
131
+ msgid "Stripe is enabled, but a SSL certificate is not detected. Your checkout may not be secure! Please ensure your server has a valid <a href=\"%1$s\" target=\"_blank\">SSL certificate</a>"
132
msgstr ""
133
134
#: includes/admin/class-wc-stripe-admin-notices.php:203
183
msgstr ""
184
185
#: includes/admin/class-wc-stripe-privacy.php:83
186
+ msgid "By using this extension, you may be storing personal data or sharing data with an external service. <a href=\"%s\" target=\"_blank\">Learn more about how this works, including what you may want to include in your privacy policy.</a>"
187
msgstr ""
188
189
#: includes/admin/class-wc-stripe-privacy.php:106
216
217
#: includes/admin/class-wc-stripe-privacy.php:332
218
#: includes/admin/class-wc-stripe-privacy.php:367
219
+ msgid "Order ID %d is less than set retention days. Personal data retained. (Stripe)"
220
msgstr ""
221
222
#: includes/admin/class-wc-stripe-privacy.php:336
223
+ msgid "Order ID %d contains an active Subscription. Personal data retained. (Stripe)"
224
msgstr ""
225
226
#: includes/admin/class-wc-stripe-privacy.php:351
236
msgstr ""
237
238
#: includes/admin/stripe-alipay-settings.php:13
239
+ msgid "<a href=\"https://stripe.com/payments/payment-methods-guide#alipay\" target=\"_blank\">Payment Method Guide</a>"
240
msgstr ""
241
242
#: includes/admin/stripe-alipay-settings.php:17
248
#: includes/admin/stripe-p24-settings.php:13
249
#: includes/admin/stripe-sepa-settings.php:17
250
#: includes/admin/stripe-sofort-settings.php:17
251
+ msgid "Must be activated from your Stripe Dashboard Settings <a href=\"https://dashboard.stripe.com/account/payments/settings\" target=\"_blank\">here</a>"
252
msgstr ""
253
254
#: includes/admin/stripe-alipay-settings.php:21
345
msgstr ""
346
347
#: includes/admin/stripe-bancontact-settings.php:13
348
+ msgid "<a href=\"https://stripe.com/payments/payment-methods-guide#bancontact\" target=\"_blank\">Payment Method Guide</a>"
349
msgstr ""
350
351
#: includes/admin/stripe-bancontact-settings.php:22
385
msgstr ""
386
387
#: includes/admin/stripe-giropay-settings.php:13
388
+ msgid "<a href=\"https://stripe.com/payments/payment-methods-guide#giropay\" target=\"_blank\">Payment Method Guide</a>"
389
msgstr ""
390
391
#: includes/admin/stripe-giropay-settings.php:22
405
msgstr ""
406
407
#: includes/admin/stripe-ideal-settings.php:13
408
+ msgid "<a href=\"https://stripe.com/payments/payment-methods-guide#ideal\" target=\"_blank\">Payment Method Guide</a>"
409
msgstr ""
410
411
#: includes/admin/stripe-ideal-settings.php:22
453
msgstr ""
454
455
#: includes/admin/stripe-sepa-settings.php:9
456
+ msgid "Relevant Payer Geography: France, Germany, Spain, Belgium, Netherlands, Luxembourg, Italy, Portugal, Austria, Ireland"
457
msgstr ""
458
459
#: includes/admin/stripe-sepa-settings.php:13
460
+ msgid "<a href=\"https://stripe.com/payments/payment-methods-guide#sepa-direct-debit\" target=\"_blank\">Payment Method Guide</a>"
461
msgstr ""
462
463
#: includes/admin/stripe-sepa-settings.php:22
484
msgid "Pay with your credit card via Stripe."
485
msgstr ""
486
487
#. translators: webhook URL
488
+
489
+ #: includes/admin/stripe-settings.php:36
490
msgid "Test mode"
491
msgstr ""
492
524
msgstr ""
525
526
#: includes/admin/stripe-settings.php:74
527
+ msgid "Choose the style you want to show for your credit card form. When unchecked, the credit card form will display separate credit card number field, expiry date field and cvc field."
528
msgstr ""
529
530
#: includes/admin/stripe-settings.php:79
532
msgstr ""
533
534
#: includes/admin/stripe-settings.php:81
535
+ msgid "This may be up to 22 characters. The statement description must contain at least one letter, may not include ><\"' characters, and will appear on your customer's statement in capital letters."
536
msgstr ""
537
538
#: includes/admin/stripe-settings.php:86
544
msgstr ""
545
546
#: includes/admin/stripe-settings.php:89
547
+ msgid "Whether or not to immediately capture the charge. When unchecked, the charge issues an authorization and will need to be captured later. Uncaptured charges expire in 7 days."
548
msgstr ""
549
550
#: includes/admin/stripe-settings.php:94
556
msgstr ""
557
558
#: includes/admin/stripe-settings.php:97
559
+ msgid "Some payment methods have 3D Secure feature. This is an extra security layer for your store. Choose how to handle payments when 3D Secure is recommended. Enabling would require customers to use 3D Secure when recommended."
560
msgstr ""
561
562
#: includes/admin/stripe-settings.php:102
568
msgstr ""
569
570
#: includes/admin/stripe-settings.php:105
571
+ msgid "If enabled, this option shows a \"pay\" button and modal credit card form on the checkout, instead of credit card fields directly on the page. We recommend you leave this disabled and use the embedded form as that is the preferred method."
572
msgstr ""
573
574
#: includes/admin/stripe-settings.php:110
576
msgstr ""
577
578
#: includes/admin/stripe-settings.php:111
579
+ msgid "Optionally enter the URL to a 128x128px image of your brand or product. e.g. <code>https://yoursite.com/wp-content/uploads/2013/09/yourimage.jpg</code>"
580
msgstr ""
581
582
#: includes/admin/stripe-settings.php:117
591
msgid "Payment Request Buttons"
592
msgstr ""
593
594
#. translators: 1) br tag 2) opening anchor tag 3) closing anchor tag
595
+
596
+ #: includes/admin/stripe-settings.php:126
597
+ msgid "Enable Payment Request Buttons. (Apple Pay/Chrome Payment Request API) %1$sBy using Apple Pay, you agree to %2$s and %3$s's terms of service."
598
msgstr ""
599
600
#: includes/admin/stripe-settings.php:128
601
+ msgid "If enabled, users will be able to pay using Apple Pay or Chrome Payment Request if supported by the browser."
602
msgstr ""
603
604
#: includes/admin/stripe-settings.php:133
658
msgstr ""
659
660
#: includes/admin/stripe-settings.php:162
661
+ msgid "Enter the height you would like the button to be in pixels. Width will always be 100%."
662
msgstr ""
663
664
#: includes/admin/stripe-settings.php:167
670
msgstr ""
671
672
#: includes/admin/stripe-settings.php:170
673
+ msgid "If enabled, users will be able to pay with a saved card during checkout. Card details are saved on Stripe servers, not on your store."
674
msgstr ""
675
676
#: includes/admin/stripe-settings.php:175
690
msgstr ""
691
692
#: includes/admin/stripe-sofort-settings.php:13
693
+ msgid "<a href=\"https://stripe.com/payments/payment-methods-guide#sofort\" target=\"_blank\">Payment Method Guide</a>"
694
msgstr ""
695
696
#: includes/admin/stripe-sofort-settings.php:22
705
msgid "You will be redirected to SOFORT."
706
msgstr ""
707
708
#. translators: 1) link to Stripe register page 2) link to Stripe api keys page
709
+
710
+ #: includes/class-wc-gateway-stripe.php:118
711
+ msgid "Stripe works by adding payment fields on the checkout and then sending the details to Stripe for verification. <a href=\"%1$s\" target=\"_blank\">Sign up</a> for a Stripe account, and <a href=\"%2$s\" target=\"_blank\">get your Stripe account keys</a>."
712
msgstr ""
713
714
#: includes/class-wc-gateway-stripe.php:162
715
msgid "Continue to payment"
716
msgstr ""
717
718
#. translators: 1) Opening anchor tag 2) closing anchor tag
719
+
720
+ #: includes/class-wc-gateway-stripe.php:224
721
+ msgid "If your billing address has been changed for saved payment methods, be sure to remove any %1$ssaved payment methods%2$s on file and re-add them."
722
msgstr ""
723
724
#: includes/class-wc-gateway-stripe.php:284
729
msgid "Change Payment Method"
730
msgstr ""
731
732
#. translators: link to Stripe testing page
733
+
734
+ #: includes/class-wc-gateway-stripe.php:317
735
+ msgid "TEST MODE ENABLED. In test mode, you can use the card number 4242424242424242 with any CVC and a valid expiration date or check the <a href=\"%s\" target=\"_blank\">Testing Stripe documentation</a> for more card numbers."
736
msgstr ""
737
738
+ #: includes/class-wc-gateway-stripe.php:360
739
msgid "Credit or debit card"
740
msgstr ""
741
742
+ #: includes/class-wc-gateway-stripe.php:368
743
msgid "Card Number"
744
msgstr ""
745
746
+ #: includes/class-wc-gateway-stripe.php:379
747
msgid "Expiry Date"
748
msgstr ""
749
750
+ #: includes/class-wc-gateway-stripe.php:387
751
msgid "Card Code (CVC)"
752
msgstr ""
753
754
+ #: includes/class-wc-gateway-stripe.php:472
755
msgid "Please accept the terms and conditions first"
756
msgstr ""
757
758
+ #: includes/class-wc-gateway-stripe.php:473
759
msgid "Please fill in required checkout fields first"
760
msgstr ""
761
762
+ #: includes/class-wc-gateway-stripe.php:493
763
+ #: includes/class-wc-gateway-stripe.php:701
764
#: includes/compat/class-wc-stripe-subs-compat.php:91
765
+ msgid "Sorry, we're not accepting prepaid cards at this time. Your credit card has not been charge. Please try with alternative payment method."
766
msgstr ""
767
768
+ #: includes/class-wc-gateway-stripe.php:494
769
msgid "Please enter your IBAN account name."
770
msgstr ""
771
772
+ #: includes/class-wc-gateway-stripe.php:495
773
msgid "Please enter your IBAN account number."
774
msgstr ""
775
776
+ #: includes/class-wc-gateway-stripe.php:507
777
msgid "Billing First Name and Last Name are required."
778
msgstr ""
779
780
+ #: includes/class-wc-gateway-stripe.php:591
781
msgid "Place Order"
782
msgstr ""
783
784
+ #: includes/class-wc-gateway-stripe.php:791
785
#: includes/class-wc-stripe-order-handler.php:144
786
#: includes/class-wc-stripe-webhook-handler.php:187
787
+ #: includes/payment-methods/class-wc-gateway-stripe-sepa.php:347
788
msgid "This card is no longer available and has been removed."
789
msgstr ""
790
791
+ #: includes/class-wc-gateway-stripe.php:810
792
#: includes/class-wc-stripe-order-handler.php:162
793
#: includes/class-wc-stripe-webhook-handler.php:206
794
#: includes/compat/class-wc-stripe-sepa-subs-compat.php:222
795
#: includes/compat/class-wc-stripe-subs-compat.php:237
796
+ #: includes/payment-methods/class-wc-gateway-stripe-sepa.php:367
797
+ msgid "Sorry, we are unable to process your payment at this time. Please retry later."
798
msgstr ""
799
800
#. translators: error message
801
+
802
+ #: includes/class-wc-gateway-stripe.php:887
803
msgid "This represents the fee Stripe collects for the transaction."
804
msgstr ""
805
806
+ #: includes/class-wc-gateway-stripe.php:888
807
msgid "Stripe Fee:"
808
msgstr ""
809
810
+ #: includes/class-wc-gateway-stripe.php:924
811
+ msgid "This represents the net total that will be credited to your Stripe bank account. This may be in the currency that is set in your Stripe account."
812
msgstr ""
813
814
+ #: includes/class-wc-gateway-stripe.php:925
815
msgid "Stripe Payout:"
816
msgstr ""
817
818
+ #: includes/class-wc-stripe-api.php:138 includes/class-wc-stripe-api.php:172
819
msgid "There was a problem connecting to the Stripe API endpoint."
820
msgstr ""
821
823
msgid "Unable to verify domain - missing secret key."
824
msgstr ""
825
826
+ #. translators: error message
827
+
828
#: includes/class-wc-stripe-apple-pay-registration.php:148
829
#: includes/class-wc-stripe-apple-pay-registration.php:157
830
msgid "Unable to verify domain - %s"
831
msgstr ""
832
838
msgid "Unable to copy domain association file to domain root."
839
msgstr ""
840
841
#. translators: 1) HTML anchor open tag 2) HTML anchor closing tag
842
+
843
+ #: includes/class-wc-stripe-apple-pay-registration.php:243
844
+ msgid "Apple Pay domain verification failed. Please check the %1$slog%2$s to see the issue. (Logging must be enabled to see recorded logs)"
845
msgstr ""
846
847
#: includes/class-wc-stripe-customer.php:119
925
msgid "The billing country is not accepted by SOFORT. Please try another country."
926
msgstr ""
927
928
#. translators: error message
929
+
930
+ #: includes/class-wc-stripe-order-handler.php:194
931
msgid "Stripe payment failed: %s"
932
msgstr ""
933
934
#. translators: error message
935
+
936
+ #: includes/class-wc-stripe-order-handler.php:246
937
msgid "Unable to capture charge! %s"
938
msgstr ""
939
941
msgid "SEPA IBAN"
942
msgstr ""
943
944
#. translators: last 4 digits of IBAN account
945
+
946
+ #: includes/class-wc-stripe-sepa-payment-token.php:41
947
msgid "SEPA IBAN ending in %s"
948
msgstr ""
949
950
#. translators: 1) The URL to the order.
951
+
952
+ #: includes/class-wc-stripe-webhook-handler.php:264
953
+ msgid "A dispute was created for this order. Response is needed. Please go to your <a href=\"%s\" title=\"Stripe Dashboard\" target=\"_blank\">Stripe Dashboard</a> to review this dispute."
954
msgstr ""
955
956
#. translators: partial captured amount
957
+
958
+ #: includes/class-wc-stripe-webhook-handler.php:309
959
msgid "This charge was partially captured via Stripe Dashboard in the amount of: %s"
960
msgstr ""
961
976
msgid "Pre-Authorization Released via Stripe Dashboard"
977
msgstr ""
978
979
#. translators: 1) dollar amount 2) transaction id 3) refund message
980
+
981
+ #: includes/class-wc-stripe-webhook-handler.php:478
982
msgid "Refunded %1$s - Refund ID: %2$s - %3$s"
983
msgstr ""
984
985
#. translators: 1) The URL to the order. 2) The reason type.
986
+
987
+ #: includes/class-wc-stripe-webhook-handler.php:500
988
+ msgid "A review has been opened for this order. Action is needed. Please go to your <a href=\"%1$s\" title=\"Stripe Dashboard\" target=\"_blank\">Stripe Dashboard</a> to review the issue. Reason: (%2$s)"
989
msgstr ""
990
991
#. translators: 1) The reason type.
992
+
993
+ #: includes/class-wc-stripe-webhook-handler.php:524
994
msgid "The opened review for this order is now closed. Reason: (%s)"
995
msgstr ""
996
998
msgid "Unable to store payment details. Please try again."
999
msgstr ""
1000
1001
#. translators: error message
1002
+
1003
+ #: includes/compat/class-wc-stripe-pre-orders-compat.php:120
1004
msgid "Stripe Transaction Failed (%s)"
1005
msgstr ""
1006
1009
msgid "Customer not found"
1010
msgstr ""
1011
1012
+ #. translators: error message
1013
+
1014
#: includes/compat/class-wc-stripe-sepa-subs-compat.php:345
1015
#: includes/compat/class-wc-stripe-subs-compat.php:389
1016
msgid "A \"Stripe Customer ID\" value is required."
1017
msgstr ""
1018
1019
#: includes/compat/class-wc-stripe-sepa-subs-compat.php:347
1020
#: includes/compat/class-wc-stripe-subs-compat.php:391
1021
+ msgid "Invalid customer ID. A valid \"Stripe Customer ID\" must begin with \"cus_\"."
1022
msgstr ""
1023
1024
#: includes/compat/class-wc-stripe-sepa-subs-compat.php:356
1025
#: includes/compat/class-wc-stripe-subs-compat.php:400
1026
+ msgid "Invalid source ID. A valid source \"Stripe Source ID\" must begin with \"src_\" or \"card_\"."
1027
msgstr ""
1028
1029
#. translators: 1) last 4 digits of SEPA Direct Debit
1030
+
1031
+ #: includes/compat/class-wc-stripe-sepa-subs-compat.php:427
1032
msgid "Via SEPA Direct Debit ending in %1$s"
1033
msgstr ""
1034
1035
+ #. translators: 1) card brand 2) last 4 digits
1036
+
1037
#: includes/compat/class-wc-stripe-subs-compat.php:482
1038
#: includes/compat/class-wc-stripe-subs-compat.php:497
1039
msgid "Via %1$s card ending in %2$s"
1040
msgstr ""
1041
1044
msgid "Stripe Alipay"
1045
msgstr ""
1046
1047
+ #. translators: link
1048
+
1049
#: includes/payment-methods/class-wc-gateway-stripe-alipay.php:62
1050
#: includes/payment-methods/class-wc-gateway-stripe-bancontact.php:62
1051
#: includes/payment-methods/class-wc-gateway-stripe-eps.php:62
1055
#: includes/payment-methods/class-wc-gateway-stripe-p24.php:62
1056
#: includes/payment-methods/class-wc-gateway-stripe-sepa.php:77
1057
#: includes/payment-methods/class-wc-gateway-stripe-sofort.php:62
1058
msgid "All other general Stripe settings can be adjusted <a href=\"%s\">here</a>."
1059
msgstr ""
1060
1128
msgid "Stripe SEPA Direct Debit"
1129
msgstr ""
1130
1131
#. translators: statement descriptor
1132
+
1133
+ #: includes/payment-methods/class-wc-gateway-stripe-sepa.php:209
1134
+ msgid "By providing your IBAN and confirming this payment, you are authorizing %s and Stripe, our payment service provider, to send instructions to your bank to debit your account and your bank to debit your account in accordance with those instructions. You are entitled to a refund from your bank under the terms and conditions of your agreement with your bank. A refund must be claimed within 8 weeks starting from the date on which your account was debited."
1135
msgstr ""
1136
1137
+ #: includes/payment-methods/class-wc-gateway-stripe-sepa.php:225
1138
msgid "IBAN."
1139
msgstr ""
1140
1141
#: includes/payment-methods/class-wc-gateway-stripe-sepa.php:265
1142
+ msgid "TEST MODE ENABLED. In test mode, you can use IBAN number DE89370400440532013000."
1143
msgstr ""
1144
1145
#: includes/payment-methods/class-wc-gateway-stripe-sofort.php:60
1148
msgstr ""
1149
1150
#: includes/payment-methods/class-wc-stripe-payment-request.php:269
1151
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:848
1152
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:1146
1153
msgid "Tax"
1154
msgstr ""
1155
1156
#: includes/payment-methods/class-wc-stripe-payment-request.php:277
1157
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:856
1158
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:1153
1159
msgid "Shipping"
1160
msgstr ""
1161
1162
#: includes/payment-methods/class-wc-stripe-payment-request.php:284
1163
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:863
1164
msgid "Pending"
1165
msgstr ""
1166
1167
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:504
1168
msgid "Sorry, we're not accepting prepaid cards at this time."
1169
msgstr ""
1170
1171
#. translators: Do not translate the [option] placeholder
1172
+
1173
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:506
1174
msgid "Unknown shipping option \"[option]\"."
1175
msgstr ""
1176
1177
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:632
1178
msgid "OR"
1179
msgstr ""
1180
1181
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:726
1182
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:739
1183
msgid "Unable to find shipping method for address."
1184
msgstr ""
1185
1186
+ #. translators: 1: product name 2: quantity in stock
1187
+
1188
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:831
1189
+ msgid "You cannot add that amount of \"%1$s\"; to the cart because there is not enough stock (%2$s remaining)."
1190
+ msgstr ""
1191
+
1192
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:985
1193
msgid "Empty cart"
1194
msgstr ""
1195
1196
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:1160
1197
msgid "Discount"
1198
msgstr ""
1199
1200
+ #: node_modules/grunt-wp-i18n/test/fixtures/basic-theme/exclude/file.php:3
1201
+ #: node_modules/grunt-wp-i18n/test/fixtures/plugin-include/plugin-include.php:6
1202
+ msgid "Exclude"
1203
+ msgstr ""
1204
+
1205
+ #: node_modules/grunt-wp-i18n/test/fixtures/plugin-include/include/file.php:2
1206
+ msgid "Include"
1207
+ msgstr ""
1208
+
1209
+ #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/add-domain.php:2
1210
+ #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-all-domains.php:2
1211
+ #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-all-domains.php:3
1212
+ #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-all-domains.php:4
1213
+ #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-domains.php:2
1214
+ #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-domains.php:3
1215
+ msgid "String"
1216
+ msgstr ""
1217
+
1218
+ #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-all-domains.php:6
1219
+ #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-all-domains.php:7
1220
+ #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-all-domains.php:8
1221
+ msgctxt "a string"
1222
+ msgid "String"
1223
+ msgstr ""
1224
+
1225
+ #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-all-domains.php:9
1226
+ #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-all-domains.php:10
1227
+ #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-all-domains.php:11
1228
+ msgid "1 Star"
1229
+ msgid_plural "%s Stars"
1230
+ msgstr[0] ""
1231
+ msgstr[1] ""
1232
+
1233
+ #. translators: A single line translators comment.
1234
+
1235
+ #: node_modules/grunt-wp-i18n/test/fixtures/translator-comments/translator-comments.php:7
1236
+ msgid "A"
1237
+ msgstr ""
1238
+
1239
+ #. translators: A multiline translators comment.
1240
+
1241
+ #: node_modules/grunt-wp-i18n/test/fixtures/translator-comments/translator-comments.php:15
1242
+ msgid "B"
1243
+ msgstr ""
1244
+
1245
#. translators: 1. URL link.
1246
+
1247
+ #: woocommerce-gateway-stripe.php:30
1248
+ msgid "Stripe requires WooCommerce to be installed and active. You can download %s here."
1249
msgstr ""
1250
1251
#: woocommerce-gateway-stripe.php:196
1259
#: woocommerce-gateway-stripe.php:198
1260
msgid "Support"
1261
msgstr ""
1262
#. Plugin Name of the plugin/theme
1263
msgid "WooCommerce Stripe Gateway"
1264
msgstr ""
1277
1278
#. Author URI of the plugin/theme
1279
msgid "https://woocommerce.com/"
1280
+ msgstr ""
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: credit card, stripe, apple pay, payment request, google pay, sepa, sofort,
4
Requires at least: 4.4
5
Tested up to: 4.9
6
Requires PHP: 5.6
7
- Stable tag: 4.1.9
8
License: GPLv3
9
License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
Attributions: thorsten-stripe
@@ -101,13 +101,12 @@ If you get stuck, you can ask for help in the Plugin Forum.
101
102
== Changelog ==
103
104
- = 4.1.9 - 2018-08-27 =
105
- * Fix - Don't display admin notices to user that cannot manage woocommerce.
106
- * Fix - Fatal error when clicking on order link that doesn't exist.
107
- * Fix - When capturing a charge from authorize, Stripe fees not displaying.
108
- * Fix - Undefined property error on card type in rare cases.
109
- * Tweak - Update SEPA IBAN to use new elements implementation.
110
- * Add - Filter for Payment Request Button locale `wc_stripe_payment_request_button_locale`.
111
112
[See changelog for all versions](https://raw.githubusercontent.com/woothemes/woocommerce-gateway-stripe/master/changelog.txt).
113
4
Requires at least: 4.4
5
Tested up to: 4.9
6
Requires PHP: 5.6
7
+ Stable tag: 4.1.10
8
License: GPLv3
9
License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
Attributions: thorsten-stripe
101
102
== Changelog ==
103
104
+ = 4.1.10 - 2018-09-17 =
105
+ * Fix - When 3DS card redirect status is "not_required", charge the 3DS source.
106
+ * Fix - Payment Request not validating quantity before payment sheet shows.
107
+ * Fix - Test mode info not showing when description field is left blank.
108
+ * Add - Filter for Payment Request localized parameters `wc_stripe_payment_request_params`.
109
+ * Update - Stripe API version to 2018-09-06.
110
111
[See changelog for all versions](https://raw.githubusercontent.com/woothemes/woocommerce-gateway-stripe/master/changelog.txt).
112
woocommerce-gateway-stripe.php CHANGED
@@ -5,7 +5,7 @@
5
* Description: Take credit card payments on your store using Stripe.
6
* Author: WooCommerce
7
* Author URI: https://woocommerce.com/
8
- * Version: 4.1.9
9
* Requires at least: 4.4
10
* Tested up to: 4.9
11
* WC requires at least: 2.6
@@ -44,7 +44,7 @@ function woocommerce_gateway_stripe_init() {
44
/**
45
* Required minimums and constants
46
*/
47
- define( 'WC_STRIPE_VERSION', '4.1.9' );
48
define( 'WC_STRIPE_MIN_PHP_VER', '5.6.0' );
49
define( 'WC_STRIPE_MIN_WC_VER', '2.6.0' );
50
define( 'WC_STRIPE_MAIN_FILE', __FILE__ );
5
* Description: Take credit card payments on your store using Stripe.
6
* Author: WooCommerce
7
* Author URI: https://woocommerce.com/
8
+ * Version: 4.1.10
9
* Requires at least: 4.4
10
* Tested up to: 4.9
11
* WC requires at least: 2.6
44
/**
45
* Required minimums and constants
46
*/
47
+ define( 'WC_STRIPE_VERSION', '4.1.10' );
48
define( 'WC_STRIPE_MIN_PHP_VER', '5.6.0' );
49
define( 'WC_STRIPE_MIN_WC_VER', '2.6.0' );
50
define( 'WC_STRIPE_MAIN_FILE', __FILE__ );