Version Description
- Feature - SEPA Direct Debit Gateway
- Feature - Pay by Invoice Gateway
- Fix - Trusted Shops Widget Fix
- Fix - Checkbox CSS Styling
Download this release
Release Info
Developer | vendidero |
Plugin | WooCommerce Germanized |
Version | 1.4.0 |
Comparing to | |
See all releases |
Code changes from version 1.3.7 to 1.4.0
- assets/css/woocommerce-gzd-activation.css +23 -0
- assets/css/woocommerce-gzd-activation.min.css +1 -1
- assets/css/woocommerce-gzd-admin.css +9 -0
- assets/css/woocommerce-gzd-admin.min.css +1 -1
- assets/css/woocommerce-gzd-layout.css +6 -0
- assets/css/woocommerce-gzd-layout.min.css +1 -1
- i18n/languages/woocommerce-germanized-de_DE.mo +0 -0
- i18n/languages/woocommerce-germanized-de_DE.po +357 -28
- includes/admin/class-wc-gzd-admin-welcome.php +125 -160
- includes/class-wc-gzd-ekomi.php +15 -13
- includes/class-wc-gzd-emails.php +1 -1
- includes/class-wc-gzd-hook-priorities.php +1 -0
- includes/emails/class-wc-gzd-email-customer-sepa-direct-debit-mandate.php +116 -0
- includes/gateways/direct-debit/assets/js/direct-debit.js +88 -0
- includes/gateways/direct-debit/assets/js/direct-debit.min.js +1 -0
- includes/gateways/direct-debit/assets/js/iban.js +420 -0
- includes/gateways/direct-debit/assets/js/iban.min.js +1 -0
- includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php +468 -0
- includes/gateways/invoice/class-wc-gzd-gateway-invoice.php +195 -0
- includes/libraries/iban/LICENSE +165 -0
- includes/libraries/iban/mistranscriptions.txt +49 -0
- includes/libraries/iban/oophp-iban.php +157 -0
- includes/libraries/iban/php-iban.php +486 -0
- includes/libraries/iban/registry.txt +81 -0
- includes/wc-gzd-template-functions.php +3 -3
- includes/widgets/class-wc-gzd-widget-trusted-shops-reviews.php +0 -2
- includes/widgets/class-wc-gzd-widget-trusted-shops-rich-snippets.php +0 -2
- readme.txt +18 -2
- templates/emails/customer-sepa-direct-debit-mandate.php +20 -0
- templates/myaccount/form-register-checkbox.php +1 -1
- woocommerce-germanized.php +25 -8
- wpml-config.xml +4 -0
assets/css/woocommerce-gzd-activation.css
CHANGED
@@ -1,3 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
.wc-gzd-logo {
|
2 |
display: inline-block !important;
|
3 |
text-indent: -9999px;
|
1 |
+
.wc-gzd-news .wc-feature {
|
2 |
+
|
3 |
+
}
|
4 |
+
|
5 |
+
.wc-gzd-news .wc-feature > div {
|
6 |
+
float: left;
|
7 |
+
margin-right: 0;
|
8 |
+
}
|
9 |
+
|
10 |
+
.wc-gzd-news .three-col > div {
|
11 |
+
width: 31%;
|
12 |
+
padding-right: 3%;
|
13 |
+
}
|
14 |
+
|
15 |
+
.wc-gzd-news .two-col > div {
|
16 |
+
width: 47.5%;
|
17 |
+
padding-right: 5%;
|
18 |
+
}
|
19 |
+
|
20 |
+
.wc-gzd-news .wc-feature > div.last-feature {
|
21 |
+
padding-right: 0;
|
22 |
+
}
|
23 |
+
|
24 |
.wc-gzd-logo {
|
25 |
display: inline-block !important;
|
26 |
text-indent: -9999px;
|
assets/css/woocommerce-gzd-activation.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.
|
1 |
+
.wc-gzd-news .wc-feature>div{margin-right:0;float:left}.wc-gzd-news .wc-feature>div.last-feature{padding-right:0}.wc-gzd-news .two-col>div{margin-right:0;width:45%;padding-right:5%}.wc-gzd-news .three-col>div{width:30%;padding-right:3%}.wc-gzd-logo{display:inline-block!important;text-indent:-9999px;width:298px;vertical-align:top;margin-top:2rem;height:89px;background:url(../images/wc-germanized.svg)no-repeat;background-size:298px auto}.about-text,.dashboard_page_wc-gzd-about .vendipro .left,.vendipro-buttons a,.vendipro-buttons p,.wc-gzd-fb,.wc-gzd-fb iframe,.wc-gzd-twitter{display:inline-block}.about-text{padding:0;max-width:50%;width:50%;margin:2rem 0 0 5%}.wc-gzd-twitter iframe{width:130px!important}.wc-gzd-fb iframe{position:relative;top:5px}.dashboard_page_wc-gzd-about h1{width:100%;margin-right:0}.dashboard_page_wc-gzd-about h3 .wc-gzd-pro{font-size:.7em;margin-left:1em}.dashboard_page_wc-gzd-about .wc-vendipro-features{margin-top:0;border:none;padding-bottom:15px}.dashboard_page_wc-gzd-about .wc-vendipro-features div h4{margin-top:.5em;font-size:1.1em;line-height:1.1em}.vendipro-buttons p{font-size:.8em;padding-top:3px;margin:0 0 0 5px}.dashboard_page_wc-gzd-about .changelog{margin-top:3em;border-top:1px solid #CCC;padding-top:0}.dashboard_page_wc-gzd-about .feature-section{border:none}.dashboard_page_wc-gzd-about .vendipro .left{width:40%;padding-right:2em;vertical-align:top}.dashboard_page_wc-gzd-about .vendipro .right{display:inline-block;vertical-align:top;width:50%}.dashboard_page_wc-gzd-about .vendipro .right p:first-child{margin-top:5px}.dashboard_page_wc-gzd-about .vendipro .left img{width:100%;border:1px solid #CCC;border-radius:3px}.woocommerce-gzd-message .button-primary,p.wc-gzd-actions a.button-primary{background-color:#262626!important;border:1px solid #000!important}.woocommerce-gzd-message .button-primary:hover,p.wc-gzd-actions a.button-primary:hover{background-color:#363636!important;border:1px solid #000!important}.woocommerce-gzd-message .form-table tr td,.woocommerce-gzd-message .form-table tr th{padding:.7rem 0;margin:0}.woocommerce-gzd-message a.wc-gzd-skip{opacity:.7}.woocommerce-gzd-message{border-left:4px solid #bb2525!important}
|
assets/css/woocommerce-gzd-admin.css
CHANGED
@@ -127,4 +127,13 @@ table.wc-gzd-tax-example tr th:first-child, table.wc-gzd-tax-example tr td:first
|
|
127 |
|
128 |
.wc-gzd-admin-settings tbody.ui-sortable tr:hover {
|
129 |
cursor: move;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
}
|
127 |
|
128 |
.wc-gzd-admin-settings tbody.ui-sortable tr:hover {
|
129 |
cursor: move;
|
130 |
+
}
|
131 |
+
|
132 |
+
#order_data .order_data_column ._direct_debit_holder_field, #order_data .order_data_column ._direct_debit_iban_field, #order_data .order_data_column ._direct_debit_bic_field, #order_data .order_data_column ._direct_debit_reference_field {
|
133 |
+
clear: left;
|
134 |
+
width: 100% !important;
|
135 |
+
}
|
136 |
+
|
137 |
+
#order_data .order_data_column ._direct_debit_holder_field input, #order_data .order_data_column ._direct_debit_iban_field input, #order_data .order_data_column ._direct_debit_bic_field input, #order_data .order_data_column ._direct_debit_reference_field input {
|
138 |
+
width: 100%;
|
139 |
}
|
assets/css/woocommerce-gzd-admin.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wc-gzd-pro:hover,.wc-gzd-pro:visited{color:#FFF}.wc-gzd-pro{font-style:normal;opacity:1!important}._unit_price_auto_field .wc-gzd-premium-desc,._unit_price_auto_field input,._unit_price_auto_field label{opacity:.6}.wc-gzd-admin-settings tbody.ui-sortable tr:hover{cursor:move}.wc-gzd-admin-settings,.wc-gzd-admin-settings-sidebar{display:inline-block;box-sizing:border-box;vertical-align:top}.wc-gzd-button,.wc-gzd-button:hover{box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15)!important}table.data_table tr td p.form-field{margin:0!important;padding:0!important}.variable_cart_mini_desc .wp-editor-tools{margin-top:-3em}.variable_cart_mini_desc_pre .wp-editor-tools{margin-top:-2em}.wc-gzd-admin-settings{width:70%;border-right:1px solid #CCC;padding-right:2%}.wc-gzd-admin-settings-sidebar{padding-left:2%;margin-left:-4px;width:30%}.wc-gzd-admin-settings-agbs,.wc-gzd-admin-settings-sidebar img,.wc-gzd-admin-settings-widerruf{width:100%}.wc-gzd-admin-settings-sidebar .browser{border:1px solid #CCC;border-radius:3px}.wc-gzd-admin-settings-sidebar .small{font-size:.9em;display:block;margin-top:.5em}._billing_address_1_field,._billing_title_field,._shipping_address_1_field,._shipping_title_field{width:100%!important}.wc-gzd-button{background-color:#7b9f35!important;border:1px solid #557020!important}.wc-gzd-button:hover{background-color:#73982a!important;border:1px solid #557020!important}.wc-gzd-button-wrapper .button{margin-right:1em}.wc-gzd-premium-section-tab,.wc-gzd-pro{font-size:9px;background:#0074a2;border-radius:3px;line-height:9px;color:#FFF;text-align:center;text-transform:uppercase;padding:1px 3px;position:relative;top:-1px}.wc-gzd-pro{background:#222;text-decoration:none}.subsubsub li a:hover .wc-gzd-premium-section-tab{background:#2ea2cc}.subsubsub li a.current .wc-gzd-premium-section-tab{background:#222}.forminp-image img,.wc-gzd-premium img{width:100%;height:auto;opacity:.5}table.wc-gzd-tax-example tr td,table.wc-gzd-tax-example tr th{padding:5px;font-size:.9em}table.wc-gzd-tax-example tr td:first-child,table.wc-gzd-tax-example tr th:first-child{padding-left:0}
|
1 |
+
#order_data .order_data_column ._direct_debit_bic_field,#order_data .order_data_column ._direct_debit_holder_field,#order_data .order_data_column ._direct_debit_iban_field,#order_data .order_data_column ._direct_debit_reference_field{clear:left;width:100%!important}#order_data .order_data_column ._direct_debit_bic_field input,#order_data .order_data_column ._direct_debit_holder_field input,#order_data .order_data_column ._direct_debit_iban_field input,#order_data .order_data_column ._direct_debit_reference_field input{width:100%}.wc-gzd-pro:hover,.wc-gzd-pro:visited{color:#FFF}.wc-gzd-pro{font-style:normal;opacity:1!important}._unit_price_auto_field .wc-gzd-premium-desc,._unit_price_auto_field input,._unit_price_auto_field label{opacity:.6}.wc-gzd-admin-settings tbody.ui-sortable tr:hover{cursor:move}.wc-gzd-admin-settings,.wc-gzd-admin-settings-sidebar{display:inline-block;box-sizing:border-box;vertical-align:top}.wc-gzd-button,.wc-gzd-button:hover{box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15)!important}table.data_table tr td p.form-field{margin:0!important;padding:0!important}.variable_cart_mini_desc .wp-editor-tools{margin-top:-3em}.variable_cart_mini_desc_pre .wp-editor-tools{margin-top:-2em}.wc-gzd-admin-settings{width:70%;border-right:1px solid #CCC;padding-right:2%}.wc-gzd-admin-settings-sidebar{padding-left:2%;margin-left:-4px;width:30%}.wc-gzd-admin-settings-agbs,.wc-gzd-admin-settings-sidebar img,.wc-gzd-admin-settings-widerruf{width:100%}.wc-gzd-admin-settings-sidebar .browser{border:1px solid #CCC;border-radius:3px}.wc-gzd-admin-settings-sidebar .small{font-size:.9em;display:block;margin-top:.5em}._billing_address_1_field,._billing_title_field,._shipping_address_1_field,._shipping_title_field{width:100%!important}.wc-gzd-button{background-color:#7b9f35!important;border:1px solid #557020!important}.wc-gzd-button:hover{background-color:#73982a!important;border:1px solid #557020!important}.wc-gzd-button-wrapper .button{margin-right:1em}.wc-gzd-premium-section-tab,.wc-gzd-pro{font-size:9px;background:#0074a2;border-radius:3px;line-height:9px;color:#FFF;text-align:center;text-transform:uppercase;padding:1px 3px;position:relative;top:-1px}.wc-gzd-pro{background:#222;text-decoration:none}.subsubsub li a:hover .wc-gzd-premium-section-tab{background:#2ea2cc}.subsubsub li a.current .wc-gzd-premium-section-tab{background:#222}.forminp-image img,.wc-gzd-premium img{width:100%;height:auto;opacity:.5}table.wc-gzd-tax-example tr td,table.wc-gzd-tax-example tr th{padding:5px;font-size:.9em}table.wc-gzd-tax-example tr td:first-child,table.wc-gzd-tax-example tr th:first-child{padding-left:0}
|
assets/css/woocommerce-gzd-layout.css
CHANGED
@@ -40,9 +40,15 @@
|
|
40 |
.entry-content .woocommerce .place-order .form-row, .entry-content .woocommerce .place-order .form-row input[type="checkbox"] {
|
41 |
padding: 0;
|
42 |
}
|
|
|
|
|
|
|
43 |
.woocommerce-checkout p.terms {
|
44 |
text-align: left;
|
45 |
}
|
|
|
|
|
|
|
46 |
.unit-price-cart {
|
47 |
font-size: 0.9em;
|
48 |
display: block;
|
40 |
.entry-content .woocommerce .place-order .form-row, .entry-content .woocommerce .place-order .form-row input[type="checkbox"] {
|
41 |
padding: 0;
|
42 |
}
|
43 |
+
.legal label input[type=checkbox] {
|
44 |
+
vertical-align: middle;
|
45 |
+
}
|
46 |
.woocommerce-checkout p.terms {
|
47 |
text-align: left;
|
48 |
}
|
49 |
+
.woocommerce-checkout p.direct-debit-checkbox {
|
50 |
+
display: none;
|
51 |
+
}
|
52 |
.unit-price-cart {
|
53 |
font-size: 0.9em;
|
54 |
display: block;
|
assets/css/woocommerce-gzd-layout.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.entry-content .woocommerce .place-order .form-row,.entry-content .woocommerce .place-order .form-row input[type=checkbox]{padding:0}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.trusted-shops-badge{background:url(../images/trusted-shops-badge@2x.png)no-repeat;background-size:100px 100px}.trusted-shops-badge-smaller{background-size:75px 75px}}.cart_totals .wc-gzd-additional-wrapper,.entry-content .woocommerce .checkout-btn-wrap,.shop_table .product-name-inner tr td:last-child{text-align:right}.woocommerce-checkout .shop_table{background-color:#EEE}.includes_tax{display:none!important}#order_review_heading{display:none}.woocommerce-checkout .shop_table tr td p{margin-bottom:0}.woocommerce-checkout .shop_table td,.woocommerce-checkout .shop_table th{line-height:1.5}.shop_table .product-name-inner,.shop_table .product-name-inner tr td{border:none;padding:0;margin:0}.cart_totals p.wc-gzd-additional-info{font-size:.8em;width:60%;border-top:1px solid #CCC;padding-top:.5rem;display:inline-block}.entry-content .woocommerce #payment{margin-bottom:1em}.entry-content .woocommerce .place-order .form-row,.entry-content .woocommerce .place-order .form-row input[type=checkbox]{padding:0}.woocommerce-checkout p.terms{text-align:left}.unit-price-cart{font-size:.9em;display:block;margin-top:5px}.products .wc-gzd-additional-info{font-size:.8em;margin:.7rem 0;padding:0}.products .product .price-unit{font-size:.8em}.wc-gzd-item-desc p,p.footer-info{font-size:.9em}.product p.wc-gzd-additional-info{margin-bottom:.5rem;font-size:.9em}.product .product_meta{margin-top:1rem}p.footer-info{text-align:center;padding-bottom:.5rem}.trusted-shops-badge{width:100px;height:100px;display:inline-block;background:url(../images/trusted-shops-badge.png)no-repeat}.wc-gzd-edit-data-notice{background:#EEE;display:inline-block;padding:1em}.wc-gzd-edit-data-notice p.wc-gzd-info{margin:0;padding:0}table.product-details-inner{table-layout:fixed;margin:0;padding:0}table.product-details-inner,table.product-details-inner td,table.product-details-inner tr{padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border:none;background:0 0}table.product-details-inner tr td:last-child{text-align:right}.wc-gzd-trusted-shops-rating-widget{line-height:1.5rem}.wc-gzd-trusted-shops-rating-widget .star-rating{display:inline-block;float:none;margin-left:.5rem}.wc-gzd-product-name-left,.wc-gzd-product-name-right{float:left}.wc-gzd-product-name-left{max-width:15%;margin-right:1em}#eKomiSeal_default img{width:100%!important;height:100%!important}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.trusted-shops-badge{background:url(../images/trusted-shops-badge@2x.png)no-repeat;background-size:100px 100px}.trusted-shops-badge-smaller{background-size:75px 75px}}
|
1 |
+
.entry-content .woocommerce .place-order .form-row,.entry-content .woocommerce .place-order .form-row input[type=checkbox]{padding:0}.woocommerce-checkout p.direct-debit-checkbox{display:none}.legal label input[type=checkbox]{vertical-align:middle}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.trusted-shops-badge{background:url(../images/trusted-shops-badge@2x.png)no-repeat;background-size:100px 100px}.trusted-shops-badge-smaller{background-size:75px 75px}}.cart_totals .wc-gzd-additional-wrapper,.entry-content .woocommerce .checkout-btn-wrap,.shop_table .product-name-inner tr td:last-child{text-align:right}.woocommerce-checkout .shop_table{background-color:#EEE}.includes_tax{display:none!important}#order_review_heading{display:none}.woocommerce-checkout .shop_table tr td p{margin-bottom:0}.woocommerce-checkout .shop_table td,.woocommerce-checkout .shop_table th{line-height:1.5}.shop_table .product-name-inner,.shop_table .product-name-inner tr td{border:none;padding:0;margin:0}.cart_totals p.wc-gzd-additional-info{font-size:.8em;width:60%;border-top:1px solid #CCC;padding-top:.5rem;display:inline-block}.entry-content .woocommerce #payment{margin-bottom:1em}.entry-content .woocommerce .place-order .form-row,.entry-content .woocommerce .place-order .form-row input[type=checkbox]{padding:0}.woocommerce-checkout p.terms{text-align:left}.unit-price-cart{font-size:.9em;display:block;margin-top:5px}.products .wc-gzd-additional-info{font-size:.8em;margin:.7rem 0;padding:0}.products .product .price-unit{font-size:.8em}.wc-gzd-item-desc p,p.footer-info{font-size:.9em}.product p.wc-gzd-additional-info{margin-bottom:.5rem;font-size:.9em}.product .product_meta{margin-top:1rem}p.footer-info{text-align:center;padding-bottom:.5rem}.trusted-shops-badge{width:100px;height:100px;display:inline-block;background:url(../images/trusted-shops-badge.png)no-repeat}.wc-gzd-edit-data-notice{background:#EEE;display:inline-block;padding:1em}.wc-gzd-edit-data-notice p.wc-gzd-info{margin:0;padding:0}table.product-details-inner{table-layout:fixed;margin:0;padding:0}table.product-details-inner,table.product-details-inner td,table.product-details-inner tr{padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border:none;background:0 0}table.product-details-inner tr td:last-child{text-align:right}.wc-gzd-trusted-shops-rating-widget{line-height:1.5rem}.wc-gzd-trusted-shops-rating-widget .star-rating{display:inline-block;float:none;margin-left:.5rem}.wc-gzd-product-name-left,.wc-gzd-product-name-right{float:left}.wc-gzd-product-name-left{max-width:15%;margin-right:1em}#eKomiSeal_default img{width:100%!important;height:100%!important}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.trusted-shops-badge{background:url(../images/trusted-shops-badge@2x.png)no-repeat;background-size:100px 100px}.trusted-shops-badge-smaller{background-size:75px 75px}}
|
i18n/languages/woocommerce-germanized-de_DE.mo
CHANGED
Binary file
|
i18n/languages/woocommerce-germanized-de_DE.po
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
-
"Project-Id-Version: WooCommerce Germanized v1.
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
"POT-Creation-Date: 2014-09-29 12:26+0100\n"
|
6 |
-
"PO-Revision-Date: 2015-08-
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -85,7 +85,7 @@ msgstr "Über WooCommerce Germanized"
|
|
85 |
msgid "Welcome to WooCommerce Germanized"
|
86 |
msgstr "Willkommen bei WooCommerce Germanized"
|
87 |
|
88 |
-
#: includes/admin/class-wc-gzd-admin-welcome.php:
|
89 |
#@ woocommerce-germanized
|
90 |
msgid "Go to WooCommerce Germanized Settings"
|
91 |
msgstr "zu den WooCommerce Germanized Einstellungen"
|
@@ -209,7 +209,7 @@ msgctxt "trusted-shops"
|
|
209 |
msgid "Trusted Shops Options"
|
210 |
msgstr "Trusted Shops"
|
211 |
|
212 |
-
#: includes/class-wc-gzd-ekomi.php:
|
213 |
#@ woocommerce-germanized
|
214 |
msgctxt "ekomi"
|
215 |
msgid "eKomi Options"
|
@@ -613,6 +613,8 @@ msgstr "Vielen Dank. Wir haben Ihre Widerruf erhalten. Sie bekommen in Kürze ei
|
|
613 |
|
614 |
#: includes/class-wc-gzd-checkout.php:148
|
615 |
#: includes/class-wc-gzd-checkout.php:159
|
|
|
|
|
616 |
#: includes/widgets/class-wc-gzd-widget-trusted-shops-reviews.php:26
|
617 |
#: includes/widgets/class-wc-gzd-widget-trusted-shops-rich-snippets.php:26
|
618 |
#@ woocommerce-germanized
|
@@ -632,84 +634,84 @@ msgstr "Herr"
|
|
632 |
msgid "Madam"
|
633 |
msgstr "Frau"
|
634 |
|
635 |
-
#: includes/class-wc-gzd-ekomi.php:
|
636 |
#@ woocommerce-germanized
|
637 |
msgid "eKomi Customer"
|
638 |
msgstr "eKomi Kundenbewertung"
|
639 |
|
640 |
-
#: includes/class-wc-gzd-ekomi.php:
|
641 |
#@ woocommerce-germanized
|
642 |
msgctxt "ekomi"
|
643 |
msgid "Ekomi Integration"
|
644 |
msgstr "eKomi Integration"
|
645 |
|
646 |
-
#: includes/class-wc-gzd-ekomi.php:
|
647 |
#@ woocommerce-germanized
|
648 |
msgctxt "ekomi"
|
649 |
msgid "Shop ID"
|
650 |
msgstr "Shop ID"
|
651 |
|
652 |
-
#: includes/class-wc-gzd-ekomi.php:
|
653 |
#@ woocommerce-germanized
|
654 |
msgctxt "ekomi"
|
655 |
msgid "Insert your Shop ID here."
|
656 |
msgstr "Fügen Sie hier ihre Shop ID ein."
|
657 |
|
658 |
-
#: includes/class-wc-gzd-ekomi.php:
|
659 |
#@ woocommerce-germanized
|
660 |
msgctxt "ekomi"
|
661 |
msgid "Link to Certificate"
|
662 |
msgstr "Link zum Shop-Zertifikat"
|
663 |
|
664 |
-
#: includes/class-wc-gzd-ekomi.php:
|
665 |
#@ woocommerce-germanized
|
666 |
msgctxt "ekomi"
|
667 |
msgid "Insert the link to your Certificate"
|
668 |
msgstr "Fügen Sie hier den Link zu Ihrem Shop-Zertifikat ein"
|
669 |
|
670 |
-
#: includes/class-wc-gzd-ekomi.php:
|
671 |
#@ woocommerce-germanized
|
672 |
msgctxt "ekomi"
|
673 |
msgid "Partner ID"
|
674 |
msgstr "Partner ID"
|
675 |
|
676 |
-
#: includes/class-wc-gzd-ekomi.php:
|
677 |
#@ woocommerce-germanized
|
678 |
msgctxt "ekomi"
|
679 |
msgid "Insert your Partner ID here (you may find that ID on your certificate website)"
|
680 |
msgstr "Fügen Sie hier Ihre Partner ID ein (diese ID finden Sie z.B. auf Ihrer Zertifikat-Seite)"
|
681 |
|
682 |
-
#: includes/class-wc-gzd-ekomi.php:
|
683 |
#@ woocommerce-germanized
|
684 |
msgctxt "ekomi"
|
685 |
msgid "Interface ID"
|
686 |
msgstr "Interface ID"
|
687 |
|
688 |
-
#: includes/class-wc-gzd-ekomi.php:
|
689 |
#@ woocommerce-germanized
|
690 |
msgctxt "ekomi"
|
691 |
msgid "Insert your Interface ID here."
|
692 |
msgstr "Fügen Sie hier Ihre Interface ID ein (diese Daten finden Sie im eKomi Kundenbereich)"
|
693 |
|
694 |
-
#: includes/class-wc-gzd-ekomi.php:
|
695 |
#@ woocommerce-germanized
|
696 |
msgctxt "ekomi"
|
697 |
msgid "Interface Password"
|
698 |
msgstr "Interface Password"
|
699 |
|
700 |
-
#: includes/class-wc-gzd-ekomi.php:
|
701 |
#@ woocommerce-germanized
|
702 |
msgctxt "ekomi"
|
703 |
msgid "Insert your Interface Password here."
|
704 |
msgstr "Fügen Sie hier Ihr Interface Passwort ein (diese Daten finden Sie im eKomi Kundenbereich)"
|
705 |
|
706 |
-
#: includes/class-wc-gzd-ekomi.php:
|
707 |
#@ woocommerce-germanized
|
708 |
msgctxt "ekomi"
|
709 |
msgid "Days until Email"
|
710 |
msgstr "Tage bis E-Mail Erinnerung"
|
711 |
|
712 |
-
#: includes/class-wc-gzd-ekomi.php:
|
713 |
#@ woocommerce-germanized
|
714 |
msgctxt "ekomi"
|
715 |
msgid "Number of days between an order being marked as completed and review email to customer."
|
@@ -1079,7 +1081,7 @@ msgstr "Zahlungsgebühr"
|
|
1079 |
|
1080 |
#: includes/abstracts/abstract-wc-gzd-product.php:129
|
1081 |
#: includes/wc-gzd-cart-functions.php:159
|
1082 |
-
#: woocommerce-germanized.php:
|
1083 |
#, php-format
|
1084 |
#@ woocommerce-germanized
|
1085 |
msgid "incl. %s%% VAT"
|
@@ -1102,7 +1104,7 @@ msgstr "Zahlungsart auswählen"
|
|
1102 |
msgid "I want immediate access to the digital content and I acknowledge that thereby I lose my right to cancel once the service has begun."
|
1103 |
msgstr "Ja, ich möchte sofort Zugang zu dem digitalen Inhalt und weiß, dass mein Widerrufsrecht mit dem Zugang erlischt."
|
1104 |
|
1105 |
-
#: includes/wc-gzd-template-functions.php:
|
1106 |
#@ woocommerce-germanized
|
1107 |
msgid "To get immediate access to digital content you have to agree to the losal of your right to cancel."
|
1108 |
msgstr "Um direkten Zugang zu den digitalen Inhalte zu erhalten, müssen Sie auf das Widerrufsrecht verzichten."
|
@@ -1172,7 +1174,7 @@ msgstr "Gesamtsumme aktualisieren"
|
|
1172 |
msgid "I’ve read and accept the <a href=\"%s\" target=\"_blank\">terms & conditions</a>"
|
1173 |
msgstr "Ich habe die <a href=\"%s\" target=\"_blank\">Allgemeinen Geschäftsbedingungen</a> gelesen und akzeptiert."
|
1174 |
|
1175 |
-
#: includes/wc-gzd-template-functions.php:
|
1176 |
#: templates/checkout/order-submit.php:25
|
1177 |
#: templates/checkout/review-order-2-2.php:175
|
1178 |
#@ woocommerce
|
@@ -1262,7 +1264,8 @@ msgstr "Widerruf erklären"
|
|
1262 |
msgid "VAT free based on §19 UStG"
|
1263 |
msgstr "Kein Mehrwertsteuerausweis, da Kleinunternehmer nach §19 (1) UStG."
|
1264 |
|
1265 |
-
#:
|
|
|
1266 |
#@ woocommerce
|
1267 |
msgid "Settings"
|
1268 |
msgstr "Einstellungen"
|
@@ -1636,7 +1639,7 @@ msgstr "Versandkosten-Hinweis auch für virtuelle Produkte aktivieren?"
|
|
1636 |
|
1637 |
#: includes/abstracts/abstract-wc-gzd-product.php:127
|
1638 |
#: includes/wc-gzd-cart-functions.php:159
|
1639 |
-
#: woocommerce-germanized.php:
|
1640 |
#@ woocommerce-germanized
|
1641 |
msgid "incl. VAT"
|
1642 |
msgstr "inkl. MwSt."
|
@@ -1965,12 +1968,12 @@ msgstr "Wenn Sie bei %s kein Benutzerkonto eröffnet haben, ignorieren Sie diese
|
|
1965 |
msgid "If you cannot follow the link above please copy this url and paste it to your browser bar: %s"
|
1966 |
msgstr "Falls Sie dem Link nicht folgen können, kopieren Sie bitte folgende URL in die Adresszeile Ihres Browsers: %s"
|
1967 |
|
1968 |
-
#: woocommerce-germanized.php:
|
1969 |
#@ woocommerce-germanized
|
1970 |
msgid "Thank you. You have successfully activated your account."
|
1971 |
msgstr "Vielen Dank. Ihr Benutzerkonto wurde erfolgreich aktiviert."
|
1972 |
|
1973 |
-
#: woocommerce-germanized.php:
|
1974 |
#@ woocommerce-germanized
|
1975 |
msgid "Sorry, but this activation code cannot be found."
|
1976 |
msgstr "Sorry, dieser Aktivierungscode ist uns leider nicht bekannt."
|
@@ -2076,6 +2079,7 @@ msgid "Enjoy even more professional features such as invoices, legal text genera
|
|
2076 |
msgstr "Als Nutzer der Pro Version erhältst du viele produktive weiterführende Features wie z.B. PDF-Rechnungen & Lieferscheine, eine Schnittstelle zum Generator für Mustertexte, die Möglichkeit Bestellungen vor Annahme des Vertrages zu prüfen, eine optionale mehrstufige Kasse, die Überprüfung von USt.-IDs und natürlich professionellen Support!"
|
2077 |
|
2078 |
#: includes/admin/views/html-settings-pro.php:25
|
|
|
2079 |
#@ woocommerce-germanized
|
2080 |
msgid "Upgrade now"
|
2081 |
msgstr "jetzt upgraden"
|
@@ -2301,6 +2305,7 @@ msgid "Learn more about Pro Version"
|
|
2301 |
msgstr "Mehr über die Pro Version erfahren"
|
2302 |
|
2303 |
#: includes/admin/settings/class-wc-gzd-settings-germanized.php:349
|
|
|
2304 |
#@ woocommerce-germanized
|
2305 |
msgid "Checkbox"
|
2306 |
msgstr "Checkbox"
|
@@ -2355,7 +2360,7 @@ msgstr "Füge einen jetzt bezahlen - Button zur E-Mail und der Bestätigungs-Sei
|
|
2355 |
msgid "Add a pay now button to order confirmation email and order success page if the order awaits payment (PayPal etc)."
|
2356 |
msgstr "Füge einen jetzt bezahlen - Button zur Bestellbestätigungs-Email sowie zur Bestätigungs-Seite hinzu insofern die Bestellung eine automatisierte Zahlung benötigt (z.B. per PayPal)."
|
2357 |
|
2358 |
-
#: includes/wc-gzd-template-functions.php:
|
2359 |
#@ woocommerce-germanized
|
2360 |
msgid "Please accept the creation of a new customer account"
|
2361 |
msgstr "Bitte akzeptieren Sie die Erstellung eines neuen Kundenkontos"
|
@@ -2548,9 +2553,333 @@ msgstr "Überschreiben relevanter Templates im Checkout durch dein Theme verhind
|
|
2548 |
msgid "If you are facing problems within your checkout e.g. legally relevant data is not showing (terms, delivery time, unit price etc.) your theme seems to be incompatible (not using default WooCommerce hooks and filters). As a workaround you may use this fallback which ensures default review-order.php and form-checkout.php is used."
|
2549 |
msgstr "Wenn du Probleme während des Checkouts hast (Inhalte werden falsch, nicht oder doppelt dargestellt), dann könntest du als Workaround diese Option aktivieren. Diese Option hindert dein Theme relevante Templates für den Checkout (review-order.php und form-checkout.php) zu überschreiben. "
|
2550 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2551 |
#. translators: plugin header field 'Version'
|
2552 |
#: woocommerce-germanized.php:0
|
2553 |
#@ woocommerce-germanized
|
2554 |
-
msgid "1.
|
2555 |
-
msgstr "1.
|
2556 |
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
+
"Project-Id-Version: WooCommerce Germanized v1.4.0\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
"POT-Creation-Date: 2014-09-29 12:26+0100\n"
|
6 |
+
"PO-Revision-Date: 2015-08-25 11:42:43+0000\n"
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
85 |
msgid "Welcome to WooCommerce Germanized"
|
86 |
msgstr "Willkommen bei WooCommerce Germanized"
|
87 |
|
88 |
+
#: includes/admin/class-wc-gzd-admin-welcome.php:267
|
89 |
#@ woocommerce-germanized
|
90 |
msgid "Go to WooCommerce Germanized Settings"
|
91 |
msgstr "zu den WooCommerce Germanized Einstellungen"
|
209 |
msgid "Trusted Shops Options"
|
210 |
msgstr "Trusted Shops"
|
211 |
|
212 |
+
#: includes/class-wc-gzd-ekomi.php:378
|
213 |
#@ woocommerce-germanized
|
214 |
msgctxt "ekomi"
|
215 |
msgid "eKomi Options"
|
613 |
|
614 |
#: includes/class-wc-gzd-checkout.php:148
|
615 |
#: includes/class-wc-gzd-checkout.php:159
|
616 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:252
|
617 |
+
#: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:85
|
618 |
#: includes/widgets/class-wc-gzd-widget-trusted-shops-reviews.php:26
|
619 |
#: includes/widgets/class-wc-gzd-widget-trusted-shops-rich-snippets.php:26
|
620 |
#@ woocommerce-germanized
|
634 |
msgid "Madam"
|
635 |
msgstr "Frau"
|
636 |
|
637 |
+
#: includes/class-wc-gzd-ekomi.php:49
|
638 |
#@ woocommerce-germanized
|
639 |
msgid "eKomi Customer"
|
640 |
msgstr "eKomi Kundenbewertung"
|
641 |
|
642 |
+
#: includes/class-wc-gzd-ekomi.php:314
|
643 |
#@ woocommerce-germanized
|
644 |
msgctxt "ekomi"
|
645 |
msgid "Ekomi Integration"
|
646 |
msgstr "eKomi Integration"
|
647 |
|
648 |
+
#: includes/class-wc-gzd-ekomi.php:317
|
649 |
#@ woocommerce-germanized
|
650 |
msgctxt "ekomi"
|
651 |
msgid "Shop ID"
|
652 |
msgstr "Shop ID"
|
653 |
|
654 |
+
#: includes/class-wc-gzd-ekomi.php:318
|
655 |
#@ woocommerce-germanized
|
656 |
msgctxt "ekomi"
|
657 |
msgid "Insert your Shop ID here."
|
658 |
msgstr "Fügen Sie hier ihre Shop ID ein."
|
659 |
|
660 |
+
#: includes/class-wc-gzd-ekomi.php:326
|
661 |
#@ woocommerce-germanized
|
662 |
msgctxt "ekomi"
|
663 |
msgid "Link to Certificate"
|
664 |
msgstr "Link zum Shop-Zertifikat"
|
665 |
|
666 |
+
#: includes/class-wc-gzd-ekomi.php:327
|
667 |
#@ woocommerce-germanized
|
668 |
msgctxt "ekomi"
|
669 |
msgid "Insert the link to your Certificate"
|
670 |
msgstr "Fügen Sie hier den Link zu Ihrem Shop-Zertifikat ein"
|
671 |
|
672 |
+
#: includes/class-wc-gzd-ekomi.php:335
|
673 |
#@ woocommerce-germanized
|
674 |
msgctxt "ekomi"
|
675 |
msgid "Partner ID"
|
676 |
msgstr "Partner ID"
|
677 |
|
678 |
+
#: includes/class-wc-gzd-ekomi.php:336
|
679 |
#@ woocommerce-germanized
|
680 |
msgctxt "ekomi"
|
681 |
msgid "Insert your Partner ID here (you may find that ID on your certificate website)"
|
682 |
msgstr "Fügen Sie hier Ihre Partner ID ein (diese ID finden Sie z.B. auf Ihrer Zertifikat-Seite)"
|
683 |
|
684 |
+
#: includes/class-wc-gzd-ekomi.php:344
|
685 |
#@ woocommerce-germanized
|
686 |
msgctxt "ekomi"
|
687 |
msgid "Interface ID"
|
688 |
msgstr "Interface ID"
|
689 |
|
690 |
+
#: includes/class-wc-gzd-ekomi.php:345
|
691 |
#@ woocommerce-germanized
|
692 |
msgctxt "ekomi"
|
693 |
msgid "Insert your Interface ID here."
|
694 |
msgstr "Fügen Sie hier Ihre Interface ID ein (diese Daten finden Sie im eKomi Kundenbereich)"
|
695 |
|
696 |
+
#: includes/class-wc-gzd-ekomi.php:353
|
697 |
#@ woocommerce-germanized
|
698 |
msgctxt "ekomi"
|
699 |
msgid "Interface Password"
|
700 |
msgstr "Interface Password"
|
701 |
|
702 |
+
#: includes/class-wc-gzd-ekomi.php:354
|
703 |
#@ woocommerce-germanized
|
704 |
msgctxt "ekomi"
|
705 |
msgid "Insert your Interface Password here."
|
706 |
msgstr "Fügen Sie hier Ihr Interface Passwort ein (diese Daten finden Sie im eKomi Kundenbereich)"
|
707 |
|
708 |
+
#: includes/class-wc-gzd-ekomi.php:362
|
709 |
#@ woocommerce-germanized
|
710 |
msgctxt "ekomi"
|
711 |
msgid "Days until Email"
|
712 |
msgstr "Tage bis E-Mail Erinnerung"
|
713 |
|
714 |
+
#: includes/class-wc-gzd-ekomi.php:363
|
715 |
#@ woocommerce-germanized
|
716 |
msgctxt "ekomi"
|
717 |
msgid "Number of days between an order being marked as completed and review email to customer."
|
1081 |
|
1082 |
#: includes/abstracts/abstract-wc-gzd-product.php:129
|
1083 |
#: includes/wc-gzd-cart-functions.php:159
|
1084 |
+
#: woocommerce-germanized.php:871
|
1085 |
#, php-format
|
1086 |
#@ woocommerce-germanized
|
1087 |
msgid "incl. %s%% VAT"
|
1104 |
msgid "I want immediate access to the digital content and I acknowledge that thereby I lose my right to cancel once the service has begun."
|
1105 |
msgstr "Ja, ich möchte sofort Zugang zu dem digitalen Inhalt und weiß, dass mein Widerrufsrecht mit dem Zugang erlischt."
|
1106 |
|
1107 |
+
#: includes/wc-gzd-template-functions.php:217
|
1108 |
#@ woocommerce-germanized
|
1109 |
msgid "To get immediate access to digital content you have to agree to the losal of your right to cancel."
|
1110 |
msgstr "Um direkten Zugang zu den digitalen Inhalte zu erhalten, müssen Sie auf das Widerrufsrecht verzichten."
|
1174 |
msgid "I’ve read and accept the <a href=\"%s\" target=\"_blank\">terms & conditions</a>"
|
1175 |
msgstr "Ich habe die <a href=\"%s\" target=\"_blank\">Allgemeinen Geschäftsbedingungen</a> gelesen und akzeptiert."
|
1176 |
|
1177 |
+
#: includes/wc-gzd-template-functions.php:353
|
1178 |
#: templates/checkout/order-submit.php:25
|
1179 |
#: templates/checkout/review-order-2-2.php:175
|
1180 |
#@ woocommerce
|
1264 |
msgid "VAT free based on §19 UStG"
|
1265 |
msgstr "Kein Mehrwertsteuerausweis, da Kleinunternehmer nach §19 (1) UStG."
|
1266 |
|
1267 |
+
#: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:50
|
1268 |
+
#: woocommerce-germanized.php:610
|
1269 |
#@ woocommerce
|
1270 |
msgid "Settings"
|
1271 |
msgstr "Einstellungen"
|
1639 |
|
1640 |
#: includes/abstracts/abstract-wc-gzd-product.php:127
|
1641 |
#: includes/wc-gzd-cart-functions.php:159
|
1642 |
+
#: woocommerce-germanized.php:871
|
1643 |
#@ woocommerce-germanized
|
1644 |
msgid "incl. VAT"
|
1645 |
msgstr "inkl. MwSt."
|
1968 |
msgid "If you cannot follow the link above please copy this url and paste it to your browser bar: %s"
|
1969 |
msgstr "Falls Sie dem Link nicht folgen können, kopieren Sie bitte folgende URL in die Adresszeile Ihres Browsers: %s"
|
1970 |
|
1971 |
+
#: woocommerce-germanized.php:775
|
1972 |
#@ woocommerce-germanized
|
1973 |
msgid "Thank you. You have successfully activated your account."
|
1974 |
msgstr "Vielen Dank. Ihr Benutzerkonto wurde erfolgreich aktiviert."
|
1975 |
|
1976 |
+
#: woocommerce-germanized.php:779
|
1977 |
#@ woocommerce-germanized
|
1978 |
msgid "Sorry, but this activation code cannot be found."
|
1979 |
msgstr "Sorry, dieser Aktivierungscode ist uns leider nicht bekannt."
|
2079 |
msgstr "Als Nutzer der Pro Version erhältst du viele produktive weiterführende Features wie z.B. PDF-Rechnungen & Lieferscheine, eine Schnittstelle zum Generator für Mustertexte, die Möglichkeit Bestellungen vor Annahme des Vertrages zu prüfen, eine optionale mehrstufige Kasse, die Überprüfung von USt.-IDs und natürlich professionellen Support!"
|
2080 |
|
2081 |
#: includes/admin/views/html-settings-pro.php:25
|
2082 |
+
#: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:60
|
2083 |
#@ woocommerce-germanized
|
2084 |
msgid "Upgrade now"
|
2085 |
msgstr "jetzt upgraden"
|
2305 |
msgstr "Mehr über die Pro Version erfahren"
|
2306 |
|
2307 |
#: includes/admin/settings/class-wc-gzd-settings-germanized.php:349
|
2308 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:295
|
2309 |
#@ woocommerce-germanized
|
2310 |
msgid "Checkbox"
|
2311 |
msgstr "Checkbox"
|
2360 |
msgid "Add a pay now button to order confirmation email and order success page if the order awaits payment (PayPal etc)."
|
2361 |
msgstr "Füge einen jetzt bezahlen - Button zur Bestellbestätigungs-Email sowie zur Bestätigungs-Seite hinzu insofern die Bestellung eine automatisierte Zahlung benötigt (z.B. per PayPal)."
|
2362 |
|
2363 |
+
#: includes/wc-gzd-template-functions.php:424
|
2364 |
#@ woocommerce-germanized
|
2365 |
msgid "Please accept the creation of a new customer account"
|
2366 |
msgstr "Bitte akzeptieren Sie die Erstellung eines neuen Kundenkontos"
|
2553 |
msgid "If you are facing problems within your checkout e.g. legally relevant data is not showing (terms, delivery time, unit price etc.) your theme seems to be incompatible (not using default WooCommerce hooks and filters). As a workaround you may use this fallback which ensures default review-order.php and form-checkout.php is used."
|
2554 |
msgstr "Wenn du Probleme während des Checkouts hast (Inhalte werden falsch, nicht oder doppelt dargestellt), dann könntest du als Workaround diese Option aktivieren. Diese Option hindert dein Theme relevante Templates für den Checkout (review-order.php und form-checkout.php) zu überschreiben. "
|
2555 |
|
2556 |
+
#: includes/emails/class-wc-gzd-email-customer-sepa-direct-debit-mandate.php:29
|
2557 |
+
#: includes/emails/class-wc-gzd-email-customer-sepa-direct-debit-mandate.php:35
|
2558 |
+
#: includes/emails/class-wc-gzd-email-customer-sepa-direct-debit-mandate.php:36
|
2559 |
+
#@ woocommerce-germanized
|
2560 |
+
msgid "SEPA Direct Debit Mandate"
|
2561 |
+
msgstr "SEPA Lastschriftmandat"
|
2562 |
+
|
2563 |
+
#: includes/emails/class-wc-gzd-email-customer-sepa-direct-debit-mandate.php:30
|
2564 |
+
#@ woocommerce-germanized
|
2565 |
+
msgid "Email contains a copy of the SEPA mandate generated by information provided by the customer."
|
2566 |
+
msgstr "Dieses E-Mail Template enthält eine Kopie des SEPA Mandates, welches basierend auf den Bestelldaten und Kontodaten des Käufers generiert wird."
|
2567 |
+
|
2568 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:26
|
2569 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:255
|
2570 |
+
#@ woocommerce-germanized
|
2571 |
+
msgid "Direct Debit"
|
2572 |
+
msgstr "Lastschrift"
|
2573 |
+
|
2574 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:27
|
2575 |
+
#@ woocommerce-germanized
|
2576 |
+
msgid "Allows you to offer direct debit as a payment method to your customers. Adds SEPA fields to checkout."
|
2577 |
+
msgstr "Fügt das manuelle Lastschriftverfahren (SEPA) als Zahlungsmethode hinzu. "
|
2578 |
+
|
2579 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:42
|
2580 |
+
#@ woocommerce-germanized
|
2581 |
+
msgid ""
|
2582 |
+
"[company_info]\n"
|
2583 |
+
"debtee identification number: [company_identification_number]\n"
|
2584 |
+
"mandat reference number: will be notified separately.\n"
|
2585 |
+
"\n"
|
2586 |
+
"<h3>SEPA Direct Debit Mandate</h3>\n"
|
2587 |
+
"\n"
|
2588 |
+
"I hereby authorize the payee to automatically draft from my savings account listed below for the specified amount. I further authorize my bank to accept the direct debit from this account.\n"
|
2589 |
+
"\n"
|
2590 |
+
"Notice: I may request a full refund within eight weeks starting with the initial debiting date. Responsibilities agreed with my credit institute apply for a refund.\n"
|
2591 |
+
"\n"
|
2592 |
+
"<strong>Debtor:</strong>\n"
|
2593 |
+
"Account holder: [account_holder]\n"
|
2594 |
+
"Street: [street]\n"
|
2595 |
+
"Postcode: [postcode]\n"
|
2596 |
+
"City: [city]\n"
|
2597 |
+
"Country: [country]\n"
|
2598 |
+
"IBAN: [account_iban]\n"
|
2599 |
+
"BIC: [account_swift]\n"
|
2600 |
+
"\n"
|
2601 |
+
"[city], [date], [account_holder]\n"
|
2602 |
+
"\n"
|
2603 |
+
"This letter is done automatically and is valid without signature.\n"
|
2604 |
+
"\n"
|
2605 |
+
"<hr/>\n"
|
2606 |
+
"\n"
|
2607 |
+
"Please notice: Period for pre-information of the SEPA direct debit is shortened to one day."
|
2608 |
+
msgstr ""
|
2609 |
+
"[company_info]\n"
|
2610 |
+
"Gläubiger-Identifikationsnummer: [company_identification_number]\n"
|
2611 |
+
"Mandat-Referenznummer: Wird separat mitgeteilt.\n"
|
2612 |
+
"\n"
|
2613 |
+
"<h3>SEPA-Lastschriftmandat</h3>\n"
|
2614 |
+
"\n"
|
2615 |
+
"Hiermit ermächtige ich den Zahlungsempfänger, einmalig eine Zahlung von meinem Konto mittel Lastschrift einzuziehen. Zugleich weise ich mein Kreditinstitut an, die von dem Zahlungsempfänger auf mein Konto gezogene Lastschrift einzulösen.\n"
|
2616 |
+
"\n"
|
2617 |
+
"Hinweis: Ich kann innerhalb von acht Wochen, beginnend mit dem Belastungsdatum, die Erstattung des belasteten Betrages verlangen. Es gelten dabei die mit meinem Kreditinstitut vereinbarten Bedingungen.\n"
|
2618 |
+
"\n"
|
2619 |
+
"<strong>Zahlungspflichtiger:</strong>\n"
|
2620 |
+
"Kontoinhaber: [account_holder]\n"
|
2621 |
+
"Straße: [street]\n"
|
2622 |
+
"Postcode: [postcode]\n"
|
2623 |
+
"Ort: [city]\n"
|
2624 |
+
"Land: [country]\n"
|
2625 |
+
"IBAN: [account_iban]\n"
|
2626 |
+
"BIC: [account_swift]\n"
|
2627 |
+
"\n"
|
2628 |
+
"[city], [date], [account_holder]\n"
|
2629 |
+
"\n"
|
2630 |
+
"Dieses Schreiben wurde maschinell erstellt und ist ohne Unterschrift gültig.\n"
|
2631 |
+
"\n"
|
2632 |
+
"<hr/>\n"
|
2633 |
+
"\n"
|
2634 |
+
"Bitte beachten Sie: Die First für die Vorabinformation der SEPA-Lastschrift wird auf einen Tag verkürzt. "
|
2635 |
+
|
2636 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:107
|
2637 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:322
|
2638 |
+
#@ woocommerce-germanized
|
2639 |
+
msgid "Account Holder"
|
2640 |
+
msgstr "Kontoinhaber"
|
2641 |
+
|
2642 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:114
|
2643 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:326
|
2644 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:414
|
2645 |
+
#@ woocommerce-germanized
|
2646 |
+
msgid "IBAN"
|
2647 |
+
msgstr "IBAN"
|
2648 |
+
|
2649 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:120
|
2650 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:330
|
2651 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:415
|
2652 |
+
#@ woocommerce-germanized
|
2653 |
+
msgid "BIC/SWIFT"
|
2654 |
+
msgstr "BIC/SWIFT"
|
2655 |
+
|
2656 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:126
|
2657 |
+
#@ woocommerce-germanized
|
2658 |
+
msgid "Mandate Reference ID"
|
2659 |
+
msgstr "Mandat-Referenznummer"
|
2660 |
+
|
2661 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:246
|
2662 |
+
#: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:79
|
2663 |
+
#@ woocommerce
|
2664 |
+
msgid "Enable/Disable"
|
2665 |
+
msgstr ""
|
2666 |
+
|
2667 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:248
|
2668 |
+
#@ woocommerce-germanized
|
2669 |
+
msgid "Enable Direct Debit Payment"
|
2670 |
+
msgstr "Bezahlung per Lastschrift aktivieren"
|
2671 |
+
|
2672 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:254
|
2673 |
+
#: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:87
|
2674 |
+
#@ woocommerce
|
2675 |
+
msgid "This controls the title which the user sees during checkout."
|
2676 |
+
msgstr ""
|
2677 |
+
|
2678 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:259
|
2679 |
+
#: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:92
|
2680 |
+
#@ woocommerce
|
2681 |
+
msgid "Description"
|
2682 |
+
msgstr ""
|
2683 |
+
|
2684 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:261
|
2685 |
+
#: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:94
|
2686 |
+
#@ woocommerce
|
2687 |
+
msgid "Payment method description that the customer will see on your checkout."
|
2688 |
+
msgstr ""
|
2689 |
+
|
2690 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:262
|
2691 |
+
#@ woocommerce-germanized
|
2692 |
+
msgid "The order amount will be debited directly from your bank account."
|
2693 |
+
msgstr "Der Gesamtbestellbetrag wird per SEPA-Lastschrift direkt von Ihrem Konto abgebucht."
|
2694 |
+
|
2695 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:266
|
2696 |
+
#: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:99
|
2697 |
+
#@ woocommerce
|
2698 |
+
msgid "Instructions"
|
2699 |
+
msgstr ""
|
2700 |
+
|
2701 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:268
|
2702 |
+
#: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:101
|
2703 |
+
#@ woocommerce
|
2704 |
+
msgid "Instructions that will be added to the thank you page and emails."
|
2705 |
+
msgstr ""
|
2706 |
+
|
2707 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:273
|
2708 |
+
#@ woocommerce-germanized
|
2709 |
+
msgid "Debtee"
|
2710 |
+
msgstr "Gläubiger Informationen"
|
2711 |
+
|
2712 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:275
|
2713 |
+
#@ woocommerce-germanized
|
2714 |
+
msgid "Insert your company information."
|
2715 |
+
msgstr "Füge hier die Informationen zu deinem Unternehmen ein."
|
2716 |
+
|
2717 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:277
|
2718 |
+
#@ woocommerce-germanized
|
2719 |
+
msgid "Company Inc, John Doe Street, New York"
|
2720 |
+
msgstr "Musterfirma GmbH, Musterstraße 12, 12203 Musterstadt"
|
2721 |
+
|
2722 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:281
|
2723 |
+
#@ woocommerce-germanized
|
2724 |
+
msgid "Debtee identification number"
|
2725 |
+
msgstr "Identifikationsnummer"
|
2726 |
+
|
2727 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:283
|
2728 |
+
#, php-format
|
2729 |
+
#@ woocommerce-germanized
|
2730 |
+
msgid "Insert your debtee indentification number. More information can be found <a href=\"%s\">here</a>."
|
2731 |
+
msgstr "Füge hier die Gläubiger Identifikationsnummer deines Unternehmens ein. Weitere Informationen zu dieser Nummer erhältst du <a href=\"%s\">hier</a>."
|
2732 |
+
|
2733 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:287
|
2734 |
+
#@ woocommerce-germanized
|
2735 |
+
msgid "Mandate Text"
|
2736 |
+
msgstr "Lastschriftmandat"
|
2737 |
+
|
2738 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:298
|
2739 |
+
#@ woocommerce-germanized
|
2740 |
+
msgid "Enable a checkbox linking to a SEPA direct debit mandate preview."
|
2741 |
+
msgstr "Aktiviere eine Checkbox, die zu einer Vorschau des Lastschrift-Mandats führt."
|
2742 |
+
|
2743 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:302
|
2744 |
+
#@ woocommerce-germanized
|
2745 |
+
msgid "Checkbox label"
|
2746 |
+
msgstr "Checkbox Text"
|
2747 |
+
|
2748 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:304
|
2749 |
+
#@ woocommerce-germanized
|
2750 |
+
msgid "Customize the checkbox label. Use {link}link name{/link} to insert the preview link."
|
2751 |
+
msgstr "Passe den Checkbox Text an. Verwende {link}SEPA Lastschriftmandat{/link} um auf die Vorschau zu verlinken."
|
2752 |
+
|
2753 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:372
|
2754 |
+
#@ woocommerce-germanized
|
2755 |
+
msgid "Please insert your SEPA account data."
|
2756 |
+
msgstr "Bitte fügen Sie Ihre SEPA Kontoinformationen ein."
|
2757 |
+
|
2758 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:355
|
2759 |
+
#@ woocommerce-germanized
|
2760 |
+
msgid "Please accept the direct debit mandate."
|
2761 |
+
msgstr "Bitte erteilen Sie das SEPA Lastschriftmandat."
|
2762 |
+
|
2763 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:382
|
2764 |
+
#@ woocommerce-germanized
|
2765 |
+
msgid "Your IBAN seems to be invalid."
|
2766 |
+
msgstr "Ihr IBAN scheint nicht gültig zu sein."
|
2767 |
+
|
2768 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:384
|
2769 |
+
#@ woocommerce-germanized
|
2770 |
+
msgid "Your IBAN's country code doesn’t match with your billing country."
|
2771 |
+
msgstr "Der Ländercode des IBANs stimmt nicht mit dem Rechnungsland überein."
|
2772 |
+
|
2773 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:388
|
2774 |
+
#@ woocommerce-germanized
|
2775 |
+
msgid "Your BIC seems to be invalid."
|
2776 |
+
msgstr "Ihr BIC/SWIFT scheint nicht gültig zu sein."
|
2777 |
+
|
2778 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:416
|
2779 |
+
#@ woocommerce
|
2780 |
+
msgid "is invalid"
|
2781 |
+
msgstr ""
|
2782 |
+
|
2783 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:454
|
2784 |
+
#@ woocommerce-germanized
|
2785 |
+
msgid "Processing direct debit"
|
2786 |
+
msgstr "Lastschriftverfahren vorbereiten"
|
2787 |
+
|
2788 |
+
#: templates/emails/customer-sepa-direct-debit-mandate.php:16
|
2789 |
+
#, php-format
|
2790 |
+
#@ woocommerce-germanized
|
2791 |
+
msgid "Please see the SEPA direct debit mandate for order %s attached to this email."
|
2792 |
+
msgstr "Im Folgenden finden Sie eine Kopie des SEPA Lastschriftmandates zur Bestellung %s."
|
2793 |
+
|
2794 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:305
|
2795 |
+
#@ woocommerce-germanized
|
2796 |
+
msgid "I hereby agree to the {link}direct debit mandate{/link}."
|
2797 |
+
msgstr "Hiermit erteile ich das {link}SEPA Lastschriftmandat{/link}."
|
2798 |
+
|
2799 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:289
|
2800 |
+
#@ woocommerce-germanized
|
2801 |
+
msgid "This text will be populated with live order/checkout data. Will be used as preview direct debit mandate and as email template text."
|
2802 |
+
msgstr "Dieser Text wird anhand der Bestelldaten bzw. der Daten innerhalb der Kasse komplettiert und als Vorschau bzw. als Kopie des SEPA Lastschriftmandates während des Checkouts und anschließend per E-Mail an den Kunden zur Verfügung gestellt."
|
2803 |
+
|
2804 |
+
#: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:26
|
2805 |
+
#: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:88
|
2806 |
+
#@ woocommerce-germanized
|
2807 |
+
msgid "Pay by Invoice"
|
2808 |
+
msgstr "Rechnung"
|
2809 |
+
|
2810 |
+
#: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:27
|
2811 |
+
#@ woocommerce-germanized
|
2812 |
+
msgid "Customers will be able to pay by invoice."
|
2813 |
+
msgstr "Kunden haben die Möglichkeit ihre Bestellungen auf Rechnung zu bezahlen."
|
2814 |
+
|
2815 |
+
#: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:57
|
2816 |
+
#@ woocommerce-germanized
|
2817 |
+
msgid "Automatically generate PDF invoices for this gateway?"
|
2818 |
+
msgstr "PDF Rechnungen für diese Zahlungsart automatisch erstellen?"
|
2819 |
+
|
2820 |
+
#: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:58
|
2821 |
+
#@ woocommerce-germanized
|
2822 |
+
msgid "By upgrading to the professional version you'll be able to automatically generate PDF invoices to this payment gateway. Furthermore you'll benefit from even more professional features such as a multistep checkout page, legal text generators, B2B VAT settings and premium support!"
|
2823 |
+
msgstr "Mit der Pro-Version von WooCommerce Germanized, kannst du vollautomatisch PDF-Rechnungen generieren und per E-Mail an den Kunden verschicken. Zusätzlich profitierst du von weiteren Features, wie der mehrstufigen Kasse, rechtliche Mustertext-Generatoren, B2B USt.-Einstellungen und natürlich Premium-Support via Ticket-System!"
|
2824 |
+
|
2825 |
+
#: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:61
|
2826 |
+
#@ woocommerce-germanized
|
2827 |
+
msgid "Learn more about PDF invoicing"
|
2828 |
+
msgstr "Mehr über PDF-Rechnungen erfahren"
|
2829 |
+
|
2830 |
+
#: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:81
|
2831 |
+
#@ woocommerce-germanized
|
2832 |
+
msgid "Enable Pay by Invoice"
|
2833 |
+
msgstr "Bezahlung auf Rechnung aktivieren"
|
2834 |
+
|
2835 |
+
#: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:95
|
2836 |
+
#@ woocommerce-germanized
|
2837 |
+
msgid "You'll receive an invoice after your order. Please transfer the order amount to our bank account within 14 days."
|
2838 |
+
msgstr "Sie erhalten nach der Bestellung eine Rechnung von uns. Bitte überweisen Sie den Gesamtbetrag innerhalb von 14 Tagen auf das dort angegebene Konto."
|
2839 |
+
|
2840 |
+
#: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:106
|
2841 |
+
#@ woocommerce-germanized
|
2842 |
+
msgid "Order Status"
|
2843 |
+
msgstr "Bestellstatus"
|
2844 |
+
|
2845 |
+
#: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:108
|
2846 |
+
#@ woocommerce-germanized
|
2847 |
+
msgid "Choose which order status should be applied after a customer has chosen to pay by invoice."
|
2848 |
+
msgstr "Wähle einen Bestellstatus aus, der nach einer Bestellung dieser Zahlungsart angewendet werden soll."
|
2849 |
+
|
2850 |
+
#: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:114
|
2851 |
+
#@ woocommerce-germanized
|
2852 |
+
msgid "Registered customers"
|
2853 |
+
msgstr "Registrierte Kunden"
|
2854 |
+
|
2855 |
+
#: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:115
|
2856 |
+
#@ woocommerce-germanized
|
2857 |
+
msgid "Do only offer pay by invoice to registered/logged in customers."
|
2858 |
+
msgstr "Biete diese Zahlungsart nur registrierten/eingeloggten Kunden an."
|
2859 |
+
|
2860 |
+
#: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:117
|
2861 |
+
#@ woocommerce-germanized
|
2862 |
+
msgid "This will enable Pay by Invoice to logged in customers only"
|
2863 |
+
msgstr "Diese Option erlaubt es dir, die Zahlungsart lediglich eingeloggten Kunden zur Verfügung zu stellen"
|
2864 |
+
|
2865 |
+
#: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:122
|
2866 |
+
#@ woocommerce-germanized
|
2867 |
+
msgid "Customer limitation"
|
2868 |
+
msgstr "Kunden Eingrenzung"
|
2869 |
+
|
2870 |
+
#: includes/gateways/invoice/class-wc-gzd-gateway-invoice.php:123
|
2871 |
+
#@ woocommerce-germanized
|
2872 |
+
msgid "Do only offer pay by invoice to customers who have at least completed one order."
|
2873 |
+
msgstr "Aktiviere die Zahlungsart nur dann, wenn der Kunde bereits eine Bestellung erfolgreich abgeschlossen hat."
|
2874 |
+
|
2875 |
+
#: includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php:296
|
2876 |
+
#@ woocommerce-germanized
|
2877 |
+
msgid "Enable \"agree to SEPA mandate\" checkbox"
|
2878 |
+
msgstr "Aktiviere die Checkbox zur Bestätigung des Lastschriftmandates."
|
2879 |
+
|
2880 |
#. translators: plugin header field 'Version'
|
2881 |
#: woocommerce-germanized.php:0
|
2882 |
#@ woocommerce-germanized
|
2883 |
+
msgid "1.4.0"
|
2884 |
+
msgstr "1.4.0"
|
2885 |
|
includes/admin/class-wc-gzd-admin-welcome.php
CHANGED
@@ -102,184 +102,149 @@ class WC_GZD_Admin_Welcome {
|
|
102 |
// Drop minor version if 0
|
103 |
$major_version = substr( WC_germanized()->version, 0, 3 );
|
104 |
?>
|
105 |
-
<
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
<a href="<?php echo admin_url('admin.php?page=wc-settings&tab=germanized'); ?>" class="button button-primary">Einstellungen</a>
|
121 |
-
<a href="https://vendidero.de/woocommerce-germanized#buy" target="_blank" class="button button-primary">Upgrade zur Pro Version</a>
|
122 |
-
<span class="wc-gzd-fb">
|
123 |
-
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fvendidero.de%2Fwoocommerce-germanized&width&layout=button&action=recommend&show_faces=false&share=false&height=20" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:20px;" allowTransparency="true"></iframe>
|
124 |
-
</span>
|
125 |
-
</p>
|
126 |
-
<div class="changelog vendipro new-feature">
|
127 |
-
<h3>Neu: Mehrstufige Kasse mit Datenüberprüfung <span class="wc-gzd-pro">pro</span></h3>
|
128 |
-
<div class="left">
|
129 |
-
<a href="https://vendidero.de/woocommerce-germanized#multistep-checkout" target="_blank"><img src="<?php echo WC_germanized()->plugin_url();?>/assets/images/multistep-checkout.png" /></a>
|
130 |
</div>
|
131 |
-
<
|
132 |
-
<
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
</
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
</div>
|
142 |
-
<div class="
|
143 |
-
<
|
144 |
-
<p>
|
145 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
<div>
|
147 |
-
<h4><i class="fa fa-
|
148 |
-
<p>
|
|
|
|
|
|
|
149 |
</div>
|
150 |
-
<div
|
151 |
-
<h4><i class="fa fa-
|
152 |
-
<p>
|
|
|
|
|
|
|
153 |
</div>
|
154 |
</div>
|
155 |
-
<div class="
|
156 |
-
<a href="
|
157 |
-
<p class="price smaller">ab 69,95 € inkl. Mwst. - inkl. 1 Jahr Updates & Premium Support!</p>
|
158 |
</div>
|
159 |
</div>
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
<div class="left">
|
164 |
-
<a href="https://vendidero.de/vendipro" target="_blank"><img src="<?php echo WC_germanized()->plugin_url();?>/assets/images/vendidero.jpg" /></a>
|
165 |
-
</div>
|
166 |
-
<div class="right">
|
167 |
-
<p>Endlich ist es soweit - Ein WooCommerce Theme, perfekt auf den deutschen Markt abgestimmt.
|
168 |
-
Mit <a href="https://vendidero.de/vendipro" target="_blank">VendiPro</a> wirken alle WooCommerce & WooCommerce Germanized Inhalte einfach noch professioneller.</p>
|
169 |
-
<div class="wc-feature wc-vendipro-features feature-section col two-col">
|
170 |
<div>
|
171 |
-
<h4><i class="fa fa-
|
172 |
-
<p>
|
|
|
|
|
|
|
|
|
|
|
173 |
</div>
|
174 |
<div class="last-feature">
|
175 |
-
<h4><i class="fa fa-
|
176 |
-
<p>
|
|
|
|
|
|
|
|
|
|
|
177 |
</div>
|
178 |
<div>
|
179 |
-
<h4><i class="fa fa-
|
180 |
-
<p>
|
|
|
181 |
</div>
|
182 |
<div class="last-feature">
|
183 |
-
<h4
|
184 |
-
<p>
|
185 |
</div>
|
186 |
</div>
|
187 |
-
<div class="vendipro-buttons">
|
188 |
-
<a href="https://vendidero.de/vendipro" target="_blank" class="button button-primary wc-gzd-button">mehr erfahren</a>
|
189 |
-
<p class="price smaller">ab 49,95 € inkl. Mwst. - inkl. 1 Jahr Updates & Premium Support!</p>
|
190 |
-
</div>
|
191 |
-
</div>
|
192 |
-
</div>
|
193 |
-
<div class="changelog">
|
194 |
-
<h3>Neu in WooCommerce Germanized 1.3</h3>
|
195 |
-
<div class="wc-feature feature-section col three-col" style="margin-bottom: -30px">
|
196 |
-
<div>
|
197 |
-
<h4><i class="fa fa-file-pdf-o"></i> PDF Rechnungen & Lieferscheine <a class="wc-gzd-pro" target="_blank" href="https://vendidero.de/woocommerce-germanized#accounting">Pro</a></h4>
|
198 |
-
<p>
|
199 |
-
Als glücklicker Pro-User kannst du mit wenigen Klicks PDF Rechnungen, Lieferscheine und Stornierungen zu deinen Bestellungen erzeugen.
|
200 |
-
Natürlich wurden auch die Rechnungen optimal an die Bedürfnisse des deutschen Marktes angepasst.
|
201 |
-
</p>
|
202 |
-
</div>
|
203 |
-
<div>
|
204 |
-
<h4><i class="fa fa-list-ol"></i> Mehrstufige Kasse <a class="wc-gzd-pro" target="_blank" href="https://vendidero.de/woocommerce-germanized#multistep-checkout">Pro</a></h4>
|
205 |
-
<p>
|
206 |
-
Nutze den beliebten Multistep-Checkout und biete deinen Kunden die Möglichkeit ihre eingegeben Daten vor dem Kauf noch einmal zu überprüfen und etwaige Falscheingaben zu korrigieren.
|
207 |
-
</p>
|
208 |
-
</div>
|
209 |
-
<div class="last-feature">
|
210 |
-
<h4><i class="fa fa-file-text-o"></i> Mustertexte API <a class="wc-gzd-pro" target="_blank" href="https://vendidero.de/woocommerce-germanized#generator">Pro</a></h4>
|
211 |
-
<p>
|
212 |
-
Generiere über die Schnittstelle zu vendidero.de in deinem Backend einfach Mustertexte für AGB & Widerrufsbelehrung.
|
213 |
-
Fragen ausfüllen, Mustertext erhalten und mit einem Klick in die entsprechende Seite übernehmen.
|
214 |
-
</p>
|
215 |
-
</div>
|
216 |
-
<div style="clear: both">
|
217 |
-
<h4><i class="fa fa-clock-o"></i> Vertragsschluss <a class="wc-gzd-pro" target="_blank" href="https://vendidero.de/woocommerce-germanized#contract">Pro</a></h4>
|
218 |
-
<p>
|
219 |
-
Du möchtest den Zeitpunkt des Vertragsschlusses aktiv bestimmen und deine Bestellungen manuell prüfen?
|
220 |
-
Alle Zahlungsinformationen werden erst dann an den Kunden ausgegeben, wenn du die Bestellung annimmst.
|
221 |
-
</p>
|
222 |
-
</div>
|
223 |
-
<div>
|
224 |
-
<h4><i class="fa fa-thumbs-up"></i> Theme Kompatibilität</h4>
|
225 |
-
<p>
|
226 |
-
Falls du WooCommerce > 2.3 nutzst, überschreibt WooCommerce Germanized von nun an keine Templates mehr.
|
227 |
-
Damit sollte es mit deinem Theme keine Probleme mehr während des Bezahlvorganges geben.
|
228 |
-
</p>
|
229 |
-
</div>
|
230 |
-
<div class="last-feature">
|
231 |
-
<h4><i class="fa fa-arrows-h"></i> Einheiten anlegen</h4>
|
232 |
-
<p>
|
233 |
-
Du verkaufst basierend auf Einheitspreisen? Dann möchtest du vielleicht neue Einheiten (z.B. "Stück") hinzufügen.
|
234 |
-
Alles kein Problem mehr mit dem <a href="<?php echo admin_url('edit-tags.php?taxonomy=product_unit&post_type=product'); ?>">Einheiten-Editor</a>. Füge neue Einheiten hinzu oder passe die Bezeichnung an.
|
235 |
-
</p>
|
236 |
-
</div>
|
237 |
-
<div style="clear: both">
|
238 |
-
<h4><i class="fa fa-language"></i> WPML Kompatibilität</h4>
|
239 |
-
<p>
|
240 |
-
Einige von euch betreiben Multi-Sprachen-Shops. Um auch die Optionen (Kaufen-Button-Text etc.) von WooCommerce Germanized übersetzen zu können, haben wir
|
241 |
-
eine wpml-confix.xml Datei angelegt, die euch dabei hilft die Strings zu übersetzen.
|
242 |
-
</p>
|
243 |
-
</div>
|
244 |
-
<div>
|
245 |
-
<h4><i class="fa fa-reorder"></i> E-Mail Anhänge sortieren</h4>
|
246 |
-
<p>
|
247 |
-
Sortiere in deinen WooCommerce Germanized Einstellungen per Drag & Drop die E-Mail Anhänge (z.B. AGB, Widerrufsbelehrung, Impressum). So kannst du ganz einfach
|
248 |
-
die Reihenfolge der Inhalte in deinen E-Mails beeinflussen.
|
249 |
-
</p>
|
250 |
-
</div>
|
251 |
-
</div>
|
252 |
-
</div>
|
253 |
-
<div class="changelog">
|
254 |
-
<h3>WooCommerce Germanized - Funktionsübersicht</h3>
|
255 |
-
<div class="wc-feature feature-section col three-col">
|
256 |
-
<div>
|
257 |
-
<h4><i class="fa fa-child"></i> Kleinunternehmerregelung</h4>
|
258 |
-
<p>Mit nur einem Klick wird Dein Online-Shop §19 UStG - kompatibel! Einfach die Häkchen innerhalb der WooCommerce Germanized Einstellungen setzen und schon geht es los.</p>
|
259 |
-
</div>
|
260 |
-
<div>
|
261 |
-
<h4><i class="fa fa-truck"></i> Lieferzeiten</h4>
|
262 |
-
<p>Erstelle einfach neue Lieferzeiten für deine Produkte. Die Lieferzeiten werden dann sowohl auf der Produktseite als auch im Bestellvorgang dargestellt.
|
263 |
-
Die Bearbeitung der Lieferzeiten erfolgt ganz bequem per WordPress Taxonomy.</p>
|
264 |
-
</div>
|
265 |
-
<div class="last-feature">
|
266 |
-
<h4><i class="fa fa-laptop"></i> Darstellungsoptionen</h4>
|
267 |
-
<p>Wir haben die Darstellung des Warenkorbs und des Bezahlvorgangs für Dich an deutsche Rechtsgrundlagen angepasst. Zusätzlich kannst Du selbst entscheiden, welche rechtlich relevanten Seiten Du wo und wie verlinken willst.</p>
|
268 |
-
</div>
|
269 |
-
<div>
|
270 |
-
<h4><i class="fa fa-legal"></i> Rechtlich relevante Seiten</h4>
|
271 |
-
<p>Erstelle ganz einfach alle rechtlich relevanten Seiten (z.B. Datenschutz, Widerrufsbelehrung).
|
272 |
-
Wir setzen den Inhalt automatisch in die von Dir ausgewählten E-Mail-Templates ein und fügen auf Wunsch auch Checkboxen zum Bezahlvorgang hinzu.</p>
|
273 |
-
</div>
|
274 |
-
<div>
|
275 |
-
<h4><i class="fa fa-certificate"></i> Trusted Shops</h4>
|
276 |
-
<p>Du möchtest deine Trusted Shops Mitgliedschaft in WooCommerce nutzen? Kein Problem. WooCommerce Germanized hat die Schnittstelle zu Trusted Shops bereits implementiert.
|
277 |
-
Klicke <a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'wc-settings&tab=germanized§ion=trusted_shops' ), 'admin.php' ) ) ); ?>">hier</a> um die nötigen Einstellungen vorzunehmen.</p>
|
278 |
-
</div>
|
279 |
-
<div class="last-feature">
|
280 |
-
<h4>Und noch vieles mehr</h4>
|
281 |
-
<p>Natürlich gibt es auch noch viele weitere Optionen, die wir für Dich implementiert haben. Du kannst z.B. den Button-Text im Bestellabschluss ganz bequem anpassen oder entscheiden ob du den "zum Warenkorb" - Button wirklich auch in der Produktübersicht haben möchtest.</p>
|
282 |
-
</div>
|
283 |
</div>
|
284 |
</div>
|
285 |
<?php
|
102 |
// Drop minor version if 0
|
103 |
$major_version = substr( WC_germanized()->version, 0, 3 );
|
104 |
?>
|
105 |
+
<div class="wc-gzd-news">
|
106 |
+
|
107 |
+
<h1>Willkommen bei WooCommerce Germanized</h1>
|
108 |
+
<a class="wc-gzd-logo" href="https://vendidero.de/woocommerce-germanized" target="_blank" style="margin-right: 1em"></a>
|
109 |
+
<div class="about-text woocommerce-about-text">
|
110 |
+
<?php
|
111 |
+
if ( ! empty( $_GET['wc-gzd-installed'] ) )
|
112 |
+
$message = 'Super, alles erledigt!';
|
113 |
+
elseif ( ! empty( $_GET['wc-gzd-updated'] ) )
|
114 |
+
$message = 'Danke, dass du auf die neueste Version aktualisiert hast!';
|
115 |
+
else
|
116 |
+
$message = 'Danke für die Installation!';
|
117 |
+
echo $message . '<br/>';
|
118 |
+
?>
|
119 |
+
WooCommerce Germanized <?php echo $major_version; ?> erweitert deine WooCommerce Installation um wichtige Funktionen für den deutschen Markt.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
</div>
|
121 |
+
<p class="woocommerce-actions wc-gzd-actions">
|
122 |
+
<a href="<?php echo admin_url('admin.php?page=wc-settings&tab=germanized'); ?>" class="button button-primary">Einstellungen</a>
|
123 |
+
<a href="https://vendidero.de/woocommerce-germanized#buy" target="_blank" class="button button-primary">Upgrade zur Pro Version</a>
|
124 |
+
<span class="wc-gzd-fb">
|
125 |
+
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fvendidero.de%2Fwoocommerce-germanized&width&layout=button&action=recommend&show_faces=false&share=false&height=20" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:20px;" allowTransparency="true"></iframe>
|
126 |
+
</span>
|
127 |
+
</p>
|
128 |
+
<div class="changelog vendipro new-feature">
|
129 |
+
<h3>Neu: Mehrstufige Kasse mit Datenüberprüfung <span class="wc-gzd-pro">pro</span></h3>
|
130 |
+
<div class="left">
|
131 |
+
<a href="https://vendidero.de/woocommerce-germanized#multistep-checkout" target="_blank"><img src="<?php echo WC_germanized()->plugin_url();?>/assets/images/multistep-checkout.png" /></a>
|
132 |
+
</div>
|
133 |
+
<div class="right">
|
134 |
+
<p>
|
135 |
+
Du möchtest deinen Checkout in mehrere Stufen aufteilen? Mit diesem neuen Feature ist das kein Problem mehr.
|
136 |
+
Nutze ähnlich wie andere große deutsche Shops die Schritte Persönliche Daten, Zahlungsart und Bestätigen. Im Bestätigungs-Schritt
|
137 |
+
werden dem Kunden alle Eingaben noch einmal aufgeführt.
|
138 |
+
</p>
|
139 |
+
<div class="wc-feature wc-vendipro-features feature-section col two-col">
|
140 |
+
<div>
|
141 |
+
<h4><i class="fa fa-paint-brush"></i> Läuft mit deinem Theme</h4>
|
142 |
+
<p>Die mehrstufige Kasse kommt ganz ohne Überschreiben von WooCommerce Templates aus.</p>
|
143 |
+
</div>
|
144 |
+
<div class="last-feature">
|
145 |
+
<h4><i class="fa fa-adjust"></i> Farben & Optionen</h4>
|
146 |
+
<p>Passe sowohl Farben als auch Beschriftungen einfach in den Einstellungen an.</p>
|
147 |
+
</div>
|
148 |
+
<div>
|
149 |
+
<h4><i class="fa fa-check"></i> Daten Prüfen</h4>
|
150 |
+
<p>Lasse deine Kunden im letzten Schritt ihre Daten vor Bestellabschluss prüfen und u.U. korrigieren.</p>
|
151 |
+
</div>
|
152 |
+
<div class="last-feature">
|
153 |
+
<h4><i class="fa fa-refresh"></i> Kein Neuladen</h4>
|
154 |
+
<p>Die Mehrstufige Kasse funktioniert komplett per Javascript. Inhalte werden asynchron nachgeladen.</p>
|
155 |
+
</div>
|
156 |
</div>
|
157 |
+
<div class="vendipro-buttons">
|
158 |
+
<a href="https://vendidero.de/woocommerce-germanized#pro" target="_blank" class="button button-primary wc-gzd-button">Pro Version entdecken</a>
|
159 |
+
<p class="price smaller">ab 69,95 € inkl. Mwst. - inkl. 1 Jahr Updates & Premium Support!</p>
|
160 |
</div>
|
161 |
+
</div>
|
162 |
+
</div>
|
163 |
+
<div class="changelog vendipro">
|
164 |
+
<h3>VendiPro - Das WooCommerce Theme für den deutschen Markt</h3>
|
165 |
+
<div class="left">
|
166 |
+
<a href="https://vendidero.de/vendipro" target="_blank"><img src="<?php echo WC_germanized()->plugin_url();?>/assets/images/vendidero.jpg" /></a>
|
167 |
+
</div>
|
168 |
+
<div class="right">
|
169 |
+
<p>Endlich ist es soweit - Ein WooCommerce Theme, perfekt auf den deutschen Markt abgestimmt.
|
170 |
+
Mit <a href="https://vendidero.de/vendipro" target="_blank">VendiPro</a> wirken alle WooCommerce & WooCommerce Germanized Inhalte einfach noch professioneller.</p>
|
171 |
+
<div class="wc-feature wc-vendipro-features feature-section col two-col">
|
172 |
+
<div>
|
173 |
+
<h4><i class="fa fa-mobile"></i> Responsive Layout</h4>
|
174 |
+
<p>VendiPro hinterlässt sowohl auf Desktop- als auch auf Mobilgeräten einen klasse Eindruck!</p>
|
175 |
+
</div>
|
176 |
+
<div class="last-feature">
|
177 |
+
<h4><i class="fa fa-pencil"></i> Individualität</h4>
|
178 |
+
<p>Passe VendiPro einfach per WordPress Theme Customizer an deine Bedürfnisse an.</p>
|
179 |
+
</div>
|
180 |
+
<div>
|
181 |
+
<h4><i class="fa fa-font"></i> Typisch deutsch</h4>
|
182 |
+
<p>Gemacht für den deutschen Markt - und das merkt man sofort.</p>
|
183 |
+
</div>
|
184 |
+
<div class="last-feature">
|
185 |
+
<h4><i class="fa fa-play-circle"></i> Slideshow</h4>
|
186 |
+
<p>Einfach per Shortcode Slideshows und Produkt Carousels erstellen.</p>
|
187 |
+
</div>
|
188 |
+
</div>
|
189 |
+
<div class="vendipro-buttons">
|
190 |
+
<a href="https://vendidero.de/vendipro" target="_blank" class="button button-primary wc-gzd-button">mehr erfahren</a>
|
191 |
+
<p class="price smaller">ab 49,95 € inkl. Mwst. - inkl. 1 Jahr Updates & Premium Support!</p>
|
192 |
+
</div>
|
193 |
+
</div>
|
194 |
+
</div>
|
195 |
+
<div class="changelog">
|
196 |
+
<h3>Neu in WooCommerce Germanized 1.4</h3>
|
197 |
+
<div class="wc-feature feature-section col three-col" style="margin-bottom: -30px">
|
198 |
<div>
|
199 |
+
<h4><i class="fa fa-euro"></i> SEPA Lastschrift</h4>
|
200 |
+
<p>
|
201 |
+
Ermögliche deinen Kunden die Bezahlung via SEPA Lastschrift - ganz ohne Payment Anbieter.
|
202 |
+
Die entsprechenden Felder werden automatisch im Checkout hinzugefügt und validiert. Der Kunde erhält eine Kopie des Mandats per Mail.
|
203 |
+
</p>
|
204 |
</div>
|
205 |
+
<div>
|
206 |
+
<h4><i class="fa fa-file-pdf-o"></i> Bezahlung per Rechnung</h4>
|
207 |
+
<p>
|
208 |
+
Biete deinen Kunden die beliebte Zahlungsart "Kauf auf Rechnung" an. Du kannst zusätzlich einschränken, ob nur registrierte Kunden die Zahlungsart nutzen dürften.
|
209 |
+
Als <a class="wc-gzd-pro" style="display: inline !important" href="https://vendidero.de/woocommerce-germanized#accounting" target="_blank">pro</a> User kannst du automatisiert PDF-Rechnungen erstellen.
|
210 |
+
</p>
|
211 |
</div>
|
212 |
</div>
|
213 |
+
<div class="return-to-dashboard">
|
214 |
+
<a href="<?php echo admin_url( 'admin.php?page=wc-settings&tab=checkout' ); ?>">Neue Zahlungsarten jetzt entdecken</a>
|
|
|
215 |
</div>
|
216 |
</div>
|
217 |
+
<div class="changelog">
|
218 |
+
<h3>WooCommerce Germanized - Funktionsübersicht</h3>
|
219 |
+
<div class="wc-feature feature-section col three-col">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
<div>
|
221 |
+
<h4><i class="fa fa-child"></i> Kleinunternehmerregelung</h4>
|
222 |
+
<p>Mit nur einem Klick wird Dein Online-Shop §19 UStG - kompatibel! Einfach die Häkchen innerhalb der WooCommerce Germanized Einstellungen setzen und schon geht es los.</p>
|
223 |
+
</div>
|
224 |
+
<div>
|
225 |
+
<h4><i class="fa fa-truck"></i> Lieferzeiten</h4>
|
226 |
+
<p>Erstelle einfach neue Lieferzeiten für deine Produkte. Die Lieferzeiten werden dann sowohl auf der Produktseite als auch im Bestellvorgang dargestellt.
|
227 |
+
Die Bearbeitung der Lieferzeiten erfolgt ganz bequem per WordPress Taxonomy.</p>
|
228 |
</div>
|
229 |
<div class="last-feature">
|
230 |
+
<h4><i class="fa fa-laptop"></i> Darstellungsoptionen</h4>
|
231 |
+
<p>Wir haben die Darstellung des Warenkorbs und des Bezahlvorgangs für Dich an deutsche Rechtsgrundlagen angepasst. Zusätzlich kannst Du selbst entscheiden, welche rechtlich relevanten Seiten Du wo und wie verlinken willst.</p>
|
232 |
+
</div>
|
233 |
+
<div>
|
234 |
+
<h4><i class="fa fa-legal"></i> Rechtlich relevante Seiten</h4>
|
235 |
+
<p>Erstelle ganz einfach alle rechtlich relevanten Seiten (z.B. Datenschutz, Widerrufsbelehrung).
|
236 |
+
Wir setzen den Inhalt automatisch in die von Dir ausgewählten E-Mail-Templates ein und fügen auf Wunsch auch Checkboxen zum Bezahlvorgang hinzu.</p>
|
237 |
</div>
|
238 |
<div>
|
239 |
+
<h4><i class="fa fa-certificate"></i> Trusted Shops</h4>
|
240 |
+
<p>Du möchtest deine Trusted Shops Mitgliedschaft in WooCommerce nutzen? Kein Problem. WooCommerce Germanized hat die Schnittstelle zu Trusted Shops bereits implementiert.
|
241 |
+
Klicke <a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'wc-settings&tab=germanized§ion=trusted_shops' ), 'admin.php' ) ) ); ?>">hier</a> um die nötigen Einstellungen vorzunehmen.</p>
|
242 |
</div>
|
243 |
<div class="last-feature">
|
244 |
+
<h4>Und noch vieles mehr</h4>
|
245 |
+
<p>Natürlich gibt es auch noch viele weitere Optionen, die wir für Dich implementiert haben. Du kannst z.B. den Button-Text im Bestellabschluss ganz bequem anpassen oder entscheiden ob du den "zum Warenkorb" - Button wirklich auch in der Produktübersicht haben möchtest.</p>
|
246 |
</div>
|
247 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
</div>
|
249 |
</div>
|
250 |
<?php
|
includes/class-wc-gzd-ekomi.php
CHANGED
@@ -37,24 +37,26 @@ class WC_GZD_Ekomi {
|
|
37 |
public function __construct() {
|
38 |
$this->version = 'cust-1.0.0';
|
39 |
$this->id = $this->shop_id;
|
40 |
-
if (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
wp_create_user( __( 'eKomi Customer', 'woocommerce-germanized' ), wp_generate_password(), 'ekomi@loremipsumdolorom.com' );
|
42 |
$this->user = get_user_by( 'email', 'ekomi@loremipsumdolorom.com' );
|
43 |
wp_update_user( array( 'ID' => $this->user->ID, 'role' => 'customer' ) );
|
44 |
}
|
45 |
// Cronjobs & Hooks
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
add_action( 'wp_footer', array( $this, 'add_scripts' ), 10 );
|
53 |
-
}
|
54 |
-
//add_action( 'init', array( $this, 'get_reviews' ) );
|
55 |
-
// Register sections
|
56 |
-
add_filter( 'woocommerce_gzd_settings_sections', array( $this, 'register_section' ), 2 );
|
57 |
-
add_filter( 'woocommerce_gzd_get_settings_ekomi', array( $this, 'get_settings' ) );
|
58 |
}
|
59 |
|
60 |
/**
|
37 |
public function __construct() {
|
38 |
$this->version = 'cust-1.0.0';
|
39 |
$this->id = $this->shop_id;
|
40 |
+
if ( $this->is_enabled() )
|
41 |
+
add_action( 'init', array( $this, 'init' ) );
|
42 |
+
// Register sections
|
43 |
+
add_filter( 'woocommerce_gzd_settings_sections', array( $this, 'register_section' ), 2 );
|
44 |
+
add_filter( 'woocommerce_gzd_get_settings_ekomi', array( $this, 'get_settings' ) );
|
45 |
+
}
|
46 |
+
|
47 |
+
public function init() {
|
48 |
+
if ( ! username_exists( 'ekomi' ) ) {
|
49 |
wp_create_user( __( 'eKomi Customer', 'woocommerce-germanized' ), wp_generate_password(), 'ekomi@loremipsumdolorom.com' );
|
50 |
$this->user = get_user_by( 'email', 'ekomi@loremipsumdolorom.com' );
|
51 |
wp_update_user( array( 'ID' => $this->user->ID, 'role' => 'customer' ) );
|
52 |
}
|
53 |
// Cronjobs & Hooks
|
54 |
+
$this->user = get_user_by( 'email', 'ekomi@loremipsumdolorom.com' );
|
55 |
+
add_action( 'woocommerce_gzd_ekomi', array( $this, 'get_reviews' ) );
|
56 |
+
add_action( 'woocommerce_gzd_ekomi', array( $this, 'put_products' ) );
|
57 |
+
add_action( 'woocommerce_gzd_ekomi', array( $this, 'send_mails' ) );
|
58 |
+
add_action( 'woocommerce_order_status_completed', array( $this, 'put_order' ), 0, 1 );
|
59 |
+
add_action( 'wp_footer', array( $this, 'add_scripts' ), 10 );
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
}
|
61 |
|
62 |
/**
|
includes/class-wc-gzd-emails.php
CHANGED
@@ -183,7 +183,7 @@ class WC_GZD_Emails {
|
|
183 |
foreach ( $tpls as $tpl ) {
|
184 |
$tpl = apply_filters( 'woocommerce_germanized_email_template_name', str_replace( array( 'admin-', '-' ), array( '', '_' ), basename( $tpl, '.php' ) ), $tpl );
|
185 |
$mails = WC()->mailer()->get_emails();
|
186 |
-
if ( !empty( $mails ) ) {
|
187 |
foreach ( $mails as $mail ) {
|
188 |
if ( $mail->id == $tpl )
|
189 |
array_push( $found_mails, $mail );
|
183 |
foreach ( $tpls as $tpl ) {
|
184 |
$tpl = apply_filters( 'woocommerce_germanized_email_template_name', str_replace( array( 'admin-', '-' ), array( '', '_' ), basename( $tpl, '.php' ) ), $tpl );
|
185 |
$mails = WC()->mailer()->get_emails();
|
186 |
+
if ( ! empty( $mails ) ) {
|
187 |
foreach ( $mails as $mail ) {
|
188 |
if ( $mail->id == $tpl )
|
189 |
array_push( $found_mails, $mail );
|
includes/class-wc-gzd-hook-priorities.php
CHANGED
@@ -94,6 +94,7 @@ class WC_GZD_Hook_Priorities {
|
|
94 |
'checkout_legal' => 2,
|
95 |
'checkout_set_terms' => 3,
|
96 |
'checkout_digital_checkbox' => 4,
|
|
|
97 |
'order_product_delivery_time' => 0,
|
98 |
'order_product_item_desc' => 0,
|
99 |
'order_product_unit_price' => 0,
|
94 |
'checkout_legal' => 2,
|
95 |
'checkout_set_terms' => 3,
|
96 |
'checkout_digital_checkbox' => 4,
|
97 |
+
'checkout_direct_debit' => 5,
|
98 |
'order_product_delivery_time' => 0,
|
99 |
'order_product_item_desc' => 0,
|
100 |
'order_product_unit_price' => 0,
|
includes/emails/class-wc-gzd-email-customer-sepa-direct-debit-mandate.php
ADDED
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
4 |
+
|
5 |
+
if ( ! class_exists( 'WC_GZD_Email_Customer_SEPA_Direct_Debit_Mandate' ) ) :
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Direct debit mandate email
|
9 |
+
*
|
10 |
+
* Email is being sent directly after the order to inform the customer about the SEPA mandate.
|
11 |
+
*
|
12 |
+
* @class WC_GZD_Email_Customer_Revocation
|
13 |
+
* @version 1.0.0
|
14 |
+
* @author Vendidero
|
15 |
+
*/
|
16 |
+
class WC_GZD_Email_Customer_SEPA_Direct_Debit_Mandate extends WC_Email {
|
17 |
+
|
18 |
+
public $gateway = null;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Constructor
|
22 |
+
*
|
23 |
+
* @access public
|
24 |
+
* @return void
|
25 |
+
*/
|
26 |
+
function __construct() {
|
27 |
+
|
28 |
+
$this->id = 'customer_sepa_direct_debit_mandate';
|
29 |
+
$this->title = __( 'SEPA Direct Debit Mandate', 'woocommerce-germanized' );
|
30 |
+
$this->description = __( 'Email contains a copy of the SEPA mandate generated by information provided by the customer.', 'woocommerce-germanized' );
|
31 |
+
|
32 |
+
$this->template_html = 'emails/customer-sepa-direct-debit-mandate.php';
|
33 |
+
$this->template_plain = 'emails/plain/customer-sepa-direct-debit-mandate.php';
|
34 |
+
|
35 |
+
$this->subject = __( 'SEPA Direct Debit Mandate', 'woocommerce-germanized' );
|
36 |
+
$this->heading = __( 'SEPA Direct Debit Mandate', 'woocommerce-germanized' );
|
37 |
+
|
38 |
+
// Call parent constuctor
|
39 |
+
parent::__construct();
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* trigger function.
|
44 |
+
*
|
45 |
+
* @access public
|
46 |
+
* @return void
|
47 |
+
*/
|
48 |
+
function trigger( $order ) {
|
49 |
+
|
50 |
+
if ( ! is_object( $order ) ) {
|
51 |
+
$order = wc_get_order( absint( $order ) );
|
52 |
+
}
|
53 |
+
|
54 |
+
if ( $order ) {
|
55 |
+
$this->object = $order;
|
56 |
+
|
57 |
+
$gateways = WC()->payment_gateways()->payment_gateways();
|
58 |
+
$this->gateway = $gateways[ 'direct-debit' ];
|
59 |
+
|
60 |
+
$this->recipient = $this->object->billing_email;
|
61 |
+
|
62 |
+
$this->find['order-date'] = '{order_date}';
|
63 |
+
$this->find['order-number'] = '{order_number}';
|
64 |
+
|
65 |
+
$this->replace['order-date'] = date_i18n( wc_date_format(), strtotime( $this->object->order_date ) );
|
66 |
+
$this->replace['order-number'] = $this->object->get_order_number();
|
67 |
+
}
|
68 |
+
|
69 |
+
if ( ! $this->is_enabled() || ! $this->get_recipient() )
|
70 |
+
return;
|
71 |
+
|
72 |
+
$this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* get_content_html function.
|
77 |
+
*
|
78 |
+
* @access public
|
79 |
+
* @return string
|
80 |
+
*/
|
81 |
+
function get_content_html() {
|
82 |
+
ob_start();
|
83 |
+
wc_get_template( $this->template_html, array(
|
84 |
+
'order' => $this->object,
|
85 |
+
'gateway' => $this->gateway,
|
86 |
+
'email_heading' => $this->get_heading(),
|
87 |
+
'blogname' => $this->get_blogname(),
|
88 |
+
'sent_to_admin' => false,
|
89 |
+
'plain_text' => false
|
90 |
+
) );
|
91 |
+
return ob_get_clean();
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* get_content_plain function.
|
96 |
+
*
|
97 |
+
* @access public
|
98 |
+
* @return string
|
99 |
+
*/
|
100 |
+
function get_content_plain() {
|
101 |
+
ob_start();
|
102 |
+
wc_get_template( $this->template_plain, array(
|
103 |
+
'order' => $this->object,
|
104 |
+
'gateway' => $this->gateway,
|
105 |
+
'email_heading' => $this->get_heading(),
|
106 |
+
'blogname' => $this->get_blogname(),
|
107 |
+
'sent_to_admin' => false,
|
108 |
+
'plain_text' => true
|
109 |
+
) );
|
110 |
+
return ob_get_clean();
|
111 |
+
}
|
112 |
+
}
|
113 |
+
|
114 |
+
endif;
|
115 |
+
|
116 |
+
return new WC_GZD_Email_Customer_SEPA_Direct_Debit_Mandate();
|
includes/gateways/direct-debit/assets/js/direct-debit.js
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function ( $ ) {
|
2 |
+
|
3 |
+
// Form Validation
|
4 |
+
function directDebitValidateIBAN( iban ) {
|
5 |
+
return IBAN.isValid( iban );
|
6 |
+
}
|
7 |
+
|
8 |
+
function directDebitValidateSWIFT( swift ) {
|
9 |
+
var regSWIFT = /^([a-zA-Z]){4}([a-zA-Z]){2}([0-9a-zA-Z]){2}([0-9a-zA-Z]{3})?$/;
|
10 |
+
return regSWIFT.test( swift );
|
11 |
+
}
|
12 |
+
|
13 |
+
$( function () {
|
14 |
+
|
15 |
+
$( 'form.checkout, form#order_review' ).on( 'blur input change', '#direct-debit-form input#direct-debit-account-holder', function() {
|
16 |
+
if ( ! $( this ).val() ) {
|
17 |
+
$( this ).parents( 'p.form-row' ).removeClass( 'woocommerce-validated' );
|
18 |
+
$( this ).parents( 'p.form-row' ).addClass( 'woocommerce-invalid woocommerce-invalid-required-field' );
|
19 |
+
}
|
20 |
+
});
|
21 |
+
|
22 |
+
$( 'form.checkout, form#order_review' ).on( 'blur input change', '#direct-debit-form input#direct-debit-account-iban', function() {
|
23 |
+
if ( ! directDebitValidateIBAN( $( this ).val() ) ) {
|
24 |
+
$( this ).parents( 'p.form-row' ).removeClass( 'woocommerce-validated' );
|
25 |
+
$( this ).parents( 'p.form-row' ).addClass( 'woocommerce-invalid woocommerce-invalid-required-field' );
|
26 |
+
}
|
27 |
+
});
|
28 |
+
|
29 |
+
$( 'form.checkout, form#order_review' ).on( 'blur input change', '#direct-debit-form input#direct-debit-account-bic', function() {
|
30 |
+
if ( ! directDebitValidateSWIFT( $( this ).val() ) ) {
|
31 |
+
$( this ).parents( 'p.form-row' ).removeClass( 'woocommerce-validated' );
|
32 |
+
$( this ).parents( 'p.form-row' ).addClass( 'woocommerce-invalid woocommerce-invalid-required-field' );
|
33 |
+
}
|
34 |
+
});
|
35 |
+
|
36 |
+
$( 'form.checkout, form#order_review' ).on( 'blur input change', 'input, select', function() {
|
37 |
+
|
38 |
+
if ( $( '#direct-debit-form' ).length ) {
|
39 |
+
|
40 |
+
$( '.direct-debit-checkbox' ).hide();
|
41 |
+
|
42 |
+
if ( $( '#payment_method_direct-debit' ).is( ':checked' ) &&
|
43 |
+
$( 'input#direct-debit-account-holder' ).val() &&
|
44 |
+
$( 'input#direct-debit-account-iban' ).val() &&
|
45 |
+
$( 'input#direct-debit-account-bic' ).val()
|
46 |
+
) {
|
47 |
+
$( '.direct-debit-checkbox' ).show();
|
48 |
+
}
|
49 |
+
|
50 |
+
}
|
51 |
+
|
52 |
+
});
|
53 |
+
|
54 |
+
$( document ).on( 'click', 'a#show-direct-debit-trigger', function(e) {
|
55 |
+
|
56 |
+
e.preventDefault();
|
57 |
+
|
58 |
+
var url = $( this ).attr( 'href' );
|
59 |
+
|
60 |
+
var data = {
|
61 |
+
country: $( '#billing_country' ).val(),
|
62 |
+
postcode: $( 'input#billing_postcode' ).val(),
|
63 |
+
city: $( '#billing_city' ).val(),
|
64 |
+
address: $( 'input#billing_address_1' ).val(),
|
65 |
+
address_2: $( 'input#billing_address_2' ).val(),
|
66 |
+
debit_holder: $( 'input#direct-debit-account-holder' ).val(),
|
67 |
+
debit_iban: $( 'input#direct-debit-account-iban' ).val(),
|
68 |
+
debit_swift: $( 'input#direct-debit-account-bic' ).val(),
|
69 |
+
}
|
70 |
+
|
71 |
+
url += '&ajax=true&' + jQuery.param( data );
|
72 |
+
|
73 |
+
$( '#show-direct-debit-pretty' ).attr( 'href', url );
|
74 |
+
$( '#show-direct-debit-pretty' ).trigger( 'click' );
|
75 |
+
|
76 |
+
});
|
77 |
+
|
78 |
+
$( "a#show-direct-debit-pretty" ).prettyPhoto({
|
79 |
+
social_tools: false,
|
80 |
+
theme: 'pp_woocommerce',
|
81 |
+
horizontal_padding: 20,
|
82 |
+
opacity: 0.8,
|
83 |
+
deeplinking: false
|
84 |
+
});
|
85 |
+
|
86 |
+
});
|
87 |
+
|
88 |
+
}( jQuery ) );
|
includes/gateways/direct-debit/assets/js/direct-debit.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(a){function b(a){return IBAN.isValid(a)}function c(a){var b=/^([a-zA-Z]){4}([a-zA-Z]){2}([0-9a-zA-Z]){2}([0-9a-zA-Z]{3})?$/;return b.test(a)}a(function(){a("form.checkout, form#order_review").on("blur input change","#direct-debit-form input#direct-debit-account-holder",function(){a(this).val()||(a(this).parents("p.form-row").removeClass("woocommerce-validated"),a(this).parents("p.form-row").addClass("woocommerce-invalid woocommerce-invalid-required-field"))}),a("form.checkout, form#order_review").on("blur input change","#direct-debit-form input#direct-debit-account-iban",function(){b(a(this).val())||(a(this).parents("p.form-row").removeClass("woocommerce-validated"),a(this).parents("p.form-row").addClass("woocommerce-invalid woocommerce-invalid-required-field"))}),a("form.checkout, form#order_review").on("blur input change","#direct-debit-form input#direct-debit-account-bic",function(){c(a(this).val())||(a(this).parents("p.form-row").removeClass("woocommerce-validated"),a(this).parents("p.form-row").addClass("woocommerce-invalid woocommerce-invalid-required-field"))}),a("form.checkout, form#order_review").on("blur input change","input, select",function(){a("#direct-debit-form").length&&(a(".direct-debit-checkbox").hide(),a("#payment_method_direct-debit").is(":checked")&&a("input#direct-debit-account-holder").val()&&a("input#direct-debit-account-iban").val()&&a("input#direct-debit-account-bic").val()&&a(".direct-debit-checkbox").show())}),a(document).on("click","a#show-direct-debit-trigger",function(b){b.preventDefault();var c=a(this).attr("href"),d={country:a("#billing_country").val(),postcode:a("input#billing_postcode").val(),city:a("#billing_city").val(),address:a("input#billing_address_1").val(),address_2:a("input#billing_address_2").val(),debit_holder:a("input#direct-debit-account-holder").val(),debit_iban:a("input#direct-debit-account-iban").val(),debit_swift:a("input#direct-debit-account-bic").val()};c+="&ajax=true&"+jQuery.param(d),a("#show-direct-debit-pretty").attr("href",c),a("#show-direct-debit-pretty").trigger("click")}),a("a#show-direct-debit-pretty").prettyPhoto({social_tools:!1,theme:"pp_woocommerce",horizontal_padding:20,opacity:.8,deeplinking:!1})})}(jQuery);
|
includes/gateways/direct-debit/assets/js/iban.js
ADDED
@@ -0,0 +1,420 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
The MIT License (MIT)
|
3 |
+
Copyright (c) 2013-2015 ARHS Developments SA
|
4 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
5 |
+
this software and associated documentation files (the "Software"), to deal in
|
6 |
+
the Software without restriction, including without limitation the rights to
|
7 |
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
8 |
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
9 |
+
subject to the following conditions:
|
10 |
+
|
11 |
+
The above copyright notice and this permission notice shall be included in all
|
12 |
+
copies or substantial portions of the Software.
|
13 |
+
|
14 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
16 |
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
17 |
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
18 |
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
19 |
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20 |
+
*/
|
21 |
+
(function(exports){
|
22 |
+
|
23 |
+
// Array.prototype.map polyfill
|
24 |
+
// code from https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/map
|
25 |
+
if (!Array.prototype.map){
|
26 |
+
Array.prototype.map = function(fun /*, thisArg */){
|
27 |
+
"use strict";
|
28 |
+
|
29 |
+
if (this === void 0 || this === null)
|
30 |
+
throw new TypeError();
|
31 |
+
|
32 |
+
var t = Object(this);
|
33 |
+
var len = t.length >>> 0;
|
34 |
+
if (typeof fun !== "function")
|
35 |
+
throw new TypeError();
|
36 |
+
|
37 |
+
var res = new Array(len);
|
38 |
+
var thisArg = arguments.length >= 2 ? arguments[1] : void 0;
|
39 |
+
for (var i = 0; i < len; i++)
|
40 |
+
{
|
41 |
+
// NOTE: Absolute correctness would demand Object.defineProperty
|
42 |
+
// be used. But this method is fairly new, and failure is
|
43 |
+
// possible only if Object.prototype or Array.prototype
|
44 |
+
// has a property |i| (very unlikely), so use a less-correct
|
45 |
+
// but more portable alternative.
|
46 |
+
if (i in t)
|
47 |
+
res[i] = fun.call(thisArg, t[i], i, t);
|
48 |
+
}
|
49 |
+
|
50 |
+
return res;
|
51 |
+
};
|
52 |
+
}
|
53 |
+
|
54 |
+
var A = 'A'.charCodeAt(0),
|
55 |
+
Z = 'Z'.charCodeAt(0);
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Prepare an IBAN for mod 97 computation by moving the first 4 chars to the end and transforming the letters to
|
59 |
+
* numbers (A = 10, B = 11, ..., Z = 35), as specified in ISO13616.
|
60 |
+
*
|
61 |
+
* @param {string} iban the IBAN
|
62 |
+
* @returns {string} the prepared IBAN
|
63 |
+
*/
|
64 |
+
function iso13616Prepare(iban) {
|
65 |
+
iban = iban.toUpperCase();
|
66 |
+
iban = iban.substr(4) + iban.substr(0,4);
|
67 |
+
|
68 |
+
return iban.split('').map(function(n){
|
69 |
+
var code = n.charCodeAt(0);
|
70 |
+
if (code >= A && code <= Z){
|
71 |
+
// A = 10, B = 11, ... Z = 35
|
72 |
+
return code - A + 10;
|
73 |
+
} else {
|
74 |
+
return n;
|
75 |
+
}
|
76 |
+
}).join('');
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Calculates the MOD 97 10 of the passed IBAN as specified in ISO7064.
|
81 |
+
*
|
82 |
+
* @param iban
|
83 |
+
* @returns {number}
|
84 |
+
*/
|
85 |
+
function iso7064Mod97_10(iban) {
|
86 |
+
var remainder = iban,
|
87 |
+
block;
|
88 |
+
|
89 |
+
while (remainder.length > 2){
|
90 |
+
block = remainder.slice(0, 9);
|
91 |
+
remainder = parseInt(block, 10) % 97 + remainder.slice(block.length);
|
92 |
+
}
|
93 |
+
|
94 |
+
return parseInt(remainder, 10) % 97;
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Parse the BBAN structure used to configure each IBAN Specification and returns a matching regular expression.
|
99 |
+
* A structure is composed of blocks of 3 characters (one letter and 2 digits). Each block represents
|
100 |
+
* a logical group in the typical representation of the BBAN. For each group, the letter indicates which characters
|
101 |
+
* are allowed in this group and the following 2-digits number tells the length of the group.
|
102 |
+
*
|
103 |
+
* @param {string} structure the structure to parse
|
104 |
+
* @returns {RegExp}
|
105 |
+
*/
|
106 |
+
function parseStructure(structure){
|
107 |
+
// split in blocks of 3 chars
|
108 |
+
var regex = structure.match(/(.{3})/g).map(function(block){
|
109 |
+
|
110 |
+
// parse each structure block (1-char + 2-digits)
|
111 |
+
var format,
|
112 |
+
pattern = block.slice(0, 1),
|
113 |
+
repeats = parseInt(block.slice(1), 10);
|
114 |
+
|
115 |
+
switch (pattern){
|
116 |
+
case "A": format = "0-9A-Za-z"; break;
|
117 |
+
case "B": format = "0-9A-Z"; break;
|
118 |
+
case "C": format = "A-Za-z"; break;
|
119 |
+
case "F": format = "0-9"; break;
|
120 |
+
case "L": format = "a-z"; break;
|
121 |
+
case "U": format = "A-Z"; break;
|
122 |
+
case "W": format = "0-9a-z"; break;
|
123 |
+
}
|
124 |
+
|
125 |
+
return '([' + format + ']{' + repeats + '})';
|
126 |
+
});
|
127 |
+
|
128 |
+
return new RegExp('^' + regex.join('') + '$');
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Create a new Specification for a valid IBAN number.
|
133 |
+
*
|
134 |
+
* @param countryCode the code of the country
|
135 |
+
* @param length the length of the IBAN
|
136 |
+
* @param structure the structure of the undernying BBAN (for validation and formatting)
|
137 |
+
* @param example an example valid IBAN
|
138 |
+
* @constructor
|
139 |
+
*/
|
140 |
+
function Specification(countryCode, length, structure, example){
|
141 |
+
|
142 |
+
this.countryCode = countryCode;
|
143 |
+
this.length = length;
|
144 |
+
this.structure = structure;
|
145 |
+
this.example = example;
|
146 |
+
}
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Lazy-loaded regex (parse the structure and construct the regular expression the first time we need it for validation)
|
150 |
+
*/
|
151 |
+
Specification.prototype._regex = function(){
|
152 |
+
return this._cachedRegex || (this._cachedRegex = parseStructure(this.structure))
|
153 |
+
};
|
154 |
+
|
155 |
+
/**
|
156 |
+
* Check if the passed iban is valid according to this specification.
|
157 |
+
*
|
158 |
+
* @param {String} iban the iban to validate
|
159 |
+
* @returns {boolean} true if valid, false otherwise
|
160 |
+
*/
|
161 |
+
Specification.prototype.isValid = function(iban){
|
162 |
+
return this.length == iban.length
|
163 |
+
&& this.countryCode === iban.slice(0,2)
|
164 |
+
&& this._regex().test(iban.slice(4))
|
165 |
+
&& iso7064Mod97_10(iso13616Prepare(iban)) == 1;
|
166 |
+
};
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Convert the passed IBAN to a country-specific BBAN.
|
170 |
+
*
|
171 |
+
* @param iban the IBAN to convert
|
172 |
+
* @param separator the separator to use between BBAN blocks
|
173 |
+
* @returns {string} the BBAN
|
174 |
+
*/
|
175 |
+
Specification.prototype.toBBAN = function(iban, separator) {
|
176 |
+
return this._regex().exec(iban.slice(4)).slice(1).join(separator);
|
177 |
+
};
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Convert the passed BBAN to an IBAN for this country specification.
|
181 |
+
* Please note that <i>"generation of the IBAN shall be the exclusive responsibility of the bank/branch servicing the account"</i>.
|
182 |
+
* This method implements the preferred algorithm described in http://en.wikipedia.org/wiki/International_Bank_Account_Number#Generating_IBAN_check_digits
|
183 |
+
*
|
184 |
+
* @param bban the BBAN to convert to IBAN
|
185 |
+
* @returns {string} the IBAN
|
186 |
+
*/
|
187 |
+
Specification.prototype.fromBBAN = function(bban) {
|
188 |
+
if (!this.isValidBBAN(bban)){
|
189 |
+
throw new Error('Invalid BBAN');
|
190 |
+
}
|
191 |
+
|
192 |
+
var remainder = iso7064Mod97_10(iso13616Prepare(this.countryCode + '00' + bban)),
|
193 |
+
checkDigit = ('0' + (98 - remainder)).slice(-2);
|
194 |
+
|
195 |
+
return this.countryCode + checkDigit + bban;
|
196 |
+
};
|
197 |
+
|
198 |
+
/**
|
199 |
+
* Check of the passed BBAN is valid.
|
200 |
+
* This function only checks the format of the BBAN (length and matching the letetr/number specs) but does not
|
201 |
+
* verify the check digit.
|
202 |
+
*
|
203 |
+
* @param bban the BBAN to validate
|
204 |
+
* @returns {boolean} true if the passed bban is a valid BBAN according to this specification, false otherwise
|
205 |
+
*/
|
206 |
+
Specification.prototype.isValidBBAN = function(bban) {
|
207 |
+
return this.length - 4 == bban.length
|
208 |
+
&& this._regex().test(bban);
|
209 |
+
};
|
210 |
+
|
211 |
+
var countries = {};
|
212 |
+
|
213 |
+
function addSpecification(IBAN){
|
214 |
+
countries[IBAN.countryCode] = IBAN;
|
215 |
+
}
|
216 |
+
|
217 |
+
addSpecification(new Specification("AD", 24, "F04F04A12", "AD1200012030200359100100"));
|
218 |
+
addSpecification(new Specification("AE", 23, "F03F16", "AE070331234567890123456"));
|
219 |
+
addSpecification(new Specification("AL", 28, "F08A16", "AL47212110090000000235698741"));
|
220 |
+
addSpecification(new Specification("AT", 20, "F05F11", "AT611904300234573201"));
|
221 |
+
addSpecification(new Specification("AZ", 28, "U04A20", "AZ21NABZ00000000137010001944"));
|
222 |
+
addSpecification(new Specification("BA", 20, "F03F03F08F02", "BA391290079401028494"));
|
223 |
+
addSpecification(new Specification("BE", 16, "F03F07F02", "BE68539007547034"));
|
224 |
+
addSpecification(new Specification("BG", 22, "U04F04F02A08", "BG80BNBG96611020345678"));
|
225 |
+
addSpecification(new Specification("BH", 22, "U04A14", "BH67BMAG00001299123456"));
|
226 |
+
addSpecification(new Specification("BR", 29, "F08F05F10U01A01", "BR9700360305000010009795493P1"));
|
227 |
+
addSpecification(new Specification("CH", 21, "F05A12", "CH9300762011623852957"));
|
228 |
+
addSpecification(new Specification("CR", 21, "F03F14", "CR0515202001026284066"));
|
229 |
+
addSpecification(new Specification("CY", 28, "F03F05A16", "CY17002001280000001200527600"));
|
230 |
+
addSpecification(new Specification("CZ", 24, "F04F06F10", "CZ6508000000192000145399"));
|
231 |
+
addSpecification(new Specification("DE", 22, "F08F10", "DE89370400440532013000"));
|
232 |
+
addSpecification(new Specification("DK", 18, "F04F09F01", "DK5000400440116243"));
|
233 |
+
addSpecification(new Specification("DO", 28, "U04F20", "DO28BAGR00000001212453611324"));
|
234 |
+
addSpecification(new Specification("EE", 20, "F02F02F11F01", "EE382200221020145685"));
|
235 |
+
addSpecification(new Specification("ES", 24, "F04F04F01F01F10", "ES9121000418450200051332"));
|
236 |
+
addSpecification(new Specification("FI", 18, "F06F07F01", "FI2112345600000785"));
|
237 |
+
addSpecification(new Specification("FO", 18, "F04F09F01", "FO6264600001631634"));
|
238 |
+
addSpecification(new Specification("FR", 27, "F05F05A11F02", "FR1420041010050500013M02606"));
|
239 |
+
addSpecification(new Specification("GB", 22, "U04F06F08", "GB29NWBK60161331926819"));
|
240 |
+
addSpecification(new Specification("GE", 22, "U02F16", "GE29NB0000000101904917"));
|
241 |
+
addSpecification(new Specification("GI", 23, "U04A15", "GI75NWBK000000007099453"));
|
242 |
+
addSpecification(new Specification("GL", 18, "F04F09F01", "GL8964710001000206"));
|
243 |
+
addSpecification(new Specification("GR", 27, "F03F04A16", "GR1601101250000000012300695"));
|
244 |
+
addSpecification(new Specification("GT", 28, "A04A20", "GT82TRAJ01020000001210029690"));
|
245 |
+
addSpecification(new Specification("HR", 21, "F07F10", "HR1210010051863000160"));
|
246 |
+
addSpecification(new Specification("HU", 28, "F03F04F01F15F01", "HU42117730161111101800000000"));
|
247 |
+
addSpecification(new Specification("IE", 22, "U04F06F08", "IE29AIBK93115212345678"));
|
248 |
+
addSpecification(new Specification("IL", 23, "F03F03F13", "IL620108000000099999999"));
|
249 |
+
addSpecification(new Specification("IS", 26, "F04F02F06F10", "IS140159260076545510730339"));
|
250 |
+
addSpecification(new Specification("IT", 27, "U01F05F05A12", "IT60X0542811101000000123456"));
|
251 |
+
addSpecification(new Specification("KW", 30, "U04A22", "KW81CBKU0000000000001234560101"));
|
252 |
+
addSpecification(new Specification("KZ", 20, "F03A13", "KZ86125KZT5004100100"));
|
253 |
+
addSpecification(new Specification("LB", 28, "F04A20", "LB62099900000001001901229114"));
|
254 |
+
addSpecification(new Specification("LI", 21, "F05A12", "LI21088100002324013AA"));
|
255 |
+
addSpecification(new Specification("LT", 20, "F05F11", "LT121000011101001000"));
|
256 |
+
addSpecification(new Specification("LU", 20, "F03A13", "LU280019400644750000"));
|
257 |
+
addSpecification(new Specification("LV", 21, "U04A13", "LV80BANK0000435195001"));
|
258 |
+
addSpecification(new Specification("MC", 27, "F05F05A11F02", "MC5811222000010123456789030"));
|
259 |
+
addSpecification(new Specification("MD", 24, "U02F18", "MD24AG000225100013104168"));
|
260 |
+
addSpecification(new Specification("ME", 22, "F03F13F02", "ME25505000012345678951"));
|
261 |
+
addSpecification(new Specification("MK", 19, "F03A10F02", "MK07250120000058984"));
|
262 |
+
addSpecification(new Specification("MR", 27, "F05F05F11F02", "MR1300020001010000123456753"));
|
263 |
+
addSpecification(new Specification("MT", 31, "U04F05A18", "MT84MALT011000012345MTLCAST001S"));
|
264 |
+
addSpecification(new Specification("MU", 30, "U04F02F02F12F03U03", "MU17BOMM0101101030300200000MUR"));
|
265 |
+
addSpecification(new Specification("NL", 18, "U04F10", "NL91ABNA0417164300"));
|
266 |
+
addSpecification(new Specification("NO", 15, "F04F06F01", "NO9386011117947"));
|
267 |
+
addSpecification(new Specification("PK", 24, "U04A16", "PK36SCBL0000001123456702"));
|
268 |
+
addSpecification(new Specification("PL", 28, "F08F16", "PL61109010140000071219812874"));
|
269 |
+
addSpecification(new Specification("PS", 29, "U04A21", "PS92PALS000000000400123456702"));
|
270 |
+
addSpecification(new Specification("PT", 25, "F04F04F11F02", "PT50000201231234567890154"));
|
271 |
+
addSpecification(new Specification("RO", 24, "U04A16", "RO49AAAA1B31007593840000"));
|
272 |
+
addSpecification(new Specification("RS", 22, "F03F13F02", "RS35260005601001611379"));
|
273 |
+
addSpecification(new Specification("SA", 24, "F02A18", "SA0380000000608010167519"));
|
274 |
+
addSpecification(new Specification("SE", 24, "F03F16F01", "SE4550000000058398257466"));
|
275 |
+
addSpecification(new Specification("SI", 19, "F05F08F02", "SI56263300012039086"));
|
276 |
+
addSpecification(new Specification("SK", 24, "F04F06F10", "SK3112000000198742637541"));
|
277 |
+
addSpecification(new Specification("SM", 27, "U01F05F05A12", "SM86U0322509800000000270100"));
|
278 |
+
addSpecification(new Specification("TN", 24, "F02F03F13F02", "TN5910006035183598478831"));
|
279 |
+
addSpecification(new Specification("TR", 26, "F05A01A16", "TR330006100519786457841326"));
|
280 |
+
addSpecification(new Specification("VG", 24, "U04F16", "VG96VPVG0000012345678901"));
|
281 |
+
|
282 |
+
// Angola
|
283 |
+
addSpecification(new Specification("AO", 25, "F21", "AO69123456789012345678901"));
|
284 |
+
// Burkina
|
285 |
+
addSpecification(new Specification("BF", 27, "F23", "BF2312345678901234567890123"));
|
286 |
+
// Burundi
|
287 |
+
addSpecification(new Specification("BI", 16, "F12", "BI41123456789012"));
|
288 |
+
// Benin
|
289 |
+
addSpecification(new Specification("BJ", 28, "F24", "BJ39123456789012345678901234"));
|
290 |
+
// Ivory
|
291 |
+
addSpecification(new Specification("CI", 28, "U01F23", "CI17A12345678901234567890123"));
|
292 |
+
// Cameron
|
293 |
+
addSpecification(new Specification("CM", 27, "F23", "CM9012345678901234567890123"));
|
294 |
+
// Cape Verde
|
295 |
+
addSpecification(new Specification("CV", 25, "F21", "CV30123456789012345678901"));
|
296 |
+
// Algeria
|
297 |
+
addSpecification(new Specification("DZ", 24, "F20", "DZ8612345678901234567890"));
|
298 |
+
// Iran
|
299 |
+
addSpecification(new Specification("IR", 26, "F22", "IR861234568790123456789012"));
|
300 |
+
// Jordan
|
301 |
+
addSpecification(new Specification("JO", 30, "A04F22", "JO15AAAA1234567890123456789012"));
|
302 |
+
// Madagascar
|
303 |
+
addSpecification(new Specification("MG", 27, "F23", "MG1812345678901234567890123"));
|
304 |
+
// Mali
|
305 |
+
addSpecification(new Specification("ML", 28, "U01F23", "ML15A12345678901234567890123"));
|
306 |
+
// Mozambique
|
307 |
+
addSpecification(new Specification("MZ", 25, "F21", "MZ25123456789012345678901"));
|
308 |
+
// Quatar
|
309 |
+
addSpecification(new Specification("QA", 29, "U04A21", "QA30AAAA123456789012345678901"));
|
310 |
+
// Senegal
|
311 |
+
addSpecification(new Specification("SN", 28, "U01F23", "SN52A12345678901234567890123"));
|
312 |
+
// Ukraine
|
313 |
+
addSpecification(new Specification("UA", 29, "F25", "UA511234567890123456789012345"));
|
314 |
+
|
315 |
+
var NON_ALPHANUM = /[^a-zA-Z0-9]/g,
|
316 |
+
EVERY_FOUR_CHARS =/(.{4})(?!$)/g;
|
317 |
+
|
318 |
+
/**
|
319 |
+
* Utility function to check if a variable is a String.
|
320 |
+
*
|
321 |
+
* @param v
|
322 |
+
* @returns {boolean} true if the passed variable is a String, false otherwise.
|
323 |
+
*/
|
324 |
+
function isString(v){
|
325 |
+
return (typeof v == 'string' || v instanceof String);
|
326 |
+
}
|
327 |
+
|
328 |
+
/**
|
329 |
+
* Check if an IBAN is valid.
|
330 |
+
*
|
331 |
+
* @param {String} iban the IBAN to validate.
|
332 |
+
* @returns {boolean} true if the passed IBAN is valid, false otherwise
|
333 |
+
*/
|
334 |
+
exports.isValid = function(iban){
|
335 |
+
if (!isString(iban)){
|
336 |
+
return false;
|
337 |
+
}
|
338 |
+
iban = this.electronicFormat(iban);
|
339 |
+
var countryStructure = countries[iban.slice(0,2)];
|
340 |
+
return !!countryStructure && countryStructure.isValid(iban);
|
341 |
+
};
|
342 |
+
|
343 |
+
/**
|
344 |
+
* Convert an IBAN to a BBAN.
|
345 |
+
*
|
346 |
+
* @param iban
|
347 |
+
* @param {String} [separator] the separator to use between the blocks of the BBAN, defaults to ' '
|
348 |
+
* @returns {string|*}
|
349 |
+
*/
|
350 |
+
exports.toBBAN = function(iban, separator){
|
351 |
+
if (typeof separator == 'undefined'){
|
352 |
+
separator = ' ';
|
353 |
+
}
|
354 |
+
iban = this.electronicFormat(iban);
|
355 |
+
var countryStructure = countries[iban.slice(0,2)];
|
356 |
+
if (!countryStructure) {
|
357 |
+
throw new Error('No country with code ' + iban.slice(0,2));
|
358 |
+
}
|
359 |
+
return countryStructure.toBBAN(iban, separator);
|
360 |
+
};
|
361 |
+
|
362 |
+
/**
|
363 |
+
* Convert the passed BBAN to an IBAN for this country specification.
|
364 |
+
* Please note that <i>"generation of the IBAN shall be the exclusive responsibility of the bank/branch servicing the account"</i>.
|
365 |
+
* This method implements the preferred algorithm described in http://en.wikipedia.org/wiki/International_Bank_Account_Number#Generating_IBAN_check_digits
|
366 |
+
*
|
367 |
+
* @param countryCode the country of the BBAN
|
368 |
+
* @param bban the BBAN to convert to IBAN
|
369 |
+
* @returns {string} the IBAN
|
370 |
+
*/
|
371 |
+
exports.fromBBAN = function(countryCode, bban){
|
372 |
+
var countryStructure = countries[countryCode];
|
373 |
+
if (!countryStructure) {
|
374 |
+
throw new Error('No country with code ' + countryCode);
|
375 |
+
}
|
376 |
+
return countryStructure.fromBBAN(this.electronicFormat(bban));
|
377 |
+
};
|
378 |
+
|
379 |
+
/**
|
380 |
+
* Check the validity of the passed BBAN.
|
381 |
+
*
|
382 |
+
* @param countryCode the country of the BBAN
|
383 |
+
* @param bban the BBAN to check the validity of
|
384 |
+
*/
|
385 |
+
exports.isValidBBAN = function(countryCode, bban){
|
386 |
+
if (!isString(bban)){
|
387 |
+
return false;
|
388 |
+
}
|
389 |
+
var countryStructure = countries[countryCode];
|
390 |
+
return countryStructure && countryStructure.isValidBBAN(this.electronicFormat(bban));
|
391 |
+
};
|
392 |
+
|
393 |
+
/**
|
394 |
+
*
|
395 |
+
* @param iban
|
396 |
+
* @param separator
|
397 |
+
* @returns {string}
|
398 |
+
*/
|
399 |
+
exports.printFormat = function(iban, separator){
|
400 |
+
if (typeof separator == 'undefined'){
|
401 |
+
separator = ' ';
|
402 |
+
}
|
403 |
+
return this.electronicFormat(iban).replace(EVERY_FOUR_CHARS, "$1" + separator);
|
404 |
+
};
|
405 |
+
|
406 |
+
/**
|
407 |
+
*
|
408 |
+
* @param iban
|
409 |
+
* @returns {string}
|
410 |
+
*/
|
411 |
+
exports.electronicFormat = function(iban){
|
412 |
+
return iban.replace(NON_ALPHANUM, '').toUpperCase();
|
413 |
+
};
|
414 |
+
|
415 |
+
/**
|
416 |
+
* An object containing all the known IBAN specifications.
|
417 |
+
*/
|
418 |
+
exports.countries = countries;
|
419 |
+
|
420 |
+
})(typeof exports == 'undefined' ? this.IBAN = {} : exports);
|
includes/gateways/direct-debit/assets/js/iban.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(a){function b(a){return a=a.toUpperCase(),a=a.substr(4)+a.substr(0,4),a.split("").map(function(a){var b=a.charCodeAt(0);return b>=h&&i>=b?b-h+10:a}).join("")}function c(a){for(var b,c=a;c.length>2;)b=c.slice(0,9),c=parseInt(b,10)%97+c.slice(b.length);return parseInt(c,10)%97}function d(a){var b=a.match(/(.{3})/g).map(function(a){var b,c=a.slice(0,1),d=parseInt(a.slice(1),10);switch(c){case"A":b="0-9A-Za-z";break;case"B":b="0-9A-Z";break;case"C":b="A-Za-z";break;case"F":b="0-9";break;case"L":b="a-z";break;case"U":b="A-Z";break;case"W":b="0-9a-z"}return"(["+b+"]{"+d+"})"});return new RegExp("^"+b.join("")+"$")}function e(a,b,c,d){this.countryCode=a,this.length=b,this.structure=c,this.example=d}function f(a){j[a.countryCode]=a}function g(a){return"string"==typeof a||a instanceof String}Array.prototype.map||(Array.prototype.map=function(a){"use strict";if(void 0===this||null===this)throw new TypeError;var b=Object(this),c=b.length>>>0;if("function"!=typeof a)throw new TypeError;for(var d=new Array(c),e=arguments.length>=2?arguments[1]:void 0,f=0;c>f;f++)f in b&&(d[f]=a.call(e,b[f],f,b));return d});var h="A".charCodeAt(0),i="Z".charCodeAt(0);e.prototype._regex=function(){return this._cachedRegex||(this._cachedRegex=d(this.structure))},e.prototype.isValid=function(a){return this.length==a.length&&this.countryCode===a.slice(0,2)&&this._regex().test(a.slice(4))&&1==c(b(a))},e.prototype.toBBAN=function(a,b){return this._regex().exec(a.slice(4)).slice(1).join(b)},e.prototype.fromBBAN=function(a){if(!this.isValidBBAN(a))throw new Error("Invalid BBAN");var d=c(b(this.countryCode+"00"+a)),e=("0"+(98-d)).slice(-2);return this.countryCode+e+a},e.prototype.isValidBBAN=function(a){return this.length-4==a.length&&this._regex().test(a)};var j={};f(new e("AD",24,"F04F04A12","AD1200012030200359100100")),f(new e("AE",23,"F03F16","AE070331234567890123456")),f(new e("AL",28,"F08A16","AL47212110090000000235698741")),f(new e("AT",20,"F05F11","AT611904300234573201")),f(new e("AZ",28,"U04A20","AZ21NABZ00000000137010001944")),f(new e("BA",20,"F03F03F08F02","BA391290079401028494")),f(new e("BE",16,"F03F07F02","BE68539007547034")),f(new e("BG",22,"U04F04F02A08","BG80BNBG96611020345678")),f(new e("BH",22,"U04A14","BH67BMAG00001299123456")),f(new e("BR",29,"F08F05F10U01A01","BR9700360305000010009795493P1")),f(new e("CH",21,"F05A12","CH9300762011623852957")),f(new e("CR",21,"F03F14","CR0515202001026284066")),f(new e("CY",28,"F03F05A16","CY17002001280000001200527600")),f(new e("CZ",24,"F04F06F10","CZ6508000000192000145399")),f(new e("DE",22,"F08F10","DE89370400440532013000")),f(new e("DK",18,"F04F09F01","DK5000400440116243")),f(new e("DO",28,"U04F20","DO28BAGR00000001212453611324")),f(new e("EE",20,"F02F02F11F01","EE382200221020145685")),f(new e("ES",24,"F04F04F01F01F10","ES9121000418450200051332")),f(new e("FI",18,"F06F07F01","FI2112345600000785")),f(new e("FO",18,"F04F09F01","FO6264600001631634")),f(new e("FR",27,"F05F05A11F02","FR1420041010050500013M02606")),f(new e("GB",22,"U04F06F08","GB29NWBK60161331926819")),f(new e("GE",22,"U02F16","GE29NB0000000101904917")),f(new e("GI",23,"U04A15","GI75NWBK000000007099453")),f(new e("GL",18,"F04F09F01","GL8964710001000206")),f(new e("GR",27,"F03F04A16","GR1601101250000000012300695")),f(new e("GT",28,"A04A20","GT82TRAJ01020000001210029690")),f(new e("HR",21,"F07F10","HR1210010051863000160")),f(new e("HU",28,"F03F04F01F15F01","HU42117730161111101800000000")),f(new e("IE",22,"U04F06F08","IE29AIBK93115212345678")),f(new e("IL",23,"F03F03F13","IL620108000000099999999")),f(new e("IS",26,"F04F02F06F10","IS140159260076545510730339")),f(new e("IT",27,"U01F05F05A12","IT60X0542811101000000123456")),f(new e("KW",30,"U04A22","KW81CBKU0000000000001234560101")),f(new e("KZ",20,"F03A13","KZ86125KZT5004100100")),f(new e("LB",28,"F04A20","LB62099900000001001901229114")),f(new e("LI",21,"F05A12","LI21088100002324013AA")),f(new e("LT",20,"F05F11","LT121000011101001000")),f(new e("LU",20,"F03A13","LU280019400644750000")),f(new e("LV",21,"U04A13","LV80BANK0000435195001")),f(new e("MC",27,"F05F05A11F02","MC5811222000010123456789030")),f(new e("MD",24,"U02F18","MD24AG000225100013104168")),f(new e("ME",22,"F03F13F02","ME25505000012345678951")),f(new e("MK",19,"F03A10F02","MK07250120000058984")),f(new e("MR",27,"F05F05F11F02","MR1300020001010000123456753")),f(new e("MT",31,"U04F05A18","MT84MALT011000012345MTLCAST001S")),f(new e("MU",30,"U04F02F02F12F03U03","MU17BOMM0101101030300200000MUR")),f(new e("NL",18,"U04F10","NL91ABNA0417164300")),f(new e("NO",15,"F04F06F01","NO9386011117947")),f(new e("PK",24,"U04A16","PK36SCBL0000001123456702")),f(new e("PL",28,"F08F16","PL61109010140000071219812874")),f(new e("PS",29,"U04A21","PS92PALS000000000400123456702")),f(new e("PT",25,"F04F04F11F02","PT50000201231234567890154")),f(new e("RO",24,"U04A16","RO49AAAA1B31007593840000")),f(new e("RS",22,"F03F13F02","RS35260005601001611379")),f(new e("SA",24,"F02A18","SA0380000000608010167519")),f(new e("SE",24,"F03F16F01","SE4550000000058398257466")),f(new e("SI",19,"F05F08F02","SI56263300012039086")),f(new e("SK",24,"F04F06F10","SK3112000000198742637541")),f(new e("SM",27,"U01F05F05A12","SM86U0322509800000000270100")),f(new e("TN",24,"F02F03F13F02","TN5910006035183598478831")),f(new e("TR",26,"F05A01A16","TR330006100519786457841326")),f(new e("VG",24,"U04F16","VG96VPVG0000012345678901")),f(new e("AO",25,"F21","AO69123456789012345678901")),f(new e("BF",27,"F23","BF2312345678901234567890123")),f(new e("BI",16,"F12","BI41123456789012")),f(new e("BJ",28,"F24","BJ39123456789012345678901234")),f(new e("CI",28,"U01F23","CI17A12345678901234567890123")),f(new e("CM",27,"F23","CM9012345678901234567890123")),f(new e("CV",25,"F21","CV30123456789012345678901")),f(new e("DZ",24,"F20","DZ8612345678901234567890")),f(new e("IR",26,"F22","IR861234568790123456789012")),f(new e("JO",30,"A04F22","JO15AAAA1234567890123456789012")),f(new e("MG",27,"F23","MG1812345678901234567890123")),f(new e("ML",28,"U01F23","ML15A12345678901234567890123")),f(new e("MZ",25,"F21","MZ25123456789012345678901")),f(new e("QA",29,"U04A21","QA30AAAA123456789012345678901")),f(new e("SN",28,"U01F23","SN52A12345678901234567890123")),f(new e("UA",29,"F25","UA511234567890123456789012345"));var k=/[^a-zA-Z0-9]/g,l=/(.{4})(?!$)/g;a.isValid=function(a){if(!g(a))return!1;a=this.electronicFormat(a);var b=j[a.slice(0,2)];return!!b&&b.isValid(a)},a.toBBAN=function(a,b){"undefined"==typeof b&&(b=" "),a=this.electronicFormat(a);var c=j[a.slice(0,2)];if(!c)throw new Error("No country with code "+a.slice(0,2));return c.toBBAN(a,b)},a.fromBBAN=function(a,b){var c=j[a];if(!c)throw new Error("No country with code "+a);return c.fromBBAN(this.electronicFormat(b))},a.isValidBBAN=function(a,b){if(!g(b))return!1;var c=j[a];return c&&c.isValidBBAN(this.electronicFormat(b))},a.printFormat=function(a,b){return"undefined"==typeof b&&(b=" "),this.electronicFormat(a).replace(l,"$1"+b)},a.electronicFormat=function(a){return a.replace(k,"").toUpperCase()},a.countries=j}("undefined"==typeof exports?this.IBAN={}:exports);
|
includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php
ADDED
@@ -0,0 +1,468 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit; // Exit if accessed directly
|
5 |
+
}
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Direct Debit Payment Gateway
|
9 |
+
*
|
10 |
+
* Provides a Direct Debit Payment Gateway.
|
11 |
+
*
|
12 |
+
* @class WC_GZD_Gateway_Direct_Debit
|
13 |
+
* @extends WC_Payment_Gateway
|
14 |
+
* @version 2.1.0
|
15 |
+
* @author Vendidero
|
16 |
+
*/
|
17 |
+
class WC_GZD_Gateway_Direct_Debit extends WC_Payment_Gateway {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Constructor for the gateway.
|
21 |
+
*/
|
22 |
+
public function __construct() {
|
23 |
+
$this->id = 'direct-debit';
|
24 |
+
$this->icon = apply_filters( 'woocommerce_gzd_direct_debit_icon', '' );
|
25 |
+
$this->has_fields = true;
|
26 |
+
$this->method_title = __( 'Direct Debit', 'woocommerce-germanized' );
|
27 |
+
$this->method_description = __( 'Allows you to offer direct debit as a payment method to your customers. Adds SEPA fields to checkout.', 'woocommerce-germanized' );
|
28 |
+
|
29 |
+
// Load the settings.
|
30 |
+
$this->init_form_fields();
|
31 |
+
$this->init_settings();
|
32 |
+
|
33 |
+
// Define user set variables
|
34 |
+
$this->enabled = $this->get_option( 'enabled' );
|
35 |
+
$this->title = $this->get_option( 'title' );
|
36 |
+
$this->description = $this->get_option( 'description' );
|
37 |
+
$this->instructions = $this->get_option( 'instructions', $this->description );
|
38 |
+
$this->enable_checkbox = $this->get_option( 'enable_checkbox', 'yes' );
|
39 |
+
$this->company_info = $this->get_option( 'company_info' );
|
40 |
+
$this->company_identification_number = $this->get_option( 'company_identification_number' );
|
41 |
+
$this->checkbox_label = $this->get_option( 'checkbox_label' );
|
42 |
+
$this->mandate_text = $this->get_option( 'mandate_text', __( '[company_info]
|
43 |
+
debtee identification number: [company_identification_number]
|
44 |
+
mandat reference number: will be notified separately.
|
45 |
+
|
46 |
+
<h3>SEPA Direct Debit Mandate</h3>
|
47 |
+
|
48 |
+
I hereby authorize the payee to automatically draft from my savings account listed below for the specified amount. I further authorize my bank to accept the direct debit from this account.
|
49 |
+
|
50 |
+
Notice: I may request a full refund within eight weeks starting with the initial debiting date. Responsibilities agreed with my credit institute apply for a refund.
|
51 |
+
|
52 |
+
<strong>Debtor:</strong>
|
53 |
+
Account holder: [account_holder]
|
54 |
+
Street: [street]
|
55 |
+
Postcode: [postcode]
|
56 |
+
City: [city]
|
57 |
+
Country: [country]
|
58 |
+
IBAN: [account_iban]
|
59 |
+
BIC: [account_swift]
|
60 |
+
|
61 |
+
[city], [date], [account_holder]
|
62 |
+
|
63 |
+
This letter is done automatically and is valid without signature.
|
64 |
+
|
65 |
+
<hr/>
|
66 |
+
|
67 |
+
Please notice: Period for pre-information of the SEPA direct debit is shortened to one day.', 'woocommerce-germanized' ) );
|
68 |
+
|
69 |
+
$this->supports = array(
|
70 |
+
'products',
|
71 |
+
);
|
72 |
+
|
73 |
+
// Actions
|
74 |
+
add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );
|
75 |
+
add_action( 'woocommerce_thankyou_direct-debit', array( $this, 'thankyou_page' ) );
|
76 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'payment_scripts' ) );
|
77 |
+
add_action( 'woocommerce_review_order_after_payment', array( $this, 'checkbox' ), wc_gzd_get_hook_priority( 'checkout_direct_debit' ) );
|
78 |
+
add_action( 'wp_ajax_show_direct_debit', array( $this, 'generate_mandate' ) );
|
79 |
+
add_action( 'wp_ajax_nopriv_show_direct_debit', array( $this, 'generate_mandate' ) );
|
80 |
+
add_filter( 'woocommerce_email_classes', array( $this, 'add_email_template' ) );
|
81 |
+
|
82 |
+
// Checkbox check
|
83 |
+
add_action( 'woocommerce_after_checkout_validation', array( $this, 'validate_checkbox' ), 10, 1 );
|
84 |
+
|
85 |
+
// Order Meta
|
86 |
+
add_action( 'woocommerce_checkout_update_order_meta', array( $this, 'set_order_meta' ), 10, 2 );
|
87 |
+
|
88 |
+
// Customer Emails
|
89 |
+
add_action( 'woocommerce_email_before_order_table', array( $this, 'email_instructions' ), 10, 3 );
|
90 |
+
add_action( 'woocommerce_germanized_order_confirmation_sent', array( $this, 'send_mail' ) );
|
91 |
+
|
92 |
+
// Order admin
|
93 |
+
add_filter( 'woocommerce_admin_billing_fields', array( $this, 'set_debit_fields' ) );
|
94 |
+
|
95 |
+
}
|
96 |
+
|
97 |
+
public function set_debit_fields( $fields ) {
|
98 |
+
|
99 |
+
global $post;
|
100 |
+
|
101 |
+
$order = wc_get_order( $post->ID );
|
102 |
+
|
103 |
+
if ( ! $order->payment_method == $this->id )
|
104 |
+
return $fields;
|
105 |
+
|
106 |
+
$fields[ 'direct_debit_holder' ] = array(
|
107 |
+
'label' => __( 'Account Holder', 'woocommerce-germanized' ),
|
108 |
+
'id' => '_direct_debit_holder',
|
109 |
+
'class' => '',
|
110 |
+
'show' => true,
|
111 |
+
);
|
112 |
+
|
113 |
+
$fields[ 'direct_debit_iban' ] = array(
|
114 |
+
'label' => __( 'IBAN', 'woocommerce-germanized' ),
|
115 |
+
'id' => '_direct_debit_iban',
|
116 |
+
'show' => true,
|
117 |
+
);
|
118 |
+
|
119 |
+
$fields[ 'direct_debit_bic' ] = array(
|
120 |
+
'label' => __( 'BIC/SWIFT', 'woocommerce-germanized' ),
|
121 |
+
'id' => '_direct_debit_bic',
|
122 |
+
'show' => true,
|
123 |
+
);
|
124 |
+
|
125 |
+
$fields[ 'direct_debit_reference' ] = array(
|
126 |
+
'label' => __( 'Mandate Reference ID', 'woocommerce-germanized' ),
|
127 |
+
'id' => '_direct_debit_reference',
|
128 |
+
'show' => true,
|
129 |
+
);
|
130 |
+
|
131 |
+
return $fields;
|
132 |
+
|
133 |
+
}
|
134 |
+
|
135 |
+
public function send_mail( $order_id ) {
|
136 |
+
|
137 |
+
$order = wc_get_order( $order_id );
|
138 |
+
|
139 |
+
if ( $order->payment_method == $this->id )
|
140 |
+
WC()->mailer()->emails[ 'WC_GZD_Email_Customer_SEPA_Direct_Debit_Mandate' ]->trigger( $order );
|
141 |
+
|
142 |
+
}
|
143 |
+
|
144 |
+
public function set_order_meta( $order_id, $posted ) {
|
145 |
+
|
146 |
+
$order = wc_get_order( $order_id );
|
147 |
+
|
148 |
+
if ( ! $order->payment_method == $this->id )
|
149 |
+
return;
|
150 |
+
|
151 |
+
update_post_meta( $order->id, '_direct_debit_holder', ( isset( $_POST[ 'direct_debit_account_holder' ] ) ? wc_clean( $_POST[ 'direct_debit_account_holder' ] ) : '' ) );
|
152 |
+
update_post_meta( $order->id, '_direct_debit_iban', ( isset( $_POST[ 'direct_debit_account_iban' ] ) ? wc_clean( $_POST[ 'direct_debit_account_iban' ] ) : '' ) );
|
153 |
+
update_post_meta( $order->id, '_direct_debit_bic', ( isset( $_POST[ 'direct_debit_account_bic' ] ) ? wc_clean( $_POST[ 'direct_debit_account_bic' ] ) : '' ) );
|
154 |
+
|
155 |
+
}
|
156 |
+
|
157 |
+
public function add_email_template( $mails ) {
|
158 |
+
$mails[ 'WC_GZD_Email_Customer_SEPA_Direct_Debit_Mandate' ] = include WC_germanized()->plugin_path() . '/includes/emails/class-wc-gzd-email-customer-sepa-direct-debit-mandate.php';
|
159 |
+
return $mails;
|
160 |
+
}
|
161 |
+
|
162 |
+
public function generate_mandate() {
|
163 |
+
|
164 |
+
if ( ! isset( $_GET[ '_wpnonce' ] ) || ! wp_verify_nonce( $_GET[ '_wpnonce' ], 'show_direct_debit' ) )
|
165 |
+
exit();
|
166 |
+
|
167 |
+
$params = array(
|
168 |
+
'account_holder' => wc_clean( isset( $_GET[ 'debit_holder' ] ) ? $_GET[ 'debit_holder' ] : '' ),
|
169 |
+
'account_iban' => wc_clean( isset( $_GET[ 'debit_iban' ] ) ? $_GET[ 'debit_iban' ] : '' ),
|
170 |
+
'account_swift' => wc_clean( isset( $_GET[ 'debit_swift' ] ) ? $_GET[ 'debit_swift' ] : '' ),
|
171 |
+
'street' => wc_clean( isset( $_GET[ 'address' ] ) ? $_GET[ 'address' ] : '' ),
|
172 |
+
'postcode' => wc_clean( isset( $_GET[ 'postcode' ] ) ? $_GET[ 'postcode' ] : '' ),
|
173 |
+
'city' => wc_clean( isset( $_GET[ 'city' ] ) ? $_GET[ 'city' ] : '' ),
|
174 |
+
'country' => ( isset( $_GET[ 'country' ] ) && isset( WC()->countries->countries[ $_GET[ 'country' ] ] ) ? WC()->countries->countries[ $_GET[ 'country' ] ] : '' ),
|
175 |
+
);
|
176 |
+
|
177 |
+
echo $this->generate_mandate_text( $params );
|
178 |
+
exit();
|
179 |
+
|
180 |
+
}
|
181 |
+
|
182 |
+
public function generate_mandate_by_order( $order ) {
|
183 |
+
|
184 |
+
if ( is_numeric( $order ) )
|
185 |
+
$order = wc_get_order( absint( $order ) );
|
186 |
+
|
187 |
+
$params = array(
|
188 |
+
'account_holder' => $order->direct_debit_holder,
|
189 |
+
'account_iban' => $order->direct_debit_iban,
|
190 |
+
'account_swift' => $order->direct_debit_bic,
|
191 |
+
'street' => $order->billing_address_1,
|
192 |
+
'postcode' => $order->billing_postcode,
|
193 |
+
'city' => $order->billing_city,
|
194 |
+
'country' => WC()->countries->countries[ $order->billing_country ],
|
195 |
+
'date' => date_i18n( wc_date_format(), strtotime( $order->post->post_date ) ),
|
196 |
+
);
|
197 |
+
|
198 |
+
return $this->generate_mandate_text( $params );
|
199 |
+
|
200 |
+
}
|
201 |
+
|
202 |
+
public function generate_mandate_text( $args = array() ) {
|
203 |
+
|
204 |
+
$args = wp_parse_args( $args, array(
|
205 |
+
'company_info' => $this->company_info,
|
206 |
+
'company_identification_number' => $this->company_identification_number,
|
207 |
+
'date' => date_i18n( wc_date_format(), strtotime( "now" ) ),
|
208 |
+
) );
|
209 |
+
|
210 |
+
$text = $this->mandate_text;
|
211 |
+
|
212 |
+
foreach ( $args as $key => $val )
|
213 |
+
$text = str_replace( '[' . $key . ']', $val, $text );
|
214 |
+
|
215 |
+
return apply_filters( 'the_content', $text );
|
216 |
+
|
217 |
+
}
|
218 |
+
|
219 |
+
public function checkbox() {
|
220 |
+
|
221 |
+
if ( $this->is_available() && $this->enable_checkbox === 'yes' ) : ?>
|
222 |
+
|
223 |
+
<p class="form-row legal direct-debit-checkbox">
|
224 |
+
<label class="checkbox" for="direct-debit-checkbox">
|
225 |
+
<input type="checkbox" class="input-checkbox" name="direct_debit_legal" id="direct-debit-checkbox" />
|
226 |
+
<?php echo $this->get_checkbox_label(); ?>
|
227 |
+
<a href="" rel="prettyPhoto" id="show-direct-debit-pretty" class="hidden"></a>
|
228 |
+
</label>
|
229 |
+
</p>
|
230 |
+
|
231 |
+
<?php endif;
|
232 |
+
}
|
233 |
+
|
234 |
+
public function get_checkbox_label() {
|
235 |
+
$ajax_url = wp_nonce_url( add_query_arg( array( 'action' => 'show_direct_debit' ), admin_url( 'admin-ajax.php' ) ), 'show_direct_debit' );
|
236 |
+
return apply_filters( 'woocommerce_gzd_direct_debit_ajax_url', str_replace( array( '{link}', '{/link}' ), array( '<a href="' . $ajax_url . '" id="show-direct-debit-trigger" rel="prettyPhoto">', '</a>' ), $this->checkbox_label ), $this );
|
237 |
+
}
|
238 |
+
|
239 |
+
/**
|
240 |
+
* Initialise Gateway Settings Form Fields
|
241 |
+
*/
|
242 |
+
public function init_form_fields() {
|
243 |
+
|
244 |
+
$this->form_fields = array(
|
245 |
+
'enabled' => array(
|
246 |
+
'title' => __( 'Enable/Disable', 'woocommerce' ),
|
247 |
+
'type' => 'checkbox',
|
248 |
+
'label' => __( 'Enable Direct Debit Payment', 'woocommerce-germanized' ),
|
249 |
+
'default' => 'no'
|
250 |
+
),
|
251 |
+
'title' => array(
|
252 |
+
'title' => __( 'Title', 'woocommerce' ),
|
253 |
+
'type' => 'text',
|
254 |
+
'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce' ),
|
255 |
+
'default' => __( 'Direct Debit', 'woocommerce-germanized' ),
|
256 |
+
'desc_tip' => true,
|
257 |
+
),
|
258 |
+
'description' => array(
|
259 |
+
'title' => __( 'Description', 'woocommerce' ),
|
260 |
+
'type' => 'textarea',
|
261 |
+
'description' => __( 'Payment method description that the customer will see on your checkout.', 'woocommerce' ),
|
262 |
+
'default' => __( 'The order amount will be debited directly from your bank account.', 'woocommerce-germanized' ),
|
263 |
+
'desc_tip' => true,
|
264 |
+
),
|
265 |
+
'instructions' => array(
|
266 |
+
'title' => __( 'Instructions', 'woocommerce' ),
|
267 |
+
'type' => 'textarea',
|
268 |
+
'description' => __( 'Instructions that will be added to the thank you page and emails.', 'woocommerce' ),
|
269 |
+
'default' => '',
|
270 |
+
'desc_tip' => true,
|
271 |
+
),
|
272 |
+
'company_info' => array(
|
273 |
+
'title' => __( 'Debtee', 'woocommerce-germanized' ),
|
274 |
+
'type' => 'text',
|
275 |
+
'description' => __( 'Insert your company information.', 'woocommerce-germanized' ),
|
276 |
+
'default' => '',
|
277 |
+
'placeholder' => __( 'Company Inc, John Doe Street, New York', 'woocommerce-germanized' ),
|
278 |
+
'desc_tip' => true,
|
279 |
+
),
|
280 |
+
'company_identification_number' => array(
|
281 |
+
'title' => __( 'Debtee identification number', 'woocommerce-germanized' ),
|
282 |
+
'type' => 'text',
|
283 |
+
'description' => sprintf( __( 'Insert your debtee indentification number. More information can be found <a href="%s">here</a>.', 'woocommerce-germanized' ), 'http://www.bundesbank.de/Navigation/DE/Aufgaben/Unbarer_Zahlungsverkehr/SEPA/Glaeubiger_Identifikationsnummer/glaeubiger_identifikationsnummer.html' ),
|
284 |
+
'default' => '',
|
285 |
+
),
|
286 |
+
'mandate_text' => array(
|
287 |
+
'title' => __( 'Mandate Text', 'woocommerce-germanized' ),
|
288 |
+
'type' => 'textarea',
|
289 |
+
'description' => __( 'This text will be populated with live order/checkout data. Will be used as preview direct debit mandate and as email template text.', 'woocommerce-germanized' ),
|
290 |
+
'default' => '',
|
291 |
+
'css' => 'min-height: 250px;',
|
292 |
+
'desc_tip' => true,
|
293 |
+
),
|
294 |
+
'enable_checkbox' => array(
|
295 |
+
'title' => __( 'Checkbox', 'woocommerce-germanized' ),
|
296 |
+
'label' => __( 'Enable "agree to SEPA mandate" checkbox', 'woocommerce-germanized' ),
|
297 |
+
'type' => 'checkbox',
|
298 |
+
'description' => __( 'Enable a checkbox linking to a SEPA direct debit mandate preview.', 'woocommerce-germanized' ),
|
299 |
+
'default' => 'yes',
|
300 |
+
),
|
301 |
+
'checkbox_label' => array(
|
302 |
+
'title' => __( 'Checkbox label', 'woocommerce-germanized' ),
|
303 |
+
'type' => 'text',
|
304 |
+
'description' => __( 'Customize the checkbox label. Use {link}link name{/link} to insert the preview link.', 'woocommerce-germanized' ),
|
305 |
+
'default' => __( 'I hereby agree to the {link}direct debit mandate{/link}.', 'woocommerce-germanized' ),
|
306 |
+
'desc_tip' => true,
|
307 |
+
),
|
308 |
+
);
|
309 |
+
}
|
310 |
+
|
311 |
+
/**
|
312 |
+
* Payment form on checkout page
|
313 |
+
*/
|
314 |
+
public function payment_fields() {
|
315 |
+
|
316 |
+
if ( $description = $this->get_description() ) {
|
317 |
+
echo wpautop( wptexturize( $description ) );
|
318 |
+
}
|
319 |
+
|
320 |
+
$fields = array(
|
321 |
+
'account-holder' => '<p class="form-row form-row-wide">
|
322 |
+
<label for="' . esc_attr( $this->id ) . '-account-holder">' . __( 'Account Holder', 'woocommerce-germanized' ) . ' <span class="required">*</span></label>
|
323 |
+
<input id="' . esc_attr( $this->id ) . '-account-holder" class="input-text wc-gzd-' . $this->id . '-account-holder" type="text" autocomplete="off" placeholder="" name="' . str_replace( '-', '_', $this->id ) . '_account_holder' . '" />
|
324 |
+
</p>',
|
325 |
+
'account-iban' => '<p class="form-row form-row-wide">
|
326 |
+
<label for="' . esc_attr( $this->id ) . '-account-iban">' . __( 'IBAN', 'woocommerce-germanized' ) . ' <span class="required">*</span></label>
|
327 |
+
<input id="' . esc_attr( $this->id ) . '-account-iban" class="input-text wc-gzd-' . $this->id . '-account-iban" type="text" autocomplete="off" placeholder="" name="' . str_replace( '-', '_', $this->id ) . '_account_iban' . '" />
|
328 |
+
</p>',
|
329 |
+
'account-bic' => '<p class="form-row form-row-wide">
|
330 |
+
<label for="' . esc_attr( $this->id ) . '-account-bic">' . __( 'BIC/SWIFT', 'woocommerce-germanized' ) . ' <span class="required">*</span></label>
|
331 |
+
<input id="' . esc_attr( $this->id ) . '-account-bic" class="input-text wc-gzd-' . $this->id . '-account-bic" type="text" autocomplete="off" placeholder="" name="' . str_replace( '-', '_', $this->id ) . '_account_bic' . '" />
|
332 |
+
</p>',
|
333 |
+
);
|
334 |
+
|
335 |
+
?>
|
336 |
+
<fieldset id="<?php echo $this->id; ?>-form">
|
337 |
+
<?php do_action( 'woocommerce_gzd_direct_debit_form_start', $this->id ); ?>
|
338 |
+
<?php
|
339 |
+
foreach ( $fields as $field ) {
|
340 |
+
echo $field;
|
341 |
+
}
|
342 |
+
?>
|
343 |
+
<?php do_action( 'woocommerce_gzd_direct_debit_form_end', $this->id ); ?>
|
344 |
+
<div class="clear"></div>
|
345 |
+
</fieldset>
|
346 |
+
<?php
|
347 |
+
|
348 |
+
}
|
349 |
+
|
350 |
+
public function validate_checkbox( $posted ) {
|
351 |
+
|
352 |
+
if ( ! isset( $_POST[ 'woocommerce_checkout_update_totals' ] ) ) {
|
353 |
+
|
354 |
+
if ( ! isset( $_POST[ 'direct_debit_legal' ] ) && empty( $_POST[ 'direct_debit_legal' ] ) )
|
355 |
+
wc_add_notice( __( 'Please accept the direct debit mandate.', 'woocommerce-germanized' ), 'error' );
|
356 |
+
|
357 |
+
}
|
358 |
+
|
359 |
+
}
|
360 |
+
|
361 |
+
public function validate_fields() {
|
362 |
+
|
363 |
+
if ( ! isset( $_POST[ 'payment_method' ] ) || $_POST[ 'payment_method' ] != $this->id )
|
364 |
+
return;
|
365 |
+
|
366 |
+
$iban = ( isset( $_POST[ 'direct_debit_account_iban' ] ) ? wc_clean( $_POST[ 'direct_debit_account_iban' ] ) : '' );
|
367 |
+
$holder = ( isset( $_POST[ 'direct_debit_account_holder' ] ) ? wc_clean( $_POST[ 'direct_debit_account_holder' ] ) : '' );
|
368 |
+
$bic = ( isset( $_POST[ 'direct_debit_account_bic' ] ) ? wc_clean( $_POST[ 'direct_debit_account_bic' ] ) : '' );
|
369 |
+
$country = ( isset( $_POST[ 'billing_country' ] ) ? wc_clean( $_POST[ 'billing_country' ] ) : WC()->countries->get_base_country() );
|
370 |
+
|
371 |
+
if ( empty( $iban ) || empty( $holder ) || empty( $bic ) ) {
|
372 |
+
wc_add_notice( __( 'Please insert your SEPA account data.', 'woocommerce-germanized' ), 'error' );
|
373 |
+
return false;
|
374 |
+
}
|
375 |
+
|
376 |
+
// Validate IBAN
|
377 |
+
include_once( WC_germanized()->plugin_path() . '/includes/libraries/iban/oophp-iban.php' );
|
378 |
+
|
379 |
+
$iban_validator = new IBAN( $iban );
|
380 |
+
|
381 |
+
if ( ! $iban_validator->Verify() )
|
382 |
+
wc_add_notice( __( 'Your IBAN seems to be invalid.', 'woocommerce-germanized' ), 'error' );
|
383 |
+
else if ( $iban_validator->Country() != $country )
|
384 |
+
wc_add_notice( __( 'Your IBAN\'s country code doesn’t match with your billing country.', 'woocommerce-germanized' ), 'error' );
|
385 |
+
|
386 |
+
// Validate BIC
|
387 |
+
if ( ! preg_match( '/^([a-zA-Z]){4}([a-zA-Z]){2}([0-9a-zA-Z]){2}([0-9a-zA-Z]{3})?$/', $bic ) )
|
388 |
+
wc_add_notice( __( 'Your BIC seems to be invalid.', 'woocommerce-germanized' ), 'error' );
|
389 |
+
|
390 |
+
}
|
391 |
+
|
392 |
+
/**
|
393 |
+
* payment_scripts function.
|
394 |
+
*
|
395 |
+
* Outputs scripts used for simplify payment
|
396 |
+
*/
|
397 |
+
public function payment_scripts() {
|
398 |
+
|
399 |
+
if ( ! is_checkout() || ! $this->is_available() ) {
|
400 |
+
return;
|
401 |
+
}
|
402 |
+
|
403 |
+
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
404 |
+
$assets_path = str_replace( array( 'http:', 'https:' ), '', WC()->plugin_url() ) . '/assets/';
|
405 |
+
|
406 |
+
wp_enqueue_script( 'prettyPhoto', $assets_path . 'js/prettyPhoto/jquery.prettyPhoto' . $suffix . '.js', array( 'jquery' ), '3.1.6', true );
|
407 |
+
wp_enqueue_style( 'woocommerce_prettyPhoto_css', $assets_path . 'css/prettyPhoto.css' );
|
408 |
+
|
409 |
+
wp_register_script( 'wc-gzd-iban', WC_germanized()->plugin_url() . '/includes/gateways/direct-debit/assets/js/iban' . $suffix . '.js', array( 'wc-checkout' ), WC_GERMANIZED_VERSION, true );
|
410 |
+
wp_enqueue_script( 'wc-gzd-iban' );
|
411 |
+
|
412 |
+
wp_register_script( 'wc-gzd-direct-debit', WC_germanized()->plugin_url() . '/includes/gateways/direct-debit/assets/js/direct-debit' . $suffix . '.js', array( 'wc-gzd-iban' ), WC_GERMANIZED_VERSION, true );
|
413 |
+
wp_localize_script( 'wc-gzd-direct-debit', 'direct_debit_params', array(
|
414 |
+
'iban' => __( 'IBAN', 'woocommerce-germanized' ),
|
415 |
+
'swift' => __( 'BIC/SWIFT', 'woocommerce-germanized' ),
|
416 |
+
'is_invalid' => __( 'is invalid', 'woocommerce' ),
|
417 |
+
) );
|
418 |
+
wp_enqueue_script( 'wc-gzd-direct-debit' );
|
419 |
+
}
|
420 |
+
|
421 |
+
/**
|
422 |
+
* Output for the order received page.
|
423 |
+
*/
|
424 |
+
public function thankyou_page() {
|
425 |
+
if ( $this->instructions )
|
426 |
+
echo wpautop( wptexturize( $this->instructions ) );
|
427 |
+
}
|
428 |
+
|
429 |
+
/**
|
430 |
+
* Add content to the WC emails.
|
431 |
+
*
|
432 |
+
* @access public
|
433 |
+
* @param WC_Order $order
|
434 |
+
* @param bool $sent_to_admin
|
435 |
+
* @param bool $plain_text
|
436 |
+
*/
|
437 |
+
public function email_instructions( $order, $sent_to_admin, $plain_text = false ) {
|
438 |
+
if ( $this->instructions && ! $sent_to_admin && 'direct-debit' === $order->payment_method && $order->has_status( 'processing' ) ) {
|
439 |
+
echo wpautop( wptexturize( $this->instructions ) ) . PHP_EOL;
|
440 |
+
}
|
441 |
+
}
|
442 |
+
|
443 |
+
/**
|
444 |
+
* Process the payment and return the result
|
445 |
+
*
|
446 |
+
* @param int $order_id
|
447 |
+
* @return array
|
448 |
+
*/
|
449 |
+
public function process_payment( $order_id ) {
|
450 |
+
|
451 |
+
$order = wc_get_order( $order_id );
|
452 |
+
|
453 |
+
// Mark as on-hold (we're awaiting the cheque)
|
454 |
+
$order->update_status( 'processing', __( 'Processing direct debit', 'woocommerce-germanized' ) );
|
455 |
+
|
456 |
+
// Reduce stock levels
|
457 |
+
$order->reduce_order_stock();
|
458 |
+
|
459 |
+
// Remove cart
|
460 |
+
WC()->cart->empty_cart();
|
461 |
+
|
462 |
+
// Return thankyou redirect
|
463 |
+
return array(
|
464 |
+
'result' => 'success',
|
465 |
+
'redirect' => $this->get_return_url( $order )
|
466 |
+
);
|
467 |
+
}
|
468 |
+
}
|
includes/gateways/invoice/class-wc-gzd-gateway-invoice.php
ADDED
@@ -0,0 +1,195 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit; // Exit if accessed directly
|
5 |
+
}
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Pay by Invoice Gateway
|
9 |
+
*
|
10 |
+
* Provides an Invoice Payment Gateway.
|
11 |
+
*
|
12 |
+
* @class WC_GZD_Gateway_Invoice
|
13 |
+
* @extends WC_Payment_Gateway
|
14 |
+
* @version 2.1.0
|
15 |
+
* @author Vendidero
|
16 |
+
*/
|
17 |
+
class WC_GZD_Gateway_Invoice extends WC_Payment_Gateway {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Constructor for the gateway.
|
21 |
+
*/
|
22 |
+
public function __construct() {
|
23 |
+
$this->id = 'invoice';
|
24 |
+
$this->icon = apply_filters( 'woocommerce_gzd_invoice_icon', '' );
|
25 |
+
$this->has_fields = true;
|
26 |
+
$this->method_title = __( 'Pay by Invoice', 'woocommerce-germanized' );
|
27 |
+
$this->method_description = __( 'Customers will be able to pay by invoice.', 'woocommerce-germanized' );
|
28 |
+
|
29 |
+
// Load the settings.
|
30 |
+
$this->init_form_fields();
|
31 |
+
$this->init_settings();
|
32 |
+
|
33 |
+
// Define user set variables
|
34 |
+
$this->enabled = $this->get_option( 'enabled' );
|
35 |
+
$this->title = $this->get_option( 'title' );
|
36 |
+
$this->description = $this->get_option( 'description' );
|
37 |
+
$this->instructions = $this->get_option( 'instructions', $this->description );
|
38 |
+
$this->default_order_status = $this->get_option( 'default_order_status', 'on-hold' );
|
39 |
+
$this->customers_only = $this->get_option( 'customers_only', 'no' );
|
40 |
+
$this->customers_completed = $this->get_option( 'customers_completed', 'no' );
|
41 |
+
|
42 |
+
// Actions
|
43 |
+
add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );
|
44 |
+
add_action( 'woocommerce_thankyou_invoice', array( $this, 'thankyou_page' ) );
|
45 |
+
|
46 |
+
}
|
47 |
+
|
48 |
+
public function admin_options() { ?>
|
49 |
+
|
50 |
+
<h3><?php echo ( ! empty( $this->method_title ) ) ? $this->method_title : __( 'Settings', 'woocommerce' ) ; ?></h3>
|
51 |
+
|
52 |
+
<?php echo ( ! empty( $this->method_description ) ) ? wpautop( $this->method_description ) : ''; ?>
|
53 |
+
|
54 |
+
<?php if ( ! WC_germanized()->is_pro() ) : ?>
|
55 |
+
|
56 |
+
<div class="wc-gzd-premium-overlay notice notice-warning inline">
|
57 |
+
<h3><?php _e( 'Automatically generate PDF invoices for this gateway?', 'woocommerce-germanized' );?></h3>
|
58 |
+
<p><?php _e( 'By upgrading to the professional version you\'ll be able to automatically generate PDF invoices to this payment gateway. Furthermore you\'ll benefit from even more professional features such as a multistep checkout page, legal text generators, B2B VAT settings and premium support!', 'woocommerce-germanized' );?></p>
|
59 |
+
<p>
|
60 |
+
<a class="button button-primary" href="https://vendidero.de/woocommerce-germanized" target="_blank"><?php _e( 'Upgrade now', 'woocommerce-germanized' ); ?></a>
|
61 |
+
<a class="button button-secondary" style="margin-left: 1em" href="https://vendidero.de/woocommerce-germanized#accounting" target="_blank"><?php _e( 'Learn more about PDF invoicing', 'woocommerce-germanized' ); ?></a>
|
62 |
+
</p>
|
63 |
+
</div>
|
64 |
+
|
65 |
+
<?php endif; ?>
|
66 |
+
|
67 |
+
<table class="form-table">
|
68 |
+
<?php $this->generate_settings_html(); ?>
|
69 |
+
</table><?php
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Initialise Gateway Settings Form Fields
|
74 |
+
*/
|
75 |
+
public function init_form_fields() {
|
76 |
+
|
77 |
+
$this->form_fields = array(
|
78 |
+
'enabled' => array(
|
79 |
+
'title' => __( 'Enable/Disable', 'woocommerce' ),
|
80 |
+
'type' => 'checkbox',
|
81 |
+
'label' => __( 'Enable Pay by Invoice', 'woocommerce-germanized' ),
|
82 |
+
'default' => 'no'
|
83 |
+
),
|
84 |
+
'title' => array(
|
85 |
+
'title' => __( 'Title', 'woocommerce' ),
|
86 |
+
'type' => 'text',
|
87 |
+
'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce' ),
|
88 |
+
'default' => __( 'Pay by Invoice', 'woocommerce-germanized' ),
|
89 |
+
'desc_tip' => true,
|
90 |
+
),
|
91 |
+
'description' => array(
|
92 |
+
'title' => __( 'Description', 'woocommerce' ),
|
93 |
+
'type' => 'textarea',
|
94 |
+
'description' => __( 'Payment method description that the customer will see on your checkout.', 'woocommerce' ),
|
95 |
+
'default' => __( 'You\'ll receive an invoice after your order. Please transfer the order amount to our bank account within 14 days.', 'woocommerce-germanized' ),
|
96 |
+
'desc_tip' => true,
|
97 |
+
),
|
98 |
+
'instructions' => array(
|
99 |
+
'title' => __( 'Instructions', 'woocommerce' ),
|
100 |
+
'type' => 'textarea',
|
101 |
+
'description' => __( 'Instructions that will be added to the thank you page and emails.', 'woocommerce' ),
|
102 |
+
'default' => '',
|
103 |
+
'desc_tip' => true,
|
104 |
+
),
|
105 |
+
'default_order_status' => array(
|
106 |
+
'title' => __( 'Order Status', 'woocommerce-germanized' ),
|
107 |
+
'type' => 'select',
|
108 |
+
'description' => __( 'Choose which order status should be applied after a customer has chosen to pay by invoice.', 'woocommerce-germanized' ),
|
109 |
+
'default' => 'wc-on-hold',
|
110 |
+
'options' => wc_get_order_statuses(),
|
111 |
+
'desc_tip' => true,
|
112 |
+
),
|
113 |
+
'customers_only' => array(
|
114 |
+
'title' => __( 'Registered customers', 'woocommerce-germanized' ),
|
115 |
+
'label' => __( 'Do only offer pay by invoice to registered/logged in customers.', 'woocommerce-germanized' ),
|
116 |
+
'type' => 'checkbox',
|
117 |
+
'description' => __( 'This will enable Pay by Invoice to logged in customers only', 'woocommerce-germanized' ),
|
118 |
+
'desc_tip' => true,
|
119 |
+
'default' => 'no',
|
120 |
+
),
|
121 |
+
'customers_completed' => array(
|
122 |
+
'title' => __( 'Customer limitation', 'woocommerce-germanized' ),
|
123 |
+
'label' => __( 'Do only offer pay by invoice to customers who have at least completed one order.', 'woocommerce-germanized' ),
|
124 |
+
'type' => 'checkbox',
|
125 |
+
'default' => 'no',
|
126 |
+
),
|
127 |
+
);
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Output for the order received page.
|
132 |
+
*/
|
133 |
+
public function thankyou_page() {
|
134 |
+
if ( $this->instructions )
|
135 |
+
echo wpautop( wptexturize( $this->instructions ) );
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Add content to the WC emails.
|
140 |
+
*
|
141 |
+
* @access public
|
142 |
+
* @param WC_Order $order
|
143 |
+
* @param bool $sent_to_admin
|
144 |
+
* @param bool $plain_text
|
145 |
+
*/
|
146 |
+
public function email_instructions( $order, $sent_to_admin, $plain_text = false ) {
|
147 |
+
if ( $this->instructions && ! $sent_to_admin && 'invoice' === $order->payment_method && $order->has_status( 'on-hold' ) ) {
|
148 |
+
echo wpautop( wptexturize( $this->instructions ) ) . PHP_EOL;
|
149 |
+
}
|
150 |
+
}
|
151 |
+
|
152 |
+
public function is_available() {
|
153 |
+
|
154 |
+
if ( 'yes' != $this->enabled )
|
155 |
+
return false;
|
156 |
+
|
157 |
+
if ( is_checkout() ) {
|
158 |
+
|
159 |
+
if ( $this->get_option( 'customers_only' ) == 'yes' && ! is_user_logged_in() )
|
160 |
+
return false;
|
161 |
+
|
162 |
+
if ( $this->get_option( 'customers_completed' ) == 'yes' && ( ! is_user_logged_in() || ! WC()->customer->is_paying_customer( get_current_user_id() ) ) )
|
163 |
+
return false;
|
164 |
+
|
165 |
+
}
|
166 |
+
|
167 |
+
return true;
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Process the payment and return the result
|
172 |
+
*
|
173 |
+
* @param int $order_id
|
174 |
+
* @return array
|
175 |
+
*/
|
176 |
+
public function process_payment( $order_id ) {
|
177 |
+
|
178 |
+
$order = wc_get_order( $order_id );
|
179 |
+
|
180 |
+
// Mark as on-hold (we're awaiting the cheque)
|
181 |
+
$order->update_status( $this->default_order_status );
|
182 |
+
|
183 |
+
// Reduce stock levels
|
184 |
+
$order->reduce_order_stock();
|
185 |
+
|
186 |
+
// Remove cart
|
187 |
+
WC()->cart->empty_cart();
|
188 |
+
|
189 |
+
// Return thankyou redirect
|
190 |
+
return array(
|
191 |
+
'result' => 'success',
|
192 |
+
'redirect' => $this->get_return_url( $order )
|
193 |
+
);
|
194 |
+
}
|
195 |
+
}
|
includes/libraries/iban/LICENSE
ADDED
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
GNU LESSER GENERAL PUBLIC LICENSE
|
2 |
+
Version 3, 29 June 2007
|
3 |
+
|
4 |
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5 |
+
Everyone is permitted to copy and distribute verbatim copies
|
6 |
+
of this license document, but changing it is not allowed.
|
7 |
+
|
8 |
+
|
9 |
+
This version of the GNU Lesser General Public License incorporates
|
10 |
+
the terms and conditions of version 3 of the GNU General Public
|
11 |
+
License, supplemented by the additional permissions listed below.
|
12 |
+
|
13 |
+
0. Additional Definitions.
|
14 |
+
|
15 |
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
16 |
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
17 |
+
General Public License.
|
18 |
+
|
19 |
+
"The Library" refers to a covered work governed by this License,
|
20 |
+
other than an Application or a Combined Work as defined below.
|
21 |
+
|
22 |
+
An "Application" is any work that makes use of an interface provided
|
23 |
+
by the Library, but which is not otherwise based on the Library.
|
24 |
+
Defining a subclass of a class defined by the Library is deemed a mode
|
25 |
+
of using an interface provided by the Library.
|
26 |
+
|
27 |
+
A "Combined Work" is a work produced by combining or linking an
|
28 |
+
Application with the Library. The particular version of the Library
|
29 |
+
with which the Combined Work was made is also called the "Linked
|
30 |
+
Version".
|
31 |
+
|
32 |
+
The "Minimal Corresponding Source" for a Combined Work means the
|
33 |
+
Corresponding Source for the Combined Work, excluding any source code
|
34 |
+
for portions of the Combined Work that, considered in isolation, are
|
35 |
+
based on the Application, and not on the Linked Version.
|
36 |
+
|
37 |
+
The "Corresponding Application Code" for a Combined Work means the
|
38 |
+
object code and/or source code for the Application, including any data
|
39 |
+
and utility programs needed for reproducing the Combined Work from the
|
40 |
+
Application, but excluding the System Libraries of the Combined Work.
|
41 |
+
|
42 |
+
1. Exception to Section 3 of the GNU GPL.
|
43 |
+
|
44 |
+
You may convey a covered work under sections 3 and 4 of this License
|
45 |
+
without being bound by section 3 of the GNU GPL.
|
46 |
+
|
47 |
+
2. Conveying Modified Versions.
|
48 |
+
|
49 |
+
If you modify a copy of the Library, and, in your modifications, a
|
50 |
+
facility refers to a function or data to be supplied by an Application
|
51 |
+
that uses the facility (other than as an argument passed when the
|
52 |
+
facility is invoked), then you may convey a copy of the modified
|
53 |
+
version:
|
54 |
+
|
55 |
+
a) under this License, provided that you make a good faith effort to
|
56 |
+
ensure that, in the event an Application does not supply the
|
57 |
+
function or data, the facility still operates, and performs
|
58 |
+
whatever part of its purpose remains meaningful, or
|
59 |
+
|
60 |
+
b) under the GNU GPL, with none of the additional permissions of
|
61 |
+
this License applicable to that copy.
|
62 |
+
|
63 |
+
3. Object Code Incorporating Material from Library Header Files.
|
64 |
+
|
65 |
+
The object code form of an Application may incorporate material from
|
66 |
+
a header file that is part of the Library. You may convey such object
|
67 |
+
code under terms of your choice, provided that, if the incorporated
|
68 |
+
material is not limited to numerical parameters, data structure
|
69 |
+
layouts and accessors, or small macros, inline functions and templates
|
70 |
+
(ten or fewer lines in length), you do both of the following:
|
71 |
+
|
72 |
+
a) Give prominent notice with each copy of the object code that the
|
73 |
+
Library is used in it and that the Library and its use are
|
74 |
+
covered by this License.
|
75 |
+
|
76 |
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
77 |
+
document.
|
78 |
+
|
79 |
+
4. Combined Works.
|
80 |
+
|
81 |
+
You may convey a Combined Work under terms of your choice that,
|
82 |
+
taken together, effectively do not restrict modification of the
|
83 |
+
portions of the Library contained in the Combined Work and reverse
|
84 |
+
engineering for debugging such modifications, if you also do each of
|
85 |
+
the following:
|
86 |
+
|
87 |
+
a) Give prominent notice with each copy of the Combined Work that
|
88 |
+
the Library is used in it and that the Library and its use are
|
89 |
+
covered by this License.
|
90 |
+
|
91 |
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
92 |
+
document.
|
93 |
+
|
94 |
+
c) For a Combined Work that displays copyright notices during
|
95 |
+
execution, include the copyright notice for the Library among
|
96 |
+
these notices, as well as a reference directing the user to the
|
97 |
+
copies of the GNU GPL and this license document.
|
98 |
+
|
99 |
+
d) Do one of the following:
|
100 |
+
|
101 |
+
0) Convey the Minimal Corresponding Source under the terms of this
|
102 |
+
License, and the Corresponding Application Code in a form
|
103 |
+
suitable for, and under terms that permit, the user to
|
104 |
+
recombine or relink the Application with a modified version of
|
105 |
+
the Linked Version to produce a modified Combined Work, in the
|
106 |
+
manner specified by section 6 of the GNU GPL for conveying
|
107 |
+
Corresponding Source.
|
108 |
+
|
109 |
+
1) Use a suitable shared library mechanism for linking with the
|
110 |
+
Library. A suitable mechanism is one that (a) uses at run time
|
111 |
+
a copy of the Library already present on the user's computer
|
112 |
+
system, and (b) will operate properly with a modified version
|
113 |
+
of the Library that is interface-compatible with the Linked
|
114 |
+
Version.
|
115 |
+
|
116 |
+
e) Provide Installation Information, but only if you would otherwise
|
117 |
+
be required to provide such information under section 6 of the
|
118 |
+
GNU GPL, and only to the extent that such information is
|
119 |
+
necessary to install and execute a modified version of the
|
120 |
+
Combined Work produced by recombining or relinking the
|
121 |
+
Application with a modified version of the Linked Version. (If
|
122 |
+
you use option 4d0, the Installation Information must accompany
|
123 |
+
the Minimal Corresponding Source and Corresponding Application
|
124 |
+
Code. If you use option 4d1, you must provide the Installation
|
125 |
+
Information in the manner specified by section 6 of the GNU GPL
|
126 |
+
for conveying Corresponding Source.)
|
127 |
+
|
128 |
+
5. Combined Libraries.
|
129 |
+
|
130 |
+
You may place library facilities that are a work based on the
|
131 |
+
Library side by side in a single library together with other library
|
132 |
+
facilities that are not Applications and are not covered by this
|
133 |
+
License, and convey such a combined library under terms of your
|
134 |
+
choice, if you do both of the following:
|
135 |
+
|
136 |
+
a) Accompany the combined library with a copy of the same work based
|
137 |
+
on the Library, uncombined with any other library facilities,
|
138 |
+
conveyed under the terms of this License.
|
139 |
+
|
140 |
+
b) Give prominent notice with the combined library that part of it
|
141 |
+
is a work based on the Library, and explaining where to find the
|
142 |
+
accompanying uncombined form of the same work.
|
143 |
+
|
144 |
+
6. Revised Versions of the GNU Lesser General Public License.
|
145 |
+
|
146 |
+
The Free Software Foundation may publish revised and/or new versions
|
147 |
+
of the GNU Lesser General Public License from time to time. Such new
|
148 |
+
versions will be similar in spirit to the present version, but may
|
149 |
+
differ in detail to address new problems or concerns.
|
150 |
+
|
151 |
+
Each version is given a distinguishing version number. If the
|
152 |
+
Library as you received it specifies that a certain numbered version
|
153 |
+
of the GNU Lesser General Public License "or any later version"
|
154 |
+
applies to it, you have the option of following the terms and
|
155 |
+
conditions either of that published version or of any later version
|
156 |
+
published by the Free Software Foundation. If the Library as you
|
157 |
+
received it does not specify a version number of the GNU Lesser
|
158 |
+
General Public License, you may choose any version of the GNU Lesser
|
159 |
+
General Public License ever published by the Free Software Foundation.
|
160 |
+
|
161 |
+
If the Library as you received it specifies that a proxy can decide
|
162 |
+
whether future versions of the GNU Lesser General Public License shall
|
163 |
+
apply, that proxy's public statement of acceptance of any version is
|
164 |
+
permanent authorization for you to choose that version for the
|
165 |
+
Library.
|
includes/libraries/iban/mistranscriptions.txt
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
; formalities
|
2 |
+
input-roman = number / letter
|
3 |
+
number = c-0 / c-1 / c-2 / c-3 / c-4 / c-5 / c-6 / c-7 / c-8 / c-9
|
4 |
+
letter = c-a / c-b / c-c / c-d / c-e / c-f / c-g / c-h / c-i / c-j
|
5 |
+
/ c-k / c-l / c-m / c-n / c-o / c-p / c-q / c-r / c-s
|
6 |
+
/ c-t / c-u / c-v / c-w / c-x / c-y / c-z
|
7 |
+
|
8 |
+
; possible sources of mistranscribed numbers
|
9 |
+
c-0 = "O" / "6" / "D" / "G"
|
10 |
+
c-1 = "I" / "L" / "7" / "2" / "Z"
|
11 |
+
c-2 = "Z" / "7" / "P" / "E" / "1"
|
12 |
+
c-3 = "8" / "B"
|
13 |
+
c-4 = "G" / "U"
|
14 |
+
c-5 = "S" / "7"
|
15 |
+
c-6 = "0" / "O" / "8" / "G" / "C" / "B" / "D"
|
16 |
+
c-7 = "J" / "I" / "1" / "L"
|
17 |
+
c-8 = "B" / "3" / "6"
|
18 |
+
c-9 = "G" / "Y" / "O" / "0" / "D"
|
19 |
+
|
20 |
+
; possible sources of mistranscribed letters
|
21 |
+
c-a = "G" / "Q" / "O" / "0"
|
22 |
+
c-b = "6" / "3" / "8" / "P" / "0" / "O"
|
23 |
+
c-c = "R" / "6" / "I" / "L" / "O" / "0"
|
24 |
+
c-d = "0" / "O" / "9" / "Q" / "G" / "6" / "A"
|
25 |
+
c-e = "F" / "G" / "0" / "2" / "K" / "Z" / "S" / "O"
|
26 |
+
c-f = "E" / "K" / "T" / "P" / "Y" / "4" / "B" / "7" / "1"
|
27 |
+
c-g = "9" / "Q" / "8" / "6" / "0" / "C" / "4" / "O"
|
28 |
+
c-h = "B" / "N" / "A" / "4" / "6" / "M" / "W" / "F" / "R" / "T" / "X"
|
29 |
+
c-i = "1" / "L" / "7" / "J" / "2" / "T" / "Z"
|
30 |
+
c-j = "I" / "7" / "2" / "9" / "1" / "U" / "T" / "Q" / "P" / "Y" / "Z"
|
31 |
+
/ "L" / "S"
|
32 |
+
c-k = "F" / "X" / "H" / "R"
|
33 |
+
c-l = "1" / "2" / "7" / "C" / "I" / "J" / "R" / "T" / "Y" / "Z"
|
34 |
+
c-m = "H" / "8" / "E" / "3" / "N" / "V" / "W"
|
35 |
+
c-n = "H" / "R" / "C" / "2" / "4" / "M" / "O" / "P" / "K" / "T" / "Z"
|
36 |
+
c-o = "0" / "6" / "9" / "A" / "D" / "G" / "C" / "E" / "B" / "N" / "P"
|
37 |
+
/ "Q" / "R"
|
38 |
+
c-p = "F" / "4" / "8" / "2" / "B" / "J" / "R" / "N" / "O" / "T" / "Y"
|
39 |
+
c-q = "O" / "G" / "9" / "Y" / "1" / "7" / "L"
|
40 |
+
c-r = "K" / "B" / "V" / "C" / "1" / "L" / "2"
|
41 |
+
c-s = "5" / "6" / "9" / "B" / "G" / "Q" / "A" / "Y"
|
42 |
+
c-t = "1" / "4" / "7" / "F" / "I" / "J" / "L" / "P" / "X" / "Y"
|
43 |
+
c-u = "V" / "N" / "A" / "4" / "9" / "W" / "Y"
|
44 |
+
c-v = "U" / "R" / "N"
|
45 |
+
c-w = "M" / "N" / "U" / "V"
|
46 |
+
c-x = "K" / "F" / "4" / "T" / "V" / "Y"
|
47 |
+
c-y = "G" / "V" / "J" / "I" / "4" / "9" / "T" / "F" / "Q" / "1"
|
48 |
+
c-z = "2" / "1" / "L" / "R" / "I" / "7" / "V" / "3" / "4"
|
49 |
+
|
includes/libraries/iban/oophp-iban.php
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
# OO wrapper for 'php-iban.php'
|
4 |
+
Class IBAN {
|
5 |
+
|
6 |
+
function __construct($iban = '') {
|
7 |
+
require_once('php-iban.php'); # load the procedural codebase
|
8 |
+
$this->iban = $iban;
|
9 |
+
}
|
10 |
+
|
11 |
+
public function Verify($iban='') {
|
12 |
+
if($iban!='') { return verify_iban($iban); }
|
13 |
+
return verify_iban($this->iban);
|
14 |
+
# we could throw exceptions of various types, but why - does it really
|
15 |
+
# add anything? possibly some slightly better user feedback potential.
|
16 |
+
# however, this can be written by hand by performing individual checks
|
17 |
+
# ala the code in verify_iban() itself where required, which is likely
|
18 |
+
# almost never. for the increased complexity and
|
19 |
+
# maintenance/documentation cost, i say, therefore: no. no exceptions.
|
20 |
+
}
|
21 |
+
|
22 |
+
public function MistranscriptionSuggestions() {
|
23 |
+
return iban_mistranscription_suggestions($this->iban);
|
24 |
+
}
|
25 |
+
|
26 |
+
public function MachineFormat() {
|
27 |
+
return iban_to_machine_format($this->iban);
|
28 |
+
}
|
29 |
+
|
30 |
+
public function HumanFormat() {
|
31 |
+
return iban_to_human_format($this->iban);
|
32 |
+
}
|
33 |
+
|
34 |
+
public function Country($iban='') {
|
35 |
+
return iban_get_country_part($this->iban);
|
36 |
+
}
|
37 |
+
|
38 |
+
public function Checksum($iban='') {
|
39 |
+
return iban_get_checksum_part($this->iban);
|
40 |
+
}
|
41 |
+
|
42 |
+
public function BBAN() {
|
43 |
+
return iban_get_bban_part($this->iban);
|
44 |
+
}
|
45 |
+
|
46 |
+
public function VerifyChecksum() {
|
47 |
+
return iban_verify_checksum($this->iban);
|
48 |
+
}
|
49 |
+
|
50 |
+
public function FindChecksum() {
|
51 |
+
return iban_find_checksum($this->iban);
|
52 |
+
}
|
53 |
+
|
54 |
+
public function SetChecksum() {
|
55 |
+
$this->iban = iban_set_checksum($this->iban);
|
56 |
+
}
|
57 |
+
|
58 |
+
public function ChecksumStringReplace() {
|
59 |
+
return iban_checksum_string_replace($this->iban);
|
60 |
+
}
|
61 |
+
|
62 |
+
public function Parts() {
|
63 |
+
return iban_get_parts($this->iban);
|
64 |
+
}
|
65 |
+
|
66 |
+
public function Bank() {
|
67 |
+
return iban_get_bank_part($this->iban);
|
68 |
+
}
|
69 |
+
|
70 |
+
public function Branch() {
|
71 |
+
return iban_get_branch_part($this->iban);
|
72 |
+
}
|
73 |
+
|
74 |
+
public function Account() {
|
75 |
+
return iban_get_account_part($this->iban);
|
76 |
+
}
|
77 |
+
|
78 |
+
public function Countries() {
|
79 |
+
return iban_countries();
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
# IBANCountry
|
84 |
+
Class IBANCountry {
|
85 |
+
|
86 |
+
# constructor with code
|
87 |
+
function __construct($code = '') {
|
88 |
+
$this->code = $code;
|
89 |
+
}
|
90 |
+
|
91 |
+
public function Name() {
|
92 |
+
return iban_country_get_country_name($this->code);
|
93 |
+
}
|
94 |
+
|
95 |
+
public function DomesticExample() {
|
96 |
+
return iban_country_get_domestic_example($this->code);
|
97 |
+
}
|
98 |
+
|
99 |
+
public function BBANExample() {
|
100 |
+
return iban_country_get_bban_example($this->code);
|
101 |
+
}
|
102 |
+
|
103 |
+
public function BBANFormatSWIFT() {
|
104 |
+
return iban_country_get_bban_format_swift($this->code);
|
105 |
+
}
|
106 |
+
|
107 |
+
public function BBANFormatRegex() {
|
108 |
+
return iban_country_get_bban_format_regex($this->code);
|
109 |
+
}
|
110 |
+
|
111 |
+
public function BBANLength() {
|
112 |
+
return iban_country_get_bban_length($this->code);
|
113 |
+
}
|
114 |
+
|
115 |
+
public function IBANExample() {
|
116 |
+
return iban_country_get_iban_example($this->code);
|
117 |
+
}
|
118 |
+
|
119 |
+
public function IBANFormatSWIFT() {
|
120 |
+
return iban_country_get_iban_format_swift($this->code);
|
121 |
+
}
|
122 |
+
|
123 |
+
public function IBANFormatRegex() {
|
124 |
+
return iban_country_get_iban_format_regex($this->code);
|
125 |
+
}
|
126 |
+
|
127 |
+
public function IBANLength() {
|
128 |
+
return iban_country_get_iban_length($this->code);
|
129 |
+
}
|
130 |
+
|
131 |
+
public function BankIDStartOffset() {
|
132 |
+
return iban_country_get_bankid_start_offset($this->code);
|
133 |
+
}
|
134 |
+
|
135 |
+
public function BankIDStopOffset() {
|
136 |
+
return iban_country_get_bankid_stop_offset($this->code);
|
137 |
+
}
|
138 |
+
|
139 |
+
public function BranchIDStartOffset() {
|
140 |
+
return iban_country_get_branchid_start_offset($this->code);
|
141 |
+
}
|
142 |
+
|
143 |
+
public function BranchIDStopOffset() {
|
144 |
+
return iban_country_get_branchid_stop_offset($this->code);
|
145 |
+
}
|
146 |
+
|
147 |
+
public function RegistryEdition() {
|
148 |
+
return iban_country_get_registry_edition($this->code);
|
149 |
+
}
|
150 |
+
|
151 |
+
public function IsSEPA() {
|
152 |
+
return iban_country_is_sepa($this->code);
|
153 |
+
}
|
154 |
+
|
155 |
+
}
|
156 |
+
|
157 |
+
?>
|
includes/libraries/iban/php-iban.php
ADDED
@@ -0,0 +1,486 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
# PHP IBAN - http://code.google.com/p/php-iban - LGPLv3
|
4 |
+
|
5 |
+
# Global flag by request
|
6 |
+
$__disable_iiban_gmp_extension=false;
|
7 |
+
|
8 |
+
# Verify an IBAN number. Returns true or false.
|
9 |
+
# NOTE: Input can be printed 'IIBAN xx xx xx...' or 'IBAN xx xx xx...' or machine 'xxxxx' format.
|
10 |
+
function verify_iban($iban) {
|
11 |
+
|
12 |
+
# First convert to machine format.
|
13 |
+
$iban = iban_to_machine_format($iban);
|
14 |
+
|
15 |
+
# Get country of IBAN
|
16 |
+
$country = iban_get_country_part($iban);
|
17 |
+
|
18 |
+
# Test length of IBAN
|
19 |
+
if(strlen($iban)!=iban_country_get_iban_length($country)) { return false; }
|
20 |
+
|
21 |
+
# Get checksum of IBAN
|
22 |
+
$checksum = iban_get_checksum_part($iban);
|
23 |
+
|
24 |
+
# Get country-specific IBAN format regex
|
25 |
+
$regex = '/'.iban_country_get_iban_format_regex($country).'/';
|
26 |
+
|
27 |
+
# Check regex
|
28 |
+
if(preg_match($regex,$iban)) {
|
29 |
+
# Regex passed, check checksum
|
30 |
+
if(!iban_verify_checksum($iban)) {
|
31 |
+
return false;
|
32 |
+
}
|
33 |
+
}
|
34 |
+
else {
|
35 |
+
return false;
|
36 |
+
}
|
37 |
+
|
38 |
+
# Otherwise it 'could' exist
|
39 |
+
return true;
|
40 |
+
}
|
41 |
+
|
42 |
+
# Convert an IBAN to machine format. To do this, we
|
43 |
+
# remove IBAN from the start, if present, and remove
|
44 |
+
# non basic roman letter / digit characters
|
45 |
+
function iban_to_machine_format($iban) {
|
46 |
+
# Uppercase and trim spaces from left
|
47 |
+
$iban = ltrim(strtoupper($iban));
|
48 |
+
# Remove IIBAN or IBAN from start of string, if present
|
49 |
+
$iban = preg_replace('/^I?IBAN/','',$iban);
|
50 |
+
# Remove all non basic roman letter / digit characters
|
51 |
+
$iban = preg_replace('/[^a-zA-Z0-9]/','',$iban);
|
52 |
+
return $iban;
|
53 |
+
}
|
54 |
+
|
55 |
+
# Convert an IBAN to human format. To do this, we
|
56 |
+
# simply insert spaces right now, as per the ECBS
|
57 |
+
# (European Committee for Banking Standards)
|
58 |
+
# recommendations available at:
|
59 |
+
# http://www.europeanpaymentscouncil.eu/knowledge_bank_download.cfm?file=ECBS%20standard%20implementation%20guidelines%20SIG203V3.2.pdf
|
60 |
+
function iban_to_human_format($iban) {
|
61 |
+
# First verify validity, or return
|
62 |
+
if(!verify_iban($iban)) { return false; }
|
63 |
+
# Add spaces every four characters
|
64 |
+
$human_iban = '';
|
65 |
+
for($i=0;$i<strlen($iban);$i++) {
|
66 |
+
$human_iban .= substr($iban,$i,1);
|
67 |
+
if(($i>0) && (($i+1)%4==0)) { $human_iban .= ' '; }
|
68 |
+
}
|
69 |
+
return $human_iban;
|
70 |
+
}
|
71 |
+
|
72 |
+
# Get the country part from an IBAN
|
73 |
+
function iban_get_country_part($iban) {
|
74 |
+
$iban = iban_to_machine_format($iban);
|
75 |
+
return substr($iban,0,2);
|
76 |
+
}
|
77 |
+
|
78 |
+
# Get the checksum part from an IBAN
|
79 |
+
function iban_get_checksum_part($iban) {
|
80 |
+
$iban = iban_to_machine_format($iban);
|
81 |
+
return substr($iban,2,2);
|
82 |
+
}
|
83 |
+
|
84 |
+
# Get the BBAN part from an IBAN
|
85 |
+
function iban_get_bban_part($iban) {
|
86 |
+
$iban = iban_to_machine_format($iban);
|
87 |
+
return substr($iban,4);
|
88 |
+
}
|
89 |
+
|
90 |
+
# Check the checksum of an IBAN - code modified from Validate_Finance PEAR class
|
91 |
+
function iban_verify_checksum($iban) {
|
92 |
+
# convert to machine format
|
93 |
+
$iban = iban_to_machine_format($iban);
|
94 |
+
# move first 4 chars (countrycode and checksum) to the end of the string
|
95 |
+
$tempiban = substr($iban, 4).substr($iban, 0, 4);
|
96 |
+
# subsitutute chars
|
97 |
+
$tempiban = iban_checksum_string_replace($tempiban);
|
98 |
+
# mod97-10
|
99 |
+
$result = iban_mod97_10($tempiban);
|
100 |
+
# checkvalue of 1 indicates correct IBAN checksum
|
101 |
+
if ($result != 1) {
|
102 |
+
return false;
|
103 |
+
}
|
104 |
+
return true;
|
105 |
+
}
|
106 |
+
|
107 |
+
# Find the correct checksum for an IBAN
|
108 |
+
# $iban The IBAN whose checksum should be calculated
|
109 |
+
function iban_find_checksum($iban) {
|
110 |
+
$iban = iban_to_machine_format($iban);
|
111 |
+
# move first 4 chars to right
|
112 |
+
$left = substr($iban,0,2) . '00'; # but set right-most 2 (checksum) to '00'
|
113 |
+
$right = substr($iban,4);
|
114 |
+
# glue back together
|
115 |
+
$tmp = $right . $left;
|
116 |
+
# convert letters using conversion table
|
117 |
+
$tmp = iban_checksum_string_replace($tmp);
|
118 |
+
# get mod97-10 output
|
119 |
+
$checksum = iban_mod97_10_checksum($tmp);
|
120 |
+
# return 98 minus the mod97-10 output, left zero padded to two digits
|
121 |
+
return str_pad((98-$checksum),2,'0',STR_PAD_LEFT);
|
122 |
+
}
|
123 |
+
|
124 |
+
# Set the correct checksum for an IBAN
|
125 |
+
# $iban IBAN whose checksum should be set
|
126 |
+
function iban_set_checksum($iban) {
|
127 |
+
$iban = iban_to_machine_format($iban);
|
128 |
+
return substr($iban,0,2) . iban_find_checksum($iban) . substr($iban,4);
|
129 |
+
}
|
130 |
+
|
131 |
+
# Character substitution required for IBAN MOD97-10 checksum validation/generation
|
132 |
+
# $s Input string (IBAN)
|
133 |
+
function iban_checksum_string_replace($s) {
|
134 |
+
$iban_replace_chars = range('A','Z');
|
135 |
+
foreach (range(10,35) as $tempvalue) { $iban_replace_values[]=strval($tempvalue); }
|
136 |
+
return str_replace($iban_replace_chars,$iban_replace_values,$s);
|
137 |
+
}
|
138 |
+
|
139 |
+
# Same as below but actually returns resulting checksum
|
140 |
+
function iban_mod97_10_checksum($numeric_representation) {
|
141 |
+
$checksum = intval(substr($numeric_representation, 0, 1));
|
142 |
+
for ($position = 1; $position < strlen($numeric_representation); $position++) {
|
143 |
+
$checksum *= 10;
|
144 |
+
$checksum += intval(substr($numeric_representation,$position,1));
|
145 |
+
$checksum %= 97;
|
146 |
+
}
|
147 |
+
return $checksum;
|
148 |
+
}
|
149 |
+
|
150 |
+
# Perform MOD97-10 checksum calculation ('Germanic-level effiency' version - thanks Chris!)
|
151 |
+
function iban_mod97_10($numeric_representation) {
|
152 |
+
global $__disable_iiban_gmp_extension;
|
153 |
+
# prefer php5 gmp extension if available
|
154 |
+
if(!($__disable_iiban_gmp_extension) && function_exists('gmp_intval')) { return gmp_intval(gmp_mod(gmp_init($numeric_representation, 10),'97')) === 1; }
|
155 |
+
|
156 |
+
/*
|
157 |
+
# old manual processing (~16x slower)
|
158 |
+
$checksum = intval(substr($numeric_representation, 0, 1));
|
159 |
+
for ($position = 1; $position < strlen($numeric_representation); $position++) {
|
160 |
+
$checksum *= 10;
|
161 |
+
$checksum += intval(substr($numeric_representation,$position,1));
|
162 |
+
$checksum %= 97;
|
163 |
+
}
|
164 |
+
return $checksum;
|
165 |
+
*/
|
166 |
+
|
167 |
+
# new manual processing (~3x slower)
|
168 |
+
$length = strlen($numeric_representation);
|
169 |
+
$rest = "";
|
170 |
+
$position = 0;
|
171 |
+
while ($position < $length) {
|
172 |
+
$value = 9-strlen($rest);
|
173 |
+
$n = $rest . substr($numeric_representation,$position,$value);
|
174 |
+
$rest = $n % 97;
|
175 |
+
$position = $position + $value;
|
176 |
+
}
|
177 |
+
return ($rest === 1);
|
178 |
+
}
|
179 |
+
|
180 |
+
# Get an array of all the parts from an IBAN
|
181 |
+
function iban_get_parts($iban) {
|
182 |
+
return array(
|
183 |
+
'country' => iban_get_country_part($iban),
|
184 |
+
'checksum' => iban_get_checksum_part($iban),
|
185 |
+
'bban' => iban_get_bban_part($iban),
|
186 |
+
'bank' => iban_get_bank_part($iban),
|
187 |
+
'country' => iban_get_country_part($iban),
|
188 |
+
'branch' => iban_get_branch_part($iban),
|
189 |
+
'account' => iban_get_account_part($iban)
|
190 |
+
);
|
191 |
+
}
|
192 |
+
|
193 |
+
# Get the Bank ID (institution code) from an IBAN
|
194 |
+
function iban_get_bank_part($iban) {
|
195 |
+
$iban = iban_to_machine_format($iban);
|
196 |
+
$country = iban_get_country_part($iban);
|
197 |
+
$start = iban_country_get_bankid_start_offset($country);
|
198 |
+
$stop = iban_country_get_bankid_stop_offset($country);
|
199 |
+
if($start!=''&&$stop!='') {
|
200 |
+
$bban = iban_get_bban_part($iban);
|
201 |
+
return substr($bban,$start,($stop-$start+1));
|
202 |
+
}
|
203 |
+
return '';
|
204 |
+
}
|
205 |
+
|
206 |
+
# Get the Branch ID (sort code) from an IBAN
|
207 |
+
function iban_get_branch_part($iban) {
|
208 |
+
$iban = iban_to_machine_format($iban);
|
209 |
+
$country = iban_get_country_part($iban);
|
210 |
+
$start = iban_country_get_branchid_start_offset($country);
|
211 |
+
$stop = iban_country_get_branchid_stop_offset($country);
|
212 |
+
if($start!=''&&$stop!='') {
|
213 |
+
$bban = iban_get_bban_part($iban);
|
214 |
+
return substr($bban,$start,($stop-$start+1));
|
215 |
+
}
|
216 |
+
return '';
|
217 |
+
}
|
218 |
+
|
219 |
+
# Get the (branch-local) account ID from an IBAN
|
220 |
+
function iban_get_account_part($iban) {
|
221 |
+
$iban = iban_to_machine_format($iban);
|
222 |
+
$country = iban_get_country_part($iban);
|
223 |
+
$start = iban_country_get_branchid_stop_offset($country);
|
224 |
+
if($start=='') {
|
225 |
+
$start = iban_country_get_bankid_stop_offset($country);
|
226 |
+
}
|
227 |
+
if($start!='') {
|
228 |
+
$bban = iban_get_bban_part($iban);
|
229 |
+
return substr($bban,$start+1);
|
230 |
+
}
|
231 |
+
return '';
|
232 |
+
}
|
233 |
+
|
234 |
+
# Get the name of an IBAN country
|
235 |
+
function iban_country_get_country_name($iban_country) {
|
236 |
+
return _iban_country_get_info($iban_country,'country_name');
|
237 |
+
}
|
238 |
+
|
239 |
+
# Get the domestic example for an IBAN country
|
240 |
+
function iban_country_get_domestic_example($iban_country) {
|
241 |
+
return _iban_country_get_info($iban_country,'domestic_example');
|
242 |
+
}
|
243 |
+
|
244 |
+
# Get the BBAN example for an IBAN country
|
245 |
+
function iban_country_get_bban_example($iban_country) {
|
246 |
+
return _iban_country_get_info($iban_country,'bban_example');
|
247 |
+
}
|
248 |
+
|
249 |
+
# Get the BBAN format (in SWIFT format) for an IBAN country
|
250 |
+
function iban_country_get_bban_format_swift($iban_country) {
|
251 |
+
return _iban_country_get_info($iban_country,'bban_format_swift');
|
252 |
+
}
|
253 |
+
|
254 |
+
# Get the BBAN format (as a regular expression) for an IBAN country
|
255 |
+
function iban_country_get_bban_format_regex($iban_country) {
|
256 |
+
return _iban_country_get_info($iban_country,'bban_format_regex');
|
257 |
+
}
|
258 |
+
|
259 |
+
# Get the BBAN length for an IBAN country
|
260 |
+
function iban_country_get_bban_length($iban_country) {
|
261 |
+
return _iban_country_get_info($iban_country,'bban_length');
|
262 |
+
}
|
263 |
+
|
264 |
+
# Get the IBAN example for an IBAN country
|
265 |
+
function iban_country_get_iban_example($iban_country) {
|
266 |
+
return _iban_country_get_info($iban_country,'iban_example');
|
267 |
+
}
|
268 |
+
|
269 |
+
# Get the IBAN format (in SWIFT format) for an IBAN country
|
270 |
+
function iban_country_get_iban_format_swift($iban_country) {
|
271 |
+
return _iban_country_get_info($iban_country,'iban_format_swift');
|
272 |
+
}
|
273 |
+
|
274 |
+
# Get the IBAN format (as a regular expression) for an IBAN country
|
275 |
+
function iban_country_get_iban_format_regex($iban_country) {
|
276 |
+
return _iban_country_get_info($iban_country,'iban_format_regex');
|
277 |
+
}
|
278 |
+
|
279 |
+
# Get the IBAN length for an IBAN country
|
280 |
+
function iban_country_get_iban_length($iban_country) {
|
281 |
+
return _iban_country_get_info($iban_country,'iban_length');
|
282 |
+
}
|
283 |
+
|
284 |
+
# Get the BBAN Bank ID start offset for an IBAN country
|
285 |
+
function iban_country_get_bankid_start_offset($iban_country) {
|
286 |
+
return _iban_country_get_info($iban_country,'bban_bankid_start_offset');
|
287 |
+
}
|
288 |
+
|
289 |
+
# Get the BBAN Bank ID stop offset for an IBAN country
|
290 |
+
function iban_country_get_bankid_stop_offset($iban_country) {
|
291 |
+
return _iban_country_get_info($iban_country,'bban_bankid_stop_offset');
|
292 |
+
}
|
293 |
+
|
294 |
+
# Get the BBAN Branch ID start offset for an IBAN country
|
295 |
+
function iban_country_get_branchid_start_offset($iban_country) {
|
296 |
+
return _iban_country_get_info($iban_country,'bban_branchid_start_offset');
|
297 |
+
}
|
298 |
+
|
299 |
+
# Get the BBAN Branch ID stop offset for an IBAN country
|
300 |
+
function iban_country_get_branchid_stop_offset($iban_country) {
|
301 |
+
return _iban_country_get_info($iban_country,'bban_branchid_stop_offset');
|
302 |
+
}
|
303 |
+
|
304 |
+
# Get the registry edition for an IBAN country
|
305 |
+
function iban_country_get_registry_edition($iban_country) {
|
306 |
+
return _iban_country_get_info($iban_country,'registry_edition');
|
307 |
+
}
|
308 |
+
|
309 |
+
# Is the IBAN country a SEPA member?
|
310 |
+
function iban_country_is_sepa($iban_country) {
|
311 |
+
return _iban_country_get_info($iban_country,'country_sepa');
|
312 |
+
}
|
313 |
+
|
314 |
+
# Get the list of all IBAN countries
|
315 |
+
function iban_countries() {
|
316 |
+
global $_iban_registry;
|
317 |
+
return array_keys($_iban_registry);
|
318 |
+
}
|
319 |
+
|
320 |
+
# Given an incorrect IBAN, return an array of zero or more checksum-valid
|
321 |
+
# suggestions for what the user might have meant, based upon common
|
322 |
+
# mistranscriptions.
|
323 |
+
function iban_mistranscription_suggestions($incorrect_iban) {
|
324 |
+
|
325 |
+
# abort on ridiculous length input (but be liberal)
|
326 |
+
$length = strlen($incorrect_iban);
|
327 |
+
if($length<5 || $length>34) { return array('(length bad)'); }
|
328 |
+
|
329 |
+
# abort if mistranscriptions data is unable to load
|
330 |
+
if(!_iban_load_mistranscriptions()) { return array('(failed to load)'); }
|
331 |
+
|
332 |
+
# init
|
333 |
+
global $_iban_mistranscriptions;
|
334 |
+
$suggestions = array();
|
335 |
+
|
336 |
+
# we have a string of approximately IBAN-like length.
|
337 |
+
# ... now let's make suggestions.
|
338 |
+
$numbers = array('0','1','2','3','4','5','6','7','8','9');
|
339 |
+
for($i=0;$i<$length;$i++) {
|
340 |
+
# get the character at this position
|
341 |
+
$character = substr($incorrect_iban,$i,1);
|
342 |
+
# for each known transcription error resulting in this character
|
343 |
+
foreach($_iban_mistranscriptions[$character] as $possible_origin) {
|
344 |
+
# if we're:
|
345 |
+
# - in the first 2 characters (country) and the possible replacement
|
346 |
+
# is a letter
|
347 |
+
# - in the 3rd or 4th characters (checksum) and the possible
|
348 |
+
# replacement is a number
|
349 |
+
# - later in the string
|
350 |
+
if(($i<2 && !in_array($possible_origin,$numbers)) ||
|
351 |
+
($i>=2 && $i<=3 && in_array($possible_origin,$numbers)) ||
|
352 |
+
$i>3) {
|
353 |
+
# construct a possible IBAN using this possible origin for the
|
354 |
+
# mistranscribed character, replaced at this position only
|
355 |
+
$possible_iban = substr($incorrect_iban,0,$i) . $possible_origin . substr($incorrect_iban,$i+1);
|
356 |
+
# if the checksum passes, return it as a possibility
|
357 |
+
if(verify_iban($possible_iban)) {
|
358 |
+
array_push($suggestions,$possible_iban);
|
359 |
+
}
|
360 |
+
}
|
361 |
+
}
|
362 |
+
}
|
363 |
+
|
364 |
+
# now we check for the type of mistransposition case where all of
|
365 |
+
# the characters of a certain type within a string were mistransposed.
|
366 |
+
# - first generate a character frequency table
|
367 |
+
$char_freqs = array();
|
368 |
+
for($i=0;$i<strlen($incorrect_iban);$i++) {
|
369 |
+
if(!isset($char_freqs[substr($incorrect_iban,$i,1)])) {
|
370 |
+
$char_freqs[substr($incorrect_iban,$i,1)] = 1;
|
371 |
+
}
|
372 |
+
else {
|
373 |
+
$char_freqs[substr($incorrect_iban,$i,1)]++;
|
374 |
+
}
|
375 |
+
}
|
376 |
+
# - now, for each of the characters in the string...
|
377 |
+
foreach($char_freqs as $char=>$freq) {
|
378 |
+
# if the character occurs more than once
|
379 |
+
if($freq>1) {
|
380 |
+
# check the 'all occurrences of <char> were mistranscribed' case
|
381 |
+
foreach($_iban_mistranscriptions[$char] as $possible_origin) {
|
382 |
+
$possible_iban = str_replace($char,$possible_origin,$incorrect_iban);
|
383 |
+
if(verify_iban($possible_iban)) {
|
384 |
+
array_push($suggestions,$possible_iban);
|
385 |
+
}
|
386 |
+
}
|
387 |
+
}
|
388 |
+
}
|
389 |
+
|
390 |
+
return $suggestions;
|
391 |
+
}
|
392 |
+
|
393 |
+
|
394 |
+
##### internal use functions - safe to ignore ######
|
395 |
+
|
396 |
+
# Load the IBAN registry from disk.
|
397 |
+
global $_iban_registry;
|
398 |
+
$_iban_registry = array();
|
399 |
+
_iban_load_registry();
|
400 |
+
function _iban_load_registry() {
|
401 |
+
global $_iban_registry;
|
402 |
+
# if the registry is not yet loaded, or has been corrupted, reload
|
403 |
+
if(!is_array($_iban_registry) || count($_iban_registry)<1) {
|
404 |
+
$data = file_get_contents(dirname(__FILE__) . '/registry.txt');
|
405 |
+
$lines = explode("\n",$data);
|
406 |
+
array_shift($lines); # drop leading description line
|
407 |
+
# loop through lines
|
408 |
+
foreach($lines as $line) {
|
409 |
+
if($line!='') {
|
410 |
+
# split to fields
|
411 |
+
$old_display_errors_value = ini_get('display_errors');
|
412 |
+
ini_set('display_errors',false);
|
413 |
+
$old_error_reporting_value = ini_get('error_reporting');
|
414 |
+
ini_set('error_reporting',false);
|
415 |
+
list($country,$country_name,$domestic_example,$bban_example,$bban_format_swift,$bban_format_regex,$bban_length,$iban_example,$iban_format_swift,$iban_format_regex,$iban_length,$bban_bankid_start_offset,$bban_bankid_stop_offset,$bban_branchid_start_offset,$bban_branchid_stop_offset,$registry_edition,$country_sepa) = explode('|',$line);
|
416 |
+
ini_set('display_errors',$old_display_errors_value);
|
417 |
+
ini_set('error_reporting',$old_error_reporting_value);
|
418 |
+
# assign to registry
|
419 |
+
$_iban_registry[$country] = array(
|
420 |
+
'country' => $country,
|
421 |
+
'country_name' => $country_name,
|
422 |
+
'country_sepa' => $country_sepa,
|
423 |
+
'domestic_example' => $domestic_example,
|
424 |
+
'bban_example' => $bban_example,
|
425 |
+
'bban_format_swift' => $bban_format_swift,
|
426 |
+
'bban_format_regex' => $bban_format_regex,
|
427 |
+
'bban_length' => $bban_length,
|
428 |
+
'iban_example' => $iban_example,
|
429 |
+
'iban_format_swift' => $iban_format_swift,
|
430 |
+
'iban_format_regex' => $iban_format_regex,
|
431 |
+
'iban_length' => $iban_length,
|
432 |
+
'bban_bankid_start_offset' => $bban_bankid_start_offset,
|
433 |
+
'bban_bankid_stop_offset' => $bban_bankid_stop_offset,
|
434 |
+
'bban_branchid_start_offset' => $bban_branchid_start_offset,
|
435 |
+
'bban_branchid_stop_offset' => $bban_branchid_stop_offset,
|
436 |
+
'registry_edition' => $registry_edition
|
437 |
+
);
|
438 |
+
}
|
439 |
+
}
|
440 |
+
}
|
441 |
+
}
|
442 |
+
|
443 |
+
# Get information from the IBAN registry by example IBAN / code combination
|
444 |
+
function _iban_get_info($iban,$code) {
|
445 |
+
$country = iban_get_country_part($iban);
|
446 |
+
return _iban_country_get_info($country,$code);
|
447 |
+
}
|
448 |
+
|
449 |
+
# Get information from the IBAN registry by country / code combination
|
450 |
+
function _iban_country_get_info($country,$code) {
|
451 |
+
global $_iban_registry;
|
452 |
+
$country = strtoupper($country);
|
453 |
+
$code = strtolower($code);
|
454 |
+
if(array_key_exists($country,$_iban_registry)) {
|
455 |
+
if(array_key_exists($code,$_iban_registry[$country])) {
|
456 |
+
return $_iban_registry[$country][$code];
|
457 |
+
}
|
458 |
+
}
|
459 |
+
return false;
|
460 |
+
}
|
461 |
+
|
462 |
+
# Load common mistranscriptions from disk.
|
463 |
+
function _iban_load_mistranscriptions() {
|
464 |
+
global $_iban_mistranscriptions;
|
465 |
+
# do not reload if already present
|
466 |
+
if(is_array($_iban_mistranscriptions) && count($_iban_mistranscriptions) == 36) { return true; }
|
467 |
+
$_iban_mistranscriptions = array();
|
468 |
+
$file = dirname(__FILE__) . '/mistranscriptions.txt';
|
469 |
+
if(!file_exists($file) || !is_readable($file)) { return false; }
|
470 |
+
$data = file_get_contents($file);
|
471 |
+
$lines = explode("\n",$data);
|
472 |
+
foreach($lines as $line) {
|
473 |
+
# match lines with ' c-<x> = <something>' where x is a word-like character
|
474 |
+
if(preg_match('/^ *c-(\w) = (.*?)$/',$line,$matches)) {
|
475 |
+
# normalize the character to upper case
|
476 |
+
$character = strtoupper($matches[1]);
|
477 |
+
# break the possible origins list at '/', strip quotes & spaces
|
478 |
+
$chars = explode(' ',str_replace('"','',preg_replace('/ *?\/ *?/','',$matches[2])));
|
479 |
+
# assign as possible mistranscriptions for that character
|
480 |
+
$_iban_mistranscriptions[$character] = $chars;
|
481 |
+
}
|
482 |
+
}
|
483 |
+
return true;
|
484 |
+
}
|
485 |
+
|
486 |
+
?>
|
includes/libraries/iban/registry.txt
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
country_code|country_name|domestic_example|bban_example|bban_format_swift|bban_format_regex|bban_length|iban_example|iban_format_swift|iban_format_regex|iban_length|bban_bankid_start_offset|bban_bankid_stop_offset|bban_branchid_start_offset|bban_branchid_stop_offset|registry_edition|country_sepa
|
2 |
+
AA|IIBAN (Internet)|0011123Z5678|0011123Z5678|12!a|^[A-Z0-9]{12}$|12|AA120011123Z5678|AA2!n12!a|^AA(\d{2})([A-Z0-9]{12})$|16|0|3|||N/A|0
|
3 |
+
AL|Albania|0000000235698741|212110090000000235698741|8!n16!c|^(\d{8})([A-Za-z0-9]{16})$|24|AL47212110090000000235698741|AL2!n8!n16!c|^AL(\d{2})(\d{8})([A-Za-z0-9]{16})$|28|0|2|3|6|2011-06-20|0
|
4 |
+
AD|Andorra|2030200359100100|00012030200359100100|4!n4!n12!c|^(\d{4})(\d{4})([A-Za-z0-9]{12})$|20|AD1200012030200359100100|AD2!n4!n4!n12!c|^AD(\d{2})(\d{4})(\d{4})([A-Za-z0-9]{12})$|24|0|3|4|7|2011-06-20|0
|
5 |
+
AT|Austria|19043-234573201|1904300234573201|5!n11!n|^(\d{5})(\d{11})$|16|AT611904300234573201|AT2!n5!n11!n|^AT(\d{2})(\d{5})(\d{11})$|20|0|4|||2011-06-20|1
|
6 |
+
AX|Aland Islands|123456-785|12345600000785|6!n7!n1!n|^(\d{6})(\d{7})(\d{1})$|14|AX2112345600000785|AX2!n6!n7!n1!n|^AX(\d{2})(\d{6})(\d{7})(\d{1})$|18|0|2|||2013-09-05|1
|
7 |
+
AZ|Azerbaijan|NABZ00000000137010001944|NABZ00000000137010001944|4!a20!c|^([A-Z]{4})([A-Za-z0-9]{20})$|24|AZ21NABZ00000000137010001944|AZ2!n4!a20!c|^AZ(\d{2})([A-Z]{4})([A-Za-z0-9]{20})$|28|0|3|||2012-05-29|0
|
8 |
+
BH|Bahrain|00001299123456|BMAG00001299123456|4!a14!c|^([A-Z]{4})([A-Za-z0-9]{14})$|22|BH67BMAG00001299123456|BH2!n4!a14!c|^BH(\d{2})([A-Z]{4})([A-Za-z0-9]{14})$|22|0|3|||2012-05-29|0
|
9 |
+
BE|Belgium|539-0075470-34|539007547034|3!n7!n2!n|^(\d{3})(\d{7})(\d{2})$|12|BE68539007547034|BE2!n3!n7!n2!n|^BE(\d{2})(\d{3})(\d{7})(\d{2})$|16|0|2|||2011-06-20|1
|
10 |
+
BA|Bosnia and Herzegovina|199-044-00012002-79|1990440001200279|3!n3!n8!n2!n|^(\d{3})(\d{3})(\d{8})(\d{2})$|16|BA391290079401028494|BA2!n3!n3!n8!n2!n|^BA(\d{2})(\d{3})(\d{3})(\d{8})(\d{2})$|20|0|2|3|5|2011-06-20|0
|
11 |
+
BR|Brazil|0009795493C1|00360305000010009795493P1|8!n5!n10!n1!a1!c|^(\d{8})(\d{5})(\d{10})([A-Z]{1})([A-Za-z0-9]{1})$|25|BR2300360305000010009795493P1BR1800000000141455123924100C2|BR2!n8!n5!n10!n1!a1!c|^BR(\d{2})(\d{8})(\d{5})(\d{10})([A-Z]{1})([A-Za-z0-9]{1})$|29|0|7|8|12|2013-06-20|0
|
12 |
+
BG|Bulgaria|BNBG 9661 1020 3456 78|BNBG96611020345678|4!a4!n2!n8!c|^([A-Z]{4})(\d{4})(\d{2})([A-Za-z0-9]{8})$|18|BG80BNBG96611020345678|BG2!n4!a4!n2!n8!c|^BG(\d{2})([A-Z]{4})(\d{4})(\d{2})([A-Za-z0-9]{8})$|22|0|3|4|7|2011-06-20|1
|
13 |
+
CR|Costa Rica|1026284066|15202001026284066|3!n14!n|^(\d{3})(\d{14})$|7|CR91202001026284066|CR2!n3!n14!n|^CR(\d{2})(\d{3})(\d{14})$|21|0|2|||2012-05-29|0
|
14 |
+
HR|Croatia|1001005-1863000160|10010051863000160|7!n10!n|^(\d{7})(\d{10})$|17|HR1210010051863000160|HR2!n7!n10!n|^HR(\d{2})(\d{7})(\d{10})$|21|0|6|||2011-06-20|1
|
15 |
+
CY|Cyprus|1200527600|002001280000001200527600|3!n5!n16!c|^(\d{3})(\d{5})([A-Za-z0-9]{16})$|24|CY17002001280000001200527600|CY2!n3!n5!n16!c|^CY(\d{2})(\d{3})(\d{5})([A-Za-z0-9]{16})$|28|0|2|3|7|2011-06-20|1
|
16 |
+
CZ|Czech Republic|19-2000145399/0800|08000000192000145399|4!n6!n10!n|^(\d{4})(\d{6})(\d{10})$|20|CZ6508000000192000145399|CZ2!n4!n6!n10!n|^CZ(\d{2})(\d{4})(\d{6})(\d{10})$|24|0|3|4|9|2011-06-20|1
|
17 |
+
DK|Denmark|0040 0440116243, 6460 0001631634, 6471 0001000206|00400440116243, 64600001631634, 64710001000206|4!n9!n1!n|^(\d{4})(\d{9})(\d{1})$|14|DK5000400440116243|DK2!n4!n9!n1!n|^DK(\d{2})(\d{4})(\d{9})(\d{1})$|18|0|3|||2011-06-20|1
|
18 |
+
FO|Faroe Islands|0040 0440116243, 6460 0001631634, 6471 0001000206|00400440116243, 64600001631634, 64710001000206|4!n9!n1!n|^(\d{4})(\d{9})(\d{1})$|14|FO2000400440116243|FO2!n4!n9!n1!n|^FO(\d{2})(\d{4})(\d{9})(\d{1})$|18|0|3|||2011-06-20|0
|
19 |
+
GL|Greenland|0040 0440116243, 6460 0001631634, 6471 0001000206|00400440116243, 64600001631634, 64710001000206|4!n9!n1!n|^(\d{4})(\d{9})(\d{1})$|14|GL2000400440116243|GL2!n4!n9!n1!n|^GL(\d{2})(\d{4})(\d{9})(\d{1})$|18|0|3|||2011-06-20|0
|
20 |
+
DO|Dominican Republic|1212453611324|AGR00000001212453611324|4!c20!n|^([A-Za-z0-9]{4})(\d{20})$|24|DO28BAGR00000001212453611324|DO2!n4!c20!n|^DO(\d{2})([A-Za-z0-9]{4})(\d{20})$|28|0|3|||2011-06-20|0
|
21 |
+
EE|Estonia|221020145685|2200221020145685|2!n2!n11!n1!n|^(\d{2})(\d{2})(\d{11})(\d{1})$|16|EE382200221020145685|EE2!n2!n2!n11!n1!n|^EE(\d{2})(\d{2})(\d{2})(\d{11})(\d{1})$|20|0|1|||2011-06-20|1
|
22 |
+
FI|Finland|123456-785|12345600000785|6!n7!n1!n|^(\d{6})(\d{7})(\d{1})$|14|FI2112345600000785|FI2!n6!n7!n1!n|^FI(\d{2})(\d{6})(\d{7})(\d{1})$|18|0|2|||2013-08-05|1
|
23 |
+
FR|France|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|FR1420041010050500013M02606|FR2!n5!n5!n11!c2!n|^FR(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1
|
24 |
+
BL|Saint Barthelemy|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|BL9820041010050500013M02606|BL2!n5!n5!n11!c2!n|^BL(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-02-08|0
|
25 |
+
GF|French Guyana|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|GF4120041010050500013M02606|GF2!n5!n5!n11!c2!n|^GF(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1
|
26 |
+
GP|Guadelope|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|GP1120041010050500013M02606|GP2!n5!n5!n11!c2!n|^GP(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1
|
27 |
+
MF|Saint Martin (French Part)|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|MF9820041010050500013M02606|MF2!n5!n5!n11!c2!n|^MF(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-02-08|0
|
28 |
+
MQ|Martinique|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|MQ5120041010050500013M02606|MQ2!n5!n5!n11!c2!n|^MQ(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1
|
29 |
+
RE|Reunion|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|RE4220041010050500013M02606|RE2!n5!n5!n11!c2!n|^RE(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1
|
30 |
+
PF|French Polynesia|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|PF5720041010050500013M02606|PF2!n5!n5!n11!c2!n|^PF(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2011-06-20|0
|
31 |
+
TF|French Southern Territories|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|TF2120041010050500013M02606|TF2!n5!n5!n11!c2!n|^TF(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2011-06-20|0
|
32 |
+
YT|Mayotte|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|YT3120041010050500013M02606|YT2!n5!n5!n11!c2!n|^YT(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1
|
33 |
+
NC|New Caledonia|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|NC8420041010050500013M02606|NC2!n5!n5!n11!c2!n|^NC(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2011-06-20|0
|
34 |
+
PM|Saint Pierre et Miquelon|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|PM3620041010050500013M02606|PM2!n5!n5!n11!c2!n|^PM(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1
|
35 |
+
WF|Wallis and Futuna Islands|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|WF9120041010050500013M02606|WF2!n5!n5!n11!c2!n|^WF(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2011-06-20|0
|
36 |
+
GE|Georgia|0000000101904917|NB0000000101904917|2!a16!n|^([A-Z]{2})(\d{16})$|18|GE29NB0000000101904917|GE2!n2!a16!n|^GE(\d{2})([A-Z]{2})(\d{16})$|22|0|1|||2011-06-20|0
|
37 |
+
DE|Germany|37040044-532013000|370400440532013000|8!n10!n|^(\d{8})(\d{10})$|18|DE89370400440532013000|DE2!n8!n10!n|^DE(\d{2})(\d{8})(\d{10})$|22|0|7|||2011-06-20|1
|
38 |
+
GI|Gibraltar|0000 00007099 453|NWBK000000007099453|4!a15!c|^([A-Z]{4})([A-Za-z0-9]{15})$|19|GI75NWBK000000007099453|GI2!n4!a15!c|^GI(\d{2})([A-Z]{4})([A-Za-z0-9]{15})$|23|0|3|||2011-06-20|1
|
39 |
+
GR|Greece|01250000000012300695|01101250000000012300695|3!n4!n16!c|^(\d{3})(\d{4})([A-Za-z0-9]{16})$|23|GR1601101250000000012300695|GR2!n3!n4!n16!c|^GR(\d{2})(\d{3})(\d{4})([A-Za-z0-9]{16})$|27|0|2|3|6|2011-06-20|1
|
40 |
+
GT|Guatemala|01020000001210029690|TRAJ01020000001210029690|4!c20!c|^([A-Za-z0-9]{4})([A-Za-z0-9]{20})$|24|GT82TRAJ01020000001210029690|GT2!n4!c20!c|^GT(\d{2})([A-Za-z0-9]{4})([A-Za-z0-9]{20})$|28|0|3|||2012-05-29|0
|
41 |
+
HU|Hungary|11773016-11111018-00000000|117730161111101800000000|3!n4!n1!n15!n1!n|^(\d{3})(\d{4})(\d{1})(\d{15})(\d{1})$|24|HU42117730161111101800000000|HU2!n3!n4!n1!n15!n1!n|^HU(\d{2})(\d{3})(\d{4})(\d{1})(\d{15})(\d{1})$|28|0|2|3|6|2011-06-20|1
|
42 |
+
IS|Iceland|0159-26-007654-551073-0339|0159260076545510730339|4!n2!n6!n10!n|^(\d{4})(\d{2})(\d{6})(\d{10})$|22|IS140159260076545510730339|IS2!n4!n2!n6!n10!n|^IS(\d{2})(\d{4})(\d{2})(\d{6})(\d{10})$|26|0|3|6|11|2011-06-20|1
|
43 |
+
IE|Ireland|93-11-52 12345678|AIBK93115212345678|4!a6!n8!n|^([A-Z]{4})(\d{6})(\d{8})$|18|IE29AIBK93115212345678|IE2!n4!a6!n8!n|^IE(\d{2})([A-Z]{4})(\d{6})(\d{8})$|22|0|3|4|9|2011-06-20|1
|
44 |
+
IL|Israel|10-800-99999999|100800000099999000|3!n3!n13!n|^(\d{3})(\d{3})(\d{13})$|19|IL620108000000099999999|IL2!n3!n3!n13!n|^IL(\d{2})(\d{3})(\d{3})(\d{13})$|23|0|2|3|5|2011-06-20|0
|
45 |
+
IT|Italy|X 05428 11101 000000123456|X0542811101000000123456|1!a5!n5!n12!c|^([A-Z]{1})(\d{5})(\d{5})([A-Za-z0-9]{12})$|23|IT60X0542811101000000123456|IT2!n1!a5!n5!n12!c|^IT(\d{2})([A-Z]{1})(\d{5})(\d{5})([A-Za-z0-9]{12})$|27|0|5|6|10|2011-06-20|1
|
46 |
+
JO|Jordan|1310000302|CBJO0010000000000131000302|4!a4!n18!c|^([A-Z]{4})(\d{4})([A-Za-z0-9]{18})$|26|JO94CBJO0010000000000131000302|JO2!n4!a4!n18!c|^JO(\d{2})([A-Z]{4})(\d{4})([A-Za-z0-9]{18})$|30|0|3|4|7|2014-06-05|0
|
47 |
+
KZ|Kazakhstan|KZ86 125K ZT50 0410 0100|125KZT5004100100|3!n13!c|^(\d{3})([A-Za-z0-9]{13})$|16|KZ07|KZ2!n3!n13!c|^KZ(\d{2})(\d{3})([A-Za-z0-9]{13})$||0|2|||2014-06-05|0
|
48 |
+
KW|Kuwait|CBKU0000000000001234560101|CBKU0000000000001234560101|4!a22!c|^([A-Z]{4})([A-Za-z0-9]{22})$|26|KW81CBKU0000000000001234560101|KW2!n4!a22!n|^KW(\d{2})([A-Z]{4})(\d{22})$|30|0|3|||2011-06-20|0
|
49 |
+
LV|Latvia|BANK 0000 4351 9500 1|BANK0000435195001|4!a13!c|^([A-Z]{4})([A-Za-z0-9]{13})$|17|LV80BANK0000435195001|LV2!n4!a13!c|^LV(\d{2})([A-Z]{4})([A-Za-z0-9]{13})$|21|0|3|||2011-06-20|1
|
50 |
+
LB|Lebanon|01 001 901229114|0999 0000 0001 0019 0122 9114|4!n20!c|^(\d{4})([A-Za-z0-9]{20})$|24|LB62099900000001001901229114|LB2!n4!n20!c|^LB(\d{2})(\d{4})([A-Za-z0-9]{20})$|28|0|3|||2011-06-20|0
|
51 |
+
LI|Liechtenstein|8810 2324013AA|088100002324013AA|5!n12!c|^(\d{5})([A-Za-z0-9]{12})$|19|LI21088100002324013AA|LI2!n5!n12!c|^LI(\d{2})(\d{5})([A-Za-z0-9]{12})$|21|0|4|||2012-05-29|1
|
52 |
+
LT|Lithuania|1000 0111 0100 1000|10000011101001000|5!n11!n|^(\d{5})(\d{11})$|16|LT121000011101001000|LT2!n5!n11!n|^LT(\d{2})(\d{5})(\d{11})$|20|0|4|||2011-06-20|1
|
53 |
+
LU|Luxembourg|0019 4006 4475 0000|0019400644750000|3!n13!c|^(\d{3})([A-Za-z0-9]{13})$|16|LU280019400644750000|LU2!n3!n13!c|^LU(\d{2})(\d{3})([A-Za-z0-9]{13})$|20|0|2|||2011-06-20|1
|
54 |
+
MK|Macedonia|300 0000000424 25|250120000058984|3!n10!c2!n|^(\d{3})([A-Za-z0-9]{10})(\d{2})$|15|MK07250120000058984|MK2!n3!n10!c2!n|^MK(\d{2})(\d{3})([A-Za-z0-9]{10})(\d{2})$|19|0|2|||2012-05-29|0
|
55 |
+
MT|Malta|12345MTLCAST001S|MALT011000012345MTLCAST001S|4!a5!n18!c|^([A-Z]{4})(\d{5})([A-Za-z0-9]{18})$|27|MT84MALT011000012345MTLCAST001S|MT2!n4!a5!n18!c|^MT(\d{2})([A-Z]{4})(\d{5})([A-Za-z0-9]{18})$|31|0|3|4|8|2011-06-20|1
|
56 |
+
MR|Mauritania|00020 00101 00001234567 53|00020001010000123456753|5!n5!n11!n2!n|^(\d{5})(\d{5})(\d{11})(\d{2})$|23|MR1300020001010000123456753|MR135!n5!n11!n2!n|^MR13(\d{5})(\d{5})(\d{11})(\d{2})$|27|0|4|5|9|2011-06-20|0
|
57 |
+
MU|Mauritius|BOMM 0101 1010 3030 0200 000M UR|BOMM0101101030300200000MUR|4!a2!n2!n12!n3!n3!a|^([A-Z]{4})(\d{2})(\d{2})(\d{12})(\d{3})([A-Z]{3})$|26|MU17BOMM0101101030300200000MUR|MU2!n4!a2!n2!n12!n3!n3!a|^MU(\d{2})([A-Z]{4})(\d{2})(\d{2})(\d{12})(\d{3})([A-Z]{3})$|30|0|5|6|7|2011-06-20|0
|
58 |
+
MD|Moldova|00225100013104168|AG000225100013104168|2!c18!c|^([A-Za-z0-9]{2})([A-Za-z0-9]{18})$|20|MD24AG000225100013104168|MD2!n20!c|^MD(\d{2})([A-Za-z0-9]{20})$|24|0|1|||2012-09-09|0
|
59 |
+
MC|Monaco|0011111000h|11222 00001 01234567890 30|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|MC5811222000010123456789030|MC2!n5!n5!n11!c2!n|^MC(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2011-06-20|1
|
60 |
+
ME|Montenegro|505 0000123456789 51|505000012345678951|3!n13!n2!n|^(\d{3})(\d{13})(\d{2})$|18|ME25505000012345678951|ME2!n3!n13!n2!n|^ME(\d{2})(\d{3})(\d{13})(\d{2})$|22|0|2|||2011-06-20|0
|
61 |
+
NL|The Netherlands|041 71 64 300|ABNA0417164300|4!a10!n|^([A-Z]{4})(\d{10})$|14|NL91ABNA0417164300|NL2!n4!a10!n|^NL(\d{2})([A-Z]{4})(\d{10})$|18|0|3|4|3|2013-06-20|1
|
62 |
+
NO|Norway|8601 11 17947|86011117947|4!n6!n1!n|^(\d{4})(\d{6})(\d{1})$|11|NO9386011117947|NO2!n4!n6!n1!n|^NO(\d{2})(\d{4})(\d{6})(\d{1})$|15|0|3|||2011-06-20|1
|
63 |
+
PK|Pakistan|00260101036360|SCBL0000001123456702|4!a16!c|^([A-Z]{4})([A-Za-z0-9]{16})$|20|PK36SCBL0000001123456702|PK2!n4!a16!c|^PK(\d{2})([A-Z]{4})([A-Za-z0-9]{16})$|24|0|3|||2012-05-29|0
|
64 |
+
PL|Poland|61 1090 1014 0000 0712 1981 2874|109010140000071219812874|8!n16!n|^(\d{8})(\d{16})$|24|PL61109010140000071219812874|PL2!n8!n16n|^PL(\d{2})(\d{8})(\d{1,16})$|28|0|7|||2011-06-20|1
|
65 |
+
PS|Palestine|400123456702|PALS000000000400123456702|4!a21!c|^([A-Z]{4})([A-Za-z0-9]{21})$|25|PS92PALS000000000400123456702|PS2!n4!a21!c|^PS(\d{2})([A-Z]{4})([A-Za-z0-9]{21})$|29|0|3|||2013-09-05|0
|
66 |
+
PT|Portugal|0002.0123.12345678901.54|000201231234567890154|4!n4!n11!n2!n|^(\d{4})(\d{4})(\d{11})(\d{2})$|21|PT50000201231234567890154|PT2!n4!n4!n11!n2!n|^PT(\d{2})(\d{4})(\d{4})(\d{11})(\d{2})$|25|0|3|4|7|2013-09-05|1
|
67 |
+
QA|Qatar|QA58DOHB00001234567890ABCDEFG|DOHB00001234567890ABCDEFG|4!a4!n17!c|^([A-Z]{4})(\d{4})([A-Za-z0-9]{17})$|29|QA58DOHB00001234567890ABCDEFG|QA2!n4!a4!n17!c|^QA(\d{2})([A-Z]{4})(\d{4})([A-Za-z0-9]{17})$|29|0|3|4|7|2014-06-05|0
|
68 |
+
RO|Romania|AAAA 1B31 0075 9384 0000|AAAA1B31007593840000|4!a16!c|^([A-Z]{4})([A-Za-z0-9]{16})$|20|RO49AAAA1B31007593840000|RO2!n4!a16!c|^RO(\d{2})([A-Z]{4})([A-Za-z0-9]{16})$|24|0|3|||2011-06-20|1
|
69 |
+
SM|San Marino|U032 2509 8000 0000 0270 100|U0322509800000000270100|1!a5!n5!n12!c|^([A-Z]{1})(\d{5})(\d{5})([A-Za-z0-9]{12})$|23|SM86U0322509800000000270100|SM2!n1!a5!n5!n12!c|^SM(\d{2})([A-Z]{1})(\d{5})(\d{5})([A-Za-z0-9]{12})$|27|0|5|6|10|2011-06-20|1
|
70 |
+
SA|Saudi Arabia|608010167519|80000000608010167519|2!n18!c|^(\d{2})([A-Za-z0-9]{18})$|20|SA0380000000608010167519|SA2!n2!n18!c|^SA(\d{2})(\d{2})([A-Za-z0-9]{18})$|24|0|1|||2012-05-29|0
|
71 |
+
RS|Serbia|260-0056010016113-79|260005601001611379|3!n13!n2!n|^(\d{3})(\d{13})(\d{2})$|18|RS35260005601001611379|RS2!n3!n13!n2!n|^RS(\d{2})(\d{3})(\d{13})(\d{2})$|22|0|2|||2011-06-20|0
|
72 |
+
SK|Slovak Republic|19-8742637541/1200|12000000198742637541|4!n6!n10!n|^(\d{4})(\d{6})(\d{10})$|20|SK3112000000198742637541|SK2!n4!n6!n10!n|^SK(\d{2})(\d{4})(\d{6})(\d{10})$|24|0|3|4|9|2011-06-20|1
|
73 |
+
SI|Slovenia|2633 0001 2039 086|263300012039086|5!n8!n2!n|^(\d{5})(\d{8})(\d{2})$|15|SI56191000000123438|SI2!n5!n8!n2!n|^SI(\d{2})(\d{5})(\d{8})(\d{2})$|19|0|1|2|4|2012-09-09|1
|
74 |
+
ES|Spain|2100 0418 45 0200051332|21000418450200051332|4!n4!n1!n1!n10!n|^(\d{4})(\d{4})(\d{1})(\d{1})(\d{10})$|20|ES9121000418450200051332|ES2!n4!n4!n1!n1!n10!n|^ES(\d{2})(\d{4})(\d{4})(\d{1})(\d{1})(\d{10})$|24|0|3|4|7|2013-09-05|1
|
75 |
+
SE|Sweden|1234 12 3456 1|5000 0000 0583 9825 7466|3!n16!n1!n|^(\d{3})(\d{16})(\d{1})$|20|SE4550000000058398257466|SE2!n3!n16!n1!n|^SE(\d{2})(\d{3})(\d{16})(\d{1})$|24|0|2|||2011-06-20|1
|
76 |
+
CH|Switzerland|762 1162-3852.957|00762011623852957|5!n12!c|^(\d{5})([A-Za-z0-9]{12})$|17|CH9300762011623852957|CH2!n5!n12!c|^CH(\d{2})(\d{5})([A-Za-z0-9]{12})$|21|0|4|||2011-06-20|1
|
77 |
+
TN|Tunisia|10 006 0351835984788 31|10006035183598478831|2!n3!n13!n2!n|^(\d{2})(\d{3})(\d{13})(\d{2})$|20|TN5910006035183598478831|TN592!n3!n13!n2!n|^TN59(\d{2})(\d{3})(\d{13})(\d{2})$|24|0|1|2|4|2011-06-20|0
|
78 |
+
TR|Turkey|0061 01299 1234567890123456789|0006100519786457841326|5!n1!c16!c|^(\d{5})([A-Za-z0-9]{1})([A-Za-z0-9]{16})$|22|TR330006100519786457841326|TR2!n5!n1!c16!c|^TR(\d{2})(\d{5})([A-Za-z0-9]{1})([A-Za-z0-9]{16})$|26|0|4|||2011-06-20|0
|
79 |
+
AE|United Arab Emirates|1234567890123456|0331234567890123456|3!n16!n|^(\d{3})(\d{16})$|19|AE070331234567890123456|AE2!n3!n16!n|^AE(\d{2})(\d{3})(\d{16})$|23|0|2|||2011-06-20|0
|
80 |
+
GB|United Kingdom|60-16-13 31926819|NWBK60161331926819|4!a6!n8!n|^([A-Z]{4})(\d{6})(\d{8})$|18|GB29NWBK60161331926819|GB2!n4!a6!n8!n|^GB(\d{2})([A-Z]{4})(\d{6})(\d{8})$|22|0|3|4|9|2011-06-20|1
|
81 |
+
VG|British Virgin Islands|00000 12 345 678 901|VPVG0000012345678901|4!a16!n|^([A-Z]{4})(\d{16})$|20|VG96VPVG0000012345678901|VG2!n4!a16!n|^VG(\d{2})([A-Z]{4})(\d{16})$|24|0|3|||2012-05-29|0
|
includes/wc-gzd-template-functions.php
CHANGED
@@ -179,7 +179,7 @@ if ( ! function_exists( 'woocommerce_gzd_digital_checkbox' ) ) {
|
|
179 |
if ( ! empty( $items ) ) {
|
180 |
foreach ( $items as $cart_item_key => $values ) {
|
181 |
$_product = apply_filters( 'woocommerce_cart_item_product', $values[ 'data' ], $values, $cart_item_key );
|
182 |
-
if ( $_product->is_downloadable() )
|
183 |
$is_downloadable = true;
|
184 |
}
|
185 |
}
|
@@ -200,7 +200,7 @@ if ( ! function_exists( 'woocommerce_gzd_checkout_validation' ) ) {
|
|
200 |
* Validate checkbox data
|
201 |
*/
|
202 |
function woocommerce_gzd_checkout_validation( $posted ) {
|
203 |
-
if ( ! isset( $_POST['woocommerce_checkout_update_totals'] ) ) {
|
204 |
if ( ! isset( $_POST[ 'legal' ] ) && get_option( 'woocommerce_gzd_display_checkout_legal_no_checkbox' ) == 'no' )
|
205 |
wc_add_notice( wc_gzd_get_legal_text_error(), 'error' );
|
206 |
// Check if cart contains downloadable product
|
@@ -209,7 +209,7 @@ if ( ! function_exists( 'woocommerce_gzd_checkout_validation' ) ) {
|
|
209 |
if ( ! empty( $items ) && get_option( 'woocommerce_gzd_checkout_legal_digital_checkbox' ) == 'yes' ) {
|
210 |
foreach ( $items as $cart_item_key => $values ) {
|
211 |
$_product = apply_filters( 'woocommerce_cart_item_product', $values[ 'data' ], $values, $cart_item_key );
|
212 |
-
if ( $_product->is_downloadable() )
|
213 |
$is_downloadable = true;
|
214 |
}
|
215 |
}
|
179 |
if ( ! empty( $items ) ) {
|
180 |
foreach ( $items as $cart_item_key => $values ) {
|
181 |
$_product = apply_filters( 'woocommerce_cart_item_product', $values[ 'data' ], $values, $cart_item_key );
|
182 |
+
if ( $_product->is_downloadable() || apply_filters( 'woocommerce_gzd_product_is_revocation_exception', false, $_product ) )
|
183 |
$is_downloadable = true;
|
184 |
}
|
185 |
}
|
200 |
* Validate checkbox data
|
201 |
*/
|
202 |
function woocommerce_gzd_checkout_validation( $posted ) {
|
203 |
+
if ( ! isset( $_POST[ 'woocommerce_checkout_update_totals' ] ) ) {
|
204 |
if ( ! isset( $_POST[ 'legal' ] ) && get_option( 'woocommerce_gzd_display_checkout_legal_no_checkbox' ) == 'no' )
|
205 |
wc_add_notice( wc_gzd_get_legal_text_error(), 'error' );
|
206 |
// Check if cart contains downloadable product
|
209 |
if ( ! empty( $items ) && get_option( 'woocommerce_gzd_checkout_legal_digital_checkbox' ) == 'yes' ) {
|
210 |
foreach ( $items as $cart_item_key => $values ) {
|
211 |
$_product = apply_filters( 'woocommerce_cart_item_product', $values[ 'data' ], $values, $cart_item_key );
|
212 |
+
if ( $_product->is_downloadable() || apply_filters( 'woocommerce_gzd_product_is_revocation_exception', false, $_product ) )
|
213 |
$is_downloadable = true;
|
214 |
}
|
215 |
}
|
includes/widgets/class-wc-gzd-widget-trusted-shops-reviews.php
CHANGED
@@ -61,6 +61,4 @@ class WC_GZD_Widget_Trusted_Shops_Reviews extends WC_Widget {
|
|
61 |
}
|
62 |
}
|
63 |
|
64 |
-
register_widget( 'WC_GZD_Widget_Trusted_Shops_Reviews' );
|
65 |
-
|
66 |
?>
|
61 |
}
|
62 |
}
|
63 |
|
|
|
|
|
64 |
?>
|
includes/widgets/class-wc-gzd-widget-trusted-shops-rich-snippets.php
CHANGED
@@ -59,6 +59,4 @@ class WC_GZD_Widget_Trusted_Shops_Rich_Snippets extends WC_Widget {
|
|
59 |
}
|
60 |
}
|
61 |
|
62 |
-
register_widget( 'WC_GZD_Widget_Trusted_Shops_Rich_Snippets' );
|
63 |
-
|
64 |
?>
|
59 |
}
|
60 |
}
|
61 |
|
|
|
|
|
62 |
?>
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== WooCommerce Germanized ===
|
2 |
Contributors: vendidero
|
3 |
-
Tags: woocommerce, german market, german, germany, deutsch, deutschland, de, de_DE, shop, commerce, e-commerce, ecommerce, woothemes
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=info@vendidero.de&item_name=Donation+for+WooCommerce+Germanized
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.3
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -35,6 +35,8 @@ Zudem haben wir einige Anpassungen am Bezahlvorgang vorgenommen, damit dein WooC
|
|
35 |
* Double-Opt-In für Benutzerkonten
|
36 |
* Steuern für Versandkosten und Gebühren
|
37 |
* AGB, Widerrufsbelehrung etc. in ausgewählten E-Mails
|
|
|
|
|
38 |
* Zahlungsgebühren festlegen
|
39 |
* Online Widerrufsformular per Shortcode
|
40 |
|
@@ -47,6 +49,12 @@ Selbstverständlich können Trusted Shops Kunden mit nur wenigen Einstellungen d
|
|
47 |
Bei der Entwicklung von WC Germanized haben wir besonderes Augenmerk auf die nahtlose Integration in WooCommerce gelegt.
|
48 |
Die meisten Änderungen erfolgen über Hooks & Filter - nur im äußersten Notfall wird ein Template direkt überschrieben.
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
= Pro: PDF Rechnungen & Lieferscheine =
|
51 |
Als Nutzer der Pro Version von WooCommerce Germanized erstellst du automatisiert oder manuell PDF-Rechnungen und Lieferscheine zu deinen Bestellungen. Dabei hast du volle Kontrolle über das Layout deiner PDF-Dokumente.
|
52 |
Lade beispielsweise einfach ein PDF-Template hoch, das als "Hintergrund" für deine Rechnungen fungiert. Mit wenigen Klicks exportierst du deine Rechnungen (CSV, zip) für deine Buchhaltung oder deinen Steuerberater.
|
@@ -99,6 +107,8 @@ Overview of what WooCommerce Germanized offers:
|
|
99 |
* buy now button description
|
100 |
* trusted shops integration
|
101 |
* ekomi integration
|
|
|
|
|
102 |
|
103 |
== Installation ==
|
104 |
|
@@ -163,6 +173,12 @@ Bugs sowie Hilfe bei der Arbeit an WooCommerce Germanized werden gerne über uns
|
|
163 |
|
164 |
== Changelog ==
|
165 |
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
= 1.3.7 =
|
167 |
* Feature - is_ajax double-check for nasty themes
|
168 |
* Fix - better checkout fallback mode
|
1 |
=== WooCommerce Germanized ===
|
2 |
Contributors: vendidero
|
3 |
+
Tags: woocommerce, german market, german, germany, deutsch, deutschland, de, de_DE, shop, commerce, e-commerce, ecommerce, woothemes, sepa, invoice
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=info@vendidero.de&item_name=Donation+for+WooCommerce+Germanized
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.3
|
7 |
+
Stable tag: 1.4.0
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
35 |
* Double-Opt-In für Benutzerkonten
|
36 |
* Steuern für Versandkosten und Gebühren
|
37 |
* AGB, Widerrufsbelehrung etc. in ausgewählten E-Mails
|
38 |
+
* Zahlungsart: SEPA Lastschriftverfahren/Bankeinzug
|
39 |
+
* Zahlungsart: Kauf auf Rechnung
|
40 |
* Zahlungsgebühren festlegen
|
41 |
* Online Widerrufsformular per Shortcode
|
42 |
|
49 |
Bei der Entwicklung von WC Germanized haben wir besonderes Augenmerk auf die nahtlose Integration in WooCommerce gelegt.
|
50 |
Die meisten Änderungen erfolgen über Hooks & Filter - nur im äußersten Notfall wird ein Template direkt überschrieben.
|
51 |
|
52 |
+
= SEPA Lastschrift & Kauf auf Rechnung =
|
53 |
+
Mit WooCommerce Germanized 1.4 kannst du deinen Kunden ganz einfach den Kauf per Bankeinzug und per Rechnung ermöglichen.
|
54 |
+
Beim SEPA Lastschriftverfahren werden entsprechende Felder für IBAN, BIC und Kontoinhaber zum Checkout hinzugefügt und überprüft.
|
55 |
+
Zudem kann der Kunde eine Vorschau des Mandates per Link abrufen und vor dem Kauf einsehen. Den Kauf auf Rechnung kannst du auf Wunsch
|
56 |
+
in den Einstellungen so einschränken, dass von dieser Zahlungsart nur Bestandskunden Gebrauch machen können.
|
57 |
+
|
58 |
= Pro: PDF Rechnungen & Lieferscheine =
|
59 |
Als Nutzer der Pro Version von WooCommerce Germanized erstellst du automatisiert oder manuell PDF-Rechnungen und Lieferscheine zu deinen Bestellungen. Dabei hast du volle Kontrolle über das Layout deiner PDF-Dokumente.
|
60 |
Lade beispielsweise einfach ein PDF-Template hoch, das als "Hintergrund" für deine Rechnungen fungiert. Mit wenigen Klicks exportierst du deine Rechnungen (CSV, zip) für deine Buchhaltung oder deinen Steuerberater.
|
107 |
* buy now button description
|
108 |
* trusted shops integration
|
109 |
* ekomi integration
|
110 |
+
* SEPA Payment gateway
|
111 |
+
* Pay by Invoice gateway
|
112 |
|
113 |
== Installation ==
|
114 |
|
173 |
|
174 |
== Changelog ==
|
175 |
|
176 |
+
= 1.4.0 =
|
177 |
+
* Feature - SEPA Direct Debit Gateway
|
178 |
+
* Feature - Pay by Invoice Gateway
|
179 |
+
* Fix - Trusted Shops Widget Fix
|
180 |
+
* Fix - Checkbox CSS Styling
|
181 |
+
|
182 |
= 1.3.7 =
|
183 |
* Feature - is_ajax double-check for nasty themes
|
184 |
* Fix - better checkout fallback mode
|
templates/emails/customer-sepa-direct-debit-mandate.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Customer SEPA direct debit mandate
|
4 |
+
*
|
5 |
+
* @author Vendidero
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit; // Exit if accessed directly
|
10 |
+
}
|
11 |
+
|
12 |
+
?>
|
13 |
+
|
14 |
+
<?php do_action( 'woocommerce_email_header', $email_heading ); ?>
|
15 |
+
|
16 |
+
<p><?php printf( __( "Please see the SEPA direct debit mandate for order %s attached to this email.", 'woocommerce-germanized' ), $order->get_order_number() ); ?></p>
|
17 |
+
|
18 |
+
<?php echo $gateway->generate_mandate_by_order( $order ); ?>
|
19 |
+
|
20 |
+
<?php do_action( 'woocommerce_email_footer' ); ?>
|
templates/myaccount/form-register-checkbox.php
CHANGED
@@ -13,6 +13,6 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|
13 |
<p class="form-row form-row-wide">
|
14 |
<label for="reg_data_privacy" class="inline">
|
15 |
<input type="checkbox" class="input-checkbox" value="1" name="privacy" id="reg_data_privacy" />
|
16 |
-
|
17 |
</label>
|
18 |
</p>
|
13 |
<p class="form-row form-row-wide">
|
14 |
<label for="reg_data_privacy" class="inline">
|
15 |
<input type="checkbox" class="input-checkbox" value="1" name="privacy" id="reg_data_privacy" />
|
16 |
+
<?php echo wc_gzd_get_legal_text( get_option( 'woocommerce_gzd_customer_account_text' ) ); ?><span class="required">*</span>
|
17 |
</label>
|
18 |
</p>
|
woocommerce-germanized.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: WooCommerce Germanized
|
4 |
* Plugin URI: https://www.vendidero.de/woocommerce-germanized
|
5 |
* Description: Extends WooCommerce to become a legally compliant store for the german market.
|
6 |
-
* Version: 1.
|
7 |
* Author: Vendidero
|
8 |
* Author URI: https://vendidero.de
|
9 |
* Requires at least: 3.8
|
@@ -26,7 +26,7 @@ final class WooCommerce_Germanized {
|
|
26 |
*
|
27 |
* @var string
|
28 |
*/
|
29 |
-
public $version = '1.
|
30 |
|
31 |
/**
|
32 |
* Single instance of WooCommerce Germanized Main Class
|
@@ -197,6 +197,9 @@ final class WooCommerce_Germanized {
|
|
197 |
add_filter( 'woocommerce_payment_successful_result', array( $this, 'send_order_confirmation_mails' ), 0, 2 );
|
198 |
add_filter( 'woocommerce_checkout_no_payment_needed_redirect', array( $this, 'send_order_confirmation_mails' ), 0, 2 );
|
199 |
|
|
|
|
|
|
|
200 |
// Check for customer activation
|
201 |
add_action( 'template_redirect', array( $this, 'customer_account_activation_check' ) );
|
202 |
add_action( 'woocommerce_gzd_customer_cleanup', array( WC_GZD_Admin_Customer::instance(), 'account_cleanup' ) );
|
@@ -207,14 +210,21 @@ final class WooCommerce_Germanized {
|
|
207 |
$this->unregister_order_confirmation_hooks();
|
208 |
|
209 |
$this->units = new WC_GZD_Units();
|
210 |
-
$this->trusted_shops = new WC_GZD_Trusted_Shops();
|
211 |
-
$this->ekomi = new WC_GZD_Ekomi();
|
212 |
$this->emails = new WC_GZD_Emails();
|
213 |
|
214 |
// Init action
|
215 |
do_action( 'woocommerce_germanized_init' );
|
216 |
}
|
217 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
public function unregister_order_confirmation_hooks() {
|
219 |
|
220 |
$statuses = array( 'completed', 'on-hold', 'processing' );
|
@@ -275,6 +285,8 @@ final class WooCommerce_Germanized {
|
|
275 |
|
276 |
if ( strpos( $class, 'wc_gzd_admin_' ) === 0 )
|
277 |
$path = $this->plugin_path() . '/includes/admin/';
|
|
|
|
|
278 |
|
279 |
if ( version_compare( get_option( 'woocommerce_version' ), '2.3', '<' ) ) {
|
280 |
$old_file = str_replace( '.php', '-2-2.php', $file );
|
@@ -366,11 +378,12 @@ final class WooCommerce_Germanized {
|
|
366 |
include_once ( 'includes/abstracts/abstract-wc-gzd-product.php' );
|
367 |
|
368 |
include_once ( 'includes/class-wc-gzd-wpml-helper.php' );
|
369 |
-
|
370 |
include_once ( 'includes/wc-gzd-cart-functions.php' );
|
371 |
-
|
372 |
include_once ( 'includes/class-wc-gzd-checkout.php' );
|
373 |
|
|
|
|
|
|
|
374 |
}
|
375 |
|
376 |
/**
|
@@ -576,10 +589,14 @@ final class WooCommerce_Germanized {
|
|
576 |
* Include WooCommerce Germanized Widgets
|
577 |
*/
|
578 |
public function include_widgets() {
|
579 |
-
if ( is_object( $this->trusted_shops) && $this->trusted_shops->is_rich_snippets_enabled() )
|
580 |
include_once( 'includes/widgets/class-wc-gzd-widget-trusted-shops-rich-snippets.php' );
|
581 |
-
|
|
|
|
|
582 |
include_once( 'includes/widgets/class-wc-gzd-widget-trusted-shops-reviews.php' );
|
|
|
|
|
583 |
}
|
584 |
|
585 |
/**
|
3 |
* Plugin Name: WooCommerce Germanized
|
4 |
* Plugin URI: https://www.vendidero.de/woocommerce-germanized
|
5 |
* Description: Extends WooCommerce to become a legally compliant store for the german market.
|
6 |
+
* Version: 1.4.0
|
7 |
* Author: Vendidero
|
8 |
* Author URI: https://vendidero.de
|
9 |
* Requires at least: 3.8
|
26 |
*
|
27 |
* @var string
|
28 |
*/
|
29 |
+
public $version = '1.4.0';
|
30 |
|
31 |
/**
|
32 |
* Single instance of WooCommerce Germanized Main Class
|
197 |
add_filter( 'woocommerce_payment_successful_result', array( $this, 'send_order_confirmation_mails' ), 0, 2 );
|
198 |
add_filter( 'woocommerce_checkout_no_payment_needed_redirect', array( $this, 'send_order_confirmation_mails' ), 0, 2 );
|
199 |
|
200 |
+
// Payment gateways
|
201 |
+
add_filter( 'woocommerce_payment_gateways', array( $this, 'register_gateways' ) );
|
202 |
+
|
203 |
// Check for customer activation
|
204 |
add_action( 'template_redirect', array( $this, 'customer_account_activation_check' ) );
|
205 |
add_action( 'woocommerce_gzd_customer_cleanup', array( WC_GZD_Admin_Customer::instance(), 'account_cleanup' ) );
|
210 |
$this->unregister_order_confirmation_hooks();
|
211 |
|
212 |
$this->units = new WC_GZD_Units();
|
|
|
|
|
213 |
$this->emails = new WC_GZD_Emails();
|
214 |
|
215 |
// Init action
|
216 |
do_action( 'woocommerce_germanized_init' );
|
217 |
}
|
218 |
|
219 |
+
public function register_gateways( $gateways ) {
|
220 |
+
|
221 |
+
$gateways[] = 'WC_GZD_Gateway_Direct_Debit';
|
222 |
+
$gateways[] = 'WC_GZD_Gateway_Invoice';
|
223 |
+
|
224 |
+
return $gateways;
|
225 |
+
|
226 |
+
}
|
227 |
+
|
228 |
public function unregister_order_confirmation_hooks() {
|
229 |
|
230 |
$statuses = array( 'completed', 'on-hold', 'processing' );
|
285 |
|
286 |
if ( strpos( $class, 'wc_gzd_admin_' ) === 0 )
|
287 |
$path = $this->plugin_path() . '/includes/admin/';
|
288 |
+
elseif ( strpos( $class, 'wc_gzd_gateway_' ) === 0 )
|
289 |
+
$path = $this->plugin_path() . '/includes/gateways/' . substr( str_replace( '_', '-', $class ), 15 ) . '/';
|
290 |
|
291 |
if ( version_compare( get_option( 'woocommerce_version' ), '2.3', '<' ) ) {
|
292 |
$old_file = str_replace( '.php', '-2-2.php', $file );
|
378 |
include_once ( 'includes/abstracts/abstract-wc-gzd-product.php' );
|
379 |
|
380 |
include_once ( 'includes/class-wc-gzd-wpml-helper.php' );
|
|
|
381 |
include_once ( 'includes/wc-gzd-cart-functions.php' );
|
|
|
382 |
include_once ( 'includes/class-wc-gzd-checkout.php' );
|
383 |
|
384 |
+
$this->trusted_shops = new WC_GZD_Trusted_Shops();
|
385 |
+
$this->ekomi = new WC_GZD_Ekomi();
|
386 |
+
|
387 |
}
|
388 |
|
389 |
/**
|
589 |
* Include WooCommerce Germanized Widgets
|
590 |
*/
|
591 |
public function include_widgets() {
|
592 |
+
if ( is_object( $this->trusted_shops) && $this->trusted_shops->is_rich_snippets_enabled() ) {
|
593 |
include_once( 'includes/widgets/class-wc-gzd-widget-trusted-shops-rich-snippets.php' );
|
594 |
+
register_widget( 'WC_GZD_Widget_Trusted_Shops_Rich_Snippets' );
|
595 |
+
}
|
596 |
+
if ( is_object( $this->trusted_shops) && $this->trusted_shops->is_review_widget_enabled() ) {
|
597 |
include_once( 'includes/widgets/class-wc-gzd-widget-trusted-shops-reviews.php' );
|
598 |
+
register_widget( 'WC_GZD_Widget_Trusted_Shops_Reviews' );
|
599 |
+
}
|
600 |
}
|
601 |
|
602 |
/**
|
wpml-config.xml
CHANGED
@@ -10,5 +10,9 @@
|
|
10 |
<key name="woocommerce_gzd_checkout_legal_text_digital" />
|
11 |
<key name="woocommerce_gzd_order_success_text" />
|
12 |
<key name="woocommerce_gzd_customer_account_text" />
|
|
|
|
|
|
|
|
|
13 |
</admin-texts>
|
14 |
</wpml-config>
|
10 |
<key name="woocommerce_gzd_checkout_legal_text_digital" />
|
11 |
<key name="woocommerce_gzd_order_success_text" />
|
12 |
<key name="woocommerce_gzd_customer_account_text" />
|
13 |
+
<key name="woocommerce_direct-debit_company_info" />
|
14 |
+
<key name="woocommerce_direct-debit_company_identification_number" />
|
15 |
+
<key name="woocommerce_direct-debit_mandate_text" />
|
16 |
+
<key name="woocommerce_direct-debit_checkbox_label" />
|
17 |
</admin-texts>
|
18 |
</wpml-config>
|