From 37402e29340cae9333bfecfd74684537cfe74c6b Mon Sep 17 00:00:00 2001 From: Dirk Olbertz Date: Thu, 12 Dec 2024 15:54:32 +0100 Subject: [PATCH 1/2] PayPal V2 in block mode no PayPal V2 Express yet --- assets/build/blocks.asset.php | 2 +- assets/build/blocks.js | 2 +- client/blocks/paypal/index.jsx | 7 +++++++ client/blocks/paypalv2/express.jsx | 18 +++++++++++------- src/Payone/Gateway/PayoneBlocksSupport.php | 7 +++++-- 5 files changed, 25 insertions(+), 11 deletions(-) diff --git a/assets/build/blocks.asset.php b/assets/build/blocks.asset.php index 01b3d84..1da4d01 100644 --- a/assets/build/blocks.asset.php +++ b/assets/build/blocks.asset.php @@ -1 +1 @@ - array('wc-blocks-checkout', 'wc-blocks-registry', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'bf2b5aa05d052bad880a'); + array('wc-blocks-checkout', 'wc-blocks-registry', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '7d66adfab2d89f43fd03'); diff --git a/assets/build/blocks.js b/assets/build/blocks.js index 0b4b9af..f1149cc 100644 --- a/assets/build/blocks.js +++ b/assets/build/blocks.js @@ -1 +1 @@ -!function(){var e={302:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=n(723),o=n(437),c=(r=n(464))&&r.__esModule?r:{default:r};t.default=(0,c.default)("payone_alipay",(0,a.__)("PAYONE Alipay","payone-woocommerce-3"),"".concat(o.PAYONE_ASSETS_URL,"/icon-alipay.svg"))},213:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=n(723),o=n(437),c=(r=n(464))&&r.__esModule?r:{default:r};t.default=(0,c.default)("payone_bancontact",(0,a.__)("PAYONE Bancontact","payone-woocommerce-3"),"".concat(o.PAYONE_ASSETS_URL,"/icon-bancontact.png"))},874:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,o=n(723),c=n(87),i=n(437),l=(a=n(464))&&a.__esModule?a:{default:a};function u(){u=function(){return t};var e,t={},n=Object.prototype,a=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},c="function"==typeof Symbol?Symbol:{},i=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",s=c.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function p(e,t,n,r){var a=t&&t.prototype instanceof b?t:b,c=Object.create(a.prototype),i=new L(r||[]);return o(c,"_invoke",{value:P(e,n,i)}),c}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var y="suspendedStart",m="suspendedYield",h="executing",_="completed",v={};function b(){}function w(){}function g(){}var E={};f(E,i,(function(){return this}));var S=Object.getPrototypeOf,R=S&&S(S(x([])));R&&R!==n&&a.call(R,i)&&(E=R);var A=g.prototype=b.prototype=Object.create(E);function O(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function F(e,t){function n(o,c,i,l){var u=d(e[o],e,c);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==r(f)&&a.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,l)}),(function(e){n("throw",e,i,l)})):t.resolve(f).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,l)}))}l(u.arg)}var c;o(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return c=c?c.then(a,a):a()}})}function P(t,n,r){var a=y;return function(o,c){if(a===h)throw Error("Generator is already running");if(a===_){if("throw"===o)throw c;return{value:e,done:!0}}for(r.method=o,r.arg=c;;){var i=r.delegate;if(i){var l=k(i,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===y)throw a=_,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=h;var u=d(t,n,r);if("normal"===u.type){if(a=r.done?_:m,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(a=_,r.method="throw",r.arg=u.arg)}}}function k(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,k(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=d(a,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var c=o.arg;return c?c.done?(n[t.resultName]=c.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):c:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function x(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,c=function n(){for(;++o=0;--o){var c=this.tryEntries[o],i=c.completion;if("root"===c.tryLoc)return r("end");if(c.tryLoc<=this.prev){var l=a.call(c,"catchLoc"),u=a.call(c,"finallyLoc");if(l&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;C(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function s(e,t,n,r,a,o,c){try{var i=e[o](c),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,a)}function f(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){s(o,r,a,c,i,"next",e)}function i(e){s(o,r,a,c,i,"throw",e)}c(void 0)}))}}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n50||E.match(/[^a-zA-Z \-äöüÄÖÜß]/g))){e.next=4;break}return e.abrupt("return",T((0,o.__)("Bitte geben Sie maximal 50 Zeichen für den Karteninhaber ein, Sonderzeichen außer Deutsche Umlaute und einem Bindestrich sind nicht erlaubt.","payone-woocommerce-3")));case 4:if(I.current.isComplete()){e.next=6;break}return e.abrupt("return",T((0,o.__)("Bitte Formular vollständig ausfüllen!","payone-woocommerce-3")));case 6:return I.current.creditCardCheck("creditCardCheckCallbackEventProxy"),e.abrupt("return",!1);case 8:case"end":return e.stop()}}),e)}))))}),[_,P,E]),(0,c.useEffect)((function(){return h((function(){return N?{type:b.ERROR,message:N}:P?{type:b.SUCCESS,meta:{paymentMethodData:C}}:{type:b.ERROR,message:(0,o.__)("Die Zahlung konnte nicht erfolgreich durchgeführt werden.","payone-woocommerce-3")}}))}),[h,C,N]),(0,c.useEffect)((function(){return function(){return v((function(e){var t,n=e.processingResponse;return null==n||null===(t=n.paymentDetails)||void 0===t||!t.errorMessage||{type:b.ERROR,message:n.paymentDetails.errorMessage,messageContext:w.PAYMENTS}}))}}),[v,w.PAYMENTS,b.ERROR]),React.createElement("fieldset",null,React.createElement("div",{className:"form-row form-row-wide"},React.createElement("label",{htmlFor:"card_holder",title:(0,o.__)("as printed on card","payone-woocommerce-3")},(0,o.__)("Card Holder","payone-woocommerce-3")),React.createElement("input",{className:"payoneInput",id:"card_holder",type:"text",name:"card_holder",value:E,onChange:function(e){return S(e.target.value)},maxLength:"50"})),React.createElement("div",{className:"form-row form-row-wide"},React.createElement("label",{htmlFor:"cardtype"},(0,o.__)("Card type","payone-woocommerce-3")),React.createElement("select",{id:"cardtype",className:"payoneSelect",onChange:function(e){return O(e.target.value)}},p.map((function(e){var t=e.value,n=e.title;return React.createElement("option",{key:t,value:t,selected:A===t},n)})))),React.createElement("div",{className:"form-row form-row-wide"},React.createElement("label",{htmlFor:"cardpan"},(0,o.__)("Cardpan","payone-woocommerce-3")),React.createElement("div",{className:"inputIframe",id:"cardpan"})),React.createElement("div",{className:"form-row form-row-wide"},React.createElement("label",{htmlFor:"cardcvc2"},(0,o.__)("CVC","payone-woocommerce-3")),React.createElement("div",{className:"inputIframe",id:"cardcvc2"})),React.createElement("div",{className:"form-row form-row-wide"},React.createElement("label",{htmlFor:"expireInput"},(0,o.__)("Expire Date","payone-woocommerce-3")),React.createElement("div",{className:"inputIframe",id:"expireInput"},React.createElement("span",{id:"cardexpiremonth"}),React.createElement("span",{id:"cardexpireyear"}))))};t.default=(0,l.default)("bs_payone_creditcard",(0,o.__)("PAYONE Kreditkarte","payone-woocommerce-3"),"".concat(i.PAYONE_ASSETS_URL,"/icon-creditcard.png"),React.createElement(_,null))},590:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=n(723),o=n(87),c=n(0),i=n(437),l=(r=n(464))&&r.__esModule?r:{default:r};function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n=0;--o){var c=this.tryEntries[o],i=c.completion;if("root"===c.tryLoc)return r("end");if(c.tryLoc<=this.prev){var l=a.call(c,"catchLoc"),u=a.call(c,"finallyLoc");if(l&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;C(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function s(e,t,n,r,a,o,c){try{var i=e[o](c),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,a)}function f(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){s(o,r,a,c,i,"next",e)}function i(e){s(o,r,a,c,i,"throw",e)}c(void 0)}))}}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,c,i=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(u)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n\n supplementary payment terms\n and the performance of a risk assessment for the selected payment method. I am aware of the \n \n supplementary data protection notice\n .',"payone-woocommerce-3");return React.createElement("p",{className:"wc-block-checkout__terms wp-block-woocommerce-checkout-terms-block",dangerouslySetInnerHTML:{__html:e}})};var r=n(723)},715:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(723),a=n(87),o=n(0),c=f(n(729)),i=n(437),l=f(n(698)),u=f(n(266)),s=f(n(464));function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,c,i=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(u)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n\n Ratepay Terms of Payment\n as well as to the performance of a \n \n risk check by Ratepay\n .',"payone-woocommerce-3");return React.createElement("p",{className:"wc-block-checkout__terms wp-block-woocommerce-checkout-terms-block",dangerouslySetInnerHTML:{__html:e}})};var r=n(723)},442:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(723),o=n(87),c=n(0),i=d(n(729)),l=d(n(639)),u=n(437),s=d(n(804)),f=d(n(188)),p=d(n(910));function d(e){return e&&e.__esModule?e:{default:e}}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n=0;--o){var c=this.tryEntries[o],i=c.completion;if("root"===c.tryLoc)return r("end");if(c.tryLoc<=this.prev){var l=a.call(c,"catchLoc"),u=a.call(c,"finallyLoc");if(l&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;C(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function d(e,t,n,r,a,o,c){try{var i=e[o](c),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,a)}function y(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){d(o,r,a,c,i,"next",e)}function i(e){d(o,r,a,c,i,"throw",e)}c(void 0)}))}}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,c,i=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(u)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return h(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n4&&void 0!==arguments[4]?arguments[4]:{},o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:null)||React.createElement(React.Fragment,null);return function(e){for(var t=1;t>>0;if("function"!=typeof e)throw new TypeError;for(var r=new Array(n),a=arguments.length>=2?arguments[1]:void 0,o=0;o=t&&r<=n?r-t+10:e})).join("")}function a(e){for(var t,n=e;n.length>2;)t=n.slice(0,9),n=parseInt(t,10)%97+n.slice(t.length);return parseInt(n,10)%97}function o(e){return e.replace(u,"").toUpperCase()}function c(e,t,n,r){this.countryCode=e,this.length=t,this.structure=n,this.example=r}c.prototype._regex=function(){return this._cachedRegex||(this._cachedRegex=(e=this.structure,t=e.match(/(.{3})/g).map((function(e){var t,n=e.slice(0,1),r=parseInt(e.slice(1),10);switch(n){case"A":t="0-9A-Za-z";break;case"B":t="0-9A-Z";break;case"C":t="A-Za-z";break;case"F":t="0-9";break;case"L":t="a-z";break;case"U":t="A-Z";break;case"W":t="0-9a-z"}return"(["+t+"]{"+r+"})"})),new RegExp("^"+t.join("")+"$")));var e,t},c.prototype.isValid=function(e){return this.length==e.length&&this.countryCode===e.slice(0,2)&&this._regex().test(e.slice(4))&&1==a(r(e))},c.prototype.toBBAN=function(e,t){return this._regex().exec(e.slice(4)).slice(1).join(t)},c.prototype.fromBBAN=function(e){if(!this.isValidBBAN(e))throw new Error("Invalid BBAN");var t=("0"+(98-a(r(this.countryCode+"00"+e)))).slice(-2);return this.countryCode+t+e},c.prototype.isValidBBAN=function(e){return this.length-4==e.length&&this._regex().test(e)};var i={};function l(e){i[e.countryCode]=e}l(new c("AD",24,"F04F04A12","AD1200012030200359100100")),l(new c("AE",23,"F03F16","AE070331234567890123456")),l(new c("AL",28,"F08A16","AL47212110090000000235698741")),l(new c("AT",20,"F05F11","AT611904300234573201")),l(new c("AZ",28,"U04A20","AZ21NABZ00000000137010001944")),l(new c("BA",20,"F03F03F08F02","BA391290079401028494")),l(new c("BE",16,"F03F07F02","BE68539007547034")),l(new c("BG",22,"U04F04F02A08","BG80BNBG96611020345678")),l(new c("BH",22,"U04A14","BH67BMAG00001299123456")),l(new c("BR",29,"F08F05F10U01A01","BR9700360305000010009795493P1")),l(new c("BY",28,"A04F04A16","BY13NBRB3600900000002Z00AB00")),l(new c("CH",21,"F05A12","CH9300762011623852957")),l(new c("CR",22,"F04F14","CR72012300000171549015")),l(new c("CY",28,"F03F05A16","CY17002001280000001200527600")),l(new c("CZ",24,"F04F06F10","CZ6508000000192000145399")),l(new c("DE",22,"F08F10","DE89370400440532013000")),l(new c("DK",18,"F04F09F01","DK5000400440116243")),l(new c("DO",28,"U04F20","DO28BAGR00000001212453611324")),l(new c("EE",20,"F02F02F11F01","EE382200221020145685")),l(new c("EG",29,"F04F04F17","EG800002000156789012345180002")),l(new c("ES",24,"F04F04F01F01F10","ES9121000418450200051332")),l(new c("FI",18,"F06F07F01","FI2112345600000785")),l(new c("FO",18,"F04F09F01","FO6264600001631634")),l(new c("FR",27,"F05F05A11F02","FR1420041010050500013M02606")),l(new c("GB",22,"U04F06F08","GB29NWBK60161331926819")),l(new c("GE",22,"U02F16","GE29NB0000000101904917")),l(new c("GI",23,"U04A15","GI75NWBK000000007099453")),l(new c("GL",18,"F04F09F01","GL8964710001000206")),l(new c("GR",27,"F03F04A16","GR1601101250000000012300695")),l(new c("GT",28,"A04A20","GT82TRAJ01020000001210029690")),l(new c("HR",21,"F07F10","HR1210010051863000160")),l(new c("HU",28,"F03F04F01F15F01","HU42117730161111101800000000")),l(new c("IE",22,"U04F06F08","IE29AIBK93115212345678")),l(new c("IL",23,"F03F03F13","IL620108000000099999999")),l(new c("IS",26,"F04F02F06F10","IS140159260076545510730339")),l(new c("IT",27,"U01F05F05A12","IT60X0542811101000000123456")),l(new c("IQ",23,"U04F03A12","IQ98NBIQ850123456789012")),l(new c("JO",30,"A04F22","JO15AAAA1234567890123456789012")),l(new c("KW",30,"U04A22","KW81CBKU0000000000001234560101")),l(new c("KZ",20,"F03A13","KZ86125KZT5004100100")),l(new c("LB",28,"F04A20","LB62099900000001001901229114")),l(new c("LC",32,"U04F24","LC07HEMM000100010012001200013015")),l(new c("LI",21,"F05A12","LI21088100002324013AA")),l(new c("LT",20,"F05F11","LT121000011101001000")),l(new c("LU",20,"F03A13","LU280019400644750000")),l(new c("LV",21,"U04A13","LV80BANK0000435195001")),l(new c("MC",27,"F05F05A11F02","MC5811222000010123456789030")),l(new c("MD",24,"U02A18","MD24AG000225100013104168")),l(new c("ME",22,"F03F13F02","ME25505000012345678951")),l(new c("MK",19,"F03A10F02","MK07250120000058984")),l(new c("MR",27,"F05F05F11F02","MR1300020001010000123456753")),l(new c("MT",31,"U04F05A18","MT84MALT011000012345MTLCAST001S")),l(new c("MU",30,"U04F02F02F12F03U03","MU17BOMM0101101030300200000MUR")),l(new c("NL",18,"U04F10","NL91ABNA0417164300")),l(new c("NO",15,"F04F06F01","NO9386011117947")),l(new c("PK",24,"U04A16","PK36SCBL0000001123456702")),l(new c("PL",28,"F08F16","PL61109010140000071219812874")),l(new c("PS",29,"U04A21","PS92PALS000000000400123456702")),l(new c("PT",25,"F04F04F11F02","PT50000201231234567890154")),l(new c("QA",29,"U04A21","QA30AAAA123456789012345678901")),l(new c("RO",24,"U04A16","RO49AAAA1B31007593840000")),l(new c("RS",22,"F03F13F02","RS35260005601001611379")),l(new c("SA",24,"F02A18","SA0380000000608010167519")),l(new c("SC",31,"U04F04F16U03","SC18SSCB11010000000000001497USD")),l(new c("SE",24,"F03F16F01","SE4550000000058398257466")),l(new c("SI",19,"F05F08F02","SI56263300012039086")),l(new c("SK",24,"F04F06F10","SK3112000000198742637541")),l(new c("SM",27,"U01F05F05A12","SM86U0322509800000000270100")),l(new c("ST",25,"F08F11F02","ST68000100010051845310112")),l(new c("SV",28,"U04F20","SV62CENR00000000000000700025")),l(new c("TL",23,"F03F14F02","TL380080012345678910157")),l(new c("TN",24,"F02F03F13F02","TN5910006035183598478831")),l(new c("TR",26,"F05F01A16","TR330006100519786457841326")),l(new c("UA",29,"F25","UA511234567890123456789012345")),l(new c("VA",22,"F18","VA59001123000012345678")),l(new c("VG",24,"U04F16","VG96VPVG0000012345678901")),l(new c("XK",20,"F04F10F02","XK051212012345678906")),l(new c("AO",25,"F21","AO69123456789012345678901")),l(new c("BF",27,"F23","BF2312345678901234567890123")),l(new c("BI",16,"F12","BI41123456789012")),l(new c("BJ",28,"F24","BJ39123456789012345678901234")),l(new c("CI",28,"U02F22","CI70CI1234567890123456789012")),l(new c("CM",27,"F23","CM9012345678901234567890123")),l(new c("CV",25,"F21","CV30123456789012345678901")),l(new c("DZ",24,"F20","DZ8612345678901234567890")),l(new c("IR",26,"F22","IR861234568790123456789012")),l(new c("MG",27,"F23","MG1812345678901234567890123")),l(new c("ML",28,"U01F23","ML15A12345678901234567890123")),l(new c("MZ",25,"F21","MZ25123456789012345678901")),l(new c("SN",28,"U01F23","SN52A12345678901234567890123")),l(new c("GF",27,"F05F05A11F02","GF121234512345123456789AB13")),l(new c("GP",27,"F05F05A11F02","GP791234512345123456789AB13")),l(new c("MQ",27,"F05F05A11F02","MQ221234512345123456789AB13")),l(new c("RE",27,"F05F05A11F02","RE131234512345123456789AB13")),l(new c("PF",27,"F05F05A11F02","PF281234512345123456789AB13")),l(new c("TF",27,"F05F05A11F02","TF891234512345123456789AB13")),l(new c("YT",27,"F05F05A11F02","YT021234512345123456789AB13")),l(new c("NC",27,"F05F05A11F02","NC551234512345123456789AB13")),l(new c("BL",27,"F05F05A11F02","BL391234512345123456789AB13")),l(new c("MF",27,"F05F05A11F02","MF551234512345123456789AB13")),l(new c("PM",27,"F05F05A11F02","PM071234512345123456789AB13")),l(new c("WF",27,"F05F05A11F02","WF621234512345123456789AB13"));var u=/[^a-zA-Z0-9]/g,s=/(.{4})(?!$)/g;function f(e){return"string"==typeof e||e instanceof String}e.isValid=function(e){if(!f(e))return!1;e=o(e);var t=i[e.slice(0,2)];return!!t&&t.isValid(e)},e.toBBAN=function(e,t){void 0===t&&(t=" "),e=o(e);var n=i[e.slice(0,2)];if(!n)throw new Error("No country with code "+e.slice(0,2));return n.toBBAN(e,t)},e.fromBBAN=function(e,t){var n=i[e];if(!n)throw new Error("No country with code "+e);return n.fromBBAN(o(t))},e.isValidBBAN=function(e,t){if(!f(t))return!1;var n=i[e];return n&&n.isValidBBAN(o(t))},e.printFormat=function(e,t){return void 0===t&&(t=" "),o(e).replace(s,"$1"+t)},e.electronicFormat=o,e.countries=i},void 0===(r=n.apply(t,[t]))||(e.exports=r)},0:function(e){"use strict";e.exports=window.wc.blocksCheckout},83:function(e){"use strict";e.exports=window.wc.wcBlocksRegistry},143:function(e){"use strict";e.exports=window.wp.data},87:function(e){"use strict";e.exports=window.wp.element},723:function(e){"use strict";e.exports=window.wp.i18n}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}!function(){"use strict";var e=n(83),t=(c(n(302)),c(n(213)),c(n(872)),c(n(60)),c(n(442)),c(n(874))),r=(c(n(342)),c(n(94)),c(n(737)),c(n(921)),c(n(159)),c(n(333)),c(n(590)),c(n(395)),c(n(965)),c(n(293))),a=c(n(953)),o=c(n(721));function c(e){return e&&e.__esModule?e:{default:e}}c(n(570)),c(n(271)),c(n(382)),c(n(212)),c(n(816)),c(n(715)),c(n(101)),(0,e.registerPaymentMethod)(t.default),(0,e.registerPaymentMethod)(r.default),(0,e.registerPaymentMethod)(a.default),(0,e.registerExpressPaymentMethod)(o.default)}()}(); \ No newline at end of file +!function(){var e={302:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=n(723),o=n(437),c=(r=n(464))&&r.__esModule?r:{default:r};t.default=(0,c.default)("payone_alipay",(0,a.__)("PAYONE Alipay","payone-woocommerce-3"),"".concat(o.PAYONE_ASSETS_URL,"/icon-alipay.svg"))},213:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=n(723),o=n(437),c=(r=n(464))&&r.__esModule?r:{default:r};t.default=(0,c.default)("payone_bancontact",(0,a.__)("PAYONE Bancontact","payone-woocommerce-3"),"".concat(o.PAYONE_ASSETS_URL,"/icon-bancontact.png"))},874:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,o=n(723),c=n(87),i=n(437),l=(a=n(464))&&a.__esModule?a:{default:a};function u(){u=function(){return t};var e,t={},n=Object.prototype,a=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},c="function"==typeof Symbol?Symbol:{},i=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",s=c.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function p(e,t,n,r){var a=t&&t.prototype instanceof b?t:b,c=Object.create(a.prototype),i=new L(r||[]);return o(c,"_invoke",{value:P(e,n,i)}),c}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var y="suspendedStart",m="suspendedYield",h="executing",_="completed",v={};function b(){}function w(){}function g(){}var E={};f(E,i,(function(){return this}));var S=Object.getPrototypeOf,R=S&&S(S(x([])));R&&R!==n&&a.call(R,i)&&(E=R);var A=g.prototype=b.prototype=Object.create(E);function O(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function F(e,t){function n(o,c,i,l){var u=d(e[o],e,c);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==r(f)&&a.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,l)}),(function(e){n("throw",e,i,l)})):t.resolve(f).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,l)}))}l(u.arg)}var c;o(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return c=c?c.then(a,a):a()}})}function P(t,n,r){var a=y;return function(o,c){if(a===h)throw Error("Generator is already running");if(a===_){if("throw"===o)throw c;return{value:e,done:!0}}for(r.method=o,r.arg=c;;){var i=r.delegate;if(i){var l=k(i,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===y)throw a=_,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=h;var u=d(t,n,r);if("normal"===u.type){if(a=r.done?_:m,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(a=_,r.method="throw",r.arg=u.arg)}}}function k(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,k(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=d(a,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var c=o.arg;return c?c.done?(n[t.resultName]=c.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):c:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function x(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,c=function n(){for(;++o=0;--o){var c=this.tryEntries[o],i=c.completion;if("root"===c.tryLoc)return r("end");if(c.tryLoc<=this.prev){var l=a.call(c,"catchLoc"),u=a.call(c,"finallyLoc");if(l&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;C(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function s(e,t,n,r,a,o,c){try{var i=e[o](c),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,a)}function f(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){s(o,r,a,c,i,"next",e)}function i(e){s(o,r,a,c,i,"throw",e)}c(void 0)}))}}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n50||E.match(/[^a-zA-Z \-äöüÄÖÜß]/g))){e.next=4;break}return e.abrupt("return",T((0,o.__)("Bitte geben Sie maximal 50 Zeichen für den Karteninhaber ein, Sonderzeichen außer Deutsche Umlaute und einem Bindestrich sind nicht erlaubt.","payone-woocommerce-3")));case 4:if(I.current.isComplete()){e.next=6;break}return e.abrupt("return",T((0,o.__)("Bitte Formular vollständig ausfüllen!","payone-woocommerce-3")));case 6:return I.current.creditCardCheck("creditCardCheckCallbackEventProxy"),e.abrupt("return",!1);case 8:case"end":return e.stop()}}),e)}))))}),[_,P,E]),(0,c.useEffect)((function(){return h((function(){return N?{type:b.ERROR,message:N}:P?{type:b.SUCCESS,meta:{paymentMethodData:C}}:{type:b.ERROR,message:(0,o.__)("Die Zahlung konnte nicht erfolgreich durchgeführt werden.","payone-woocommerce-3")}}))}),[h,C,N]),(0,c.useEffect)((function(){return function(){return v((function(e){var t,n=e.processingResponse;return null==n||null===(t=n.paymentDetails)||void 0===t||!t.errorMessage||{type:b.ERROR,message:n.paymentDetails.errorMessage,messageContext:w.PAYMENTS}}))}}),[v,w.PAYMENTS,b.ERROR]),React.createElement("fieldset",null,React.createElement("div",{className:"form-row form-row-wide"},React.createElement("label",{htmlFor:"card_holder",title:(0,o.__)("as printed on card","payone-woocommerce-3")},(0,o.__)("Card Holder","payone-woocommerce-3")),React.createElement("input",{className:"payoneInput",id:"card_holder",type:"text",name:"card_holder",value:E,onChange:function(e){return S(e.target.value)},maxLength:"50"})),React.createElement("div",{className:"form-row form-row-wide"},React.createElement("label",{htmlFor:"cardtype"},(0,o.__)("Card type","payone-woocommerce-3")),React.createElement("select",{id:"cardtype",className:"payoneSelect",onChange:function(e){return O(e.target.value)}},p.map((function(e){var t=e.value,n=e.title;return React.createElement("option",{key:t,value:t,selected:A===t},n)})))),React.createElement("div",{className:"form-row form-row-wide"},React.createElement("label",{htmlFor:"cardpan"},(0,o.__)("Cardpan","payone-woocommerce-3")),React.createElement("div",{className:"inputIframe",id:"cardpan"})),React.createElement("div",{className:"form-row form-row-wide"},React.createElement("label",{htmlFor:"cardcvc2"},(0,o.__)("CVC","payone-woocommerce-3")),React.createElement("div",{className:"inputIframe",id:"cardcvc2"})),React.createElement("div",{className:"form-row form-row-wide"},React.createElement("label",{htmlFor:"expireInput"},(0,o.__)("Expire Date","payone-woocommerce-3")),React.createElement("div",{className:"inputIframe",id:"expireInput"},React.createElement("span",{id:"cardexpiremonth"}),React.createElement("span",{id:"cardexpireyear"}))))};t.default=(0,l.default)("bs_payone_creditcard",(0,o.__)("PAYONE Kreditkarte","payone-woocommerce-3"),"".concat(i.PAYONE_ASSETS_URL,"/icon-creditcard.png"),React.createElement(_,null))},590:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=n(723),o=n(87),c=n(0),i=n(437),l=(r=n(464))&&r.__esModule?r:{default:r};function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n=0;--o){var c=this.tryEntries[o],i=c.completion;if("root"===c.tryLoc)return r("end");if(c.tryLoc<=this.prev){var l=a.call(c,"catchLoc"),u=a.call(c,"finallyLoc");if(l&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;C(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function s(e,t,n,r,a,o,c){try{var i=e[o](c),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,a)}function f(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){s(o,r,a,c,i,"next",e)}function i(e){s(o,r,a,c,i,"throw",e)}c(void 0)}))}}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,c,i=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(u)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n\n supplementary payment terms\n and the performance of a risk assessment for the selected payment method. I am aware of the \n \n supplementary data protection notice\n .',"payone-woocommerce-3");return React.createElement("p",{className:"wc-block-checkout__terms wp-block-woocommerce-checkout-terms-block",dangerouslySetInnerHTML:{__html:e}})};var r=n(723)},715:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(723),a=n(87),o=n(0),c=f(n(729)),i=n(437),l=f(n(698)),u=f(n(266)),s=f(n(464));function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,c,i=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(u)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n\n Ratepay Terms of Payment\n as well as to the performance of a \n \n risk check by Ratepay\n .',"payone-woocommerce-3");return React.createElement("p",{className:"wc-block-checkout__terms wp-block-woocommerce-checkout-terms-block",dangerouslySetInnerHTML:{__html:e}})};var r=n(723)},442:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(723),o=n(87),c=n(0),i=d(n(729)),l=d(n(639)),u=n(437),s=d(n(804)),f=d(n(188)),p=d(n(910));function d(e){return e&&e.__esModule?e:{default:e}}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n=0;--o){var c=this.tryEntries[o],i=c.completion;if("root"===c.tryLoc)return r("end");if(c.tryLoc<=this.prev){var l=a.call(c,"catchLoc"),u=a.call(c,"finallyLoc");if(l&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;C(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function d(e,t,n,r,a,o,c){try{var i=e[o](c),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,a)}function y(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){d(o,r,a,c,i,"next",e)}function i(e){d(o,r,a,c,i,"throw",e)}c(void 0)}))}}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,c,i=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(u)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return h(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n4&&void 0!==arguments[4]?arguments[4]:{},o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:null)||React.createElement(React.Fragment,null);return function(e){for(var t=1;t>>0;if("function"!=typeof e)throw new TypeError;for(var r=new Array(n),a=arguments.length>=2?arguments[1]:void 0,o=0;o=t&&r<=n?r-t+10:e})).join("")}function a(e){for(var t,n=e;n.length>2;)t=n.slice(0,9),n=parseInt(t,10)%97+n.slice(t.length);return parseInt(n,10)%97}function o(e){return e.replace(u,"").toUpperCase()}function c(e,t,n,r){this.countryCode=e,this.length=t,this.structure=n,this.example=r}c.prototype._regex=function(){return this._cachedRegex||(this._cachedRegex=(e=this.structure,t=e.match(/(.{3})/g).map((function(e){var t,n=e.slice(0,1),r=parseInt(e.slice(1),10);switch(n){case"A":t="0-9A-Za-z";break;case"B":t="0-9A-Z";break;case"C":t="A-Za-z";break;case"F":t="0-9";break;case"L":t="a-z";break;case"U":t="A-Z";break;case"W":t="0-9a-z"}return"(["+t+"]{"+r+"})"})),new RegExp("^"+t.join("")+"$")));var e,t},c.prototype.isValid=function(e){return this.length==e.length&&this.countryCode===e.slice(0,2)&&this._regex().test(e.slice(4))&&1==a(r(e))},c.prototype.toBBAN=function(e,t){return this._regex().exec(e.slice(4)).slice(1).join(t)},c.prototype.fromBBAN=function(e){if(!this.isValidBBAN(e))throw new Error("Invalid BBAN");var t=("0"+(98-a(r(this.countryCode+"00"+e)))).slice(-2);return this.countryCode+t+e},c.prototype.isValidBBAN=function(e){return this.length-4==e.length&&this._regex().test(e)};var i={};function l(e){i[e.countryCode]=e}l(new c("AD",24,"F04F04A12","AD1200012030200359100100")),l(new c("AE",23,"F03F16","AE070331234567890123456")),l(new c("AL",28,"F08A16","AL47212110090000000235698741")),l(new c("AT",20,"F05F11","AT611904300234573201")),l(new c("AZ",28,"U04A20","AZ21NABZ00000000137010001944")),l(new c("BA",20,"F03F03F08F02","BA391290079401028494")),l(new c("BE",16,"F03F07F02","BE68539007547034")),l(new c("BG",22,"U04F04F02A08","BG80BNBG96611020345678")),l(new c("BH",22,"U04A14","BH67BMAG00001299123456")),l(new c("BR",29,"F08F05F10U01A01","BR9700360305000010009795493P1")),l(new c("BY",28,"A04F04A16","BY13NBRB3600900000002Z00AB00")),l(new c("CH",21,"F05A12","CH9300762011623852957")),l(new c("CR",22,"F04F14","CR72012300000171549015")),l(new c("CY",28,"F03F05A16","CY17002001280000001200527600")),l(new c("CZ",24,"F04F06F10","CZ6508000000192000145399")),l(new c("DE",22,"F08F10","DE89370400440532013000")),l(new c("DK",18,"F04F09F01","DK5000400440116243")),l(new c("DO",28,"U04F20","DO28BAGR00000001212453611324")),l(new c("EE",20,"F02F02F11F01","EE382200221020145685")),l(new c("EG",29,"F04F04F17","EG800002000156789012345180002")),l(new c("ES",24,"F04F04F01F01F10","ES9121000418450200051332")),l(new c("FI",18,"F06F07F01","FI2112345600000785")),l(new c("FO",18,"F04F09F01","FO6264600001631634")),l(new c("FR",27,"F05F05A11F02","FR1420041010050500013M02606")),l(new c("GB",22,"U04F06F08","GB29NWBK60161331926819")),l(new c("GE",22,"U02F16","GE29NB0000000101904917")),l(new c("GI",23,"U04A15","GI75NWBK000000007099453")),l(new c("GL",18,"F04F09F01","GL8964710001000206")),l(new c("GR",27,"F03F04A16","GR1601101250000000012300695")),l(new c("GT",28,"A04A20","GT82TRAJ01020000001210029690")),l(new c("HR",21,"F07F10","HR1210010051863000160")),l(new c("HU",28,"F03F04F01F15F01","HU42117730161111101800000000")),l(new c("IE",22,"U04F06F08","IE29AIBK93115212345678")),l(new c("IL",23,"F03F03F13","IL620108000000099999999")),l(new c("IS",26,"F04F02F06F10","IS140159260076545510730339")),l(new c("IT",27,"U01F05F05A12","IT60X0542811101000000123456")),l(new c("IQ",23,"U04F03A12","IQ98NBIQ850123456789012")),l(new c("JO",30,"A04F22","JO15AAAA1234567890123456789012")),l(new c("KW",30,"U04A22","KW81CBKU0000000000001234560101")),l(new c("KZ",20,"F03A13","KZ86125KZT5004100100")),l(new c("LB",28,"F04A20","LB62099900000001001901229114")),l(new c("LC",32,"U04F24","LC07HEMM000100010012001200013015")),l(new c("LI",21,"F05A12","LI21088100002324013AA")),l(new c("LT",20,"F05F11","LT121000011101001000")),l(new c("LU",20,"F03A13","LU280019400644750000")),l(new c("LV",21,"U04A13","LV80BANK0000435195001")),l(new c("MC",27,"F05F05A11F02","MC5811222000010123456789030")),l(new c("MD",24,"U02A18","MD24AG000225100013104168")),l(new c("ME",22,"F03F13F02","ME25505000012345678951")),l(new c("MK",19,"F03A10F02","MK07250120000058984")),l(new c("MR",27,"F05F05F11F02","MR1300020001010000123456753")),l(new c("MT",31,"U04F05A18","MT84MALT011000012345MTLCAST001S")),l(new c("MU",30,"U04F02F02F12F03U03","MU17BOMM0101101030300200000MUR")),l(new c("NL",18,"U04F10","NL91ABNA0417164300")),l(new c("NO",15,"F04F06F01","NO9386011117947")),l(new c("PK",24,"U04A16","PK36SCBL0000001123456702")),l(new c("PL",28,"F08F16","PL61109010140000071219812874")),l(new c("PS",29,"U04A21","PS92PALS000000000400123456702")),l(new c("PT",25,"F04F04F11F02","PT50000201231234567890154")),l(new c("QA",29,"U04A21","QA30AAAA123456789012345678901")),l(new c("RO",24,"U04A16","RO49AAAA1B31007593840000")),l(new c("RS",22,"F03F13F02","RS35260005601001611379")),l(new c("SA",24,"F02A18","SA0380000000608010167519")),l(new c("SC",31,"U04F04F16U03","SC18SSCB11010000000000001497USD")),l(new c("SE",24,"F03F16F01","SE4550000000058398257466")),l(new c("SI",19,"F05F08F02","SI56263300012039086")),l(new c("SK",24,"F04F06F10","SK3112000000198742637541")),l(new c("SM",27,"U01F05F05A12","SM86U0322509800000000270100")),l(new c("ST",25,"F08F11F02","ST68000100010051845310112")),l(new c("SV",28,"U04F20","SV62CENR00000000000000700025")),l(new c("TL",23,"F03F14F02","TL380080012345678910157")),l(new c("TN",24,"F02F03F13F02","TN5910006035183598478831")),l(new c("TR",26,"F05F01A16","TR330006100519786457841326")),l(new c("UA",29,"F25","UA511234567890123456789012345")),l(new c("VA",22,"F18","VA59001123000012345678")),l(new c("VG",24,"U04F16","VG96VPVG0000012345678901")),l(new c("XK",20,"F04F10F02","XK051212012345678906")),l(new c("AO",25,"F21","AO69123456789012345678901")),l(new c("BF",27,"F23","BF2312345678901234567890123")),l(new c("BI",16,"F12","BI41123456789012")),l(new c("BJ",28,"F24","BJ39123456789012345678901234")),l(new c("CI",28,"U02F22","CI70CI1234567890123456789012")),l(new c("CM",27,"F23","CM9012345678901234567890123")),l(new c("CV",25,"F21","CV30123456789012345678901")),l(new c("DZ",24,"F20","DZ8612345678901234567890")),l(new c("IR",26,"F22","IR861234568790123456789012")),l(new c("MG",27,"F23","MG1812345678901234567890123")),l(new c("ML",28,"U01F23","ML15A12345678901234567890123")),l(new c("MZ",25,"F21","MZ25123456789012345678901")),l(new c("SN",28,"U01F23","SN52A12345678901234567890123")),l(new c("GF",27,"F05F05A11F02","GF121234512345123456789AB13")),l(new c("GP",27,"F05F05A11F02","GP791234512345123456789AB13")),l(new c("MQ",27,"F05F05A11F02","MQ221234512345123456789AB13")),l(new c("RE",27,"F05F05A11F02","RE131234512345123456789AB13")),l(new c("PF",27,"F05F05A11F02","PF281234512345123456789AB13")),l(new c("TF",27,"F05F05A11F02","TF891234512345123456789AB13")),l(new c("YT",27,"F05F05A11F02","YT021234512345123456789AB13")),l(new c("NC",27,"F05F05A11F02","NC551234512345123456789AB13")),l(new c("BL",27,"F05F05A11F02","BL391234512345123456789AB13")),l(new c("MF",27,"F05F05A11F02","MF551234512345123456789AB13")),l(new c("PM",27,"F05F05A11F02","PM071234512345123456789AB13")),l(new c("WF",27,"F05F05A11F02","WF621234512345123456789AB13"));var u=/[^a-zA-Z0-9]/g,s=/(.{4})(?!$)/g;function f(e){return"string"==typeof e||e instanceof String}e.isValid=function(e){if(!f(e))return!1;e=o(e);var t=i[e.slice(0,2)];return!!t&&t.isValid(e)},e.toBBAN=function(e,t){void 0===t&&(t=" "),e=o(e);var n=i[e.slice(0,2)];if(!n)throw new Error("No country with code "+e.slice(0,2));return n.toBBAN(e,t)},e.fromBBAN=function(e,t){var n=i[e];if(!n)throw new Error("No country with code "+e);return n.fromBBAN(o(t))},e.isValidBBAN=function(e,t){if(!f(t))return!1;var n=i[e];return n&&n.isValidBBAN(o(t))},e.printFormat=function(e,t){return void 0===t&&(t=" "),o(e).replace(s,"$1"+t)},e.electronicFormat=o,e.countries=i},void 0===(r=n.apply(t,[t]))||(e.exports=r)},0:function(e){"use strict";e.exports=window.wc.blocksCheckout},83:function(e){"use strict";e.exports=window.wc.wcBlocksRegistry},143:function(e){"use strict";e.exports=window.wp.data},87:function(e){"use strict";e.exports=window.wp.element},723:function(e){"use strict";e.exports=window.wp.i18n}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}!function(){"use strict";var e=n(83),t=(c(n(302)),c(n(213)),c(n(872)),c(n(60)),c(n(442)),c(n(874))),r=(c(n(342)),c(n(94)),c(n(737)),c(n(921)),c(n(159)),c(n(333)),c(n(590)),c(n(395)),c(n(965)),c(n(293))),a=c(n(953)),o=c(n(721));function c(e){return e&&e.__esModule?e:{default:e}}c(n(570)),c(n(271)),c(n(382)),c(n(212)),c(n(816)),c(n(715)),c(n(101)),(0,e.registerPaymentMethod)(t.default),(0,e.registerPaymentMethod)(r.default),(0,e.registerPaymentMethod)(a.default),(0,e.registerExpressPaymentMethod)(o.default)}()}(); \ No newline at end of file diff --git a/client/blocks/paypal/index.jsx b/client/blocks/paypal/index.jsx index 6e91f16..cca413d 100644 --- a/client/blocks/paypal/index.jsx +++ b/client/blocks/paypal/index.jsx @@ -6,4 +6,11 @@ export default getPaymentMethodConfig( 'bs_payone_paypal', __('PAYONE PayPal', 'payone-woocommerce-3'), `${PAYONE_ASSETS_URL}/icon-paypal.png`, + null, + { + canMakePayment() { + const {paypalConfig} = wc.wcSettings.getSetting('payone_data'); + return paypalConfig.isAvailable; + }, + }, ); diff --git a/client/blocks/paypalv2/express.jsx b/client/blocks/paypalv2/express.jsx index 65da6d3..eab8de8 100644 --- a/client/blocks/paypalv2/express.jsx +++ b/client/blocks/paypalv2/express.jsx @@ -21,9 +21,8 @@ const PayPalV2Express = () => { label: 'paypal', height: 55, }, - createOrder(data, actions) { - console.log('createOrder', data, actions); - return fetch('', { + createOrder() { + return fetch(paypalExpressConfig.callbackUrl, { method: 'post', }).then((res) => { return res.text(); @@ -31,9 +30,8 @@ const PayPalV2Express = () => { return orderID; }); }, - onApprove(data, actions) { - console.log('onApprove', data, actions); - window.location = ''; + onApprove() { + window.location = paypalExpressConfig.redirectUrl; }, }).render('#payone-paypalv2-express-button'); } @@ -47,10 +45,16 @@ const PayPalV2Express = () => { export default getPaymentMethodConfig( 'payone_paypalv2_express', - __('PAYONE PayPal v2 Express', 'payone-woocommerce-3'), + __('PayPal v2 Express', 'payone-woocommerce-3'), icon, , { gatewayId: 'payone_paypalv2_express', + canMakePayment() { + return false; + + const {paypalExpressConfig} = wc.wcSettings.getSetting('payone_data'); + return paypalExpressConfig.isAvailable; + }, }, ); diff --git a/src/Payone/Gateway/PayoneBlocksSupport.php b/src/Payone/Gateway/PayoneBlocksSupport.php index 094c624..b6a8473 100644 --- a/src/Payone/Gateway/PayoneBlocksSupport.php +++ b/src/Payone/Gateway/PayoneBlocksSupport.php @@ -115,11 +115,14 @@ public function get_payment_method_data() { 'urlSecuredInstallment' => Plugin::get_callback_url( [ 'type' => 'ajax-secured-installment-options' ] ), ]; $data['paypalExpressConfig'] = [ - 'jsUrl' => 'https://www.paypal.com/sdk/js?client-id='.$this->paypalV2ExpressGateway->get_payone_client_id().'&merchant-id='.$this->paypalV2ExpressGateway->get_payone_merchant_id().'¤cy=EUR&intent=authorize&locale=de_DE&commit=false&vault=false&disable-funding=card,sepa,bancontact&enable-funding=paylater', + 'jsUrl' => 'https://www.paypal.com/sdk/js?client-id='.$this->paypalV2ExpressGateway->get_payone_client_id().'&merchant-id='.$this->paypalV2ExpressGateway->get_payone_merchant_id().'¤cy=EUR&intent=authorize&locale=de_DE&commit=false&vault=false&disable-funding=card,sepa,bancontact'.( $this->paypalV2ExpressGateway->get_allow_paylater() ? '&enable-funding=paylater' : ''), 'callbackUrl' => Plugin::get_callback_url( [ 'type' => 'paypalv2', 'a' => 'express-set-checkout' ] ), 'redirectUrl' => Plugin::get_callback_url( [ 'type' => 'paypalv2', 'a' => 'express-get-checkout' ] ), + 'isAvailable' => $this->paypalV2ExpressGateway->is_available(), + ]; + $data['paypalConfig'] = [ + 'isAvailable' => Plugin::find_gateway(PayPal::GATEWAY_ID)->is_available(), ]; - // TODO: installmentMonthOptions müssen hier befüllt werden $data['installmentMonthOptions'] = [ From c8d81c27c4abef6465a9b370bf17a7397ecf3202 Mon Sep 17 00:00:00 2001 From: Dirk Olbertz Date: Tue, 21 Jan 2025 13:29:32 +0100 Subject: [PATCH 2/2] changes to reference number --- src/Payone/Transaction/AmazonPay.php | 2 +- src/Payone/Transaction/AmazonPayExpress.php | 2 +- src/Payone/Transaction/PayPalV2.php | 2 +- src/Payone/Transaction/PayPalV2Express.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Payone/Transaction/AmazonPay.php b/src/Payone/Transaction/AmazonPay.php index 41fd012..c347a5f 100644 --- a/src/Payone/Transaction/AmazonPay.php +++ b/src/Payone/Transaction/AmazonPay.php @@ -31,7 +31,7 @@ public function execute( \WC_Order $order ) { if ( $this->should_submit_cart() ) { $this->add_article_list_to_transaction( $order ); } - $this->set( 'reference', uniqid( 'ref', false) ); + $this->set_reference( $order ); $this->set_once( 'amount', $order->get_total('edit') * 100 ); $this->set( 'currency', strtoupper( get_woocommerce_currency() ) ); $this->set_personal_data_from_order( $order ); diff --git a/src/Payone/Transaction/AmazonPayExpress.php b/src/Payone/Transaction/AmazonPayExpress.php index b0906c7..84fe2e4 100644 --- a/src/Payone/Transaction/AmazonPayExpress.php +++ b/src/Payone/Transaction/AmazonPayExpress.php @@ -31,7 +31,7 @@ public function execute( \WC_Order $order ) { if ( $this->should_submit_cart() ) { $this->add_article_list_to_transaction( $order ); } - $this->set( 'reference', uniqid( 'ref', false) ); + $this->set_reference( $order ); $this->set_once( 'amount', $order->get_total('edit') * 100 ); $this->set( 'currency', strtoupper( get_woocommerce_currency() ) ); $this->set_personal_data_from_order( $order ); diff --git a/src/Payone/Transaction/PayPalV2.php b/src/Payone/Transaction/PayPalV2.php index 29b6386..b9e8477 100644 --- a/src/Payone/Transaction/PayPalV2.php +++ b/src/Payone/Transaction/PayPalV2.php @@ -32,7 +32,7 @@ public function execute( \WC_Order $order ) { if ( $this->should_submit_cart() ) { $this->add_article_list_to_transaction( $order ); } - $this->set( 'reference', uniqid( 'ref', false) ); + $this->set_reference( $order ); $this->set_once( 'amount', $order->get_total('edit') * 100 ); $this->set( 'currency', strtoupper( get_woocommerce_currency() ) ); $this->set_personal_data_from_order( $order ); diff --git a/src/Payone/Transaction/PayPalV2Express.php b/src/Payone/Transaction/PayPalV2Express.php index a926cc3..5ff043d 100644 --- a/src/Payone/Transaction/PayPalV2Express.php +++ b/src/Payone/Transaction/PayPalV2Express.php @@ -29,7 +29,7 @@ public function __construct( $gateway ) { */ public function execute( \WC_Order $order ) { $this->add_article_list_to_transaction( $order ); - $this->set( 'reference', uniqid( 'ref', false) ); + $this->set_reference( $order ); $this->set_once( 'amount', $order->get_total('edit') * 100 ); $this->set( 'currency', strtoupper( get_woocommerce_currency() ) ); $this->set_personal_data_from_order( $order );