Version Description
- 2018-02-02 =
- Fix - Illegal offset error on settings when non is defined or saved.
- Fix - Wrong ID used for dispute webhook handler.
- Fix - A WC 2.6 backwards compat issue while trying to get order id in subscriptions.
- Fix - Processing SEPA can't find email when not logged in.
- Add - Allow restricted secret keys to be used.
- Add - Statement Descriptor to SEPA Direct Debit.
- Add - Idempotency failure retry with easing to prevent multirequest issue.
- Add - POT file.
- Tweak - Make billing name optional on pay for order page.
See changelog for all versions.
=
Download this release
Release Info
Developer | royho |
Plugin | WooCommerce Stripe Payment Gateway |
Version | 4.0.5 |
Comparing to | |
See all releases |
Code changes from version 4.0.4 to 4.0.5
- assets/js/stripe-admin.min.js +1 -1
- assets/js/stripe-payment-request.min.js +1 -1
- assets/js/stripe.js +8 -2
- assets/js/stripe.min.js +1 -1
- changelog.txt +11 -0
- includes/abstracts/abstract-wc-stripe-payment-gateway.php +38 -8
- includes/admin/stripe-settings.php +1 -1
- includes/class-wc-gateway-stripe.php +23 -0
- includes/class-wc-stripe-api.php +4 -1
- includes/class-wc-stripe-customer.php +1 -34
- includes/class-wc-stripe-order-handler.php +28 -25
- includes/class-wc-stripe-webhook-handler.php +35 -14
- includes/compat/class-wc-stripe-compat.php +1 -1
- includes/compat/class-wc-stripe-sepa-compat.php +10 -5
- languages/woocommerce-gateway-stripe.pot +1243 -0
- readme.txt +11 -22
- woocommerce-gateway-stripe.php +9 -6
assets/js/stripe-admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(
|
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_bitcoin, #woocommerce_stripe_stripe_checkout_image").closest("tr").show():e("#woocommerce_stripe_stripe_bitcoin, #woocommerce_stripe_stripe_checkout_image").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()});
|
assets/js/stripe-payment-request.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(
|
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(e){var a={security:wc_stripe_payment_request_params.nonce.payment};t.ajax({type:"POST",data:a,url:n.getAjaxURL("get_cart_details"),success:function(t){e.update({total:t.order_data.total})}})},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(){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)}})}};n.init(),t(document.body).on("updated_cart_totals",function(){n.init()}),t(document.body).on("updated_checkout",function(){n.init()})});
|
assets/js/stripe.js
CHANGED
@@ -422,6 +422,10 @@ jQuery( function( $ ) {
|
|
422 |
delete extra_details.owner.email;
|
423 |
}
|
424 |
|
|
|
|
|
|
|
|
|
425 |
if ( $( '#billing_address_1' ).length > 0 ) {
|
426 |
extra_details.owner.address.line1 = $( '#billing_address_1' ).val();
|
427 |
extra_details.owner.address.line2 = $( '#billing_address_2' ).val();
|
@@ -497,10 +501,12 @@ jQuery( function( $ ) {
|
|
497 |
// Handle special inputs that are unique to a payment method.
|
498 |
switch ( source_type ) {
|
499 |
case 'sepa_debit':
|
500 |
-
var owner = $( '#stripe-payment-data' )
|
|
|
|
|
501 |
extra_details.currency = $( '#stripe-' + source_type + '-payment-data' ).data( 'currency' );
|
502 |
extra_details.owner.name = $( '#stripe-sepa-owner' ).val();
|
503 |
-
extra_details.owner.email =
|
504 |
extra_details.sepa_debit = { iban: $( '#stripe-sepa-iban' ).val() };
|
505 |
extra_details.mandate = { notification_method: wc_stripe_params.sepa_mandate_notification };
|
506 |
break;
|
422 |
delete extra_details.owner.email;
|
423 |
}
|
424 |
|
425 |
+
if ( typeof extra_details.owner.name !== 'undefined' && 0 >= extra_details.owner.name.length ) {
|
426 |
+
delete extra_details.owner.name;
|
427 |
+
}
|
428 |
+
|
429 |
if ( $( '#billing_address_1' ).length > 0 ) {
|
430 |
extra_details.owner.address.line1 = $( '#billing_address_1' ).val();
|
431 |
extra_details.owner.address.line2 = $( '#billing_address_2' ).val();
|
501 |
// Handle special inputs that are unique to a payment method.
|
502 |
switch ( source_type ) {
|
503 |
case 'sepa_debit':
|
504 |
+
var owner = $( '#stripe-payment-data' ),
|
505 |
+
email = $( '#billing_email' ).length ? $( '#billing_email' ).val() : owner.data( 'email' );
|
506 |
+
|
507 |
extra_details.currency = $( '#stripe-' + source_type + '-payment-data' ).data( 'currency' );
|
508 |
extra_details.owner.name = $( '#stripe-sepa-owner' ).val();
|
509 |
+
extra_details.owner.email = email;
|
510 |
extra_details.sepa_debit = { iban: $( '#stripe-sepa-iban' ).val() };
|
511 |
extra_details.mandate = { notification_method: wc_stripe_params.sepa_mandate_notification };
|
512 |
break;
|
assets/js/stripe.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(a){"use strict";var b=Stripe(wc_stripe_params.key);if("yes"===wc_stripe_params.use_elements)var c,d,e,f=wc_stripe_params.elements_options.length?wc_stripe_params.elements_options:{},g=b.elements(f);var h={getAjaxURL:function(a){return wc_stripe_params.ajaxurl.toString().replace("%%endpoint%%","wc_stripe_"+a)},init:function(){"yes"===wc_stripe_params.is_change_payment_page&&a(document.body).trigger("wc-credit-card-form-init"),this.stripe_checkout_submit=!1,a("form.woocommerce-checkout").length&&(this.form=a("form.woocommerce-checkout")),a("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 checkout_place_order_stripe_bitcoin",this.onSubmit),a("form#order_review").length&&(this.form=a("form#order_review")),a("form#order_review").on("submit",this.onSubmit),a("form#add_payment_method").length&&(this.form=a("form#add_payment_method")),a("form#add_payment_method").on("submit",this.onSubmit),a("form.woocommerce-checkout").on("change","#stripe-bank-country",this.reset),a(document).on("stripeError",this.onError).on("checkout_error",this.reset);var b={base:{iconColor:"#666EE8",color:"#31325F",fontSize:"15px","::placeholder":{color:"#CFD7E0"}}},f={focus:"focused",empty:"empty",invalid:"invalid"};"yes"===wc_stripe_params.use_elements&&a("#stripe-card-element").length&&(b=wc_stripe_params.elements_styling?wc_stripe_params.elements_styling:b,f=wc_stripe_params.elements_classes?wc_stripe_params.elements_classes:f,"yes"===wc_stripe_params.inline_cc_form?(c=g.create("card",{style:b,hidePostalCode:!0}),c.addEventListener("change",function(b){h.onCCFormChange(),b.error&&a(document.body).trigger("stripeError",b)})):(c=g.create("cardNumber",{style:b,classes:f}),d=g.create("cardExpiry",{style:b,classes:f}),e=g.create("cardCvc",{style:b,classes:f}),c.addEventListener("change",function(b){h.onCCFormChange(),b.error&&a(document.body).trigger("stripeError",b)}),d.addEventListener("change",function(b){h.onCCFormChange(),b.error&&a(document.body).trigger("stripeError",b)}),e.addEventListener("change",function(b){h.onCCFormChange(),b.error&&a(document.body).trigger("stripeError",b)})),wc_stripe_params.is_checkout?a(document.body).on("updated_checkout",function(){c&&("yes"===wc_stripe_params.inline_cc_form?c.unmount("#stripe-card-element"):(c.unmount("#stripe-card-element"),d.unmount("#stripe-exp-element"),e.unmount("#stripe-cvc-element"))),"yes"===wc_stripe_params.inline_cc_form?c.mount("#stripe-card-element"):(c.mount("#stripe-card-element"),d.mount("#stripe-exp-element"),e.mount("#stripe-cvc-element"))}):(a("form#add_payment_method").length||a("form#order_review").length)&&("yes"===wc_stripe_params.inline_cc_form?c.mount("#stripe-card-element"):(c.mount("#stripe-card-element"),d.mount("#stripe-exp-element"),e.mount("#stripe-cvc-element"))))},isStripeChosen:function(){return a("#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_bitcoin").is(":checked")||a("#payment_method_stripe").is(":checked")&&"new"===a('input[name="wc-stripe-payment-token"]:checked').val()||a("#payment_method_stripe_sepa").is(":checked")&&"new"===a('input[name="wc-stripe-payment-token"]:checked').val()},isStripeSaveCardChosen:function(){return a("#payment_method_stripe").is(":checked")&&a('input[name="wc-stripe-payment-token"]').is(":checked")&&"new"!==a('input[name="wc-stripe-payment-token"]:checked').val()||a("#payment_method_stripe_sepa").is(":checked")&&a('input[name="wc-stripe_sepa-payment-token"]').is(":checked")&&"new"!==a('input[name="wc-stripe_sepa-payment-token"]:checked').val()},isStripeCardChosen:function(){return a("#payment_method_stripe").is(":checked")},isBancontactChosen:function(){return a("#payment_method_stripe_bancontact").is(":checked")},isGiropayChosen:function(){return a("#payment_method_stripe_giropay").is(":checked")},isIdealChosen:function(){return a("#payment_method_stripe_ideal").is(":checked")},isSofortChosen:function(){return a("#payment_method_stripe_sofort").is(":checked")},isAlipayChosen:function(){return a("#payment_method_stripe_alipay").is(":checked")},isSepaChosen:function(){return a("#payment_method_stripe_sepa").is(":checked")},isBitcoinChosen:function(){return a("#payment_method_stripe_bitcoin").is(":checked")},isP24Chosen:function(){return a("#payment_method_stripe_p24").is(":checked")},hasSource:function(){return 0<a("input.stripe-source").length},hasToken:function(){return 0<a("input.stripe_token").length},isMobile:function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},isStripeModalNeeded:function(a){var b=h.form.find("input.stripe_token");return(!h.stripe_submit||!b)&&!!h.isStripeChosen()},block:function(){h.isMobile()?a.blockUI({message:null,overlayCSS:{background:"#fff",opacity:.6}}):h.form.block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(){h.isMobile()?a.unblockUI():h.form.unblock()},getSelectedPaymentElement:function(){return a('.payment_methods input[name="payment_method"]:checked')},openModal:function(){var c=h.form,d=a("#stripe-payment-data");h.reset();var e=function(a){if(c.find("input.stripe_source").remove(),"token"===a.object)b.createSource({type:"card",token:a.id}).then(h.sourceResponse);else if("source"===a.object){var d={source:a};h.sourceResponse(d)}};StripeCheckout.open({key:wc_stripe_params.key,billingAddress:"yes"===wc_stripe_params.stripe_checkout_require_billing_address,amount:d.data("amount"),name:d.data("name"),description:d.data("description"),currency:d.data("currency"),image:d.data("image"),bitcoin:d.data("bitcoin"),locale:d.data("locale"),email:a("#billing_email").val()||d.data("email"),panelLabel:d.data("panel-label"),allowRememberMe:d.data("allow-remember-me"),token:e,closed:h.onClose()})},resetModal:function(){h.reset(),h.stripe_checkout_submit=!1},onClose:function(){h.unblock()},onError:function(b,c){var d=c.error.message,e=h.getSelectedPaymentElement().parents("li").eq(0).find(".stripe-source-errors");"invalid_request_error"!==c.error.type&&"api_connection_error"!==c.error.type&&"api_error"!==c.error.type&&"authentication_error"!==c.error.type&&"rate_limit_error"!==c.error.type||(d=wc_stripe_params.invalid_request_error),"card_error"===c.error.type&&wc_stripe_params.hasOwnProperty(c.error.code)&&(d=wc_stripe_params[c.error.code]),"validation_error"===c.error.type&&wc_stripe_params.hasOwnProperty(c.error.code)&&(d=wc_stripe_params[c.error.code]),h.reset(),a(".woocommerce-NoticeGroup-checkout").remove(),console.log(c.error.message),a(e).html('<ul class="woocommerce_error woocommerce-error wc-stripe-error"><li>'+d+"</li></ul>"),a(".wc-stripe-error").length&&a("html, body").animate({scrollTop:a(".wc-stripe-error").offset().top-200},200),h.unblock()},getOwnerDetails:function(){var b=a("#billing_first_name").length?a("#billing_first_name").val():wc_stripe_params.billing_first_name,c=a("#billing_last_name").length?a("#billing_last_name").val():wc_stripe_params.billing_last_name,d={owner:{name:"",address:{},email:"",phone:""}};return d.owner.name=b,b&&c&&(d.owner.name=b+" "+c),d.owner.email=a("#billing_email").val(),d.owner.phone=a("#billing_phone").val(),void 0!==d.owner.phone&&0>=d.owner.phone.length&&delete d.owner.phone,void 0!==d.owner.email&&0>=d.owner.email.length&&delete d.owner.email,a("#billing_address_1").length>0?(d.owner.address.line1=a("#billing_address_1").val(),d.owner.address.line2=a("#billing_address_2").val(),d.owner.address.state=a("#billing_state").val(),d.owner.address.city=a("#billing_city").val(),d.owner.address.postal_code=a("#billing_postcode").val(),d.owner.address.country=a("#billing_country").val()):wc_stripe_params.billing_address_1&&(d.owner.address.line1=wc_stripe_params.billing_address_1,d.owner.address.line2=wc_stripe_params.billing_address_2,d.owner.address.state=wc_stripe_params.billing_state,d.owner.address.city=wc_stripe_params.billing_city,d.owner.address.postal_code=wc_stripe_params.billing_postcode,d.owner.address.country=wc_stripe_params.billing_country),d},createSource:function(){var d=h.getOwnerDetails(),e="card";if(h.isBancontactChosen()&&(e="bancontact"),h.isSepaChosen()&&(e="sepa_debit"),h.isIdealChosen()&&(e="ideal"),h.isSofortChosen()&&(e="sofort"),h.isBitcoinChosen()&&(e="bitcoin"),h.isGiropayChosen()&&(e="giropay"),h.isAlipayChosen()&&(e="alipay"),"card"===e)b.createSource(c,d).then(h.sourceResponse);else{switch(e){case"bancontact":case"giropay":case"ideal":case"sofort":case"alipay":d.amount=a("#stripe-"+e+"-payment-data").data("amount"),d.currency=a("#stripe-"+e+"-payment-data").data("currency"),d.redirect={return_url:wc_stripe_params.return_url},wc_stripe_params.statement_descriptor&&(d.statement_descriptor=wc_stripe_params.statement_descriptor)}switch(e){case"sepa_debit":var f=a("#stripe-payment-data");d.currency=a("#stripe-"+e+"-payment-data").data("currency"),d.owner.name=a("#stripe-sepa-owner").val(),d.owner.email=f.data("email"),d.sepa_debit={iban:a("#stripe-sepa-iban").val()},d.mandate={notification_method:wc_stripe_params.sepa_mandate_notification};break;case"ideal":d.ideal={bank:a("#stripe-ideal-bank").val()};break;case"bitcoin":case"alipay":d.currency=a("#stripe-"+e+"-payment-data").data("currency"),d.amount=a("#stripe-"+e+"-payment-data").data("amount");break;case"sofort":d.sofort={country:a("#billing_country").val()}}d.type=e,b.createSource(d).then(h.sourceResponse)}},sourceResponse:function(b){b.error?a(document.body).trigger("stripeError",b):"no"===wc_stripe_params.allow_prepaid_card&&"card"===b.source.type&&"prepaid"===b.source.card.funding?(b.error={message:wc_stripe_params.no_prepaid_card_msg},wc_stripe_params.is_stripe_checkout?h.submitError('<ul class="woocommerce-error"><li>'+wc_stripe_params.no_prepaid_card_msg+"</li></ul>"):a(document.body).trigger("stripeError",b)):h.processStripeResponse(b.source)},processStripeResponse:function(b){h.reset(),h.form.append("<input type='hidden' class='stripe-source' name='stripe_source' value='"+b.id+"'/>"),a("form#add_payment_method").length&&a(h.form).off("submit",h.form.onSubmit),h.form.submit()},createToken:function(){var b=a("#stripe-card-number").val(),c=a("#stripe-card-cvc").val(),d=a("#stripe-card-expiry").payment("cardExpiryVal"),e=a("#billing_first_name").length?a("#billing_first_name").val():wc_stripe_params.billing_first_name,f=a("#billing_last_name").length?a("#billing_last_name").val():wc_stripe_params.billing_last_name,g={number:b,cvc:c,exp_month:parseInt(d.month,10)||0,exp_year:parseInt(d.year,10)||0};e&&f&&(g.name=e+" "+f),a("#billing_address_1").length>0?(g.address_line1=a("#billing_address_1").val(),g.address_line2=a("#billing_address_2").val(),g.address_state=a("#billing_state").val(),g.address_city=a("#billing_city").val(),g.address_zip=a("#billing_postcode").val(),g.address_country=a("#billing_country").val()):wc_stripe_params.billing_address_1&&(g.address_line1=wc_stripe_params.billing_address_1,g.address_line2=wc_stripe_params.billing_address_2,g.address_state=wc_stripe_params.billing_state,g.address_city=wc_stripe_params.billing_city,g.address_zip=wc_stripe_params.billing_postcode,g.address_country=wc_stripe_params.billing_country),Stripe.setPublishableKey(wc_stripe_params.key),Stripe.createToken(g,h.onStripeTokenResponse)},onStripeTokenResponse:function(b,c){if(c.error)a(document).trigger("stripeError",c);else{if("no"===wc_stripe_params.allow_prepaid_card&&"prepaid"===c.card.funding)return c.error={message:wc_stripe_params.no_prepaid_card_msg},a(document).trigger("stripeError",{response:c}),!1;var d=c.id;h.form.append("<input type='hidden' class='stripe_token' name='stripe_token' value='"+d+"'/>"),a("form#add_payment_method").length&&a(h.form).off("submit",h.form.onSubmit),h.form.submit()}},onSubmit:function(b){if(h.isStripeChosen()&&!h.isStripeSaveCardChosen()&&!h.hasSource()&&!h.hasToken()){if(b.preventDefault(),"yes"===wc_stripe_params.is_stripe_checkout&&h.isStripeModalNeeded()&&h.isStripeCardChosen())return h.isMobile()?h.openModal():h.validateCheckout("modal"),!1;if(h.block(),h.isStripeCardChosen()&&"no"===wc_stripe_params.use_elements)return h.createToken(),!1;if(h.isSepaChosen()){if(""===a("#stripe-sepa-owner").val())return a(document.body).trigger("stripeError",{error:{message:wc_stripe_params.no_sepa_owner_msg}}),!1;if(""===a("#stripe-sepa-iban").val())return a(document.body).trigger("stripeError",{error:{message:wc_stripe_params.no_sepa_iban_msg}}),!1}if(h.isBancontactChosen()||h.isGiropayChosen()||h.isIdealChosen()||h.isAlipayChosen()||h.isSofortChosen()||h.isP24Chosen()){if(a("form#order_review").length&&(a("form#order_review").off("submit",this.onSubmit),h.isMobile()&&h.unblock(),h.form.submit()),a("form.woocommerce-checkout").length)return a("form.woocommerce-checkout").off("submit",this.onSubmit),h.isMobile()&&h.unblock(),!0;a("form#add_payment_method").length&&(a("form#add_payment_method").off("submit",this.onSubmit),h.isMobile()&&h.unblock(),h.form.submit())}return wc_stripe_params.is_checkout?h.validateCheckout():h.createSource(),!1}if(a("form#add_payment_method").length)return b.preventDefault(),"yes"===wc_stripe_params.is_stripe_checkout&&h.isStripeModalNeeded()&&h.isStripeCardChosen()?(h.openModal(),!1):(h.block(),h.isStripeCardChosen()&&"no"===wc_stripe_params.use_elements?(h.createToken(),!1):(h.createSource(),!1))},onCCFormChange:function(){h.reset()},reset:function(){a(".wc-stripe-error, .stripe-source, .stripe_token, .stripe-checkout-object").remove(),"yes"===wc_stripe_params.is_stripe_checkout&&(h.stripe_submit=!1)},getRequiredFields:function(){return h.form.find(".form-row.validate-required > input, .form-row.validate-required > select, .form-row.validate-required > textarea")},validateCheckout:function(b){void 0===b&&(b="");var c={nonce:wc_stripe_params.stripe_nonce,required_fields:h.getRequiredFields().serialize(),all_fields:h.form.serialize(),source_type:h.getSelectedPaymentElement().val(),is_add_payment_page:wc_stripe_params.is_add_payment_method_page};a.ajax({type:"POST",url:h.getAjaxURL("validate_checkout"),data:c,dataType:"json",success:function(c){if("success"===c)if("modal"===b)h.openModal();else{if(h.isSepaChosen()){if(""===a("#stripe-sepa-owner").val())return a(document.body).trigger("stripeError",{error:{message:wc_stripe_params.no_sepa_owner_msg}}),!1;if(""===a("#stripe-sepa-iban").val())return a(document.body).trigger("stripeError",{error:{message:wc_stripe_params.no_sepa_iban_msg}}),!1}h.createSource()}else c.messages&&(h.resetModal(),h.reset(),h.submitError(c.messages))}})},submitError:function(b){a(".woocommerce-NoticeGroup-checkout, .woocommerce-error, .woocommerce-message").remove(),h.form.prepend('<div class="woocommerce-NoticeGroup woocommerce-NoticeGroup-checkout">'+b+"</div>"),h.form.removeClass("processing").unblock(),h.form.find(".input-text, select, input:checkbox").blur();var c="";a("#add_payment_method").length&&(c=a("#add_payment_method")),a("#order_review").length&&(c=a("#order_review")),a("form.checkout").length&&(c=a("form.checkout")),c.length&&a("html, body").animate({scrollTop:c.offset().top-100},500),a(document.body).trigger("checkout_error"),h.unblock()}};h.init()});
|
1 |
+
jQuery(function(e){"use strict";var r=Stripe(wc_stripe_params.key);if("yes"===wc_stripe_params.use_elements)var t,i,o,s=wc_stripe_params.elements_options.length?wc_stripe_params.elements_options:{},a=r.elements(s);var n={getAjaxURL:function(e){return wc_stripe_params.ajaxurl.toString().replace("%%endpoint%%","wc_stripe_"+e)},init:function(){"yes"===wc_stripe_params.is_change_payment_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 checkout_place_order_stripe_bitcoin",this.onSubmit),e("form#order_review").length&&(this.form=e("form#order_review")),e("form#order_review").on("submit",this.onSubmit),e("form#add_payment_method").length&&(this.form=e("form#add_payment_method")),e("form#add_payment_method").on("submit",this.onSubmit),e("form.woocommerce-checkout").on("change","#stripe-bank-country",this.reset),e(document).on("stripeError",this.onError).on("checkout_error",this.reset);var r={base:{iconColor:"#666EE8",color:"#31325F",fontSize:"15px","::placeholder":{color:"#CFD7E0"}}},s={focus:"focused",empty:"empty",invalid:"invalid"};"yes"===wc_stripe_params.use_elements&&e("#stripe-card-element").length&&(r=wc_stripe_params.elements_styling?wc_stripe_params.elements_styling:r,s=wc_stripe_params.elements_classes?wc_stripe_params.elements_classes:s,"yes"===wc_stripe_params.inline_cc_form?(t=a.create("card",{style:r,hidePostalCode:!0})).addEventListener("change",function(r){n.onCCFormChange(),r.error&&e(document.body).trigger("stripeError",r)}):(t=a.create("cardNumber",{style:r,classes:s}),i=a.create("cardExpiry",{style:r,classes:s}),o=a.create("cardCvc",{style:r,classes:s}),t.addEventListener("change",function(r){n.onCCFormChange(),r.error&&e(document.body).trigger("stripeError",r)}),i.addEventListener("change",function(r){n.onCCFormChange(),r.error&&e(document.body).trigger("stripeError",r)}),o.addEventListener("change",function(r){n.onCCFormChange(),r.error&&e(document.body).trigger("stripeError",r)})),wc_stripe_params.is_checkout?e(document.body).on("updated_checkout",function(){t&&("yes"===wc_stripe_params.inline_cc_form?t.unmount("#stripe-card-element"):(t.unmount("#stripe-card-element"),i.unmount("#stripe-exp-element"),o.unmount("#stripe-cvc-element"))),"yes"===wc_stripe_params.inline_cc_form?t.mount("#stripe-card-element"):(t.mount("#stripe-card-element"),i.mount("#stripe-exp-element"),o.mount("#stripe-cvc-element"))}):(e("form#add_payment_method").length||e("form#order_review").length)&&("yes"===wc_stripe_params.inline_cc_form?t.mount("#stripe-card-element"):(t.mount("#stripe-card-element"),i.mount("#stripe-exp-element"),o.mount("#stripe-cvc-element"))))},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_bitcoin").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")},isBitcoinChosen:function(){return e("#payment_method_stripe_bitcoin").is(":checked")},isP24Chosen:function(){return e("#payment_method_stripe_p24").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=n.form.find("input.stripe_token");return(!n.stripe_submit||!r)&&!!n.isStripeChosen()},block:function(){n.isMobile()?e.blockUI({message:null,overlayCSS:{background:"#fff",opacity:.6}}):n.form.block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(){n.isMobile()?e.unblockUI():n.form.unblock()},getSelectedPaymentElement:function(){return e('.payment_methods input[name="payment_method"]:checked')},openModal:function(){var t=n.form,i=e("#stripe-payment-data");n.reset();StripeCheckout.open({key:wc_stripe_params.key,billingAddress:"yes"===wc_stripe_params.stripe_checkout_require_billing_address,amount:i.data("amount"),name:i.data("name"),description:i.data("description"),currency:i.data("currency"),image:i.data("image"),bitcoin:i.data("bitcoin"),locale:i.data("locale"),email:e("#billing_email").val()||i.data("email"),panelLabel:i.data("panel-label"),allowRememberMe:i.data("allow-remember-me"),token:function(e){if(t.find("input.stripe_source").remove(),"token"===e.object)r.createSource({type:"card",token:e.id}).then(n.sourceResponse);else if("source"===e.object){var i={source:e};n.sourceResponse(i)}},closed:n.onClose()})},resetModal:function(){n.reset(),n.stripe_checkout_submit=!1},onClose:function(){n.unblock()},onError:function(r,t){var i=t.error.message,o=n.getSelectedPaymentElement().parents("li").eq(0).find(".stripe-source-errors");"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||(i=wc_stripe_params.invalid_request_error),"card_error"===t.error.type&&wc_stripe_params.hasOwnProperty(t.error.code)&&(i=wc_stripe_params[t.error.code]),"validation_error"===t.error.type&&wc_stripe_params.hasOwnProperty(t.error.code)&&(i=wc_stripe_params[t.error.code]),n.reset(),e(".woocommerce-NoticeGroup-checkout").remove(),console.log(t.error.message),e(o).html('<ul class="woocommerce_error woocommerce-error wc-stripe-error"><li>'+i+"</li></ul>"),e(".wc-stripe-error").length&&e("html, body").animate({scrollTop:e(".wc-stripe-error").offset().top-200},200),n.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,i={owner:{name:"",address:{},email:"",phone:""}};return i.owner.name=r,r&&t&&(i.owner.name=r+" "+t),i.owner.email=e("#billing_email").val(),i.owner.phone=e("#billing_phone").val(),void 0!==i.owner.phone&&0>=i.owner.phone.length&&delete i.owner.phone,void 0!==i.owner.email&&0>=i.owner.email.length&&delete i.owner.email,void 0!==i.owner.name&&0>=i.owner.name.length&&delete i.owner.name,e("#billing_address_1").length>0?(i.owner.address.line1=e("#billing_address_1").val(),i.owner.address.line2=e("#billing_address_2").val(),i.owner.address.state=e("#billing_state").val(),i.owner.address.city=e("#billing_city").val(),i.owner.address.postal_code=e("#billing_postcode").val(),i.owner.address.country=e("#billing_country").val()):wc_stripe_params.billing_address_1&&(i.owner.address.line1=wc_stripe_params.billing_address_1,i.owner.address.line2=wc_stripe_params.billing_address_2,i.owner.address.state=wc_stripe_params.billing_state,i.owner.address.city=wc_stripe_params.billing_city,i.owner.address.postal_code=wc_stripe_params.billing_postcode,i.owner.address.country=wc_stripe_params.billing_country),i},createSource:function(){var i=n.getOwnerDetails(),o="card";if(n.isBancontactChosen()&&(o="bancontact"),n.isSepaChosen()&&(o="sepa_debit"),n.isIdealChosen()&&(o="ideal"),n.isSofortChosen()&&(o="sofort"),n.isBitcoinChosen()&&(o="bitcoin"),n.isGiropayChosen()&&(o="giropay"),n.isAlipayChosen()&&(o="alipay"),"card"===o)r.createSource(t,i).then(n.sourceResponse);else{switch(o){case"bancontact":case"giropay":case"ideal":case"sofort":case"alipay":i.amount=e("#stripe-"+o+"-payment-data").data("amount"),i.currency=e("#stripe-"+o+"-payment-data").data("currency"),i.redirect={return_url:wc_stripe_params.return_url},wc_stripe_params.statement_descriptor&&(i.statement_descriptor=wc_stripe_params.statement_descriptor)}switch(o){case"sepa_debit":var s=e("#stripe-payment-data"),a=e("#billing_email").length?e("#billing_email").val():s.data("email");i.currency=e("#stripe-"+o+"-payment-data").data("currency"),i.owner.name=e("#stripe-sepa-owner").val(),i.owner.email=a,i.sepa_debit={iban:e("#stripe-sepa-iban").val()},i.mandate={notification_method:wc_stripe_params.sepa_mandate_notification};break;case"ideal":i.ideal={bank:e("#stripe-ideal-bank").val()};break;case"bitcoin":case"alipay":i.currency=e("#stripe-"+o+"-payment-data").data("currency"),i.amount=e("#stripe-"+o+"-payment-data").data("amount");break;case"sofort":i.sofort={country:e("#billing_country").val()}}i.type=o,r.createSource(i).then(n.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},wc_stripe_params.is_stripe_checkout?n.submitError('<ul class="woocommerce-error"><li>'+wc_stripe_params.no_prepaid_card_msg+"</li></ul>"):e(document.body).trigger("stripeError",r)):n.processStripeResponse(r.source)},processStripeResponse:function(r){n.reset(),n.form.append("<input type='hidden' class='stripe-source' name='stripe_source' value='"+r.id+"'/>"),e("form#add_payment_method").length&&e(n.form).off("submit",n.form.onSubmit),n.form.submit()},createToken:function(){var r=e("#stripe-card-number").val(),t=e("#stripe-card-cvc").val(),i=e("#stripe-card-expiry").payment("cardExpiryVal"),o=e("#billing_first_name").length?e("#billing_first_name").val():wc_stripe_params.billing_first_name,s=e("#billing_last_name").length?e("#billing_last_name").val():wc_stripe_params.billing_last_name,a={number:r,cvc:t,exp_month:parseInt(i.month,10)||0,exp_year:parseInt(i.year,10)||0};o&&s&&(a.name=o+" "+s),e("#billing_address_1").length>0?(a.address_line1=e("#billing_address_1").val(),a.address_line2=e("#billing_address_2").val(),a.address_state=e("#billing_state").val(),a.address_city=e("#billing_city").val(),a.address_zip=e("#billing_postcode").val(),a.address_country=e("#billing_country").val()):wc_stripe_params.billing_address_1&&(a.address_line1=wc_stripe_params.billing_address_1,a.address_line2=wc_stripe_params.billing_address_2,a.address_state=wc_stripe_params.billing_state,a.address_city=wc_stripe_params.billing_city,a.address_zip=wc_stripe_params.billing_postcode,a.address_country=wc_stripe_params.billing_country),Stripe.setPublishableKey(wc_stripe_params.key),Stripe.createToken(a,n.onStripeTokenResponse)},onStripeTokenResponse:function(r,t){if(t.error)e(document).trigger("stripeError",t);else{if("no"===wc_stripe_params.allow_prepaid_card&&"prepaid"===t.card.funding)return t.error={message:wc_stripe_params.no_prepaid_card_msg},e(document).trigger("stripeError",{response:t}),!1;var i=t.id;n.form.append("<input type='hidden' class='stripe_token' name='stripe_token' value='"+i+"'/>"),e("form#add_payment_method").length&&e(n.form).off("submit",n.form.onSubmit),n.form.submit()}},onSubmit:function(r){if(n.isStripeChosen()&&!n.isStripeSaveCardChosen()&&!n.hasSource()&&!n.hasToken()){if(r.preventDefault(),"yes"===wc_stripe_params.is_stripe_checkout&&n.isStripeModalNeeded()&&n.isStripeCardChosen())return n.isMobile()?n.openModal():n.validateCheckout("modal"),!1;if(n.block(),n.isStripeCardChosen()&&"no"===wc_stripe_params.use_elements)return n.createToken(),!1;if(n.isSepaChosen()){if(""===e("#stripe-sepa-owner").val())return e(document.body).trigger("stripeError",{error:{message:wc_stripe_params.no_sepa_owner_msg}}),!1;if(""===e("#stripe-sepa-iban").val())return e(document.body).trigger("stripeError",{error:{message:wc_stripe_params.no_sepa_iban_msg}}),!1}if(n.isBancontactChosen()||n.isGiropayChosen()||n.isIdealChosen()||n.isAlipayChosen()||n.isSofortChosen()||n.isP24Chosen()){if(e("form#order_review").length&&(e("form#order_review").off("submit",this.onSubmit),n.isMobile()&&n.unblock(),n.form.submit()),e("form.woocommerce-checkout").length)return e("form.woocommerce-checkout").off("submit",this.onSubmit),n.isMobile()&&n.unblock(),!0;e("form#add_payment_method").length&&(e("form#add_payment_method").off("submit",this.onSubmit),n.isMobile()&&n.unblock(),n.form.submit())}return wc_stripe_params.is_checkout?n.validateCheckout():n.createSource(),!1}if(e("form#add_payment_method").length)return r.preventDefault(),"yes"===wc_stripe_params.is_stripe_checkout&&n.isStripeModalNeeded()&&n.isStripeCardChosen()?(n.openModal(),!1):(n.block(),n.isStripeCardChosen()&&"no"===wc_stripe_params.use_elements?(n.createToken(),!1):(n.createSource(),!1))},onCCFormChange:function(){n.reset()},reset:function(){e(".wc-stripe-error, .stripe-source, .stripe_token, .stripe-checkout-object").remove(),"yes"===wc_stripe_params.is_stripe_checkout&&(n.stripe_submit=!1)},getRequiredFields:function(){return n.form.find(".form-row.validate-required > input, .form-row.validate-required > select, .form-row.validate-required > textarea")},validateCheckout:function(r){void 0===r&&(r="");var t={nonce:wc_stripe_params.stripe_nonce,required_fields:n.getRequiredFields().serialize(),all_fields:n.form.serialize(),source_type:n.getSelectedPaymentElement().val(),is_add_payment_page:wc_stripe_params.is_add_payment_method_page};e.ajax({type:"POST",url:n.getAjaxURL("validate_checkout"),data:t,dataType:"json",success:function(t){if("success"===t)if("modal"===r)n.openModal();else{if(n.isSepaChosen()){if(""===e("#stripe-sepa-owner").val())return e(document.body).trigger("stripeError",{error:{message:wc_stripe_params.no_sepa_owner_msg}}),!1;if(""===e("#stripe-sepa-iban").val())return e(document.body).trigger("stripeError",{error:{message:wc_stripe_params.no_sepa_iban_msg}}),!1}n.createSource()}else t.messages&&(n.resetModal(),n.reset(),n.submitError(t.messages))}})},submitError:function(r){e(".woocommerce-NoticeGroup-checkout, .woocommerce-error, .woocommerce-message").remove(),n.form.prepend('<div class="woocommerce-NoticeGroup woocommerce-NoticeGroup-checkout">'+r+"</div>"),n.form.removeClass("processing").unblock(),n.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"),n.unblock()}};n.init()});
|
changelog.txt
CHANGED
@@ -1,5 +1,16 @@
|
|
1 |
*** Changelog ***
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 4.0.4 - 2018-01-30 =
|
4 |
* Add - SEPA mandate notification email.
|
5 |
* Add - Preferred language to SOFORT and Bancontact so it can be localized.
|
1 |
*** Changelog ***
|
2 |
|
3 |
+
= 4.0.5 - 2018-02-02 =
|
4 |
+
* Fix - Illegal offset error on settings when non is defined or saved.
|
5 |
+
* Fix - Wrong ID used for dispute webhook handler.
|
6 |
+
* Fix - A WC 2.6 backwards compat issue while trying to get order id in subscriptions.
|
7 |
+
* Fix - Processing SEPA can't find email when not logged in.
|
8 |
+
* Add - Allow restricted secret keys to be used.
|
9 |
+
* Add - Statement Descriptor to SEPA Direct Debit.
|
10 |
+
* Add - Idempotency failure retry with easing to prevent multirequest issue.
|
11 |
+
* Add - POT file.
|
12 |
+
* Tweak - Make billing name optional on pay for order page.
|
13 |
+
|
14 |
= 4.0.4 - 2018-01-30 =
|
15 |
* Add - SEPA mandate notification email.
|
16 |
* Add - Preferred language to SOFORT and Bancontact so it can be localized.
|
includes/abstracts/abstract-wc-stripe-payment-gateway.php
CHANGED
@@ -14,6 +14,21 @@ abstract class WC_Stripe_Payment_Gateway extends WC_Payment_Gateway_CC {
|
|
14 |
const META_NAME_FEE = 'Stripe Fee';
|
15 |
const META_NAME_NET = 'Net Revenue From Stripe';
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
/**
|
18 |
* Check if this gateway is enabled
|
19 |
*/
|
@@ -199,6 +214,11 @@ abstract class WC_Stripe_Payment_Gateway extends WC_Payment_Gateway_CC {
|
|
199 |
|
200 |
$post_data['capture'] = $capture ? 'true' : 'false';
|
201 |
break;
|
|
|
|
|
|
|
|
|
|
|
202 |
}
|
203 |
|
204 |
$post_data['expand[]'] = 'balance_transaction';
|
@@ -264,7 +284,7 @@ abstract class WC_Stripe_Payment_Gateway extends WC_Payment_Gateway_CC {
|
|
264 |
WC_Stripe_Helper::is_pre_30() ? $order->reduce_order_stock() : wc_reduce_stock_levels( $order_id );
|
265 |
}
|
266 |
|
267 |
-
WC_Stripe_Helper::is_pre_30() ? update_post_meta( $order_id, '_transaction_id', $response->id
|
268 |
/* translators: transaction id */
|
269 |
$order->update_status( 'on-hold', sprintf( __( 'Stripe charge awaiting payment: %s.', 'woocommerce-gateway-stripe' ), $response->id ) );
|
270 |
}
|
@@ -283,7 +303,7 @@ abstract class WC_Stripe_Payment_Gateway extends WC_Payment_Gateway_CC {
|
|
283 |
throw new WC_Stripe_Exception( print_r( $response, true ), $localized_message );
|
284 |
}
|
285 |
} else {
|
286 |
-
WC_Stripe_Helper::is_pre_30() ? update_post_meta( $order_id, '_transaction_id', $response->id
|
287 |
|
288 |
if ( $order->has_status( array( 'pending', 'failed' ) ) ) {
|
289 |
WC_Stripe_Helper::is_pre_30() ? $order->reduce_order_stock() : wc_reduce_stock_levels( $order_id );
|
@@ -357,7 +377,7 @@ abstract class WC_Stripe_Payment_Gateway extends WC_Payment_Gateway_CC {
|
|
357 |
*/
|
358 |
public function get_source_object() {
|
359 |
$source = ! empty( $_POST['stripe_source'] ) ? wc_clean( $_POST['stripe_source'] ) : '';
|
360 |
-
|
361 |
if ( empty( $source ) ) {
|
362 |
return '';
|
363 |
}
|
@@ -648,27 +668,36 @@ abstract class WC_Stripe_Payment_Gateway extends WC_Payment_Gateway_CC {
|
|
648 |
return false;
|
649 |
}
|
650 |
|
651 |
-
$
|
652 |
|
653 |
if ( WC_Stripe_Helper::is_pre_30() ) {
|
654 |
$order_currency = get_post_meta( $order_id, '_order_currency', true );
|
|
|
655 |
} else {
|
656 |
$order_currency = $order->get_currency();
|
|
|
657 |
}
|
658 |
|
659 |
if ( ! is_null( $amount ) ) {
|
660 |
-
$
|
|
|
|
|
|
|
|
|
|
|
661 |
}
|
662 |
|
663 |
if ( $reason ) {
|
664 |
-
$
|
665 |
'reason' => $reason,
|
666 |
);
|
667 |
}
|
668 |
|
|
|
|
|
669 |
WC_Stripe_Logger::log( "Info: Beginning refund for order {$order->get_transaction_id()} for the amount of {$amount}" );
|
670 |
|
671 |
-
$response = WC_Stripe_API::request( $
|
672 |
|
673 |
if ( ! empty( $response->error ) ) {
|
674 |
WC_Stripe_Logger::log( 'Error: ' . $response->error->message );
|
@@ -689,7 +718,8 @@ abstract class WC_Stripe_Payment_Gateway extends WC_Payment_Gateway_CC {
|
|
689 |
}
|
690 |
|
691 |
/* translators: 1) dollar amount 2) transaction id 3) refund message */
|
692 |
-
$refund_message = sprintf( __( 'Refunded %1$s - Refund ID: %2$s - Reason: %3$s', 'woocommerce-gateway-stripe' ), $amount, $response->id, $reason );
|
|
|
693 |
$order->add_order_note( $refund_message );
|
694 |
WC_Stripe_Logger::log( 'Success: ' . html_entity_decode( strip_tags( $refund_message ) ) );
|
695 |
|
14 |
const META_NAME_FEE = 'Stripe Fee';
|
15 |
const META_NAME_NET = 'Net Revenue From Stripe';
|
16 |
|
17 |
+
/**
|
18 |
+
* Checks to see if request is invalid and that
|
19 |
+
* they are worth retrying.
|
20 |
+
*
|
21 |
+
* @since 4.0.5
|
22 |
+
* @param array $error
|
23 |
+
*/
|
24 |
+
public function is_retryable_error( $error ) {
|
25 |
+
return (
|
26 |
+
'invalid_request_error' === $error->type ||
|
27 |
+
'idempotency_error' === $error->type ||
|
28 |
+
'rate_limit_error' === $error->type
|
29 |
+
);
|
30 |
+
}
|
31 |
+
|
32 |
/**
|
33 |
* Check if this gateway is enabled
|
34 |
*/
|
214 |
|
215 |
$post_data['capture'] = $capture ? 'true' : 'false';
|
216 |
break;
|
217 |
+
case 'stripe_sepa':
|
218 |
+
if ( ! empty( $statement_descriptor ) ) {
|
219 |
+
$post_data['statement_descriptor'] = WC_Stripe_Helper::clean_statement_descriptor( $statement_descriptor );
|
220 |
+
}
|
221 |
+
break;
|
222 |
}
|
223 |
|
224 |
$post_data['expand[]'] = 'balance_transaction';
|
284 |
WC_Stripe_Helper::is_pre_30() ? $order->reduce_order_stock() : wc_reduce_stock_levels( $order_id );
|
285 |
}
|
286 |
|
287 |
+
WC_Stripe_Helper::is_pre_30() ? update_post_meta( $order_id, '_transaction_id', $response->id ) : $order->set_transaction_id( $response->id );
|
288 |
/* translators: transaction id */
|
289 |
$order->update_status( 'on-hold', sprintf( __( 'Stripe charge awaiting payment: %s.', 'woocommerce-gateway-stripe' ), $response->id ) );
|
290 |
}
|
303 |
throw new WC_Stripe_Exception( print_r( $response, true ), $localized_message );
|
304 |
}
|
305 |
} else {
|
306 |
+
WC_Stripe_Helper::is_pre_30() ? update_post_meta( $order_id, '_transaction_id', $response->id ) : $order->set_transaction_id( $response->id );
|
307 |
|
308 |
if ( $order->has_status( array( 'pending', 'failed' ) ) ) {
|
309 |
WC_Stripe_Helper::is_pre_30() ? $order->reduce_order_stock() : wc_reduce_stock_levels( $order_id );
|
377 |
*/
|
378 |
public function get_source_object() {
|
379 |
$source = ! empty( $_POST['stripe_source'] ) ? wc_clean( $_POST['stripe_source'] ) : '';
|
380 |
+
|
381 |
if ( empty( $source ) ) {
|
382 |
return '';
|
383 |
}
|
668 |
return false;
|
669 |
}
|
670 |
|
671 |
+
$request = array();
|
672 |
|
673 |
if ( WC_Stripe_Helper::is_pre_30() ) {
|
674 |
$order_currency = get_post_meta( $order_id, '_order_currency', true );
|
675 |
+
$captured = get_post_meta( $order_id, '_stripe_charge_captured', true );
|
676 |
} else {
|
677 |
$order_currency = $order->get_currency();
|
678 |
+
$captured = $order->get_meta( '_stripe_charge_captured', true );
|
679 |
}
|
680 |
|
681 |
if ( ! is_null( $amount ) ) {
|
682 |
+
$request['amount'] = WC_Stripe_Helper::get_stripe_amount( $amount, $order_currency );
|
683 |
+
}
|
684 |
+
|
685 |
+
// If order is only authorized, don't pass amount.
|
686 |
+
if ( 'yes' !== $captured ) {
|
687 |
+
unset( $request['amount'] );
|
688 |
}
|
689 |
|
690 |
if ( $reason ) {
|
691 |
+
$request['metadata'] = array(
|
692 |
'reason' => $reason,
|
693 |
);
|
694 |
}
|
695 |
|
696 |
+
$request['charge'] = $order->get_transaction_id();
|
697 |
+
|
698 |
WC_Stripe_Logger::log( "Info: Beginning refund for order {$order->get_transaction_id()} for the amount of {$amount}" );
|
699 |
|
700 |
+
$response = WC_Stripe_API::request( $request, 'refunds' );
|
701 |
|
702 |
if ( ! empty( $response->error ) ) {
|
703 |
WC_Stripe_Logger::log( 'Error: ' . $response->error->message );
|
718 |
}
|
719 |
|
720 |
/* translators: 1) dollar amount 2) transaction id 3) refund message */
|
721 |
+
$refund_message = ( isset( $captured ) && 'yes' === $captured ) ? sprintf( __( 'Refunded %1$s - Refund ID: %2$s - Reason: %3$s', 'woocommerce-gateway-stripe' ), $amount, $response->id, $reason ) : __( 'Pre-Authorization Released', 'woocommerce-gateway-stripe' );
|
722 |
+
|
723 |
$order->add_order_note( $refund_message );
|
724 |
WC_Stripe_Logger::log( 'Success: ' . html_entity_decode( strip_tags( $refund_message ) ) );
|
725 |
|
includes/admin/stripe-settings.php
CHANGED
@@ -80,7 +80,7 @@ return apply_filters( 'wc_stripe_settings',
|
|
80 |
'statement_descriptor' => array(
|
81 |
'title' => __( 'Statement Descriptor', 'woocommerce-gateway-stripe' ),
|
82 |
'type' => 'text',
|
83 |
-
'description' => __( '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.' ),
|
84 |
'default' => '',
|
85 |
'desc_tip' => true,
|
86 |
),
|
80 |
'statement_descriptor' => array(
|
81 |
'title' => __( 'Statement Descriptor', 'woocommerce-gateway-stripe' ),
|
82 |
'type' => 'text',
|
83 |
+
'description' => __( '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.', 'woocommerce-gateway-stripe' ),
|
84 |
'default' => '',
|
85 |
'desc_tip' => true,
|
86 |
),
|
includes/class-wc-gateway-stripe.php
CHANGED
@@ -9,6 +9,8 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
9 |
* @extends WC_Payment_Gateway
|
10 |
*/
|
11 |
class WC_Gateway_Stripe extends WC_Stripe_Payment_Gateway {
|
|
|
|
|
12 |
/**
|
13 |
* Should we capture Credit cards
|
14 |
*
|
@@ -111,6 +113,7 @@ class WC_Gateway_Stripe extends WC_Stripe_Payment_Gateway {
|
|
111 |
* Constructor
|
112 |
*/
|
113 |
public function __construct() {
|
|
|
114 |
$this->id = 'stripe';
|
115 |
$this->method_title = __( 'Stripe', 'woocommerce-gateway-stripe' );
|
116 |
/* translators: 1) link to Stripe register page 2) link to Stripe api keys page */
|
@@ -687,6 +690,26 @@ class WC_Gateway_Stripe extends WC_Stripe_Payment_Gateway {
|
|
687 |
}
|
688 |
}
|
689 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
690 |
// Customer param wrong? The user may have been deleted on stripe's end. Remove customer_id. Can be retried without.
|
691 |
if ( preg_match( '/No such customer/i', $response->error->message ) && $retry ) {
|
692 |
if ( WC_Stripe_Helper::is_pre_30() ) {
|
9 |
* @extends WC_Payment_Gateway
|
10 |
*/
|
11 |
class WC_Gateway_Stripe extends WC_Stripe_Payment_Gateway {
|
12 |
+
public $retry_interval;
|
13 |
+
|
14 |
/**
|
15 |
* Should we capture Credit cards
|
16 |
*
|
113 |
* Constructor
|
114 |
*/
|
115 |
public function __construct() {
|
116 |
+
$this->retry_interval = 2;
|
117 |
$this->id = 'stripe';
|
118 |
$this->method_title = __( 'Stripe', 'woocommerce-gateway-stripe' );
|
119 |
/* translators: 1) link to Stripe register page 2) link to Stripe api keys page */
|
690 |
}
|
691 |
}
|
692 |
|
693 |
+
// We want to retry.
|
694 |
+
if ( $this->is_retryable_error( $response->error ) ) {
|
695 |
+
if ( $retry ) {
|
696 |
+
// Don't do anymore retries after this.
|
697 |
+
if ( 5 <= $this->retry_interval ) {
|
698 |
+
|
699 |
+
return $this->process_payment( $order_id, false, $force_save_source );
|
700 |
+
}
|
701 |
+
|
702 |
+
sleep( $this->retry_interval );
|
703 |
+
|
704 |
+
$this->retry_interval++;
|
705 |
+
return $this->process_payment( $order_id, true, $force_save_source );
|
706 |
+
} else {
|
707 |
+
$localized_message = __( 'On going requests error and retries exhausted.', 'woocommerce-gateway-stripe' );
|
708 |
+
$order->add_order_note( $localized_message );
|
709 |
+
throw new WC_Stripe_Exception( print_r( $response, true ), $localized_message );
|
710 |
+
}
|
711 |
+
}
|
712 |
+
|
713 |
// Customer param wrong? The user may have been deleted on stripe's end. Remove customer_id. Can be retried without.
|
714 |
if ( preg_match( '/No such customer/i', $response->error->message ) && $retry ) {
|
715 |
if ( WC_Stripe_Helper::is_pre_30() ) {
|
includes/class-wc-stripe-api.php
CHANGED
@@ -101,7 +101,10 @@ class WC_Stripe_API {
|
|
101 |
$headers = self::get_headers();
|
102 |
|
103 |
if ( 'charges' === $api && 'POST' === $method ) {
|
104 |
-
$
|
|
|
|
|
|
|
105 |
}
|
106 |
|
107 |
$response = wp_safe_remote_post(
|
101 |
$headers = self::get_headers();
|
102 |
|
103 |
if ( 'charges' === $api && 'POST' === $method ) {
|
104 |
+
$customer = ! empty( $request['customer'] ) ? $request['customer'] : '';
|
105 |
+
$source = ! empty( $request['source'] ) ? $request['source'] : $customer;
|
106 |
+
|
107 |
+
$headers['Idempotency-Key'] = $request['metadata']['order_id'] . '-' . $source;
|
108 |
}
|
109 |
|
110 |
$response = wp_safe_remote_post(
|
includes/class-wc-stripe-customer.php
CHANGED
@@ -86,39 +86,6 @@ class WC_Stripe_Customer {
|
|
86 |
$this->customer_data = $data;
|
87 |
}
|
88 |
|
89 |
-
/**
|
90 |
-
* Get data from the Stripe API about this customer
|
91 |
-
*/
|
92 |
-
public function get_customer_data() {
|
93 |
-
$this->customer_data = get_transient( 'stripe_customer_' . $this->get_id() );
|
94 |
-
|
95 |
-
if ( empty( $this->customer_data ) && $this->get_id() && false === $this->customer_data ) {
|
96 |
-
$response = WC_Stripe_API::request( array(), 'customers/' . $this->get_id() );
|
97 |
-
|
98 |
-
if ( empty( $response->error ) ) {
|
99 |
-
$this->set_customer_data( $response );
|
100 |
-
set_transient( 'stripe_customer_' . $this->get_id(), $response, HOUR_IN_SECONDS * 48 );
|
101 |
-
}
|
102 |
-
}
|
103 |
-
|
104 |
-
return $this->customer_data;
|
105 |
-
}
|
106 |
-
|
107 |
-
/**
|
108 |
-
* Get default card/source
|
109 |
-
* @return string
|
110 |
-
*/
|
111 |
-
public function get_default_source() {
|
112 |
-
$data = $this->get_customer_data();
|
113 |
-
$source = '';
|
114 |
-
|
115 |
-
if ( $data ) {
|
116 |
-
$source = $data->default_source;
|
117 |
-
}
|
118 |
-
|
119 |
-
return $source;
|
120 |
-
}
|
121 |
-
|
122 |
/**
|
123 |
* Create a customer via API.
|
124 |
* @param array $args
|
@@ -244,7 +211,7 @@ class WC_Stripe_Customer {
|
|
244 |
}
|
245 |
|
246 |
/**
|
247 |
-
* Get a customers saved sources using their Stripe ID.
|
248 |
*
|
249 |
* @param string $customer_id
|
250 |
* @return array
|
86 |
$this->customer_data = $data;
|
87 |
}
|
88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
/**
|
90 |
* Create a customer via API.
|
91 |
* @param array $args
|
211 |
}
|
212 |
|
213 |
/**
|
214 |
+
* Get a customers saved sources using their Stripe ID.
|
215 |
*
|
216 |
* @param string $customer_id
|
217 |
* @return array
|
includes/class-wc-stripe-order-handler.php
CHANGED
@@ -10,6 +10,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
10 |
*/
|
11 |
class WC_Stripe_Order_Handler extends WC_Stripe_Payment_Gateway {
|
12 |
private static $_this;
|
|
|
13 |
|
14 |
/**
|
15 |
* Constructor.
|
@@ -20,6 +21,8 @@ class WC_Stripe_Order_Handler extends WC_Stripe_Payment_Gateway {
|
|
20 |
public function __construct() {
|
21 |
self::$_this = $this;
|
22 |
|
|
|
|
|
23 |
add_action( 'wp', array( $this, 'maybe_process_redirect_order' ) );
|
24 |
add_action( 'woocommerce_order_status_on-hold_to_processing', array( $this, 'capture_payment' ) );
|
25 |
add_action( 'woocommerce_order_status_on-hold_to_completed', array( $this, 'capture_payment' ) );
|
@@ -116,9 +119,28 @@ class WC_Stripe_Order_Handler extends WC_Stripe_Payment_Gateway {
|
|
116 |
sleep( 5 );
|
117 |
return $this->process_redirect_payment( $order_id, false );
|
118 |
} else {
|
119 |
-
$
|
120 |
-
$order->add_order_note( $
|
121 |
-
throw new WC_Stripe_Exception( print_r( $response, true ), $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
}
|
123 |
}
|
124 |
|
@@ -262,29 +284,10 @@ class WC_Stripe_Order_Handler extends WC_Stripe_Payment_Gateway {
|
|
262 |
$order = wc_get_order( $order_id );
|
263 |
|
264 |
if ( 'stripe' === ( WC_Stripe_Helper::is_pre_30() ? $order->payment_method : $order->get_payment_method() ) ) {
|
265 |
-
$
|
266 |
-
|
267 |
-
if ( $charge_id ) {
|
268 |
-
$result = WC_Stripe_API::request( array(
|
269 |
-
'amount' => WC_Stripe_Helper::get_stripe_amount( $order->get_total() ),
|
270 |
-
), 'charges/' . $charge_id . '/refund' );
|
271 |
|
272 |
-
|
273 |
-
|
274 |
-
} else {
|
275 |
-
/* translators: transaction id */
|
276 |
-
$order->add_order_note( sprintf( __( 'Stripe charge refunded (Charge ID: %s)', 'woocommerce-gateway-stripe' ), $result->id ) );
|
277 |
-
WC_Stripe_Helper::is_pre_30() ? delete_post_meta( $order_id, '_stripe_charge_captured' ) : $order->delete_meta_data( '_stripe_charge_captured' );
|
278 |
-
WC_Stripe_Helper::is_pre_30() ? delete_post_meta( $order_id, '_transaction_id' ) : $order->delete_meta_data( '_stripe_transaction_id' );
|
279 |
-
|
280 |
-
if ( is_callable( array( $order, 'save' ) ) ) {
|
281 |
-
$order->save();
|
282 |
-
}
|
283 |
-
}
|
284 |
-
|
285 |
-
// This hook fires when admin manually changes order status to cancel.
|
286 |
-
do_action( 'woocommerce_stripe_process_manual_cancel', $order, $result );
|
287 |
-
}
|
288 |
}
|
289 |
}
|
290 |
|
10 |
*/
|
11 |
class WC_Stripe_Order_Handler extends WC_Stripe_Payment_Gateway {
|
12 |
private static $_this;
|
13 |
+
public $retry_interval;
|
14 |
|
15 |
/**
|
16 |
* Constructor.
|
21 |
public function __construct() {
|
22 |
self::$_this = $this;
|
23 |
|
24 |
+
$this->retry_interval = 2;
|
25 |
+
|
26 |
add_action( 'wp', array( $this, 'maybe_process_redirect_order' ) );
|
27 |
add_action( 'woocommerce_order_status_on-hold_to_processing', array( $this, 'capture_payment' ) );
|
28 |
add_action( 'woocommerce_order_status_on-hold_to_completed', array( $this, 'capture_payment' ) );
|
119 |
sleep( 5 );
|
120 |
return $this->process_redirect_payment( $order_id, false );
|
121 |
} else {
|
122 |
+
$localized_message = __( 'API connection error and retries exhausted.', 'woocommerce-gateway-stripe' );
|
123 |
+
$order->add_order_note( $localized_message );
|
124 |
+
throw new WC_Stripe_Exception( print_r( $response, true ), $localized_message );
|
125 |
+
}
|
126 |
+
}
|
127 |
+
|
128 |
+
// We want to retry.
|
129 |
+
if ( $this->is_retryable_error( $response->error ) ) {
|
130 |
+
if ( $retry ) {
|
131 |
+
// Don't do anymore retries after this.
|
132 |
+
if ( 5 <= $this->retry_interval ) {
|
133 |
+
return $this->process_redirect_payment( $order_id, false );
|
134 |
+
}
|
135 |
+
|
136 |
+
sleep( $this->retry_interval );
|
137 |
+
|
138 |
+
$this->retry_interval++;
|
139 |
+
return $this->process_redirect_payment( $order_id, true );
|
140 |
+
} else {
|
141 |
+
$localized_message = __( 'On going requests error and retries exhausted.', 'woocommerce-gateway-stripe' );
|
142 |
+
$order->add_order_note( $localized_message );
|
143 |
+
throw new WC_Stripe_Exception( print_r( $response, true ), $localized_message );
|
144 |
}
|
145 |
}
|
146 |
|
284 |
$order = wc_get_order( $order_id );
|
285 |
|
286 |
if ( 'stripe' === ( WC_Stripe_Helper::is_pre_30() ? $order->payment_method : $order->get_payment_method() ) ) {
|
287 |
+
$this->process_refund( $order_id );
|
|
|
|
|
|
|
|
|
|
|
288 |
|
289 |
+
// This hook fires when admin manually changes order status to cancel.
|
290 |
+
do_action( 'woocommerce_stripe_process_manual_cancel', $order );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
}
|
292 |
}
|
293 |
|
includes/class-wc-stripe-webhook-handler.php
CHANGED
@@ -10,6 +10,8 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
10 |
* @since 4.0.0
|
11 |
*/
|
12 |
class WC_Stripe_Webhook_Handler extends WC_Stripe_Payment_Gateway {
|
|
|
|
|
13 |
/**
|
14 |
* Constructor.
|
15 |
*
|
@@ -17,6 +19,7 @@ class WC_Stripe_Webhook_Handler extends WC_Stripe_Payment_Gateway {
|
|
17 |
* @version 4.0.0
|
18 |
*/
|
19 |
public function __construct() {
|
|
|
20 |
add_action( 'woocommerce_api_wc_stripe', array( $this, 'check_for_webhook' ) );
|
21 |
}
|
22 |
|
@@ -152,7 +155,7 @@ class WC_Stripe_Webhook_Handler extends WC_Stripe_Payment_Gateway {
|
|
152 |
if ( 'api_connection_error' === $response->error->type || 'api_error' === $response->error->type ) {
|
153 |
if ( $retry ) {
|
154 |
sleep( 5 );
|
155 |
-
return $this->
|
156 |
} else {
|
157 |
$localized_message = 'API connection error and retries exhausted.';
|
158 |
$order->add_order_note( $localized_message );
|
@@ -160,6 +163,26 @@ class WC_Stripe_Webhook_Handler extends WC_Stripe_Payment_Gateway {
|
|
160 |
}
|
161 |
}
|
162 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
// Customer param wrong? The user may have been deleted on stripe's end. Remove customer_id. Can be retried without.
|
164 |
if ( preg_match( '/No such customer/i', $response->error->message ) && $retry ) {
|
165 |
if ( WC_Stripe_Helper::is_pre_30() ) {
|
@@ -171,7 +194,7 @@ class WC_Stripe_Webhook_Handler extends WC_Stripe_Payment_Gateway {
|
|
171 |
$order->save();
|
172 |
}
|
173 |
|
174 |
-
return $this->
|
175 |
|
176 |
} elseif ( preg_match( '/No such token/i', $response->error->message ) && $source_object->token_id ) {
|
177 |
// Source param wrong? The CARD may have been deleted on stripe's end. Remove token and show message.
|
@@ -218,20 +241,21 @@ class WC_Stripe_Webhook_Handler extends WC_Stripe_Payment_Gateway {
|
|
218 |
* We want to put the order into on-hold and add an order note.
|
219 |
*
|
220 |
* @since 4.0.0
|
221 |
-
* @version 4.0.0
|
222 |
* @param object $notification
|
223 |
*/
|
224 |
public function process_webhook_dispute( $notification ) {
|
225 |
-
$order = WC_Stripe_Helper::get_order_by_charge_id( $notification->data->object->
|
226 |
|
227 |
if ( ! $order ) {
|
228 |
-
WC_Stripe_Logger::log( 'Could not find order via charge ID: ' . $notification->data->object->
|
229 |
return;
|
230 |
}
|
231 |
|
232 |
$order->update_status( 'on-hold', __( 'A dispute was created for this order. Response is needed. Please go to your Stripe Dashboard to review this dispute.', 'woocommerce-gateway-stripe' ) );
|
233 |
|
234 |
do_action( 'wc_gateway_stripe_process_webhook_payment_error', $order, $notification );
|
|
|
|
|
235 |
$this->send_failed_order_email( $order_id );
|
236 |
}
|
237 |
|
@@ -409,17 +433,21 @@ class WC_Stripe_Webhook_Handler extends WC_Stripe_Payment_Gateway {
|
|
409 |
}
|
410 |
|
411 |
// Only refund captured charge.
|
412 |
-
if ( $charge
|
|
|
|
|
413 |
// Create the refund.
|
414 |
$refund = wc_create_refund( array(
|
415 |
'order_id' => $order_id,
|
416 |
'amount' => $this->get_refund_amount( $notification ),
|
417 |
-
'reason' =>
|
418 |
) );
|
419 |
|
420 |
if ( is_wp_error( $refund ) ) {
|
421 |
WC_Stripe_Logger::log( $refund->get_error_message() );
|
422 |
}
|
|
|
|
|
423 |
}
|
424 |
}
|
425 |
}
|
@@ -487,13 +515,6 @@ class WC_Stripe_Webhook_Handler extends WC_Stripe_Payment_Gateway {
|
|
487 |
public function process_webhook( $request_body ) {
|
488 |
$notification = json_decode( $request_body );
|
489 |
|
490 |
-
/*
|
491 |
-
* Hacky way to possibly prevent duplicate requests due to
|
492 |
-
* frontend request and webhook payment firing at the same
|
493 |
-
* time.
|
494 |
-
*/
|
495 |
-
sleep( 10 );
|
496 |
-
|
497 |
switch ( $notification->type ) {
|
498 |
case 'source.chargeable':
|
499 |
$this->process_webhook_payment( $notification );
|
10 |
* @since 4.0.0
|
11 |
*/
|
12 |
class WC_Stripe_Webhook_Handler extends WC_Stripe_Payment_Gateway {
|
13 |
+
public $retry_interval;
|
14 |
+
|
15 |
/**
|
16 |
* Constructor.
|
17 |
*
|
19 |
* @version 4.0.0
|
20 |
*/
|
21 |
public function __construct() {
|
22 |
+
$this->retry_interval = 2;
|
23 |
add_action( 'woocommerce_api_wc_stripe', array( $this, 'check_for_webhook' ) );
|
24 |
}
|
25 |
|
155 |
if ( 'api_connection_error' === $response->error->type || 'api_error' === $response->error->type ) {
|
156 |
if ( $retry ) {
|
157 |
sleep( 5 );
|
158 |
+
return $this->process_webhook_payment( $notification, false );
|
159 |
} else {
|
160 |
$localized_message = 'API connection error and retries exhausted.';
|
161 |
$order->add_order_note( $localized_message );
|
163 |
}
|
164 |
}
|
165 |
|
166 |
+
// We want to retry.
|
167 |
+
if ( $this->is_retryable_error( $response->error ) ) {
|
168 |
+
if ( $retry ) {
|
169 |
+
// Don't do anymore retries after this.
|
170 |
+
if ( 5 <= $this->retry_interval ) {
|
171 |
+
|
172 |
+
return $this->process_webhook_payment( $notification, false );
|
173 |
+
}
|
174 |
+
|
175 |
+
sleep( $this->retry_interval );
|
176 |
+
|
177 |
+
$this->retry_interval++;
|
178 |
+
return $this->process_webhook_payment( $notification, true );
|
179 |
+
} else {
|
180 |
+
$localized_message = __( 'On going requests error and retries exhausted.', 'woocommerce-gateway-stripe' );
|
181 |
+
$order->add_order_note( $localized_message );
|
182 |
+
throw new WC_Stripe_Exception( print_r( $response, true ), $localized_message );
|
183 |
+
}
|
184 |
+
}
|
185 |
+
|
186 |
// Customer param wrong? The user may have been deleted on stripe's end. Remove customer_id. Can be retried without.
|
187 |
if ( preg_match( '/No such customer/i', $response->error->message ) && $retry ) {
|
188 |
if ( WC_Stripe_Helper::is_pre_30() ) {
|
194 |
$order->save();
|
195 |
}
|
196 |
|
197 |
+
return $this->process_webhook_payment( $notification, false );
|
198 |
|
199 |
} elseif ( preg_match( '/No such token/i', $response->error->message ) && $source_object->token_id ) {
|
200 |
// Source param wrong? The CARD may have been deleted on stripe's end. Remove token and show message.
|
241 |
* We want to put the order into on-hold and add an order note.
|
242 |
*
|
243 |
* @since 4.0.0
|
|
|
244 |
* @param object $notification
|
245 |
*/
|
246 |
public function process_webhook_dispute( $notification ) {
|
247 |
+
$order = WC_Stripe_Helper::get_order_by_charge_id( $notification->data->object->charge );
|
248 |
|
249 |
if ( ! $order ) {
|
250 |
+
WC_Stripe_Logger::log( 'Could not find order via charge ID: ' . $notification->data->object->charge );
|
251 |
return;
|
252 |
}
|
253 |
|
254 |
$order->update_status( 'on-hold', __( 'A dispute was created for this order. Response is needed. Please go to your Stripe Dashboard to review this dispute.', 'woocommerce-gateway-stripe' ) );
|
255 |
|
256 |
do_action( 'wc_gateway_stripe_process_webhook_payment_error', $order, $notification );
|
257 |
+
|
258 |
+
$order_id = WC_Stripe_Helper::is_pre_30() ? $order->id : $order->get_id();
|
259 |
$this->send_failed_order_email( $order_id );
|
260 |
}
|
261 |
|
433 |
}
|
434 |
|
435 |
// Only refund captured charge.
|
436 |
+
if ( $charge ) {
|
437 |
+
$reason = ( isset( $captured ) && 'yes' === $captured ) ? __( 'Refunded via Stripe Dashboard', 'woocommerce-gateway-stripe' ) : __( 'Pre-Authorization Released via Stripe Dashboard', 'woocommerce-gateway-stripe' );
|
438 |
+
|
439 |
// Create the refund.
|
440 |
$refund = wc_create_refund( array(
|
441 |
'order_id' => $order_id,
|
442 |
'amount' => $this->get_refund_amount( $notification ),
|
443 |
+
'reason' => $reason,
|
444 |
) );
|
445 |
|
446 |
if ( is_wp_error( $refund ) ) {
|
447 |
WC_Stripe_Logger::log( $refund->get_error_message() );
|
448 |
}
|
449 |
+
|
450 |
+
$order->add_order_note( $reason );
|
451 |
}
|
452 |
}
|
453 |
}
|
515 |
public function process_webhook( $request_body ) {
|
516 |
$notification = json_decode( $request_body );
|
517 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
518 |
switch ( $notification->type ) {
|
519 |
case 'source.chargeable':
|
520 |
$this->process_webhook_payment( $notification );
|
includes/compat/class-wc-stripe-compat.php
CHANGED
@@ -179,7 +179,7 @@ class WC_Stripe_Compat extends WC_Gateway_Stripe {
|
|
179 |
* @param object $order
|
180 |
*/
|
181 |
public function add_subscription_meta_data( $metadata, $order ) {
|
182 |
-
if ( ! $this->has_subscription( $order->get_id() ) ) {
|
183 |
return $metadata;
|
184 |
}
|
185 |
|
179 |
* @param object $order
|
180 |
*/
|
181 |
public function add_subscription_meta_data( $metadata, $order ) {
|
182 |
+
if ( ! $this->has_subscription( WC_Stripe_Helper::is_pre_30() ? $order->id : $order->get_id() ) ) {
|
183 |
return $metadata;
|
184 |
}
|
185 |
|
includes/compat/class-wc-stripe-sepa-compat.php
CHANGED
@@ -93,7 +93,7 @@ class WC_Stripe_Sepa_Compat extends WC_Gateway_Stripe_Sepa {
|
|
93 |
* @param object $order
|
94 |
*/
|
95 |
public function add_subscription_meta_data( $metadata, $order ) {
|
96 |
-
if ( ! $this->has_subscription( $order->get_id() ) ) {
|
97 |
return $metadata;
|
98 |
}
|
99 |
|
@@ -317,13 +317,18 @@ class WC_Stripe_Sepa_Compat extends WC_Gateway_Stripe_Sepa {
|
|
317 |
if ( $this->id === $payment_method_id ) {
|
318 |
|
319 |
if ( ! isset( $payment_meta['post_meta']['_stripe_customer_id']['value'] ) || empty( $payment_meta['post_meta']['_stripe_customer_id']['value'] ) ) {
|
320 |
-
throw new Exception( 'A "
|
321 |
} elseif ( 0 !== strpos( $payment_meta['post_meta']['_stripe_customer_id']['value'], 'cus_' ) ) {
|
322 |
-
throw new Exception( 'Invalid customer ID. A valid "
|
323 |
}
|
324 |
|
325 |
-
if (
|
326 |
-
|
|
|
|
|
|
|
|
|
|
|
327 |
}
|
328 |
}
|
329 |
}
|
93 |
* @param object $order
|
94 |
*/
|
95 |
public function add_subscription_meta_data( $metadata, $order ) {
|
96 |
+
if ( ! $this->has_subscription( WC_Stripe_Helper::is_pre_30() ? $order->id : $order->get_id() ) ) {
|
97 |
return $metadata;
|
98 |
}
|
99 |
|
317 |
if ( $this->id === $payment_method_id ) {
|
318 |
|
319 |
if ( ! isset( $payment_meta['post_meta']['_stripe_customer_id']['value'] ) || empty( $payment_meta['post_meta']['_stripe_customer_id']['value'] ) ) {
|
320 |
+
throw new Exception( __( 'A "Stripe Customer ID" value is required.', 'woocommerce-gateway-stripe' ) );
|
321 |
} elseif ( 0 !== strpos( $payment_meta['post_meta']['_stripe_customer_id']['value'], 'cus_' ) ) {
|
322 |
+
throw new Exception( __( 'Invalid customer ID. A valid "Stripe Customer ID" must begin with "cus_".', 'woocommerce-gateway-stripe' ) );
|
323 |
}
|
324 |
|
325 |
+
if (
|
326 |
+
( ! empty( $payment_meta['post_meta']['_stripe_source_id']['value'] )
|
327 |
+
&& 0 !== strpos( $payment_meta['post_meta']['_stripe_source_id']['value'], 'card_' ) )
|
328 |
+
&& ( ! empty( $payment_meta['post_meta']['_stripe_source_id']['value'] )
|
329 |
+
&& 0 !== strpos( $payment_meta['post_meta']['_stripe_source_id']['value'], 'src_' ) ) ) {
|
330 |
+
|
331 |
+
throw new Exception( __( 'Invalid source ID. A valid source "Stripe Source ID" must begin with "src_" or "card_".', 'woocommerce-gateway-stripe' ) );
|
332 |
}
|
333 |
}
|
334 |
}
|
languages/woocommerce-gateway-stripe.pot
ADDED
@@ -0,0 +1,1243 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.0.4\n"
|
6 |
+
"Report-Msgid-Bugs-To: "
|
7 |
+
"https://github.com/woocommerce/woocommerce-gateway-stripe/issues\n"
|
8 |
+
"POT-Creation-Date: 2018-02-03 00:03:14+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:113
|
18 |
+
#: includes/compat/class-wc-stripe-compat.php:231
|
19 |
+
#: includes/compat/class-wc-stripe-compat.php:536
|
20 |
+
#: includes/compat/class-wc-stripe-sepa-compat.php:145
|
21 |
+
#: includes/compat/class-wc-stripe-sepa-compat.php:446
|
22 |
+
#. translators: 1) dollar amount
|
23 |
+
#. translators: minimum amount
|
24 |
+
msgid "Sorry, the minimum allowed order total is %1$s to use this payment method."
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:200
|
28 |
+
#. translators: 1) blog name 2) order number
|
29 |
+
msgid "%1$s - Order %2$s"
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:227
|
33 |
+
msgid "customer_name"
|
34 |
+
msgstr ""
|
35 |
+
|
36 |
+
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:228
|
37 |
+
msgid "customer_email"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:289
|
41 |
+
#. translators: transaction id
|
42 |
+
msgid "Stripe charge awaiting payment: %s."
|
43 |
+
msgstr ""
|
44 |
+
|
45 |
+
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:296
|
46 |
+
#: includes/class-wc-stripe-order-handler.php:250
|
47 |
+
#: includes/class-wc-stripe-webhook-handler.php:299
|
48 |
+
#: includes/class-wc-stripe-webhook-handler.php:350
|
49 |
+
#. translators: transaction id
|
50 |
+
msgid "Stripe charge complete (Charge ID: %s)"
|
51 |
+
msgstr ""
|
52 |
+
|
53 |
+
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:301
|
54 |
+
#: includes/class-wc-gateway-stripe.php:628
|
55 |
+
#: includes/compat/class-wc-stripe-compat.php:103
|
56 |
+
#: includes/payment-methods/class-wc-gateway-stripe-bitcoin.php:374
|
57 |
+
msgid "Payment processing failed. Please retry."
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:313
|
61 |
+
#. translators: transaction id
|
62 |
+
msgid ""
|
63 |
+
"Stripe charge authorized (Charge ID: %s). Process order to take payment, or "
|
64 |
+
"cancel to remove the pre-authorization."
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:496
|
68 |
+
msgid "Invalid payment method. Please input a new card number."
|
69 |
+
msgstr ""
|
70 |
+
|
71 |
+
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:721
|
72 |
+
#. translators: 1) dollar amount 2) transaction id 3) refund message
|
73 |
+
msgid "Refunded %1$s - Refund ID: %2$s - Reason: %3$s"
|
74 |
+
msgstr ""
|
75 |
+
|
76 |
+
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:721
|
77 |
+
msgid "Pre-Authorization Released"
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:739
|
81 |
+
msgid "There was a problem adding the card."
|
82 |
+
msgstr ""
|
83 |
+
|
84 |
+
#: includes/admin/stripe-alipay-settings.php:11
|
85 |
+
msgid "Relevant Payer Geography: China"
|
86 |
+
msgstr ""
|
87 |
+
|
88 |
+
#: includes/admin/stripe-alipay-settings.php:15
|
89 |
+
msgid ""
|
90 |
+
"<a href=\"https://stripe.com/payments/payment-methods-guide#alipay\" "
|
91 |
+
"target=\"_blank\">Payment Method Guide</a>"
|
92 |
+
msgstr ""
|
93 |
+
|
94 |
+
#: includes/admin/stripe-alipay-settings.php:19
|
95 |
+
#: includes/admin/stripe-bancontact-settings.php:19
|
96 |
+
#: includes/admin/stripe-bitcoin-settings.php:19
|
97 |
+
#: includes/admin/stripe-giropay-settings.php:19
|
98 |
+
#: includes/admin/stripe-ideal-settings.php:19
|
99 |
+
#: includes/admin/stripe-p24-settings.php:15
|
100 |
+
#: includes/admin/stripe-sepa-settings.php:19
|
101 |
+
#: includes/admin/stripe-sofort-settings.php:19
|
102 |
+
msgid ""
|
103 |
+
"Must be activated from your Stripe Dashboard Settings <a "
|
104 |
+
"href=\"https://dashboard.stripe.com/account/payments/settings\" "
|
105 |
+
"target=\"_blank\">here</a>"
|
106 |
+
msgstr ""
|
107 |
+
|
108 |
+
#: includes/admin/stripe-alipay-settings.php:23
|
109 |
+
#: includes/admin/stripe-bancontact-settings.php:23
|
110 |
+
#: includes/admin/stripe-bitcoin-settings.php:23
|
111 |
+
#: includes/admin/stripe-giropay-settings.php:23
|
112 |
+
#: includes/admin/stripe-ideal-settings.php:23
|
113 |
+
#: includes/admin/stripe-p24-settings.php:19
|
114 |
+
#: includes/admin/stripe-sepa-settings.php:23
|
115 |
+
#: includes/admin/stripe-settings.php:11
|
116 |
+
#: includes/admin/stripe-sofort-settings.php:23
|
117 |
+
msgid "Enable/Disable"
|
118 |
+
msgstr ""
|
119 |
+
|
120 |
+
#: includes/admin/stripe-alipay-settings.php:24
|
121 |
+
msgid "Enable Stripe Alipay"
|
122 |
+
msgstr ""
|
123 |
+
|
124 |
+
#: includes/admin/stripe-alipay-settings.php:30
|
125 |
+
#: includes/admin/stripe-bancontact-settings.php:30
|
126 |
+
#: includes/admin/stripe-bitcoin-settings.php:30
|
127 |
+
#: includes/admin/stripe-giropay-settings.php:30
|
128 |
+
#: includes/admin/stripe-ideal-settings.php:30
|
129 |
+
#: includes/admin/stripe-p24-settings.php:26
|
130 |
+
#: includes/admin/stripe-sepa-settings.php:30
|
131 |
+
#: includes/admin/stripe-settings.php:18
|
132 |
+
#: includes/admin/stripe-sofort-settings.php:30
|
133 |
+
msgid "Title"
|
134 |
+
msgstr ""
|
135 |
+
|
136 |
+
#: includes/admin/stripe-alipay-settings.php:32
|
137 |
+
#: includes/admin/stripe-bancontact-settings.php:32
|
138 |
+
#: includes/admin/stripe-bitcoin-settings.php:32
|
139 |
+
#: includes/admin/stripe-giropay-settings.php:32
|
140 |
+
#: includes/admin/stripe-ideal-settings.php:32
|
141 |
+
#: includes/admin/stripe-p24-settings.php:28
|
142 |
+
#: includes/admin/stripe-sepa-settings.php:32
|
143 |
+
#: includes/admin/stripe-settings.php:20
|
144 |
+
#: includes/admin/stripe-sofort-settings.php:32
|
145 |
+
msgid "This controls the title which the user sees during checkout."
|
146 |
+
msgstr ""
|
147 |
+
|
148 |
+
#: includes/admin/stripe-alipay-settings.php:33
|
149 |
+
msgid "Alipay"
|
150 |
+
msgstr ""
|
151 |
+
|
152 |
+
#: includes/admin/stripe-alipay-settings.php:37
|
153 |
+
#: includes/admin/stripe-bancontact-settings.php:37
|
154 |
+
#: includes/admin/stripe-bitcoin-settings.php:37
|
155 |
+
#: includes/admin/stripe-giropay-settings.php:37
|
156 |
+
#: includes/admin/stripe-ideal-settings.php:37
|
157 |
+
#: includes/admin/stripe-p24-settings.php:33
|
158 |
+
#: includes/admin/stripe-sepa-settings.php:37
|
159 |
+
#: includes/admin/stripe-settings.php:25
|
160 |
+
#: includes/admin/stripe-sofort-settings.php:37
|
161 |
+
msgid "Description"
|
162 |
+
msgstr ""
|
163 |
+
|
164 |
+
#: includes/admin/stripe-alipay-settings.php:39
|
165 |
+
#: includes/admin/stripe-bancontact-settings.php:39
|
166 |
+
#: includes/admin/stripe-bitcoin-settings.php:39
|
167 |
+
#: includes/admin/stripe-giropay-settings.php:39
|
168 |
+
#: includes/admin/stripe-ideal-settings.php:39
|
169 |
+
#: includes/admin/stripe-p24-settings.php:35
|
170 |
+
#: includes/admin/stripe-sepa-settings.php:39
|
171 |
+
#: includes/admin/stripe-settings.php:27
|
172 |
+
#: includes/admin/stripe-sofort-settings.php:39
|
173 |
+
msgid "This controls the description which the user sees during checkout."
|
174 |
+
msgstr ""
|
175 |
+
|
176 |
+
#: includes/admin/stripe-alipay-settings.php:40
|
177 |
+
msgid "You will be redirected to Alipay."
|
178 |
+
msgstr ""
|
179 |
+
|
180 |
+
#: includes/admin/stripe-alipay-settings.php:44
|
181 |
+
#: includes/admin/stripe-bancontact-settings.php:44
|
182 |
+
#: includes/admin/stripe-bitcoin-settings.php:44
|
183 |
+
#: includes/admin/stripe-giropay-settings.php:44
|
184 |
+
#: includes/admin/stripe-ideal-settings.php:44
|
185 |
+
#: includes/admin/stripe-p24-settings.php:40
|
186 |
+
#: includes/admin/stripe-sepa-settings.php:44
|
187 |
+
#: includes/admin/stripe-settings.php:32
|
188 |
+
#: includes/admin/stripe-sofort-settings.php:44
|
189 |
+
msgid "Webhook Endpoints"
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: includes/admin/stripe-alipay-settings.php:47
|
193 |
+
#: includes/admin/stripe-bancontact-settings.php:47
|
194 |
+
#: includes/admin/stripe-bitcoin-settings.php:47
|
195 |
+
#: includes/admin/stripe-giropay-settings.php:47
|
196 |
+
#: includes/admin/stripe-ideal-settings.php:47
|
197 |
+
#: includes/admin/stripe-p24-settings.php:43
|
198 |
+
#: includes/admin/stripe-sepa-settings.php:47
|
199 |
+
#: includes/admin/stripe-settings.php:35
|
200 |
+
#: includes/admin/stripe-sofort-settings.php:47
|
201 |
+
#. translators: webhook URL
|
202 |
+
msgid ""
|
203 |
+
"You must add the webhook endpoint <strong "
|
204 |
+
"style=\"background-color:#ddd;\"> %s </strong> to "
|
205 |
+
"your Stripe Account Settings <a "
|
206 |
+
"href=\"https://dashboard.stripe.com/account/webhooks\" "
|
207 |
+
"target=\"_blank\">Here</a> so you can receive notifications on the charge "
|
208 |
+
"statuses."
|
209 |
+
msgstr ""
|
210 |
+
|
211 |
+
#: includes/admin/stripe-bancontact-settings.php:11
|
212 |
+
msgid "Relevant Payer Geography: Belgium"
|
213 |
+
msgstr ""
|
214 |
+
|
215 |
+
#: includes/admin/stripe-bancontact-settings.php:15
|
216 |
+
msgid ""
|
217 |
+
"<a href=\"https://stripe.com/payments/payment-methods-guide#bancontact\" "
|
218 |
+
"target=\"_blank\">Payment Method Guide</a>"
|
219 |
+
msgstr ""
|
220 |
+
|
221 |
+
#: includes/admin/stripe-bancontact-settings.php:24
|
222 |
+
msgid "Enable Stripe Bancontact"
|
223 |
+
msgstr ""
|
224 |
+
|
225 |
+
#: includes/admin/stripe-bancontact-settings.php:33
|
226 |
+
msgid "Bancontact"
|
227 |
+
msgstr ""
|
228 |
+
|
229 |
+
#: includes/admin/stripe-bancontact-settings.php:40
|
230 |
+
msgid "You will be redirected to Bancontact."
|
231 |
+
msgstr ""
|
232 |
+
|
233 |
+
#: includes/admin/stripe-bitcoin-settings.php:11
|
234 |
+
msgid "Relevant Payer Geography: Global"
|
235 |
+
msgstr ""
|
236 |
+
|
237 |
+
#: includes/admin/stripe-bitcoin-settings.php:15
|
238 |
+
msgid ""
|
239 |
+
"<a href=\"https://stripe.com/payments/payment-methods-guide#bitcoin\" "
|
240 |
+
"target=\"_blank\">Payment Method Guide</a>"
|
241 |
+
msgstr ""
|
242 |
+
|
243 |
+
#: includes/admin/stripe-bitcoin-settings.php:24
|
244 |
+
msgid "Enable Stripe Bitcoin"
|
245 |
+
msgstr ""
|
246 |
+
|
247 |
+
#: includes/admin/stripe-bitcoin-settings.php:33
|
248 |
+
msgid "Bitcoin"
|
249 |
+
msgstr ""
|
250 |
+
|
251 |
+
#: includes/admin/stripe-bitcoin-settings.php:40
|
252 |
+
msgid "Bitcoin payment information will be provided when you place the order."
|
253 |
+
msgstr ""
|
254 |
+
|
255 |
+
#: includes/admin/stripe-giropay-settings.php:11
|
256 |
+
msgid "Relevant Payer Geography: Germany"
|
257 |
+
msgstr ""
|
258 |
+
|
259 |
+
#: includes/admin/stripe-giropay-settings.php:15
|
260 |
+
msgid ""
|
261 |
+
"<a href=\"https://stripe.com/payments/payment-methods-guide#giropay\" "
|
262 |
+
"target=\"_blank\">Payment Method Guide</a>"
|
263 |
+
msgstr ""
|
264 |
+
|
265 |
+
#: includes/admin/stripe-giropay-settings.php:24
|
266 |
+
msgid "Enable Stripe Giropay"
|
267 |
+
msgstr ""
|
268 |
+
|
269 |
+
#: includes/admin/stripe-giropay-settings.php:33
|
270 |
+
msgid "Giropay"
|
271 |
+
msgstr ""
|
272 |
+
|
273 |
+
#: includes/admin/stripe-giropay-settings.php:40
|
274 |
+
msgid "You will be redirected to Giropay."
|
275 |
+
msgstr ""
|
276 |
+
|
277 |
+
#: includes/admin/stripe-ideal-settings.php:11
|
278 |
+
msgid "Relevant Payer Geography: The Netherlands"
|
279 |
+
msgstr ""
|
280 |
+
|
281 |
+
#: includes/admin/stripe-ideal-settings.php:15
|
282 |
+
msgid ""
|
283 |
+
"<a href=\"https://stripe.com/payments/payment-methods-guide#ideal\" "
|
284 |
+
"target=\"_blank\">Payment Method Guide</a>"
|
285 |
+
msgstr ""
|
286 |
+
|
287 |
+
#: includes/admin/stripe-ideal-settings.php:24
|
288 |
+
msgid "Enable Stripe iDeal"
|
289 |
+
msgstr ""
|
290 |
+
|
291 |
+
#: includes/admin/stripe-ideal-settings.php:33
|
292 |
+
msgid "iDeal"
|
293 |
+
msgstr ""
|
294 |
+
|
295 |
+
#: includes/admin/stripe-ideal-settings.php:40
|
296 |
+
msgid "You will be redirected to iDeal."
|
297 |
+
msgstr ""
|
298 |
+
|
299 |
+
#: includes/admin/stripe-p24-settings.php:11
|
300 |
+
msgid "Relevant Payer Geography: Poland"
|
301 |
+
msgstr ""
|
302 |
+
|
303 |
+
#: includes/admin/stripe-p24-settings.php:20
|
304 |
+
msgid "Enable Stripe P24"
|
305 |
+
msgstr ""
|
306 |
+
|
307 |
+
#: includes/admin/stripe-p24-settings.php:29
|
308 |
+
msgid "Przelewy24 (P24)"
|
309 |
+
msgstr ""
|
310 |
+
|
311 |
+
#: includes/admin/stripe-p24-settings.php:36
|
312 |
+
msgid "You will be redirected to P24."
|
313 |
+
msgstr ""
|
314 |
+
|
315 |
+
#: includes/admin/stripe-sepa-settings.php:11
|
316 |
+
msgid ""
|
317 |
+
"Relevant Payer Geography: France, Germany, Spain, Belgium, Netherlands, "
|
318 |
+
"Luxembourg, Italy, Portugal, Austria, Ireland"
|
319 |
+
msgstr ""
|
320 |
+
|
321 |
+
#: includes/admin/stripe-sepa-settings.php:15
|
322 |
+
msgid ""
|
323 |
+
"<a "
|
324 |
+
"href=\"https://stripe.com/payments/payment-methods-guide#sepa-direct-debit\""
|
325 |
+
" target=\"_blank\">Payment Method Guide</a>"
|
326 |
+
msgstr ""
|
327 |
+
|
328 |
+
#: includes/admin/stripe-sepa-settings.php:24
|
329 |
+
msgid "Enable Stripe SEPA Direct Debit"
|
330 |
+
msgstr ""
|
331 |
+
|
332 |
+
#: includes/admin/stripe-sepa-settings.php:33
|
333 |
+
msgid "SEPA Direct Debit"
|
334 |
+
msgstr ""
|
335 |
+
|
336 |
+
#: includes/admin/stripe-sepa-settings.php:40
|
337 |
+
msgid "Mandate Information."
|
338 |
+
msgstr ""
|
339 |
+
|
340 |
+
#: includes/admin/stripe-settings.php:12
|
341 |
+
msgid "Enable Stripe"
|
342 |
+
msgstr ""
|
343 |
+
|
344 |
+
#: includes/admin/stripe-settings.php:21
|
345 |
+
msgid "Credit Card (Stripe)"
|
346 |
+
msgstr ""
|
347 |
+
|
348 |
+
#: includes/admin/stripe-settings.php:28
|
349 |
+
msgid "Pay with your credit card via Stripe."
|
350 |
+
msgstr ""
|
351 |
+
|
352 |
+
#: includes/admin/stripe-settings.php:38
|
353 |
+
msgid "Test mode"
|
354 |
+
msgstr ""
|
355 |
+
|
356 |
+
#: includes/admin/stripe-settings.php:39
|
357 |
+
msgid "Enable Test Mode"
|
358 |
+
msgstr ""
|
359 |
+
|
360 |
+
#: includes/admin/stripe-settings.php:41
|
361 |
+
msgid "Place the payment gateway in test mode using test API keys."
|
362 |
+
msgstr ""
|
363 |
+
|
364 |
+
#: includes/admin/stripe-settings.php:46
|
365 |
+
msgid "Test Publishable Key"
|
366 |
+
msgstr ""
|
367 |
+
|
368 |
+
#: includes/admin/stripe-settings.php:48 includes/admin/stripe-settings.php:55
|
369 |
+
#: includes/admin/stripe-settings.php:62 includes/admin/stripe-settings.php:69
|
370 |
+
msgid "Get your API keys from your stripe account."
|
371 |
+
msgstr ""
|
372 |
+
|
373 |
+
#: includes/admin/stripe-settings.php:53
|
374 |
+
msgid "Test Secret Key"
|
375 |
+
msgstr ""
|
376 |
+
|
377 |
+
#: includes/admin/stripe-settings.php:60
|
378 |
+
msgid "Live Publishable Key"
|
379 |
+
msgstr ""
|
380 |
+
|
381 |
+
#: includes/admin/stripe-settings.php:67
|
382 |
+
msgid "Live Secret Key"
|
383 |
+
msgstr ""
|
384 |
+
|
385 |
+
#: includes/admin/stripe-settings.php:74
|
386 |
+
msgid "Inline Credit Card Form"
|
387 |
+
msgstr ""
|
388 |
+
|
389 |
+
#: includes/admin/stripe-settings.php:76
|
390 |
+
msgid ""
|
391 |
+
"Choose the style you want to show for your credit card form. When "
|
392 |
+
"unchecked, the credit card form will display separate credit card number "
|
393 |
+
"field, expiry date field and cvc field."
|
394 |
+
msgstr ""
|
395 |
+
|
396 |
+
#: includes/admin/stripe-settings.php:81
|
397 |
+
msgid "Statement Descriptor"
|
398 |
+
msgstr ""
|
399 |
+
|
400 |
+
#: includes/admin/stripe-settings.php:83
|
401 |
+
msgid ""
|
402 |
+
"This may be up to 22 characters. The statement description must contain at "
|
403 |
+
"least one letter, may not include ><\"' characters, and will appear on your "
|
404 |
+
"customer's statement in capital letters."
|
405 |
+
msgstr ""
|
406 |
+
|
407 |
+
#: includes/admin/stripe-settings.php:88
|
408 |
+
msgid "Capture"
|
409 |
+
msgstr ""
|
410 |
+
|
411 |
+
#: includes/admin/stripe-settings.php:89
|
412 |
+
msgid "Capture charge immediately"
|
413 |
+
msgstr ""
|
414 |
+
|
415 |
+
#: includes/admin/stripe-settings.php:91
|
416 |
+
msgid ""
|
417 |
+
"Whether or not to immediately capture the charge. When unchecked, the "
|
418 |
+
"charge issues an authorization and will need to be captured later. "
|
419 |
+
"Uncaptured charges expire in 7 days."
|
420 |
+
msgstr ""
|
421 |
+
|
422 |
+
#: includes/admin/stripe-settings.php:96
|
423 |
+
msgid "3D Secure"
|
424 |
+
msgstr ""
|
425 |
+
|
426 |
+
#: includes/admin/stripe-settings.php:97
|
427 |
+
msgid "Require 3D Secure when applicable"
|
428 |
+
msgstr ""
|
429 |
+
|
430 |
+
#: includes/admin/stripe-settings.php:99
|
431 |
+
msgid ""
|
432 |
+
"Some payment methods have 3D Secure feature. This is an extra security "
|
433 |
+
"layer for your store. Choose how to handle payments when 3D Secure is "
|
434 |
+
"optional. Enabling would require customers to use 3D Secure when optional."
|
435 |
+
msgstr ""
|
436 |
+
|
437 |
+
#: includes/admin/stripe-settings.php:104
|
438 |
+
msgid "Stripe Checkout"
|
439 |
+
msgstr ""
|
440 |
+
|
441 |
+
#: includes/admin/stripe-settings.php:105
|
442 |
+
msgid "Enable Stripe Checkout"
|
443 |
+
msgstr ""
|
444 |
+
|
445 |
+
#: includes/admin/stripe-settings.php:107
|
446 |
+
msgid ""
|
447 |
+
"If enabled, this option shows a \"pay\" button and modal credit card form "
|
448 |
+
"on the checkout, instead of credit card fields directly on the page."
|
449 |
+
msgstr ""
|
450 |
+
|
451 |
+
#: includes/admin/stripe-settings.php:112
|
452 |
+
msgid "Bitcoin Currency"
|
453 |
+
msgstr ""
|
454 |
+
|
455 |
+
#: includes/admin/stripe-settings.php:113
|
456 |
+
msgid "Enable Bitcoin Currency"
|
457 |
+
msgstr ""
|
458 |
+
|
459 |
+
#: includes/admin/stripe-settings.php:115
|
460 |
+
msgid ""
|
461 |
+
"If enabled, an option to accept bitcoin will show on the checkout modal. "
|
462 |
+
"Note: Stripe Checkout needs to be enabled and store currency must be set to "
|
463 |
+
"USD."
|
464 |
+
msgstr ""
|
465 |
+
|
466 |
+
#: includes/admin/stripe-settings.php:120
|
467 |
+
msgid "Stripe Checkout Image"
|
468 |
+
msgstr ""
|
469 |
+
|
470 |
+
#: includes/admin/stripe-settings.php:121
|
471 |
+
msgid ""
|
472 |
+
"Optionally enter the URL to a 128x128px image of your brand or product. "
|
473 |
+
"e.g. "
|
474 |
+
"<code>https://yoursite.com/wp-content/uploads/2013/09/yourimage.jpg</code>"
|
475 |
+
msgstr ""
|
476 |
+
|
477 |
+
#: includes/admin/stripe-settings.php:127
|
478 |
+
msgid "Payment Request Buttons"
|
479 |
+
msgstr ""
|
480 |
+
|
481 |
+
#: includes/admin/stripe-settings.php:129
|
482 |
+
#. translators: 1) br tag 2) opening anchor tag 3) closing anchor tag
|
483 |
+
msgid ""
|
484 |
+
"Enable Payment Request Buttons. (Apple Pay/Chrome Payment Request API) "
|
485 |
+
"%1$sBy using Apple Pay, you agree to %2$s and %3$s's terms of service."
|
486 |
+
msgstr ""
|
487 |
+
|
488 |
+
#: includes/admin/stripe-settings.php:131
|
489 |
+
msgid ""
|
490 |
+
"If enabled, users will be able to pay using Apple Pay or Chrome Payment "
|
491 |
+
"Request if supported by the browser."
|
492 |
+
msgstr ""
|
493 |
+
|
494 |
+
#: includes/admin/stripe-settings.php:136
|
495 |
+
msgid "Payment Request Button Type"
|
496 |
+
msgstr ""
|
497 |
+
|
498 |
+
#: includes/admin/stripe-settings.php:137
|
499 |
+
msgid "Button Type"
|
500 |
+
msgstr ""
|
501 |
+
|
502 |
+
#: includes/admin/stripe-settings.php:139
|
503 |
+
msgid "Select the button type you would like to show."
|
504 |
+
msgstr ""
|
505 |
+
|
506 |
+
#: includes/admin/stripe-settings.php:143
|
507 |
+
msgid "Default"
|
508 |
+
msgstr ""
|
509 |
+
|
510 |
+
#: includes/admin/stripe-settings.php:144
|
511 |
+
msgid "Buy"
|
512 |
+
msgstr ""
|
513 |
+
|
514 |
+
#: includes/admin/stripe-settings.php:145
|
515 |
+
msgid "Donate"
|
516 |
+
msgstr ""
|
517 |
+
|
518 |
+
#: includes/admin/stripe-settings.php:149
|
519 |
+
msgid "Payment Request Button Theme"
|
520 |
+
msgstr ""
|
521 |
+
|
522 |
+
#: includes/admin/stripe-settings.php:150
|
523 |
+
msgid "Button Theme"
|
524 |
+
msgstr ""
|
525 |
+
|
526 |
+
#: includes/admin/stripe-settings.php:152
|
527 |
+
msgid "Select the button theme you would like to show."
|
528 |
+
msgstr ""
|
529 |
+
|
530 |
+
#: includes/admin/stripe-settings.php:156
|
531 |
+
msgid "Dark"
|
532 |
+
msgstr ""
|
533 |
+
|
534 |
+
#: includes/admin/stripe-settings.php:157
|
535 |
+
msgid "Light"
|
536 |
+
msgstr ""
|
537 |
+
|
538 |
+
#: includes/admin/stripe-settings.php:158
|
539 |
+
msgid "Light-Outline"
|
540 |
+
msgstr ""
|
541 |
+
|
542 |
+
#: includes/admin/stripe-settings.php:162
|
543 |
+
msgid "Payment Request Button Height"
|
544 |
+
msgstr ""
|
545 |
+
|
546 |
+
#: includes/admin/stripe-settings.php:163
|
547 |
+
msgid "Button Height"
|
548 |
+
msgstr ""
|
549 |
+
|
550 |
+
#: includes/admin/stripe-settings.php:165
|
551 |
+
msgid ""
|
552 |
+
"Enter the height you would like the button to be in pixels. Width will "
|
553 |
+
"always be 100%."
|
554 |
+
msgstr ""
|
555 |
+
|
556 |
+
#: includes/admin/stripe-settings.php:170
|
557 |
+
msgid "Saved Cards"
|
558 |
+
msgstr ""
|
559 |
+
|
560 |
+
#: includes/admin/stripe-settings.php:171
|
561 |
+
msgid "Enable Payment via Saved Cards"
|
562 |
+
msgstr ""
|
563 |
+
|
564 |
+
#: includes/admin/stripe-settings.php:173
|
565 |
+
msgid ""
|
566 |
+
"If enabled, users will be able to pay with a saved card during checkout. "
|
567 |
+
"Card details are saved on Stripe servers, not on your store."
|
568 |
+
msgstr ""
|
569 |
+
|
570 |
+
#: includes/admin/stripe-settings.php:178
|
571 |
+
msgid "Logging"
|
572 |
+
msgstr ""
|
573 |
+
|
574 |
+
#: includes/admin/stripe-settings.php:179
|
575 |
+
msgid "Log debug messages"
|
576 |
+
msgstr ""
|
577 |
+
|
578 |
+
#: includes/admin/stripe-settings.php:181
|
579 |
+
msgid "Save debug messages to the WooCommerce System Status log."
|
580 |
+
msgstr ""
|
581 |
+
|
582 |
+
#: includes/admin/stripe-sofort-settings.php:11
|
583 |
+
msgid "Relevant Payer Geography: Germany, Austria"
|
584 |
+
msgstr ""
|
585 |
+
|
586 |
+
#: includes/admin/stripe-sofort-settings.php:15
|
587 |
+
msgid ""
|
588 |
+
"<a href=\"https://stripe.com/payments/payment-methods-guide#sofort\" "
|
589 |
+
"target=\"_blank\">Payment Method Guide</a>"
|
590 |
+
msgstr ""
|
591 |
+
|
592 |
+
#: includes/admin/stripe-sofort-settings.php:24
|
593 |
+
msgid "Enable Stripe SOFORT"
|
594 |
+
msgstr ""
|
595 |
+
|
596 |
+
#: includes/admin/stripe-sofort-settings.php:33
|
597 |
+
msgid "SOFORT"
|
598 |
+
msgstr ""
|
599 |
+
|
600 |
+
#: includes/admin/stripe-sofort-settings.php:40
|
601 |
+
msgid "You will be redirected to SOFORT."
|
602 |
+
msgstr ""
|
603 |
+
|
604 |
+
#: includes/class-wc-gateway-stripe.php:118
|
605 |
+
msgid "Stripe"
|
606 |
+
msgstr ""
|
607 |
+
|
608 |
+
#: includes/class-wc-gateway-stripe.php:120
|
609 |
+
#. translators: 1) link to Stripe register page 2) link to Stripe api keys page
|
610 |
+
msgid ""
|
611 |
+
"Stripe works by adding payment fields on the checkout and then sending the "
|
612 |
+
"details to Stripe for verification. <a href=\"%1$s\" target=\"_blank\">Sign "
|
613 |
+
"up</a> for a Stripe account, and <a href=\"%2$s\" target=\"_blank\">get "
|
614 |
+
"your Stripe account keys</a>."
|
615 |
+
msgstr ""
|
616 |
+
|
617 |
+
#: includes/class-wc-gateway-stripe.php:166
|
618 |
+
msgid "Continue to payment"
|
619 |
+
msgstr ""
|
620 |
+
|
621 |
+
#: includes/class-wc-gateway-stripe.php:249
|
622 |
+
msgid "Unable to verify domain - missing secret key."
|
623 |
+
msgstr ""
|
624 |
+
|
625 |
+
#: includes/class-wc-gateway-stripe.php:270
|
626 |
+
#: includes/class-wc-gateway-stripe.php:279
|
627 |
+
#. translators: error message
|
628 |
+
msgid "Unable to verify domain - %s"
|
629 |
+
msgstr ""
|
630 |
+
|
631 |
+
#: includes/class-wc-gateway-stripe.php:304
|
632 |
+
msgid "Unable to create domain association folder to domain root."
|
633 |
+
msgstr ""
|
634 |
+
|
635 |
+
#: includes/class-wc-gateway-stripe.php:310
|
636 |
+
msgid "Unable to copy domain association file to domain root."
|
637 |
+
msgstr ""
|
638 |
+
|
639 |
+
#: includes/class-wc-gateway-stripe.php:361
|
640 |
+
#. translators: 1) HTML anchor open tag 2) HTML anchor closing tag
|
641 |
+
msgid ""
|
642 |
+
"Apple Pay domain verification failed. Please check the %1$slog%2$s to see "
|
643 |
+
"the issue. (Logging must be enabled to see recorded logs)"
|
644 |
+
msgstr ""
|
645 |
+
|
646 |
+
#: includes/class-wc-gateway-stripe.php:394
|
647 |
+
msgid "Add Card"
|
648 |
+
msgstr ""
|
649 |
+
|
650 |
+
#: includes/class-wc-gateway-stripe.php:417
|
651 |
+
#. translators: link to Stripe testing page
|
652 |
+
msgid ""
|
653 |
+
"TEST MODE ENABLED. In test mode, you can use the card number "
|
654 |
+
"4242424242424242 with any CVC and a valid expiration date or check the "
|
655 |
+
"documentation \"<a href=\"%s\" target=\"_blank\">Testing Stripe</a>\" for "
|
656 |
+
"more card numbers."
|
657 |
+
msgstr ""
|
658 |
+
|
659 |
+
#: includes/class-wc-gateway-stripe.php:457
|
660 |
+
msgid "Credit or debit card"
|
661 |
+
msgstr ""
|
662 |
+
|
663 |
+
#: includes/class-wc-gateway-stripe.php:465
|
664 |
+
msgid "Card Number"
|
665 |
+
msgstr ""
|
666 |
+
|
667 |
+
#: includes/class-wc-gateway-stripe.php:473
|
668 |
+
msgid "Expiry Date"
|
669 |
+
msgstr ""
|
670 |
+
|
671 |
+
#: includes/class-wc-gateway-stripe.php:481
|
672 |
+
msgid "Card Code (CVC)"
|
673 |
+
msgstr ""
|
674 |
+
|
675 |
+
#: includes/class-wc-gateway-stripe.php:537
|
676 |
+
msgid "Please accept the terms and conditions first"
|
677 |
+
msgstr ""
|
678 |
+
|
679 |
+
#: includes/class-wc-gateway-stripe.php:538
|
680 |
+
msgid "Please fill in required checkout fields first"
|
681 |
+
msgstr ""
|
682 |
+
|
683 |
+
#: includes/class-wc-gateway-stripe.php:556
|
684 |
+
#: includes/class-wc-gateway-stripe.php:622
|
685 |
+
#: includes/compat/class-wc-stripe-compat.php:97
|
686 |
+
msgid ""
|
687 |
+
"Sorry, we're not accepting prepaid cards at this time. Your credit card has "
|
688 |
+
"not been charge. Please try with alternative payment method."
|
689 |
+
msgstr ""
|
690 |
+
|
691 |
+
#: includes/class-wc-gateway-stripe.php:557
|
692 |
+
msgid "Please enter your IBAN account name."
|
693 |
+
msgstr ""
|
694 |
+
|
695 |
+
#: includes/class-wc-gateway-stripe.php:558
|
696 |
+
msgid "Please enter your IBAN account number."
|
697 |
+
msgstr ""
|
698 |
+
|
699 |
+
#: includes/class-wc-gateway-stripe.php:707
|
700 |
+
#: includes/class-wc-stripe-order-handler.php:141
|
701 |
+
#: includes/class-wc-stripe-webhook-handler.php:180
|
702 |
+
msgid "On going requests error and retries exhausted."
|
703 |
+
msgstr ""
|
704 |
+
|
705 |
+
#: includes/class-wc-gateway-stripe.php:729
|
706 |
+
#: includes/class-wc-stripe-order-handler.php:165
|
707 |
+
#: includes/class-wc-stripe-webhook-handler.php:203
|
708 |
+
#: includes/payment-methods/class-wc-gateway-stripe-sepa.php:381
|
709 |
+
msgid "This card is no longer available and has been removed."
|
710 |
+
msgstr ""
|
711 |
+
|
712 |
+
#: includes/class-wc-stripe-api.php:122 includes/class-wc-stripe-api.php:149
|
713 |
+
msgid "There was a problem connecting to the Stripe API endpoint."
|
714 |
+
msgstr ""
|
715 |
+
|
716 |
+
#: includes/class-wc-stripe-customer.php:164
|
717 |
+
msgid "Unable to add payment source."
|
718 |
+
msgstr ""
|
719 |
+
|
720 |
+
#: includes/class-wc-stripe-helper.php:41
|
721 |
+
msgid "The card number is not a valid credit card number."
|
722 |
+
msgstr ""
|
723 |
+
|
724 |
+
#: includes/class-wc-stripe-helper.php:42
|
725 |
+
msgid "The card's expiration month is invalid."
|
726 |
+
msgstr ""
|
727 |
+
|
728 |
+
#: includes/class-wc-stripe-helper.php:43
|
729 |
+
msgid "The card's expiration year is invalid."
|
730 |
+
msgstr ""
|
731 |
+
|
732 |
+
#: includes/class-wc-stripe-helper.php:44
|
733 |
+
msgid "The card's security code is invalid."
|
734 |
+
msgstr ""
|
735 |
+
|
736 |
+
#: includes/class-wc-stripe-helper.php:45
|
737 |
+
msgid "The card number is incorrect."
|
738 |
+
msgstr ""
|
739 |
+
|
740 |
+
#: includes/class-wc-stripe-helper.php:46
|
741 |
+
msgid "The card number is incomplete."
|
742 |
+
msgstr ""
|
743 |
+
|
744 |
+
#: includes/class-wc-stripe-helper.php:47
|
745 |
+
msgid "The card's security code is incomplete."
|
746 |
+
msgstr ""
|
747 |
+
|
748 |
+
#: includes/class-wc-stripe-helper.php:48
|
749 |
+
msgid "The card's expiration date is incomplete."
|
750 |
+
msgstr ""
|
751 |
+
|
752 |
+
#: includes/class-wc-stripe-helper.php:49
|
753 |
+
msgid "The card has expired."
|
754 |
+
msgstr ""
|
755 |
+
|
756 |
+
#: includes/class-wc-stripe-helper.php:50
|
757 |
+
msgid "The card's security code is incorrect."
|
758 |
+
msgstr ""
|
759 |
+
|
760 |
+
#: includes/class-wc-stripe-helper.php:51
|
761 |
+
msgid "The card's zip code failed validation."
|
762 |
+
msgstr ""
|
763 |
+
|
764 |
+
#: includes/class-wc-stripe-helper.php:52
|
765 |
+
msgid "The card's expiration year is in the past"
|
766 |
+
msgstr ""
|
767 |
+
|
768 |
+
#: includes/class-wc-stripe-helper.php:53
|
769 |
+
msgid "The card was declined."
|
770 |
+
msgstr ""
|
771 |
+
|
772 |
+
#: includes/class-wc-stripe-helper.php:54
|
773 |
+
msgid "There is no card on a customer that is being charged."
|
774 |
+
msgstr ""
|
775 |
+
|
776 |
+
#: includes/class-wc-stripe-helper.php:55
|
777 |
+
msgid "An error occurred while processing the card."
|
778 |
+
msgstr ""
|
779 |
+
|
780 |
+
#: includes/class-wc-stripe-helper.php:56
|
781 |
+
#: includes/class-wc-stripe-order-handler.php:93
|
782 |
+
msgid "Unable to process this payment, please try again or use alternative method."
|
783 |
+
msgstr ""
|
784 |
+
|
785 |
+
#: includes/class-wc-stripe-helper.php:57
|
786 |
+
msgid "The billing country is not accepted by SOFORT. Please try another country."
|
787 |
+
msgstr ""
|
788 |
+
|
789 |
+
#: includes/class-wc-stripe-order-handler.php:122
|
790 |
+
msgid "API connection error and retries exhausted."
|
791 |
+
msgstr ""
|
792 |
+
|
793 |
+
#: includes/class-wc-stripe-order-handler.php:191
|
794 |
+
#. translators: error message
|
795 |
+
msgid "Stripe payment failed: %s"
|
796 |
+
msgstr ""
|
797 |
+
|
798 |
+
#: includes/class-wc-stripe-order-handler.php:247
|
799 |
+
#. translators: error message
|
800 |
+
msgid "Unable to capture charge! %s"
|
801 |
+
msgstr ""
|
802 |
+
|
803 |
+
#: includes/class-wc-stripe-order-handler.php:308
|
804 |
+
msgid "Billing"
|
805 |
+
msgstr ""
|
806 |
+
|
807 |
+
#: includes/class-wc-stripe-order-handler.php:310
|
808 |
+
#: includes/payment-methods/class-wc-stripe-payment-request.php:224
|
809 |
+
#: includes/payment-methods/class-wc-stripe-payment-request.php:771
|
810 |
+
#: includes/payment-methods/class-wc-stripe-payment-request.php:1059
|
811 |
+
msgid "Shipping"
|
812 |
+
msgstr ""
|
813 |
+
|
814 |
+
#: includes/class-wc-stripe-order-handler.php:331
|
815 |
+
msgid "Owner"
|
816 |
+
msgstr ""
|
817 |
+
|
818 |
+
#: includes/class-wc-stripe-order-handler.php:347
|
819 |
+
#: woocommerce-gateway-stripe.php:149
|
820 |
+
msgid "Cheatin’ huh?"
|
821 |
+
msgstr ""
|
822 |
+
|
823 |
+
#: includes/class-wc-stripe-order-handler.php:396
|
824 |
+
#. translators: error field name
|
825 |
+
msgid "<strong>%s</strong> cannot be empty"
|
826 |
+
msgstr ""
|
827 |
+
|
828 |
+
#: includes/class-wc-stripe-order-handler.php:402
|
829 |
+
msgid "Email is not valid"
|
830 |
+
msgstr ""
|
831 |
+
|
832 |
+
#: includes/class-wc-stripe-order-handler.php:411
|
833 |
+
#. translators: %s: phone number
|
834 |
+
msgid "Please enter a valid phone number."
|
835 |
+
msgstr ""
|
836 |
+
|
837 |
+
#: includes/class-wc-stripe-order-handler.php:421
|
838 |
+
msgid "Please enter a valid billing postcode / ZIP."
|
839 |
+
msgstr ""
|
840 |
+
|
841 |
+
#: includes/class-wc-stripe-order-handler.php:428
|
842 |
+
msgid "You must accept our Terms & Conditions."
|
843 |
+
msgstr ""
|
844 |
+
|
845 |
+
#: includes/class-wc-stripe-order-handler.php:439
|
846 |
+
msgid "Please enter a valid shipping postcode / ZIP."
|
847 |
+
msgstr ""
|
848 |
+
|
849 |
+
#: includes/class-wc-stripe-order-handler.php:448
|
850 |
+
msgid "Please enter an address to continue."
|
851 |
+
msgstr ""
|
852 |
+
|
853 |
+
#: includes/class-wc-stripe-order-handler.php:451
|
854 |
+
#. translators: country name
|
855 |
+
msgid ""
|
856 |
+
"Unfortunately <strong>we do not ship %s</strong>. Please enter an "
|
857 |
+
"alternative shipping address."
|
858 |
+
msgstr ""
|
859 |
+
|
860 |
+
#: includes/class-wc-stripe-order-handler.php:457
|
861 |
+
msgid ""
|
862 |
+
"No shipping method has been selected. Please double check your address, or "
|
863 |
+
"contact us if you need any help."
|
864 |
+
msgstr ""
|
865 |
+
|
866 |
+
#: includes/class-wc-stripe-order-handler.php:467
|
867 |
+
msgid "Invalid payment method."
|
868 |
+
msgstr ""
|
869 |
+
|
870 |
+
#: includes/class-wc-stripe-payment-tokens.php:150
|
871 |
+
msgid "SEPA IBAN"
|
872 |
+
msgstr ""
|
873 |
+
|
874 |
+
#: includes/class-wc-stripe-sepa-payment-token.php:41
|
875 |
+
#. translators: last 4 digits of IBAN account
|
876 |
+
msgid "SEPA IBAN ending in %s"
|
877 |
+
msgstr ""
|
878 |
+
|
879 |
+
#: includes/class-wc-stripe-webhook-handler.php:254
|
880 |
+
msgid ""
|
881 |
+
"A dispute was created for this order. Response is needed. Please go to your "
|
882 |
+
"Stripe Dashboard to review this dispute."
|
883 |
+
msgstr ""
|
884 |
+
|
885 |
+
#: includes/class-wc-stripe-webhook-handler.php:304
|
886 |
+
msgid "This charge was partially captured via Stripe Dashboard"
|
887 |
+
msgstr ""
|
888 |
+
|
889 |
+
#: includes/class-wc-stripe-webhook-handler.php:375
|
890 |
+
msgid "This payment failed to clear."
|
891 |
+
msgstr ""
|
892 |
+
|
893 |
+
#: includes/class-wc-stripe-webhook-handler.php:402
|
894 |
+
msgid "This payment has cancelled."
|
895 |
+
msgstr ""
|
896 |
+
|
897 |
+
#: includes/class-wc-stripe-webhook-handler.php:437
|
898 |
+
msgid "Refunded via Stripe Dashboard"
|
899 |
+
msgstr ""
|
900 |
+
|
901 |
+
#: includes/class-wc-stripe-webhook-handler.php:437
|
902 |
+
msgid "Pre-Authorization Released via Stripe Dashboard"
|
903 |
+
msgstr ""
|
904 |
+
|
905 |
+
#: includes/compat/class-wc-stripe-compat.php:240
|
906 |
+
#: includes/compat/class-wc-stripe-sepa-compat.php:154
|
907 |
+
msgid "Customer not found"
|
908 |
+
msgstr ""
|
909 |
+
|
910 |
+
#: includes/compat/class-wc-stripe-compat.php:258
|
911 |
+
#: includes/compat/class-wc-stripe-compat.php:304
|
912 |
+
#: includes/compat/class-wc-stripe-compat.php:313
|
913 |
+
#: includes/compat/class-wc-stripe-compat.php:600
|
914 |
+
#: includes/compat/class-wc-stripe-sepa-compat.php:172
|
915 |
+
#: includes/compat/class-wc-stripe-sepa-compat.php:218
|
916 |
+
#: includes/compat/class-wc-stripe-sepa-compat.php:227
|
917 |
+
#: includes/compat/class-wc-stripe-sepa-compat.php:510
|
918 |
+
#. translators: error message
|
919 |
+
msgid "Stripe Transaction Failed (%s)"
|
920 |
+
msgstr ""
|
921 |
+
|
922 |
+
#: includes/compat/class-wc-stripe-compat.php:408
|
923 |
+
#: includes/compat/class-wc-stripe-sepa-compat.php:320
|
924 |
+
msgid "A \"Stripe Customer ID\" value is required."
|
925 |
+
msgstr ""
|
926 |
+
|
927 |
+
#: includes/compat/class-wc-stripe-compat.php:410
|
928 |
+
#: includes/compat/class-wc-stripe-sepa-compat.php:322
|
929 |
+
msgid ""
|
930 |
+
"Invalid customer ID. A valid \"Stripe Customer ID\" must begin with "
|
931 |
+
"\"cus_\"."
|
932 |
+
msgstr ""
|
933 |
+
|
934 |
+
#: includes/compat/class-wc-stripe-compat.php:419
|
935 |
+
#: includes/compat/class-wc-stripe-sepa-compat.php:331
|
936 |
+
msgid ""
|
937 |
+
"Invalid source ID. A valid source \"Stripe Source ID\" must begin with "
|
938 |
+
"\"src_\" or \"card_\"."
|
939 |
+
msgstr ""
|
940 |
+
|
941 |
+
#: includes/compat/class-wc-stripe-compat.php:499
|
942 |
+
#: includes/compat/class-wc-stripe-compat.php:514
|
943 |
+
#: includes/compat/class-wc-stripe-sepa-compat.php:409
|
944 |
+
#: includes/compat/class-wc-stripe-sepa-compat.php:424
|
945 |
+
#. translators: 1) card brand 2) last 4 digits
|
946 |
+
msgid "Via %1$s card ending in %2$s"
|
947 |
+
msgstr ""
|
948 |
+
|
949 |
+
#: includes/compat/class-wc-stripe-compat.php:499
|
950 |
+
#: includes/compat/class-wc-stripe-compat.php:501
|
951 |
+
#: includes/compat/class-wc-stripe-compat.php:514
|
952 |
+
#: includes/compat/class-wc-stripe-compat.php:516
|
953 |
+
#: includes/compat/class-wc-stripe-sepa-compat.php:409
|
954 |
+
#: includes/compat/class-wc-stripe-sepa-compat.php:411
|
955 |
+
#: includes/compat/class-wc-stripe-sepa-compat.php:424
|
956 |
+
#: includes/compat/class-wc-stripe-sepa-compat.php:426
|
957 |
+
msgid "N/A"
|
958 |
+
msgstr ""
|
959 |
+
|
960 |
+
#: includes/compat/class-wc-stripe-compat.php:543
|
961 |
+
#: includes/compat/class-wc-stripe-sepa-compat.php:453
|
962 |
+
msgid "Unable to store payment details. Please try again."
|
963 |
+
msgstr ""
|
964 |
+
|
965 |
+
#: includes/payment-methods/class-wc-gateway-stripe-alipay.php:60
|
966 |
+
#: woocommerce-gateway-stripe.php:413
|
967 |
+
msgid "Stripe Alipay"
|
968 |
+
msgstr ""
|
969 |
+
|
970 |
+
#: includes/payment-methods/class-wc-gateway-stripe-alipay.php:62
|
971 |
+
#: includes/payment-methods/class-wc-gateway-stripe-bancontact.php:62
|
972 |
+
#: includes/payment-methods/class-wc-gateway-stripe-bitcoin.php:69
|
973 |
+
#: includes/payment-methods/class-wc-gateway-stripe-giropay.php:62
|
974 |
+
#: includes/payment-methods/class-wc-gateway-stripe-ideal.php:62
|
975 |
+
#: includes/payment-methods/class-wc-gateway-stripe-p24.php:62
|
976 |
+
#: includes/payment-methods/class-wc-gateway-stripe-sepa.php:62
|
977 |
+
#: includes/payment-methods/class-wc-gateway-stripe-sofort.php:62
|
978 |
+
#. translators: link
|
979 |
+
msgid "All other general Stripe settings can be adjusted <a href=\"%s\">here</a>."
|
980 |
+
msgstr ""
|
981 |
+
|
982 |
+
#: includes/payment-methods/class-wc-gateway-stripe-alipay.php:131
|
983 |
+
#. translators: supported currency list
|
984 |
+
msgid "Alipay is enabled - it requires store currency to be set to %s"
|
985 |
+
msgstr ""
|
986 |
+
|
987 |
+
#: includes/payment-methods/class-wc-gateway-stripe-alipay.php:228
|
988 |
+
#: includes/payment-methods/class-wc-gateway-stripe-bancontact.php:218
|
989 |
+
#: includes/payment-methods/class-wc-gateway-stripe-bitcoin.php:234
|
990 |
+
#: includes/payment-methods/class-wc-gateway-stripe-giropay.php:218
|
991 |
+
#: includes/payment-methods/class-wc-gateway-stripe-ideal.php:218
|
992 |
+
#: includes/payment-methods/class-wc-gateway-stripe-p24.php:219
|
993 |
+
#: includes/payment-methods/class-wc-gateway-stripe-sepa.php:279
|
994 |
+
#: includes/payment-methods/class-wc-gateway-stripe-sofort.php:218
|
995 |
+
msgid "Add Payment"
|
996 |
+
msgstr ""
|
997 |
+
|
998 |
+
#: includes/payment-methods/class-wc-gateway-stripe-bancontact.php:60
|
999 |
+
#: woocommerce-gateway-stripe.php:408
|
1000 |
+
msgid "Stripe Bancontact"
|
1001 |
+
msgstr ""
|
1002 |
+
|
1003 |
+
#: includes/payment-methods/class-wc-gateway-stripe-bancontact.php:128
|
1004 |
+
msgid "Bancontact is enabled - it requires store currency to be set to Euros."
|
1005 |
+
msgstr ""
|
1006 |
+
|
1007 |
+
#: includes/payment-methods/class-wc-gateway-stripe-bitcoin.php:67
|
1008 |
+
#: woocommerce-gateway-stripe.php:415
|
1009 |
+
msgid "Stripe Bitcoin"
|
1010 |
+
msgstr ""
|
1011 |
+
|
1012 |
+
#: includes/payment-methods/class-wc-gateway-stripe-bitcoin.php:144
|
1013 |
+
msgid "Bitcoin is enabled - it requires store currency to be set to USD."
|
1014 |
+
msgstr ""
|
1015 |
+
|
1016 |
+
#: includes/payment-methods/class-wc-gateway-stripe-bitcoin.php:291
|
1017 |
+
#: includes/payment-methods/class-wc-gateway-stripe-bitcoin.php:303
|
1018 |
+
msgid "Please pay the following:"
|
1019 |
+
msgstr ""
|
1020 |
+
|
1021 |
+
#: includes/payment-methods/class-wc-gateway-stripe-bitcoin.php:293
|
1022 |
+
#: includes/payment-methods/class-wc-gateway-stripe-bitcoin.php:306
|
1023 |
+
msgid "Bitcoin Amount:"
|
1024 |
+
msgstr ""
|
1025 |
+
|
1026 |
+
#: includes/payment-methods/class-wc-gateway-stripe-bitcoin.php:296
|
1027 |
+
#: includes/payment-methods/class-wc-gateway-stripe-bitcoin.php:310
|
1028 |
+
msgid "Receiver:"
|
1029 |
+
msgstr ""
|
1030 |
+
|
1031 |
+
#: includes/payment-methods/class-wc-gateway-stripe-bitcoin.php:299
|
1032 |
+
#: includes/payment-methods/class-wc-gateway-stripe-bitcoin.php:314
|
1033 |
+
msgid "URI:"
|
1034 |
+
msgstr ""
|
1035 |
+
|
1036 |
+
#: includes/payment-methods/class-wc-gateway-stripe-bitcoin.php:318
|
1037 |
+
#. translators: link
|
1038 |
+
msgid "<a href=\"%s\">Pay Bitcoin</a>"
|
1039 |
+
msgstr ""
|
1040 |
+
|
1041 |
+
#: includes/payment-methods/class-wc-gateway-stripe-bitcoin.php:386
|
1042 |
+
msgid "Awaiting Bitcoin payment"
|
1043 |
+
msgstr ""
|
1044 |
+
|
1045 |
+
#: includes/payment-methods/class-wc-gateway-stripe-giropay.php:60
|
1046 |
+
#: woocommerce-gateway-stripe.php:410
|
1047 |
+
msgid "Stripe Giropay"
|
1048 |
+
msgstr ""
|
1049 |
+
|
1050 |
+
#: includes/payment-methods/class-wc-gateway-stripe-giropay.php:128
|
1051 |
+
msgid "Giropay is enabled - it requires store currency to be set to Euros."
|
1052 |
+
msgstr ""
|
1053 |
+
|
1054 |
+
#: includes/payment-methods/class-wc-gateway-stripe-ideal.php:60
|
1055 |
+
#: woocommerce-gateway-stripe.php:411
|
1056 |
+
msgid "Stripe iDeal"
|
1057 |
+
msgstr ""
|
1058 |
+
|
1059 |
+
#: includes/payment-methods/class-wc-gateway-stripe-ideal.php:128
|
1060 |
+
msgid "iDeal is enabled - it requires store currency to be set to Euros."
|
1061 |
+
msgstr ""
|
1062 |
+
|
1063 |
+
#: includes/payment-methods/class-wc-gateway-stripe-p24.php:60
|
1064 |
+
#: woocommerce-gateway-stripe.php:412
|
1065 |
+
msgid "Stripe P24"
|
1066 |
+
msgstr ""
|
1067 |
+
|
1068 |
+
#: includes/payment-methods/class-wc-gateway-stripe-p24.php:128
|
1069 |
+
msgid ""
|
1070 |
+
"P24 is enabled - it requires store currency to be set to Euros or Polish "
|
1071 |
+
"Zloty."
|
1072 |
+
msgstr ""
|
1073 |
+
|
1074 |
+
#: includes/payment-methods/class-wc-gateway-stripe-sepa.php:60
|
1075 |
+
#: woocommerce-gateway-stripe.php:414
|
1076 |
+
msgid "Stripe SEPA Direct Debit"
|
1077 |
+
msgstr ""
|
1078 |
+
|
1079 |
+
#: includes/payment-methods/class-wc-gateway-stripe-sepa.php:141
|
1080 |
+
msgid "SEPA is enabled - it requires store currency to be set to Euros."
|
1081 |
+
msgstr ""
|
1082 |
+
|
1083 |
+
#: includes/payment-methods/class-wc-gateway-stripe-sepa.php:230
|
1084 |
+
#. translators: statement descriptor
|
1085 |
+
msgid ""
|
1086 |
+
"By providing your IBAN and confirming this payment, you are authorizing %s "
|
1087 |
+
"and Stripe, our payment service provider, to send instructions to your bank "
|
1088 |
+
"to debit your account and your bank to debit your account in accordance "
|
1089 |
+
"with those instructions. You are entitled to a refund from your bank under "
|
1090 |
+
"the terms and conditions of your agreement with your bank. A refund must be "
|
1091 |
+
"claimed within 8 weeks starting from the date on which your account was "
|
1092 |
+
"debited."
|
1093 |
+
msgstr ""
|
1094 |
+
|
1095 |
+
#: includes/payment-methods/class-wc-gateway-stripe-sepa.php:246
|
1096 |
+
msgid "IBAN Account Name."
|
1097 |
+
msgstr ""
|
1098 |
+
|
1099 |
+
#: includes/payment-methods/class-wc-gateway-stripe-sepa.php:252
|
1100 |
+
msgid "IBAN Account Number."
|
1101 |
+
msgstr ""
|
1102 |
+
|
1103 |
+
#: includes/payment-methods/class-wc-gateway-stripe-sepa.php:292
|
1104 |
+
msgid ""
|
1105 |
+
"TEST MODE ENABLED. In test mode, you can use IBAN number "
|
1106 |
+
"DE89370400440532013000."
|
1107 |
+
msgstr ""
|
1108 |
+
|
1109 |
+
#: includes/payment-methods/class-wc-gateway-stripe-sofort.php:60
|
1110 |
+
#: woocommerce-gateway-stripe.php:409
|
1111 |
+
msgid "Stripe SOFORT"
|
1112 |
+
msgstr ""
|
1113 |
+
|
1114 |
+
#: includes/payment-methods/class-wc-gateway-stripe-sofort.php:128
|
1115 |
+
msgid "SOFORT is enabled - it requires store currency to be set to Euros."
|
1116 |
+
msgstr ""
|
1117 |
+
|
1118 |
+
#: includes/payment-methods/class-wc-stripe-payment-request.php:216
|
1119 |
+
#: includes/payment-methods/class-wc-stripe-payment-request.php:763
|
1120 |
+
#: includes/payment-methods/class-wc-stripe-payment-request.php:1052
|
1121 |
+
msgid "Tax"
|
1122 |
+
msgstr ""
|
1123 |
+
|
1124 |
+
#: includes/payment-methods/class-wc-stripe-payment-request.php:231
|
1125 |
+
#: includes/payment-methods/class-wc-stripe-payment-request.php:778
|
1126 |
+
msgid "Pending"
|
1127 |
+
msgstr ""
|
1128 |
+
|
1129 |
+
#: includes/payment-methods/class-wc-stripe-payment-request.php:437
|
1130 |
+
msgid "Sorry, we're not accepting prepaid cards at this time."
|
1131 |
+
msgstr ""
|
1132 |
+
|
1133 |
+
#: includes/payment-methods/class-wc-stripe-payment-request.php:439
|
1134 |
+
#. translators: Do not translate the [option] placeholder
|
1135 |
+
msgid "Unknown shipping option \"[option]\"."
|
1136 |
+
msgstr ""
|
1137 |
+
|
1138 |
+
#: includes/payment-methods/class-wc-stripe-payment-request.php:561
|
1139 |
+
msgid "OR"
|
1140 |
+
msgstr ""
|
1141 |
+
|
1142 |
+
#: includes/payment-methods/class-wc-stripe-payment-request.php:652
|
1143 |
+
#: includes/payment-methods/class-wc-stripe-payment-request.php:665
|
1144 |
+
msgid "Unable to find shipping method for address."
|
1145 |
+
msgstr ""
|
1146 |
+
|
1147 |
+
#: includes/payment-methods/class-wc-stripe-payment-request.php:898
|
1148 |
+
msgid "Empty cart"
|
1149 |
+
msgstr ""
|
1150 |
+
|
1151 |
+
#: includes/payment-methods/class-wc-stripe-payment-request.php:1066
|
1152 |
+
msgid "Discount"
|
1153 |
+
msgstr ""
|
1154 |
+
|
1155 |
+
#: woocommerce-gateway-stripe.php:145
|
1156 |
+
msgid "Action failed. Please refresh the page and retry."
|
1157 |
+
msgstr ""
|
1158 |
+
|
1159 |
+
#: woocommerce-gateway-stripe.php:215
|
1160 |
+
#. translators: 1) int version 2) int version
|
1161 |
+
msgid ""
|
1162 |
+
"WooCommerce Stripe - The minimum PHP version required for this plugin is "
|
1163 |
+
"%1$s. You are running %2$s."
|
1164 |
+
msgstr ""
|
1165 |
+
|
1166 |
+
#: woocommerce-gateway-stripe.php:221
|
1167 |
+
msgid "WooCommerce Stripe requires WooCommerce to be activated to work."
|
1168 |
+
msgstr ""
|
1169 |
+
|
1170 |
+
#: woocommerce-gateway-stripe.php:226
|
1171 |
+
#. translators: 1) int version 2) int version
|
1172 |
+
msgid ""
|
1173 |
+
"WooCommerce Stripe - The minimum WooCommerce version required for this "
|
1174 |
+
"plugin is %1$s. You are running %2$s."
|
1175 |
+
msgstr ""
|
1176 |
+
|
1177 |
+
#: woocommerce-gateway-stripe.php:232
|
1178 |
+
msgid "WooCommerce Stripe - cURL is not installed."
|
1179 |
+
msgstr ""
|
1180 |
+
|
1181 |
+
#: woocommerce-gateway-stripe.php:288
|
1182 |
+
#. translators: 1) link
|
1183 |
+
msgid ""
|
1184 |
+
"Stripe is almost ready. To get started, <a href=\"%s\">set your Stripe "
|
1185 |
+
"account keys</a>."
|
1186 |
+
msgstr ""
|
1187 |
+
|
1188 |
+
#: woocommerce-gateway-stripe.php:300
|
1189 |
+
#. translators: 1) link
|
1190 |
+
msgid ""
|
1191 |
+
"Stripe is in test mode however your test keys may not be valid. Test keys "
|
1192 |
+
"start with pk_test and sk_test or rk_test. Please go to your settings and, "
|
1193 |
+
"<a href=\"%s\">set your Stripe account keys</a>."
|
1194 |
+
msgstr ""
|
1195 |
+
|
1196 |
+
#: woocommerce-gateway-stripe.php:310
|
1197 |
+
#. translators: 1) link
|
1198 |
+
msgid ""
|
1199 |
+
"Stripe is in live mode however your test keys may not be valid. Live keys "
|
1200 |
+
"start with pk_live and sk_live or rk_live. Please go to your settings and, "
|
1201 |
+
"<a href=\"%s\">set your Stripe account keys</a>."
|
1202 |
+
msgstr ""
|
1203 |
+
|
1204 |
+
#: woocommerce-gateway-stripe.php:319
|
1205 |
+
#. translators: 1) link 2) link
|
1206 |
+
msgid ""
|
1207 |
+
"Stripe is enabled, but the <a href=\"%1$s\">force SSL option</a> is "
|
1208 |
+
"disabled; your checkout may not be secure! Please enable SSL and ensure "
|
1209 |
+
"your server has a valid <a href=\"%2$s\" target=\"_blank\">SSL "
|
1210 |
+
"certificate</a> - Stripe will only work in test mode."
|
1211 |
+
msgstr ""
|
1212 |
+
|
1213 |
+
#: woocommerce-gateway-stripe.php:357
|
1214 |
+
msgid "Settings"
|
1215 |
+
msgstr ""
|
1216 |
+
|
1217 |
+
#: woocommerce-gateway-stripe.php:358
|
1218 |
+
msgid "Docs"
|
1219 |
+
msgstr ""
|
1220 |
+
|
1221 |
+
#: woocommerce-gateway-stripe.php:359
|
1222 |
+
msgid "Support"
|
1223 |
+
msgstr ""
|
1224 |
+
|
1225 |
+
#. Plugin Name of the plugin/theme
|
1226 |
+
msgid "WooCommerce Stripe Gateway"
|
1227 |
+
msgstr ""
|
1228 |
+
|
1229 |
+
#. Plugin URI of the plugin/theme
|
1230 |
+
msgid "https://wordpress.org/plugins/woocommerce-gateway-stripe/"
|
1231 |
+
msgstr ""
|
1232 |
+
|
1233 |
+
#. Description of the plugin/theme
|
1234 |
+
msgid "Take credit card payments on your store using Stripe."
|
1235 |
+
msgstr ""
|
1236 |
+
|
1237 |
+
#. Author of the plugin/theme
|
1238 |
+
msgid "WooCommerce"
|
1239 |
+
msgstr ""
|
1240 |
+
|
1241 |
+
#. Author URI of the plugin/theme
|
1242 |
+
msgid "https://woocommerce.com/"
|
1243 |
+
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.0.
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
Attributions: thorsten-stripe
|
@@ -101,27 +101,16 @@ If you get stuck, you can ask for help in the Plugin Forum.
|
|
101 |
|
102 |
== Changelog ==
|
103 |
|
104 |
-
= 4.0.
|
105 |
-
*
|
106 |
-
*
|
107 |
-
*
|
108 |
-
*
|
109 |
-
* Add -
|
110 |
-
* Add -
|
111 |
-
* Add -
|
112 |
-
* Add -
|
113 |
-
*
|
114 |
-
* Fix - When checkout form produces an error on mobile, sometimes the blocking mask is not release blocking new input.
|
115 |
-
* Fix - On older subscription payments, the ending card number is not shown on the subscriptions table in my account.
|
116 |
-
* Fix - Filter to show payment request button on checkout page not working.
|
117 |
-
* Fix - WC session handling compatibility with WC 3.3.
|
118 |
-
* Fix - BW compatibility with WC 2.6.x on add_order_meta to prevent errors.
|
119 |
-
* Fix - Possible fix for duplicate charges due to webhook and redirect handler firing at the same time by adding delay to the webhook process.
|
120 |
-
* Tweak - In a subscription billing, Stripe source ID is no longer a required field.
|
121 |
-
* Tweak - On a subscription order renewal-- if source is empty, will now try to charge the default source.
|
122 |
-
* Notice - Bitcoin has been soft deprecated and Stripe will no longer support it on April 23, 2018. Please plan accordingly.
|
123 |
-
* Remove - Stripe Checkout Locale setting in favor of using store set locale.
|
124 |
-
* Update - Stripe API version to 2018-01-23.
|
125 |
|
126 |
[See changelog for all versions](https://raw.githubusercontent.com/woothemes/woocommerce-gateway-stripe/master/changelog.txt).
|
127 |
|
4 |
Requires at least: 4.4
|
5 |
Tested up to: 4.9
|
6 |
Requires PHP: 5.6
|
7 |
+
Stable tag: 4.0.5
|
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.0.5 - 2018-02-02 =
|
105 |
+
* Fix - Illegal offset error on settings when non is defined or saved.
|
106 |
+
* Fix - Wrong ID used for dispute webhook handler.
|
107 |
+
* Fix - A WC 2.6 backwards compat issue while trying to get order id in subscriptions.
|
108 |
+
* Fix - Processing SEPA can't find email when not logged in.
|
109 |
+
* Add - Allow restricted secret keys to be used.
|
110 |
+
* Add - Statement Descriptor to SEPA Direct Debit.
|
111 |
+
* Add - Idempotency failure retry with easing to prevent multirequest issue.
|
112 |
+
* Add - POT file.
|
113 |
+
* Tweak - Make billing name optional on pay for order page.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
|
115 |
[See changelog for all versions](https://raw.githubusercontent.com/woothemes/woocommerce-gateway-stripe/master/changelog.txt).
|
116 |
|
woocommerce-gateway-stripe.php
CHANGED
@@ -5,12 +5,13 @@
|
|
5 |
* Description: Take credit card payments on your store using Stripe.
|
6 |
* Author: WooCommerce
|
7 |
* Author URI: https://woocommerce.com/
|
8 |
-
* Version: 4.0.
|
9 |
* Requires at least: 4.4
|
10 |
* Tested up to: 4.9
|
11 |
* WC requires at least: 2.6
|
12 |
* WC tested up to: 3.3
|
13 |
* Text Domain: woocommerce-gateway-stripe
|
|
|
14 |
*
|
15 |
*/
|
16 |
|
@@ -22,7 +23,7 @@ if ( ! class_exists( 'WC_Stripe' ) ) :
|
|
22 |
/**
|
23 |
* Required minimums and constants
|
24 |
*/
|
25 |
-
define( 'WC_STRIPE_VERSION', '4.0.
|
26 |
define( 'WC_STRIPE_MIN_PHP_VER', '5.6.0' );
|
27 |
define( 'WC_STRIPE_MIN_WC_VER', '2.6.0' );
|
28 |
define( 'WC_STRIPE_MAIN_FILE', __FILE__ );
|
@@ -291,20 +292,22 @@ if ( ! class_exists( 'WC_Stripe' ) ) :
|
|
291 |
if ( $testmode ) {
|
292 |
if (
|
293 |
! empty( $test_pub_key ) && ! preg_match( '/^pk_test_/', $test_pub_key )
|
294 |
-
|| ! empty( $test_secret_key ) && ! preg_match( '/^sk_test_/', $test_secret_key )
|
|
|
295 |
{
|
296 |
$setting_link = $this->get_setting_link();
|
297 |
/* translators: 1) link */
|
298 |
-
$this->add_admin_notice( 'keys', 'notice notice-error', sprintf( __( 'Stripe is in test mode however your test keys may not be valid. Test keys start with pk_test and sk_test. Please go to your settings and, <a href="%s">set your Stripe account keys</a>.', 'woocommerce-gateway-stripe' ), $setting_link ), true );
|
299 |
}
|
300 |
} else {
|
301 |
if (
|
302 |
! empty( $live_pub_key ) && ! preg_match( '/^pk_live_/', $live_pub_key )
|
303 |
-
|| ! empty( $live_secret_key ) && ! preg_match( '/^sk_live_/', $live_secret_key )
|
|
|
304 |
{
|
305 |
$setting_link = $this->get_setting_link();
|
306 |
/* translators: 1) link */
|
307 |
-
$this->add_admin_notice( 'keys', 'notice notice-error', sprintf( __( 'Stripe is in live mode however your test keys may not be valid. Live keys start with pk_live and sk_live. Please go to your settings and, <a href="%s">set your Stripe account keys</a>.', 'woocommerce-gateway-stripe' ), $setting_link ), true );
|
308 |
}
|
309 |
}
|
310 |
}
|
5 |
* Description: Take credit card payments on your store using Stripe.
|
6 |
* Author: WooCommerce
|
7 |
* Author URI: https://woocommerce.com/
|
8 |
+
* Version: 4.0.5
|
9 |
* Requires at least: 4.4
|
10 |
* Tested up to: 4.9
|
11 |
* WC requires at least: 2.6
|
12 |
* WC tested up to: 3.3
|
13 |
* Text Domain: woocommerce-gateway-stripe
|
14 |
+
* Domain Path: /languages/
|
15 |
*
|
16 |
*/
|
17 |
|
23 |
/**
|
24 |
* Required minimums and constants
|
25 |
*/
|
26 |
+
define( 'WC_STRIPE_VERSION', '4.0.5' );
|
27 |
define( 'WC_STRIPE_MIN_PHP_VER', '5.6.0' );
|
28 |
define( 'WC_STRIPE_MIN_WC_VER', '2.6.0' );
|
29 |
define( 'WC_STRIPE_MAIN_FILE', __FILE__ );
|
292 |
if ( $testmode ) {
|
293 |
if (
|
294 |
! empty( $test_pub_key ) && ! preg_match( '/^pk_test_/', $test_pub_key )
|
295 |
+
|| ( ! empty( $test_secret_key ) && ! preg_match( '/^sk_test_/', $test_secret_key )
|
296 |
+
&& ! empty( $test_secret_key ) && ! preg_match( '/^rk_test_/', $test_secret_key ) ) )
|
297 |
{
|
298 |
$setting_link = $this->get_setting_link();
|
299 |
/* translators: 1) link */
|
300 |
+
$this->add_admin_notice( 'keys', 'notice notice-error', sprintf( __( '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>.', 'woocommerce-gateway-stripe' ), $setting_link ), true );
|
301 |
}
|
302 |
} else {
|
303 |
if (
|
304 |
! empty( $live_pub_key ) && ! preg_match( '/^pk_live_/', $live_pub_key )
|
305 |
+
|| ( ! empty( $live_secret_key ) && ! preg_match( '/^sk_live_/', $live_secret_key )
|
306 |
+
&& ! empty( $live_secret_key ) && ! preg_match( '/^rk_live_/', $live_secret_key ) ) )
|
307 |
{
|
308 |
$setting_link = $this->get_setting_link();
|
309 |
/* translators: 1) link */
|
310 |
+
$this->add_admin_notice( 'keys', 'notice notice-error', sprintf( __( '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>.', 'woocommerce-gateway-stripe' ), $setting_link ), true );
|
311 |
}
|
312 |
}
|
313 |
}
|