PageSourceSearch

https://app.your360.ai/_next/static/chunks/pages/stripe/checkout/failure-2b1c86bf3947bf55.js

js your360.ai collected 2026-10-05 04:09:08 UTC 13,567 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2433],{26170:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>f});var a=r(74429),s=r(71041),n=r(37331),i=r(36188),l=r(36642),d=r(27217),c=r(52011),o=r(61842),u=r(63819),m=r(37239);function f(){var e,t;let r,f,p=(0,n.useRouter)(),[h,x]=(0,s.useState)(null),[y,g]=(0,s.useState)(!0),[v,b]=(0,s.useState)(null),[j,N]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let e=p.query.session_id;e&&"string"==typeof e?w(e):p.isReady&&(b("No session ID provided"),g(!1))},[p.query.session_id,p.isReady]);let w=async e=>{try{g(!0),b(null);let t=await fetch(`/api/public/checkout/failure?session_id=${e}`),r=await t.json();if(!t.ok)throw Error(r.error||"Failed to retrieve session data");x(r)}catch(e){console.error("Error fetching session data:",e),b(e instanceof Error?e.message:"Failed to load payment information")}finally{g(!1)}},_=async()=>{if(!h?.metadata?.price_id)return void p.push("/");N(!0);let e=h.metadata.price_id,t=`/stripe/checkout/start?price_id=${encodeURIComponent(e)}`;p.push(t)};return y?(0,a.jsx)("div",{className:"min-h-screen bg-gray-50",children:(0,a.jsxs)("div",{className:"max-w-2xl mx-auto px-4",children:[(0,a.jsx)(m.A,{}),(0,a.jsx)("div",{className:"flex items-center justify-center min-h-[80vh]",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)(d.y,{className:"w-8 h-8 mx-auto mb-4"}),(0,a.jsx)("p",{className:"text-gray-600",children:"Loading payment details..."})]})})]})}):v?(0,a.jsx)("div",{className:"min-h-screen bg-gray-50 py-8",children:(0,a.jsxs)("div",{className:"max-w-2xl mx-auto px-4",children:[(0,a.jsx)(m.A,{}),(0,a.jsxs)(i.Zp,{className:"p-8 text-center",children:[(0,a.jsx)("div",{className:"text-red-500 mb-4",children:(0,a.jsx)(c.A,{className:"w-12 h-12 mx-auto"})}),(0,a.jsx)("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Error Loading Payment"}),(0,a.jsx)("p",{className:"text-gray-600 mb-6",children:v})]})]})}):(0,a.jsx)("div",{className:"min-h-screen bg-gray-50 py-8",children:(0,a.jsxs)("div",{className:"max-w-2xl mx-auto px-4",children:[(0,a.jsx)(m.A,{}),(0,a.jsxs)("div",{className:"text-center mb-8",children:[(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)(o.A,{className:"w-16 h-16 mx-auto text-red-500"})}),(0,a.jsx)("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:"Payment Failed"}),(0,a.jsx)("p",{className:"text-gray-600",children:"We were unable to process your payment. Please try again."})]}),h&&(0,a.jsxs)(i.Zp,{className:"p-8 mb-6",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold text-gray-900 mb-4",children:"What Happened?"}),(0,a.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 mb-6",children:(0,a.jsx)("p",{className:"text-red-800 font-medium",children:(e=h.failure_code,t=h.failure_reason,({card_declined:"Your card was declined. Please try a different payment method.",expired_card:"Your card has expired. Please use a different card.",insufficient_funds:"Insufficient funds. Please try a different payment method.",incorrect_cvc:"The security code (CVC) is incorrect.",processing_error:"There was an error processing your payment. Please try again.",payment_cancelled:"Payment was cancelled.",authentication_required:"Additional authentication is required for this payment."})[e]||t||"Payment failed for an unknown reason.")})}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center py-2 border-b border-gray-100",children:[(0,a.jsx)("span",{className:"text-gray-600",children:"Attempted Amount"}),(0,a.jsx)("span",{className:"font-medium text-gray-900",children:(r=h.amount_total,f=h.currency,new Intl.NumberFormat("en-US",{style:"currency",currency:f.toUpperCase()}).format(r/100))})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center py-2 border-b border-gray-100",children:[(0,a.jsx)("span",{className:"text-gray-600",children:"Attempt Date"}),(0,a.jsx)("span",{className:"font-medium text-gray-900",children:new Date(1e3*h.created).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center py-2 border-b border-gray-100",children:[(0,a.jsx)("span",{className:"text-gray-600",children:"Email"}),(0,a.jsx)("span",{className:"font-medium text-gray-900",children:h.customer_email})]})]})]}),(0,a.jsx)("div",{className:"space-y-4",children:(0,a.jsx)(l.$,{onClick:_,disabled:j,className:"w-full bg-blue-600 hover:bg-blue-700 text-white py-3 flex items-center justify-center gap-2",children:j?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.y,{className:"w-4 h-4"}),"Redirecting..."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.A,{className:"w-4 h-4"}),"Try Again"]})})}),(0,a.jsxs)(i.Zp,{className:"mt-6 p-6",children:[(0,a.jsx)("h3",{className:"font-medium text-gray-900 mb-3",children:"Need Help?"}),(0,a.jsxs)("div",{className:"space-y-2 text-sm text-gray-600",children:[(0,a.jsx)("p",{children:"• Check your card details and try again"}),(0,a.jsx)("p",{children:"• Try using a different payment method"}),(0,a.jsx)("p",{children:"• Contact your bank if the issue persists"}),(0,a.jsxs)("p",{children:["• Reach out to our ",(0,a.jsx)("a",{href:"mailto:[email protected]",className:"text-blue-600 hover:text-blue-800 underline",children:"support team"})," for assistance"]})]}),(0,a.jsx)("div",{className:"mt-4 pt-4 border-t border-gray-200",children:(0,a.jsxs)("p",{className:"text-xs text-gray-500",children:["If you continue to experience issues, please ",(0,a.jsx)("a",{href:"mailto:[email protected]",className:"text-blue-600 hover:text-blue-800 underline",children:"contact support"})," for assistance."]})})]})]})})}},27217:(e,t,r)=>{"use strict";r.d(t,{y:()=>d});var a=r(74429),s=r(43519),n=r(44921);let i={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},l={light:"text-white",dark:"text-gray-600"};function d({size:e="md",variant:t="light",className:r}){return(0,a.jsx)(s.A,{className:(0,n.cn)("animate-spin",i[e],l[t],r)})}},36188:(e,t,r)=>{"use strict";
1r.d(t,{Zp:()=>i});var a=r(74429),s=r(71041),n=r(44921);let i=s.forwardRef(({className:e,...t},r)=>(0,a.jsx)("div",{ref:r,className:(0,n.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));i.displayName="Card",s.forwardRef(({className:e,...t},r)=>(0,a.jsx)("div",{ref:r,className:(0,n.cn)("flex flex-col space-y-1.5 p-6",e),...t})).displayName="CardHeader",s.forwardRef(({className:e,...t},r)=>(0,a.jsx)("h3",{ref:r,className:(0,n.cn)("text-2xl font-semibold leading-none tracking-tight",e),...t})).displayName="CardTitle",s.forwardRef(({className:e,...t},r)=>(0,a.jsx)("p",{ref:r,className:(0,n.cn)("text-sm text-muted-foreground",e),...t})).displayName="CardDescription",s.forwardRef(({className:e,...t},r)=>(0,a.jsx)("div",{ref:r,className:(0,n.cn)("p-6 pt-0",e),...t})).displayName="CardContent",s.forwardRef(({className:e,...t},r)=>(0,a.jsx)("div",{ref:r,className:(0,n.cn)("flex items-center p-6 pt-0",e),...t})).displayName="CardFooter"},36642:(e,t,r)=>{"use strict";r.d(t,{$:()=>c,r:()=>d});var a=r(74429),s=r(71041),n=r(76092),i=r(56783),l=r(44921);let d=(0,i.F)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"},rounded:{default:"",full:"rounded-full"}},defaultVariants:{variant:"default",size:"default",rounded:"default"}}),c=s.forwardRef(({className:e,variant:t,size:r,rounded:s,asChild:i=!1,...c},o)=>{let u=i?n.DX:"button";return(0,a.jsx)(u,{className:(0,l.cn)(d({variant:t,size:r,rounded:s,className:e})),ref:o,...c})});c.displayName="Button"},37115:(e,t,r)=>{"use strict";r.d(t,{s:()=>i,t:()=>n});var a=r(71041);function s(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function n(...e){return t=>{let r=!1,a=e.map(e=>{let a=s(e,t);return r||"function"!=typeof a||(r=!0),a});if(r)return()=>{for(let t=0;t<a.length;t++){let r=a[t];"function"==typeof r?r():s(e[t],null)}}}}function i(...e){return a.useCallback(n(...e),e)}},37239:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(74429),s=r(7267),n=r.n(s);function i(){return(0,a.jsx)("header",{children:(0,a.jsx)("div",{className:"flex items-center pt-4",children:(0,a.jsx)(n(),{src:"/images/your360ai-main-logo.png",alt:"Your360.ai Logo",width:128,height:40,className:"w-32"})})})}},43519:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(78554).A)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},44921:(e,t,r)=>{"use strict";r.d(t,{cn:()=>n});var a=r(71623),s=r(28123);function n(...e){return(0,s.QP)((0,a.$)(e))}},52011:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(78554).A)("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]])},56783:(e,t,r)=>{"use strict";r.d(t,{F:()=>i});var a=r(71623);let s=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,n=a.$,i=(e,t)=>r=>{var a;if((null==t?void 0:t.variants)==null)return n(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:i,defaultVariants:l}=t,d=Object.keys(i).map(e=>{let t=null==r?void 0:r[e],a=null==l?void 0:l[e];if(null===t)return null;let n=s(t)||s(a);return i[e][n]}),c=r&&Object.entries(r).reduce((e,t)=>{let[r,a]=t;return void 0===a||(e[r]=a),e},{});return n(e,d,null==t||null==(a=t.compoundVariants)?void 0:a.reduce((e,t)=>{let{class:r,className:a,...s}=t;return Object.entries(s).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...l,...c}[t]):({...l,...c})[t]===r})?[...e,r,a]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}},57568:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/stripe/checkout/failure",function(){return r(26170)}])},61842:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(78554).A)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},63819:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(78554).A)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},76092:(e,t,r)=>{"use strict";let a,s,n;r.d(t,{DX:()=>f});var i,l=r(71041),d=r(37115),c=r(74429),o=Symbol.for("react.lazy"),u=(i||(i=r.t(l,2)))[" use ".trim().toString()];function m(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===o&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var f=((n=l.forwardRef((e,t)=>
1{let{children:r,...a}=e;if(m(r)&&"function"==typeof u&&(r=u(r._payload)),l.isValidElement(r)){var s;let e,n,i=(s=r,(n=(e=Object.getOwnPropertyDescriptor(s.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.ref:(n=(e=Object.getOwnPropertyDescriptor(s,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.props.ref:s.props.ref||s.ref),c=function(e,t){let r={...t};for(let a in t){let s=e[a],n=t[a];/^on[A-Z]/.test(a)?s&&n?r[a]=(...e)=>{let t=n(...e);return s(...e),t}:s&&(r[a]=s):"style"===a?r[a]={...s,...n}:"className"===a&&(r[a]=[s,n].filter(Boolean).join(" "))}return{...e,...r}}(a,r.props);return r.type!==l.Fragment&&(c.ref=t?(0,d.t)(t,i):i),l.cloneElement(r,c)}return l.Children.count(r)>1?l.Children.only(null):null})).displayName="Slot.SlotClone",a=n,(s=l.forwardRef((e,t)=>{let{children:r,...s}=e;m(r)&&"function"==typeof u&&(r=u(r._payload));let n=l.Children.toArray(r),i=n.find(h);if(i){let e=i.props.children,r=n.map(t=>t!==i?t:l.Children.count(e)>1?l.Children.only(null):l.isValidElement(e)?e.props.children:null);return(0,c.jsx)(a,{...s,ref:t,children:l.isValidElement(e)?l.cloneElement(e,void 0,r):null})}return(0,c.jsx)(a,{...s,ref:t,children:r})})).displayName="Slot.Slot",s),p=Symbol("radix.slottable");function h(e){return l.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===p}},78554:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var a=r(71041);let s=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var n={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,a.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:l="",children:d,iconNode:c,...o},u)=>(0,a.createElement)("svg",{ref:u,...n,width:t,height:t,stroke:e,strokeWidth:i?24*Number(r)/Number(t):r,className:s("lucide",l),...o},[...c.map(([e,t])=>(0,a.createElement)(e,t)),...Array.isArray(d)?d:[d]])),l=(e,t)=>
1{let r=(0,a.forwardRef)(({className:r,...n},l)=>(0,a.createElement)(i,{ref:l,iconNode:t,className:s(`lucide-${e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,r),...n}));return r.displayName=`${e}`,r}}},e=>{e.O(0,[7267,2781,636,6593,8792],()=>e(e.s=57568)),_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.