PageSourceSearch

https://www.thestorefront.fr/_next/static/chunks/pages/account/organisation/stripe/return-d2267792cc95d2ae.js

js thestorefront.fr collected 2026-09-25 18:48:45 UTC 8,383 bytes, 18 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a0d87e-90ae-79a1-8971-45d9dc0082a8")}catch(e){}}();(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5331],{87411:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/organisation/stripe/return",function(){return r(85337)}])},85337:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return g}});var n=r(31549),i=r(44194),s=r(37486),o=r(84742),a=r(39355),c=r(16560),l=r(85410),u=r(42284),d=r(34441),p=r(51463),m=r(23647);let f=a.Ps`
2  query StripeReturnAccounts($organisationId: ID!) {
3    listOrganisationStripeAccounts(organisationId: $organisationId) {
4      id
5      status
6      payoutsEnabled
7      createdAt
8    }
9  }
10`,h=a.Ps`
11  query StripeReturnLegacyStatus($organisationId: ID!) {
12    connectAccountStatus(organisationId: $organisationId) {
13      hasAccount
14      verified
15    }
16  }
17`;var g=!0;t.default=m.p0.withLayout({title:"Stripe Connect Setup"})(()=>{let e=(0,s.useRouter)(),{t}=(0,o.$G)("organization"),[r,a]=(0,i.useState)("loading"),m=(0,p.X6)(),g=u.WG(m)?.id??null;return(0,i.useEffect)(()=>{if(!e.isReady||!g)return;let t=!0,r=(r,n)=>{t&&(a(r),setTimeout(()=>e.push("/account/settings/stripe-accounts"),n))},n=async()=>{try{let{error:t,error_description:n}=e.query;if(t){console.error("Stripe onboarding error:",t,n),r("error",3e3);return}let{bearerToken:i}=await (0,l.h)(),s=(0,d.Ds)({headers:{authorization:i}}),o=await s.request(f,{organisationId:g}),a=o?.listOrganisationStripeAccounts??[];if(a.length>0){let e=[...a].sort((e,t)=>new Date(t.createdAt??0).getTime()-new Date(e.createdAt??0).getTime())[0];"VERIFIED"===e.status?r("success",2e3):r("pending",4e3);return}let c=await s.request(h,{organisationId:g}),u=c?.connectAccountStatus;if(u?.hasAccount){r(u.verified?"success":"pending",u.verified?2e3:4e3);return}r("error",3e3)}catch(e){console.error("Error handling Stripe return:",e),r("error",3e3)}};return n(),()=>{t=!1}},[e.isReady,g]),(0,n.jsx)(c.W2,{className:"py-12",children:(0,n.jsxs)("div",{className:"max-w-md mx-auto text-center",children:["loading"===r&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6",children:(0,n.jsxs)("svg",{className:"animate-spin h-12 w-12 text-blue-600",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,n.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}),(0,n.jsx)(c.Dx,{size:"lg",className:"mb-2",children:t("stripe.processingReturn","Processing your setup...")}),(0,n.jsx)(c.ZT.Paragraph,{className:"text-gray-600",children:t("stripe.pleaseWait","Please wait while we complete your payout configuration.")})]}),"success"===r&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 bg-green-100 rounded-full",children:(0,n.jsx)("svg",{className:"w-8 h-8 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),(0,n.jsx)(c.Dx,{size:"lg",className:"mb-2 text-green-800",children:t("stripe.setupComplete","Setup Complete!")}),(0,n.jsx)(c.ZT.Paragraph,{className:"text-gray-600",children:t("stripe.redirectingToSettings","Your payout account is configured. Redirecting you back to settings...")})]}),"pending"===r&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 bg-amber-100 rounded-full",children:(0,n.jsx)("svg",{className:"w-8 h-8 text-amber-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})}),(0,n.jsx)(c.Dx,{size:"lg",className:"mb-2 text-amber-800",children:t("stripe.verificationPending","Verification in progress")}),(0,n.jsx)(c.ZT.Paragraph,{className:"text-gray-600",children:t("stripe.verificationPendingDescription","Your details were submitted. Stripe is reviewing your account or needs more information — you can check the status in your payout settings.")})]}),"error"===r&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 bg-red-100 rounded-full",children:(0,n.jsx)("svg",{className:"w-8 h-8 text-red-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,n.jsx)(c.Dx,{size:"lg",className:"mb-2 text-red-800",children:t("stripe.setupFailed","Setup Incomplete")}
17),(0,n.jsx)(c.ZT.Paragraph,{className:"text-gray-600",children:t("stripe.tryAgain","Something went wrong. Please try setting up your payout account again from settings.")})]})]})})})},39856:function(e,t,r){"use strict";function n(e){return(n="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})(e)}r.d(t,{J:function(){return w}});var i,s="basil",o="https://js.stripe.com",a="".concat(o,"/").concat(s,"/stripe.js"),c=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,l=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,u="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",d=function(){for(var e=document.querySelectorAll('script[src^="'.concat(o,'"]')),t=0;t<e.length;t++){var r,n=e[t];if(r=n.src,c.test(r)||l.test(r))return n}return null},p=function(e){var t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src="".concat(a).concat(t);var n=document.head||document.body;if(!n)throw Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return n.appendChild(r),r},m=function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"7.9.0",startTime:t})},f=null,h=null,g=null,v=function(e,t,r){if(null===e)return null;var n,i=t[0].match(/^pk_test/),o=3===(n=e.version)?"v3":n;i&&o!==s&&console.warn("Stripe.js@".concat(o," was loaded on the page, but @stripe/stripe-js@").concat("7.9.0"," expected Stripe.js@").concat(s,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var a=e.apply(void 0,t);return m(a,r),a},y=function(e){var t="invalid load parameters; expected object of shape\n\n    {advancedFraudSignals: boolean}\n\nbut received\n\n    ".concat(JSON.stringify(e),"\n");if(null===e||"object"!==n(e))throw Error(t);if(1===Object.keys(e).length&&"boolean"==typeof e.advancedFraudSignals)return e;throw Error(t)},x=!1,w=function(){for(var e,t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];x=!0;var s=Date.now();return(e=i,null!==f?f:(f=new Promise(function(t,r){if("undefined"==typeof window||"undefined"==typeof document){t(null);return}if(window.Stripe&&e&&console.warn(u),window.Stripe){t(window.Stripe);return}try{var n,i=d();i&&e?console.warn(u):i?i&&null!==g&&null!==h&&(i.removeEventListener("load",g),i.removeEventListener("error",h),null===(n=i.parentNode)||void 0===n||n.removeChild(i),i=p(e)):i=p(e),g=function(){window.Stripe?t(window.Stripe):r(Error("Stripe.js not available"))},h=function(e){r(Error("Failed to load Stripe.js",{cause:e}))},i.addEventListener("load",g),i.addEventListener("error",h)}catch(e){r(e);return}})).catch(function(e){return f=null,Promise.reject(e)})).then(function(e){return v(e,r,s)})};w.setLoadParameters=function(e){if(!(x&&i&&Object.keys(y(e)).reduce(function(t,r){var n;return t&&e[r]===(null===(n=i)||void 0===n?void 0:n[r])},!0))){if(x)throw Error("You cannot change load parameters after calling loadStripe");i=y(e)}}}},function(e){e.O(0,[2915,3647,9774,2888,179],function(){return e(e.s=87411)}),_N_E=e.O()}]);
18//# chunkId=01a0d87e-90ae-79a1-8971-45d9dc0082a8

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.