PageSourceSearch

https://jhasolutions.com/assets/PaymentCheckout-DNJy0vTv.js

js jhasolutions.com collected 2026-09-24 14:46:28 UTC 2,546 bytes, 1 lines download raw bytes

1import{r as a,j as e}from"./query-vendor-Dp9tfhuh.js";import{d as p,a as h}from"./react-vendor-DfslLuwi.js";import{h as x,i as f,b as j,o as g,k as C,l as w,m as b,B as d}from"./index-CgOeqv80.js";import{o as k}from"./paddleJs-D6vCOr2I.js";import{C as y}from"./credit-card-B-2xvAjl.js";import{R as N}from"./rotate-cw-n6J_8Piu.js";import{A as v}from"./arrow-left-BmX2tYO6.js";import"./ui-vendor-DW4RoVmg.js";import"./chart-vendor-BoynbIzZ.js";const L=()=>{const[m]=p(),o=h(),c=m.get("_ptxn")||"",[n,s]=a.useState("loading"),[u,r]=a.useState("Preparing secure checkout..."),i=a.useCallback(async()=>{if(!/^txn_[a-z0-9]{20,40}$/i.test(c)){s("error"),r("This checkout link is invalid or incomplete.");return}s("loading"),r("Preparing secure checkout...");try{await k({transactionId:c,onSuccess:()=>o("/subscription?checkout=complete",{replace:!0}),onClose:()=>{s("closed"),r("Checkout was closed before payment was completed.")},onError:()=>{s("error"),r("Paddle could not open this checkout. Please try again.")}}),s("open"),r("Complete payment in the secure Paddle window.")}catch(l){s("error"),r(l instanceof Error?l.message:"Checkout could not be opened.")}},[o,c]);a.useEffect(()=>{i()},[i]);const t=n==="error"||n==="closed";return e.jsx("div",{className:"min-h-screen bg-muted/30 px-4 py-12 flex items-center justify-center",children:e.jsxs(x,{className:"w-full max-w-md border-border/80 shadow-lg",children:[e.jsxs(f,{className:"text-center",children:[e.jsx("div",{className:`mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-lg ${t?"bg-destructive/10":"bg-primary/10"}`,children:n==="loading"?e.jsx(j,{className:"h-6 w-6 animate-spin text-primary"}):t?e.jsx(g,{className:"h-6 w-6 text-destructive"}):e.jsx(y,{className:"h-6 w-6 text-primary"})}),e.jsx(C,{children:t?"Checkout not completed":"JHA Solutions All Access"}),e.jsx(w,{children:u})]}),e.jsxs(b,{className:"space-y-3",children:[e.jsxs("div",{className:"rounded-md border bg-muted/40 p-4 text-sm",children:[e.jsxs("div",{className:"flex items-center justify-between font-medium",children:[e.jsx("span",{children:"All Access"}),e.jsx("span",{children:"$5/month"})]}),e.jsx("p",{className:"mt-1 text-muted-foreground",children:"Unlimited properties and every platform feature."})]}),t&&e.jsxs(d,{className:"w-full",onClick:()=>void i(),children:[e.jsx(N,{className:"mr-2 h-4 w-4"}),"Try again"]}),e.jsxs(d,{variant:"ghost",className:"w-full",onClick:()=>o("/subscription"),children:[e.jsx(v,{className:"mr-2 h-4 w-4"}),"Back to billing"]})]})]})})};export{L as default};

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.