PageSourceSearch

https://my.basestation.nz/assets/GuestInvoicePaymentPage-6g20PigZ.js

js basestation.nz collected 2026-09-28 13:30:02 UTC 3,660 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-puck-lPnaRYA0.js";import{r as b,e as v}from"./vendor-react-TOOSQ9Q-.js";import{d as j,b as P,az as p,g as u,u as I,J as g,L as k,P as S,l as f}from"./index-jhQ5hK4p.js";import{P as m,I as U}from"./InvoiceBasketSummary-_7pfpuWn.js";import{S as q,a as w,P as C,A as N}from"./AlreadyAMemberBanner-j57_GDha.js";import{u as x}from"./vendor-i18n-eTj0Pfmx.js";import{a as y,R,C as A}from"./vendor-bootstrap-QfZpN2Mb.js";import"./vendor-luxon-2n2xc3QM.js";import"./vendor-calendar-WlMSM93F.js";import"./vendor-motion-BX6prKAE.js";import"./InvoiceItemFactory-NfsT_HT2.js";import"./index-VKa-JRxb.js";import"./SpreedlyCardForm-kCkSY-u6.js";import"./useExternalScript-hhwke5gZ.js";const T=a=>{const{t}=x(),{invoice:s}=a,{payments:i}=j(),{getRoutePath:o}=P(),[n,r]=b.useState(null);if(!(i.stripe.enabled||i.spreedly.enabled||i.paypal.enabled))return e.jsx(p,{variant:"info",children:t("Online payments are not available for this location. Please contact us to arrange an alternative payment method.")});const l=()=>`${window.location.origin}${o(u.public_checkout_complete)}`,c=()=>o(u.public_checkout_complete);let d=0;return e.jsxs("div",{className:"d-flex flex-column gap-3",children:[e.jsx("h5",{className:"mb-0",children:t("Choose a payment method")}),i.stripe.enabled&&e.jsx(m,{onSelected:()=>r("Stripe"),selected:n==="Stripe",title:t("Pay by Stripe"),subtitle:t("Secure payment via Stripe"),tabIndex:++d,children:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:t("Your payment details are handled securely by Stripe.")}),e.jsx(q,{completeUrl:l,invoice:s,basket:[],guestInvoiceToken:{coworkerUniqueId:a.coworkerUniqueId,invoiceUniqueId:a.invoiceUniqueId}})]})}),i.spreedly.enabled&&e.jsx(m,{onSelected:()=>r("Spreedly"),selected:n==="Spreedly",title:t("Pay by Card"),subtitle:t("Secure card payment"),tabIndex:++d,children:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:t("Please complete the form below with your payment and billing details.")}),e.jsx(w,{getReturnUrl:c,invoice:s,basket:[],border:!1,guestInvoiceToken:{coworkerUniqueId:a.coworkerUniqueId,invoiceUniqueId:a.invoiceUniqueId}})]})}),i.paypal.enabled&&e.jsx(m,{onSelected:()=>r("PayPal"),selected:n==="PayPal",title:t("Pay by PayPal"),subtitle:t("Secure payment via PayPal"),tabIndex:++d,children:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:t("Your payment details are handled securely by PayPal.")}),e.jsx(C,{invoice:s,basket:[],completeRoute:u.public_checkout_complete,extraQueryParams:{cguid:a.coworkerUniqueId,iguid:a.invoiceUniqueId},guestInvoiceToken:{coworkerUniqueId:a.coworkerUniqueId,invoiceUniqueId:a.invoiceUniqueId}})]})})]})},O=()=>{const{t:a}=x(),{coworkerUniqueId:t,invoiceUniqueId:s}=v(),{httpClient:i}=I(),o=t&&s?f.billing.invoices.guest(t,s):null,{resource:n,isLoading:r,hasError:h}=g(i,o?.url??null,{queryConfig:{staleTime:6e4}});if(r)return e.jsx(y,{className:"py-5 text-center",children:e.jsx(k,{show:!0})});if(h||!n)return e.jsx(y,{className:"py-5",children:e.jsx(p,{variant:"warning",children:a("This invoice is not available. It may have already been paid, or the link is no longer valid.")})});const l=n.Paid||n.DueAmount<=0,c={existingInvoice:n};return e.jsxs(e.Fragment,{children:[e.jsx(S,{title:a("Pay Invoice")}),e.jsx(y,{className:"py-4",children:e.jsx(R,{className:"justify-content-center",children:e.jsxs(A,{lg:8,xl:7,children:[e.jsx(U,{invoiceData:c}),l&&e.jsx(p,{variant:"success",className:"mt-4",children:a("This invoice has already been paid. No further action is required.")}),!l&&e.jsxs("div",{className:"mt-4",children:[e.jsx(N,{}),e.jsx(T,{invoice:n,coworkerUniqueId:t,invoiceUniqueId:s})]})]})})})]})};export{O 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.