PageSourceSearch

https://ticket.parc-spirou.com/_next/static/chunks/pages/payments/pcq/result-d70928246c8c1f5a.js

js parc-spirou.com collected 2026-10-04 05:21:58 UTC 4,923 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7524],{8650:(e,r,t)=>{"use strict";t.r(r),t.d(r,{__N_SSP:()=>h,default:()=>g});var a=t(37876);t(15531);var o=t(51485),n=t(62506),l=t(13664),i=t(34736),s=t(27058),c=t(70111),d=t(13057),u=t(61154);t(10318);var f=t(14232),m=t(40358),p=t(98038);let y="PCQ - ";var h=!0;let g=e=>{let{components:r}=(0,l.j)(),t=(0,s.k)(),{locale:h}=(0,i.M1)(),g=(0,f.useMemo)(()=>{let e=sessionStorage.getItem(p.UV);return e?JSON.parse(e):null},[]),{isPaymentMethodEnabled:v}=(0,c.l)({avoidConfigChecks:!0,avoidParamChecks:!0,paymentMethod:u.g5.PCQ,previousPage:null==g?void 0:g.previousPage,hideTimeout:!0,doAdditionalChecks:()=>e.paymentRef&&e.outcome?(null==g?void 0:g.fallbackUrl)&&(null==g?void 0:g.paymentRef)&&(null==g?void 0:g.redirectToURL)?void 0:(console.error(y+"Missing stored info"),!0):(console.error(y+"Missing required info: parameters"),!0)});return(0,f.useEffect)(()=>{v&&r();async function r(){try{if(await o.w.confirmOrder(h,e.paymentRef,e.outcome),e.outcome===m.MF.Success){let e=g.redirectToURL;sessionStorage.removeItem(p.UV),await t.goToPage(e,{query:{paymentRef:g.paymentRef},asUrlWithoutParams:!0,replace:!0})}else sessionStorage.removeItem(p.UV),await t.goToPaymentErrorPage({paymentRef:g.paymentRef,fallbackUrl:g.fallbackUrl,outcome:e.outcome===m.MF.Cancelled?d.t.Cancelled:d.t.Failed})}catch(e){console.error("PCQ error while confirming order: ",e),t.goToPaymentErrorPage({paymentRef:g.paymentRef,fallbackUrl:g.fallbackUrl,outcome:d.t.GenericError})}}},[v]),(0,a.jsx)(n.U,{show:!0,loader:(0,a.jsx)(r.Loader,{show:!0})})}},51485:(e,r,t)=>{"use strict";t.d(r,{w:()=>c});var a=t(81521),o=t(11557),n=t(79444),l=t(67113),i=t(14605);class s extends a.G{async createOrder(e){try{return(await (0,n.S)(l.A.paymentApi.pcqCreateOrder(...o.o9.tenantAndSite,e.paymentMode,e),i.A.CREATED)).data}catch(e){(0,n.fr)(e,[])}}async confirmOrder(e,r,t){try{await (0,n.S)(l.A.paymentApi.pcqConfirmOrder(...o.o9.tenantAndSite,r,t,e),i.A.NO_CONTENT)}catch(e){(0,n.fr)(e,[])}}}let c=new s},66684:(e,r,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/payments/pcq/result",function(){return t(8650)}])},70111:(e,r,t)=>{"use strict";t.d(r,{l:()=>y});var a=t(32516),o=t(59096),n=t(33392),l=t(14232),i=t(42135),s=t(29171),c=t(13664),d=t(92345),u=t(61154),f=t(79444),m=t(95597),p=t(27058);let y=e=>{let{paymentMethod:r,params:t,previousPage:y,avoidConfigChecks:h,avoidParamChecks:g,configs:v,doAdditionalChecks:U,hideTimeout:w}=e,{behaviour:P}=(0,c.j)(),{loggedUser:R}=(0,s.U)(),{goHome:k}=(0,p.k)(),{setCustomPage:C,getMetaPaymentPageByUrl:_}=(0,d.t)(),{clear:M}=(0,o.F)(),T=(0,l.useMemo)(()=>"".concat(r," PAYMENT - "),[r]),{value:E,setTrue:b}=(0,i.Cg)(!1);return(0,n.S)(()=>{if(!h&&!v||(0,m.fU)({behaviour:P,loggedUser:R,paymentMethod:r})){console.error(T+"Missing required configs"),k({replace:!0});return}if(!g&&(!t||!(0,m.oc)(t,y))){console.error(T+"Missing required info"),k({replace:!0});return}if(null==U?void 0:U())return void k({replace:!0});let e=y?new URL(y).pathname:"/",a=_(e);a&&(e=a),(0,f.yy)(500).then(()=>{C(e,{hideCart:!0,hideTimeout:w||!1}),b()})}),{isPaymentMethodEnabled:E,handleBrowserBack:(0,l.useCallback)((e,r,t)=>{P.checkout.paymentErrorHandlingMode===u.PI.ClearCartAndGoToFirstPage&&M(),a.w.abortOrder(e,r,t).catch(f.Zi)},[P,M])}}},95597:(e,r,t)=>{"use strict";function a(e){var r,t;let{behaviour:a,loggedUser:o,paymentMethod:n}=e,l=null==(t=null==o||null==(r=o.loadCreditPaymentMethods)?void 0:r.includes(n))||t;return!a||!a.paymentMethodsList.includes(n)&&!l}function o(e,r){return r&&(null==e?void 0:e.paymentRef)&&(null==e?void 0:e.saleAk)&&(null==e?void 0:e.redirectToURL)}function n(e){let r=e instanceof URL?e:new URL(e);return{pathName:r.pathname,query:Array.from(r.searchParams.entries()).reduce((e,r)=>({...e,[r[0]]:r[1]}),{})}}t.d(r,{bG:()=>n,fU:()=>a,oc:()=>o})},98038:(e,r,t)=>{"use strict";t.d(r,{$Y:()=>y,UV:()=>p});var a=t(37876),o=t(62506),n=t(29171),l=t(13664),i=t(34736),s=t(27058),c=t(70111),d=t(13057),u=t(61154),f=t(51485),m=t(14232);let p="__pcq-data__",y=e=>{let{components:r,payments:{pcq:t}}=(0,l.j)(),{locale:y}=(0,i.M1)(),{setShowAppLoader:h}=(0,n.U)(),{query:g,goToPaymentErrorPage:v}=(0,s.k)(),U=g.paymentRef,w=g.paymentMode,{isPaymentMethodEnabled:P}=(0,c.l)({params:g,paymentMethod:u.g5.PCQ,configs:t,previousPage:e.previousPage});return(0,m.useEffect)(()=>{P&&(h(!0),f.w.createOrder({locale:y,paymentRef:U,paymentMode:w}).then(r=>{if(null==r?void 0:r.redirectUrl){let t={previousPage:e.previousPage,paymentRef:g.paymentRef,redirectToURL:g.redirectToURL,fallbackUrl:g.fallbackURL||e.previousPage};sessionStorage.setItem(p,JSON.stringify(t)),window.location.replace(r.redirectUrl)}}).catch(()=>{v({paymentRef:g.paymentRef,fallbackUrl:g.fallbackURL,outcome:d.t.GenericError})}).finally(()=>{h(!1)}))}
1,[P]),(0,a.jsx)(o.U,{show:!0,loader:(0,a.jsx)(r.Loader,{show:!0})})}}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=66684)),_N_E=e.O()}]);

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.