PageSourceSearch

https://langholmen.com/wp-content/plugins/integration-adyen-woocom…/assets/card.js?ver=5769d06541140cf20338

js langholmen.com collected 2026-09-24 23:25:51 UTC 6,253 bytes, 1 lines download raw bytes

1(()=>{"use strict";const e=window.React;async function t(e=null,t=null){if("function"!=typeof AdyenCheckout)return new Promise(()=>{});const a=adn_util;return await AdyenCheckout({paymentMethodsResponse:a.api.response_payment_methods,clientKey:a.api.origin_key,locale:a.locale,environment:a.api.environment,onChange:function(a,n){let r={};a&&a.isValid&&(r=a.data),e&&e(t?e=>({...e,[t]:r}):r)},onAdditionalDetails:function(e,t){let n=jQuery(t._node).attr("data-order_id");jQuery(".adn-component__text").show(),jQuery.ajax({url:a.ajax.url,method:"POST",data:{action:"adn_additional_details",security:a.ajax.nonce,state_data:e.data,order_id:n},success:function(e){e.data.redirect&&(window.location.href=e.data.redirect)}})},onError:function(e){console.log({AdyenCheckoutError:e})}})}function a({paymentMethodType:a,eventRegistration:n,emitResponse:r,installments:s,storedCards:o}){const d=adn_util,c="scheme"===a?"card":a,{onPaymentSetup:i}=n,[m,l]=(0,e.useState)(null),[p,y]=(0,e.useState)(!1),[u,h]=(0,e.useState)({}),[f,_]=(0,e.useState)(!1),[w,E]=(0,e.useState)(""),[x,$]=(0,e.useState)(""),g=o.map((t,n)=>(0,e.createElement)("div",{className:w===n?`${d.prefix}-stored-card selected`:`${d.prefix}-stored-card`,key:n,onClick:()=>{_(!1),E(n),$(t.id)}},(0,e.createElement)("div",{className:`${d.prefix}-stored-card__details`},(0,e.createElement)("img",{src:"https://checkoutshopper-test.adyen.com/checkoutshopper/images/logos/"+t.brand+".svg",alt:""}),(0,e.createElement)("div",{className:"label"},"******",t.lastFour)),(0,e.createElement)("div",{id:`${d.prefix}-${a}-card-${n}`,className:`${d.prefix}-stored-card__fields`,style:{display:w===n?"block":"none"}})));return(0,e.useEffect)(()=>{!p&&f&&(function(){let e="";try{const t=JSON.parse(s);t.constructor===Array&&(e={card:{installmentOptions:{card:{values:t}},showInstallmentAmounts:!0}})}catch(e){}t(l,"newCard").then(function(t){t.setOptions({paymentMethodsConfiguration:e}),t.create(c,{brands:d.api.card_types,enableStoreDetails:d.api.store_card,hasHolderName:d.api.has_holder_name,holderNameRequired:d.api.holder_name_required,showFormInstruction:!1,maskSecurityCode:!0}).mount(`#${d.prefix}-${a}-card-new`)})}(),y(!0)),u[w]||""===w||(t(l,x).then(function(e){const t=e.paymentMethodsResponse.storedPaymentMethods,n=Object.assign({},t.find(e=>e.id===x),{showFormInstruction:!1,maskSecurityCode:!0});e.create(c,n).mount(`#${d.prefix}-${a}-card-${w}`)}),h(e=>({...e,[w]:!0})));const e=i(async()=>m[x]?{type:r.responseTypes.SUCCESS,meta:{paymentMethodData:{[`${d.prefix}-${a}-sci`]:m[x].paymentMethod?.storedPaymentMethodId||"",[`${d.prefix}-${a}-card-cvc`]:m[x].paymentMethod?.encryptedSecurityCode||"",[`${d.prefix}-${a}-is-stored-card`]:"yes"}}}:m.newCard?{type:r.responseTypes.SUCCESS,meta:{paymentMethodData:{[`${d.prefix}-${a}-card-number`]:m.newCard.paymentMethod?.encryptedCardNumber||"",[`${d.prefix}-${a}-card-exp-month`]:m.newCard.paymentMethod?.encryptedExpiryMonth||"",[`${d.prefix}-${a}-card-exp-year`]:m.newCard.paymentMethod?.encryptedExpiryYear||"",[`${d.prefix}-${a}-card-cvc`]:m.newCard.paymentMethod?.encryptedSecurityCode||"",[`${d.prefix}-${a}-card-holder`]:m.newCard.paymentMethod?.holderName||"",[`${d.prefix}-${a}-card-installments`]:m.newCard.paymentMethod?.installments||"",[`${d.prefix}-${a}-store-card`]:m.newCard.storePaymentMethod||""}}}:{type:r.responseTypes.ERROR,message:"There was an error"});return()=>{e()}},[r.responseTypes.ERROR,r.responseTypes.SUCCESS,i,m,f,w]),(0,e.createElement)("div",{className:`${d.prefix}-wrap-form`},(0,e.createElement)("div",{className:`${d.prefix}-stored-cards`},g,(0,e.createElement)("div",{className:f?`${d.prefix}-stored-card selected`:`${d.prefix}-stored-card`},(0,e.createElement)("div",{className:`${d.prefix}-stored-card__details`,onClick:()=>{_(!0),E(""),$("")}},(0,e.createElement)("span",{className:"dashicons dashicons-plus"}),(0,e.createElement)("div",{className:"label"},window.wp.i18n.__("Use a new card","integration-adyen-woocommerce"))),(0,e.createElement)("div",{className:`${d.prefix}-stored-card__fields`,id:`${d.prefix}-${a}-card-new`,style:{display:f?"block":"none"}},(0,e.createElement)("div",{id:`${d.prefix}-card-form`}
1)))))}function n({action:a}){const[n,r]=(0,e.useState)(!1),[s,o]=(0,e.useState)(!0);return(0,e.useEffect)(()=>{n||t().then(function(e){e.createFromAction(a).mount("#adn-payment-action-data"),r(!0),o(!1)})}),(0,e.createElement)("div",{className:"adn-popup"},(0,e.createElement)("div",null,(0,e.createElement)("div",{id:"adn-payment-action-data",className:"adn-component"},(0,e.createElement)("div",{className:"adn-component__text",style:{display:s?"block":"none"}},"Processing..."))))}const r=window.wc.wcSettings.getSetting("woosa_adyen_card_data",{icon:!1,payment_action:!1});if("string"==typeof r.name&&r.name.length>0){const t=window.wp.htmlEntities.decodeEntities(r.title),s=()=>(0,e.createElement)(e.Fragment,null,!!r.payment_action&&Object.keys(r.payment_action).length>0&&(0,e.createElement)(n,{action:r.payment_action})),o=t=>{const{eventRegistration:n,emitResponse:s}=t;return(0,e.createElement)(a,{paymentMethodType:"scheme",eventRegistration:n,emitResponse:s,storedCards:r.stored_cards,installments:r.get_installments})},d={name:r.name,label:(0,e.createElement)(e.Fragment,null,(0,e.createElement)(function({text:t,image:a,name:n}){const[r,s]=(0,e.useState)(""),[o,d]=(0,e.useState)(""),[c,i]=(0,e.useState)(!1);return(0,e.useEffect)(()=>{const e=adn_util;r||c||a||(i(!0),jQuery.ajax({url:e.ajax.url,method:"POST",data:{action:"adn_get_payment_method_data",security:e.ajax.nonce,payment_method:n},success:function(e){e.data.payment_method_data.icon&&s(e.data.payment_method_data.icon),e.data.payment_method_data.title&&d(e.data.payment_method_data.title),i(!1)}}))}),(0,e.createElement)("span",{style:{width:"100%"}},o||t,r?(0,e.createElement)("img",{src:r,style:{float:"right",marginRight:"20px"}}):a?(0,e.createElement)("img",{src:a,style:{float:"right",marginRight:"20px"}}):"")},{text:t,image:r.icon,name:r.name}),(0,e.createElement)(s,null)),content:Object(window.wp.element.createElement)(o,null),edit:Object(window.wp.element.createElement)(o,null),canMakePayment:()=>!0,ariaLabel:t,supports:{features:r.supports}};window.wc.wcBlocksRegistry.registerPaymentMethod(d)}})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.