PageSourceSearch

https://www.nikon.fr/dist-client/AdyenConfirmation-Chunk-dbb1c0f9619198f036f5.js

js nikon.fr collected 2026-09-24 17:52:31 UTC 7,860 bytes, 2 lines download raw bytes

1"use strict";(globalThis.webpackChunknikon_client=globalThis.webpackChunknikon_client||[]).push([[5443],{32817(e,t,n){n.d(t,{A:()=>i});var a=n(46145),r=n(55544),s=n(55169);const i=({additionalDetailsEndpoint:e,cartState:t="",clientKey:n,countryCode:i,environment:o,makePaymentEndpoint:d,orderSummary:c,paymentFailedEndpoint:l,paymentMethodsResponse:p,purchaseEndpointUrl:u,trackingData:y,translations:m,setHasError:h,setHasFatalPaymentError:w,setIsLoading:E,setResultCode:f})=>{const g=async()=>await(0,a.r3)(l);return{environment:"production"===o.toLowerCase()?"live":"test",clientKey:n,showPayButton:!0,locale:r.H,countryCode:i,translations:{[r.H]:{...m}},onSubmit:async(e,n)=>{const{isValid:i,data:o}=e;if(i&&d){n?.setStatus("loading");try{const e=await(0,a.Rr)(d,{data:o,hash:t});(0,s.A)({event:"paymentInfoSubmit",ecommerce:{currency:y?.currencyCode,items:y?.products,value:c?.totalValue},is_valid:r._.includes(e?.resultCode),payment_method:"card"}),await(async(e,t,n,s,i,o)=>{const{resultCode:d,action:c}=t;if(o(d),!r._.includes(d))return s?.(!1),void e?.setStatus("error");
1if(s?.(!0),c)return e?.handleAction(c),void s?.(!1);if(r._.includes(d)&&n){s?.(!0);try{const{data:{redirectionUrl:e}={}}=await(0,a.ZS)(n);if(e){const t=`${window.location.origin}${e}`;window.location.href=t}}catch(e){console.error("Purchase completion error:",e),window.appInsights&&e instanceof Error&&window.appInsights.trackException({exception:e}),i(!0)}}else window.appInsights&&window.appInsights.trackEvent({name:"PaymentResultFailed",properties:{res:t,purchaseEndpointUrl:n}});e?.setStatus("ready")})(n,e,u,E,h,f)}catch(e){console.error({err:e}),window.appInsights&&e instanceof Error&&window.appInsights.trackException({exception:e}),await g(),h(!0),E?.(!1),n?.setStatus("ready")}}},onAdditionalDetails:async(n,i)=>{if(n?.data?.details?.redirectResult&&e){i?.setStatus("loading"),E?.(!0);try{const o=await(0,a.zb)(e,{data:n.data,hash:t});if((0,s.A)({event:"paymentInfoSubmit",ecommerce:{currency:y?.currencyCode,items:y?.products,value:c?.totalValue},is_valid:r._.includes(o?.resultCode),payment_method:"card"}),o.action)i?.handleAction(o.action);else if(r._.includes(o.resultCode)){const{data:{redirectionUrl:e}={}}=await(0,a.ZS)(u);if(e){const t=`${window.location.origin}${e}`;window.location.href=t}}else await g(),h(!0),window.appInsights&&window.appInsights.trackEvent({name:"PaymentResultFailed",properties:{res:o,purchaseEndpointUrl:u}})}catch(e){console.error({err:e}),await g(),window.appInsights&&e instanceof Error&&window.appInsights.trackException({exception:e}),h(!0),w?.(!0)}finally{i?.setStatus("ready"),E?.(!1)}}},onError:(e,t)=>{console.error(e.name,e.message,e.stack,t),h(!0)},paymentMethodsResponse:p}}},28490(e,t,n){n.d(t,{A:()=>i});var a=n(46145),r=n(55544),s=n(55169);const i=({additionalDetailsEndpoint:e,billingAddress:t,cartState:n="",checkCartEndpoint:i="",clientKey:o,environment:d,hasErrorOccurredRef:c,id:l,orderSummary:p,paymentFailedEndpoint:u,paymentMethodRef:y,purchaseEndpointUrl:m,sessionData:h,shippingAddress:w,trackingData:E,translations:f,setHasError:g,setHasFatalPaymentError:R,setIsLoading:C,setPaymentMethod:v,setResultCode:I,setRefreshCheckout:S,onRatePayAddressMismatch:P})=>{const k=async()=>{if(!m)return;const{data:{redirectionUrl:e}={}}=await(0,a.ZS)(m);e&&(window.location.href=`${window.location.origin}${e}`)},A=async()=>await(0,a.r3)(u);return{environment:"production"===d.toLowerCase()?"live":"test",clientKey:o,showPayButton:!0,session:{id:l,sessionData:h},locale:r.H,translations:{[r.H]:{...f}},onChange:e=>{const n=e.data?.paymentMethod?.type;if(!n)return;const a=n.toLowerCase().includes("ratepay");P?.(!!a&&!(!t||!w?.address||t.addressLine1===w.address.addressLine1&&(t.addressLine2||null)===(w.address.addressLine2||null)&&t.city===w.address.city&&t.postCode===w.address.postCode&&t.country===w.address.country))},beforeSubmit:async(e,r,s)=>{if(n&&i&&S){v(e.paymentMethod.type);try{if(await(0,a.q5)(i,n)){const n={...e,billingAddress:{city:t?.city,country:t?.country,street:`${t?.addressLine1} ${t?.addressLine2??""}`,houseNumberOrName:"ZZ",postalCode:t?.postCode},deliveryAddress:{city:w?.address?.city,country:w?.address?.country,street:`${w?.address?.addressLine1} ${w?.address?.addressLine2??""}`,houseNumberOrName:"ZZ",postalCode:w?.address?.postCode,firstName:w?.firstName,lastName:w?.lastName}};s.resolve(n)}else s.reject(),S?.(!0)}catch{s.reject(),C?.(!1)}}},onPaymentCompleted:async e=>{const{resultCode:t}=e;C?.(!0),I?.(t);const n=y.current,a="scheme"===n?"card":n;if((0,s.A)({event:"paymentInfoSubmit",ecommerce:{currency:E?.currencyCode,items:E?.products,value:p?.totalValue},is_valid:r._.includes(t),...a&&{payment_method:a}}),v(void 0),r._.includes(t)&&m)try{await k()}catch(t){console.error({error:t}),window.appInsights&&t instanceof Error&&(window.appInsights.trackException({exception:t}),window.appInsights.trackEvent({name:"PaymentResultReceived",properties:{result:e}})),g(!0),R?.(!0)}else await A(),C?.(!1),g(!0),window.appInsights&&window.appInsights.trackEvent({name:"PaymentResultFailed",properties:{result:e,purchaseEndpointUrl:m}})},onPaymentFailed:async e=>{I?.(e.resultCode),await A()},onError:async(t,s)=>{if(window.appInsights&&window.appInsights.trackException({exception:t}),!c||c.current)return;c.current=!0;const i=new URLSearchParams(window.location.search).get("redirectResult");
1if("NETWORK_ERROR"===t.name&&i&&e&&m)try{const t=await(0,a.zb)(e,{data:{details:{redirectResult:i}},hash:n});t.action?s?.handleAction(t.action):r._.includes(t.resultCode)?await k():(await A(),g(!0))}catch(e){await A(),window.appInsights&&e instanceof Error&&window.appInsights.trackException({exception:e}),g(!0)}else"CANCEL"===t.name?I?.("Cancelled"):(await A(),g(!0))}}}},49114(e,t,n){n.r(t),n.d(t,{default:()=>l});var a=n(99140),r=n(73590),s=n(32817),i=n(28490),o=n(65825),d=n(55544),c=n(59471);const l=({additionalDetailsEndpoint:e,adyenClientKey:t,cardsLabel:n,countryCode:l,environment:p,isAdvancedFlow:u,orderSummary:y,paymentFailedEndpoint:m,paymentFailedBannerText:h,paymentFailedIntro:w,paymentFailedTitle:E,paymentPendingTitle:f,paymentRejectedIntro:g,paymentRejectedItems:R,paymentRejectedTitle:C,purchaseEndpointUrl:v,retryCta:I,trackingData:S})=>{const[P,k]=(0,c.useState)(!1),[A,_]=(0,c.useState)(!1),[b,F]=(0,c.useState)(),L=b&&!d._.includes(b),x=(0,c.useRef)(void 0),M=(0,c.useRef)(!1),{paymentMethod:D,setPaymentMethod:U}=(0,o.A)(e=>({paymentMethod:e.paymentMethod,setPaymentMethod:e.setPaymentMethod}));return(0,c.useEffect)(()=>{(async()=>{const r=new URLSearchParams(window.location.search),o=r.get("redirectResult"),d=r.get("sessionId");if(!d&&!u)return void k(!0);if(!o)return;const c={cardsLabel:n,clientKey:t,countryCode:l,environment:p,hasErrorOccurredRef:M,orderSummary:y,paymentFailedEndpoint:m,paymentMethod:D,paymentMethodRef:x,purchaseEndpointUrl:v,additionalDetailsEndpoint:e,trackingData:S,setHasError:k,setHasFatalPaymentError:_,setPaymentMethod:U,setResultCode:F};try{(await(0,a.mU)(u?(0,s.A)({...c,additionalDetailsEndpoint:e}):(0,i.A)({...c,id:d??""}))).submitDetails({details:{redirectResult:o}})}catch(e){console.error(e),window.appInsights&&e instanceof Error&&window.appInsights.trackException({exception:e}),M.current||(M.current=!0,k(!0))}})()},[e,t,n,p,u,v]),(0,c.useEffect)(()=>{x.current=D},[D]),React.createElement(r.A,{hasError:P,hasFatalPaymentError:A,failedPayment:L,paymentPendingTitle:f,paymentFailedTitle:E,paymentFailedIntro:w,paymentFailedBannerText:h,paymentRejectedTitle:C,paymentRejectedIntro:g,paymentRejectedItems:R,retryCta:I,orderSummary:y})}},55544(e,t,n){n.d(t,{H:()=>r,_:()=>a});const a=["Authorised","Pending","Received","PresentToShopper","RedirectShopper"],r="undefined"!=typeof window?(window.location.pathname.split("/")?.[1]).replace("_","-"):""}}]);
2//# sourceMappingURL=AdyenConfirmation-Chunk-dbb1c0f9619198f036f5.js.map

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.