PageSourceSearch

https://myka.ng/assets/ConfirmPayPage-BMEsl7gN.js

js myka.ng collected 2026-10-09 22:42:31 UTC 4,352 bytes, 1 lines download raw bytes

1import{u as Y,p as j,r as g,j as o}from"./vendor-react-DfYGAhtm.js";import{x as k,B as l,m as E,g as q}from"./index-DsBgCU7r.js";import"./LinkPaymentMethodOption-CuZHpNDU.js";import{u as w,P as L}from"./useProductPaymentFlow-BTWzU1Vd.js";import{u as O}from"./useAnalytics-HP01GbIH.js";import{S as B}from"./StepPageLayout-DdZUweau.js";import{a as M}from"./currency-tq8RhIEU.js";import{P as F}from"./PolicySummaryCard-CiBcvnsY.js";import{u as G}from"./useGadgetStepBreadcrumbs-BQrYEyhX.js";import{G as x}from"./routes-CNOe4p0Z.js";import{l as V,k as $,m as z}from"./ocrConfig-B-KSx9JM.js";import"./gadgetPostPaymentFlowConfig-ChCU4qBA.js";import{V as K,a as I,T as D}from"./vendor-ui-DA_r9yXk.js";import"./vendor-icons-1odZwi-b.js";import"./vendor-state-BsBVN-fX.js";import"./vendor-forms-BP-7CbAP.js";import"./EmailVerificationModal-BxNiYJiq.js";import"./Modal-DS-VW05m.js";import"./errors-BYKXB8DF.js";import"./paymentReturnUrls-CXEwLwaV.js";import"./walletApi-DyFgHNVA.js";import"./walletMandateApi-Du1GplC_.js";import"./walletMandateSession-B-c6J5GS.js";import"./failed-Dd90HJgP.js";import"./success-C0L8gZxS.js";import"./userEmail-9DwyWHBc.js";import"./transactionsApi-CANA4ntQ.js";import"./useWalletMandateLinkFlow-m9cf0nTk.js";import"./walletMandateReturnUrls-BPu4z42g.js";import"./paymentMandateReturnSession-B31Waw65.js";import"./deviceBrandIcons-BuVSPKZ7.js";import"./deviceBrandLogos-CnwfDF74.js";import"./stepBreadcrumbs-FCtSk5Kj.js";import"./checkoutSessionStore-BRM5sYZN.js";const A=s=>s.toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"}),W=s=>{const y=s.quoteReference?.trim();return y||s.id?.trim()||void 0},Re=()=>{const{items:s,onGoBack:y}=G(),{navigate:d}=k(),R=Y(),[S]=j(),{track:i}=O(),_=S.get("payment"),p=R.state,P=p?.selectedPlan?null:V(S.get("policyId")),e=p?.selectedPlan??P?.selectedPlan??null,r=p?.quotedPolicy??P?.quotedPolicy??null,m=p?.deviceSummary??P?.deviceSummary??null,t=p?.policyId?.trim()||P?.policyId?.trim()||S.get("policyId")?.trim()||r?.policyId?.trim()||void 0,f=e?.pricePerYear,c=r?W(r):void 0,T=g.useCallback(()=>{if(!t)return;$();const n=new URLSearchParams({policyId:t});c&&n.set("quoteId",c),d(`/${x.PolicyActivation}?${n.toString()}`,{replace:!0})},[t,c,d]),N=g.useMemo(()=>t&&e&&r?{policyId:t,selectedPlan:e,quotedPolicy:r,deviceSummary:m}:null,[t,e,r,m]),C=g.useMemo(()=>c?{quoteId:c}:null,[c]),a=w({policyId:t,amountDue:f,sessionStore:z,sessionPayload:N,successPath:x.ConfirmPay,extraReturnParamKeysToClear:["quoteId"],isPaidContextValid:!!(e&&r&&t),onPaid:({source:n})=>{n==="direct-debit"&&i(l.SCREEN_PAYMENT_COMPLETED,{product_type:"screen"}),T()},onOnlineReturnSuccess:()=>{i(l.SCREEN_PAYMENT_COMPLETED,{product_type:"screen"})},onOnlineReturnFailed:()=>{i(l.SCREEN_PAYMENT_FAILED,{product_type:"screen",failure_reason:"paystack_return"})},...e!=null?{amountDisplay:M(e.pricePerYear)}:{},...C?{extraSuccessParams:C}:{}}),b=()=>{f!=null&&i(l.SCREEN_PAYMENT_INITIATED,{product_type:"screen",premium_amount_ngn:f}),a.openMethodModal()};if(g.useEffect(()=>{_||(!e||!r||!m||!t)&&d(`/${x.VerifyImei}`,{replace:!0})},[e,r,m,t,_,d]),!e||!r||!m||!t)return null;const h=new Date,u=new Date(h);return u.setFullYear(u.getFullYear()+1),u.setDate(u.getDate()-1),o.jsxs(o.Fragment,{children:[o.jsx(L,{emailModal:{...a.modals.emailModal,onVerified:()=>{i(l.SCREEN_PAYSTACK_OPENED,{product_type:"screen",premium_amount_ngn:f??0}),a.modals.emailModal.onVerified()}},methodModal:{...a.modals.methodModal,onConfirmPayment:(n,v)=>{n==="pay_online"&&i(l.SCREEN_PAYSTACK_OPENED,{product_type:"screen",premium_amount_ngn:e.pricePerYear}),a.handleSelectMethod(n,v)}},successModal:a.modals.successModal}),o.jsx(B,{items:s,onGoBack:y,contentMaxW:"680px",mobileContentOnly:!0,children:o.jsxs(K,{align:"stretch",gap:6,children:[o.jsxs(I,{children:[o.jsx(D,{fontSize:{base:"2xl",md:"3xl"},fontWeight:"bold",color:E.text.primary,mb:1,children:"Confirm & Pay"}),o.jsx(D,{fontSize:"sm",color:E.text.gray,children:"Review your policy summary and complete payment."})]}),o.jsx(I,{bg:"white",border:"1px solid",borderColor:E.border.primary,borderRadius:"2xl",p:6,children:o.jsx(F,{deviceDetails:m,plan:e,startDate:A(h),endDate:A(u)}
1)}),o.jsx(q,{buttonType:"primary",text:`Pay ${M(e.pricePerYear)}`,size:"lg",type:"button",onClick:b,loading:a.isProcessing,disabled:a.isProcessing})]})})]})};export{Re 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.