PageSourceSearch

https://app.transactpay.ai/assets/transaction-summary-B7oNLIpD.js

js transactpay.ai collected 2026-10-05 02:52:58 UTC 10,114 bytes, 1 lines download raw bytes

1import{h as u,d as b,S as y,r as v,a as C,z as R,N as j,b as N,O as M,j as e,B as o,a2 as k,o as P,a3 as f,Q as p}from"./index-BiwlBLjf.js";import{S as A}from"./status-badge-CfP1lEp8.js";import{C as r}from"./card-BPqi3BI-.js";const E=w=>{try{return JSON.parse(w)}catch{return null}},B=()=>{var h,t,m;const{setHeader:w}=u(),g=b(),l=y().state;v.useEffect(()=>{w("Collection")},[]);const{data:s}=C({queryKey:["TRANSACTION-DETAILS"],queryFn:async()=>{var n;const d=await N.get(`subsidiary/dashboard/collections/fetch/${l==null?void 0:l.type}/${l==null?void 0:l.reference}`);return(n=d==null?void 0:d.data)==null?void 0:n.data}}),i=R({mutationFn:async d=>{const n=await N.get(`subsidiary/dashboard/collections/receipt/${l==null?void 0:l.type}/${l==null?void 0:l.reference}`,{responseType:"blob"}),a=new Blob([n.data],{type:"application/pdf"}),c=window.URL.createObjectURL(a),x=document.createElement("a");return x.href=c,x.setAttribute("download",`transaction-receipt-${d}.pdf`),document.body.appendChild(x),x.click(),x.remove(),window.URL.revokeObjectURL(c),M("Reciept Downloaded Successfully"),!0},onError:d=>{var a,c;const n=((c=(a=d==null?void 0:d.response)==null?void 0:a.data)==null?void 0:c.message)||"An error occurred while downloading.";j(n)}});return e.jsxs("div",{children:[e.jsxs(r,{className:"flex h-auto w-full flex-row flex-wrap items-center justify-between gap-4 rounded-none border-b bg-white px-2 py-4 shadow-none lg:flex-nowrap lg:py-0",children:[e.jsx("div",{className:"my-2 flex items-center justify-center gap-4 p-2 md:flex-wrap lg:flex-row lg:flex-nowrap",children:e.jsxs(o,{onClick:()=>g(-1),className:"text-primary flex max-w-none cursor-pointer items-center gap-2 bg-transparent text-sm shadow-none",children:[e.jsx("span",{children:e.jsx(k,{})}),e.jsx("span",{children:"Transaction Summary"})]})}),["successful","failed"].includes((h=l==null?void 0:l.status)==null?void 0:h.toLowerCase())&&e.jsx("div",{className:"ml-4 flex items-center gap-2 md:ml-0 md:mr-4",children:e.jsx(o,{onClick:()=>{l!=null&&l.reference?i.mutate(l==null?void 0:l.reference):j("Refund reference not found")},className:"border-primary text-primary max-w-none border bg-transparent",children:i.isPending?"Downloading...":"Download Receipt"})})]}),e.jsxs(P,{className:"flex h-auto w-full max-w-none flex-col justify-between p-4",children:[e.jsxs("div",{className:"flex w-full flex-col items-start justify-between gap-4 md:h-72 md:flex-row md:items-stretch",children:[e.jsxs(r,{className:"h-full w-full max-w-none flex-col rounded-none shadow-none",children:[e.jsx("h6",{children:"Order Details"}),e.jsx(f,{className:"my-4 border-spacing-0.5"}),e.jsxs("div",{className:"mb-2 flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Order Reference"}),e.jsx("p",{className:"w-[55%] break-all text-right",children:(s==null?void 0:s.orderReference)??"-"})]}),e.jsxs("div",{className:"mb-2 flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Payment Reference"}),e.jsx("p",{className:"w-[55%] break-all text-right",children:(s==null?void 0:s.reference)??"-"})]}),e.jsxs("div",{className:"mb-2 flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Payment Response Code"}),e.jsxs("p",{className:"w-[55%] break-all text-right",children:[" ",(s==null?void 0:s.paymentResponseCode)??"-"]})]}),e.jsxs("div",{className:"mb-2 flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Payment Response Message"}),e.jsx("p",{className:"text-right",children:(s==null?void 0:s.paymentResponseMessage)??"-"})]})]}),e.jsxs(r,{className:"h-full w-full max-w-none flex-col rounded-none shadow-none",children:[e.jsx("h6",{children:"Order Details"}),e.jsx(f,{className:"my-4 border-spacing-0.5"}),e.jsxs("div",{className:"mb-2 flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Customer Name"}),e.jsx("p",{className:"w-[55%] break-all text-right",children:(s==null?void 0:s.customerName)??"-"})]}),e.jsxs("div",{className:"mb-2 flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Customer Email"}),e.jsx("p",{className:"text-right",children:(s==null?void 0:s.customerEmail)??"-"})]}),e.jsxs("div",{className:"mb-2 flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Customer Phone Number"}),e.jsxs("p",{className:"text-right",children:[" ",(s==null?void 0:s.customerMobile)??"-"]})]}),e.jsxs("div",{className:"mb-2 flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Country"}),e.jsx("p",{className:"w-[55%] break-all text-right",children:(s==null?void 0:s.customerCountry)??"-"})]})]})]}),e.jsxs(r,{className:"mt-4 w-full max-w-none rounded-none shadow-none",children:[e.jsx("h6",{children:"Payment Details"}),e.jsx(f,{className:"my-4 border-spacing-0.5"}),e.jsxs("div",{className:"mt-4 flex w-full flex-col gap-y-2",children:[e.jsxs("div",{className:"flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Payment Method"}),e.jsx("p",{className:"w-[55%] text-right",children:(s==null?void 0:s.paymentMethod)??"-"})]}),e.jsxs("div",{className:"flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Masked Pan"}),e.jsx("p",{className:"w-[55%] text-right",children:(s==null?void 0:s.maskedPan)??"-"})]}),e.jsxs("div",{className:"flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Payment Instrument"}),e.jsx("p",{className:"w-[55%] text-right",children:(s==null?void 0:s.paymentInstrument)??"-"})]}),e.jsxs("div",{className:"flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Status"}),e.jsx("div",{className:"flex w-[55%] justify-end",children:e.jsx(A,{status:(s==null?void 0:s.status)??"-"})})]}),e.jsxs("div",{className:"flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Narration"}),e.jsx("p",{className:"w-[55%] text-right",children:(s==null?void 0:s.narration)??"-"})]}),e.jsxs("div",{className:"flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Amount"}),e.jsx("p",{className:"w-[55%] text-right",children:(s==null?void 0:s.amount)??"-"})]}),e.jsxs("div",{className:"flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Currency"}),e.jsx("p",{className:"w-[55%] text-right",children:(s==null?void 0:s.currency)??"-"})]}),e.jsxs("div",{className:"flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Remark"}),e.jsxs("p",{className:"w-[55%] text-right",children:[(s==null?void 0:s.remark)??"-"," "]})]}),e.jsxs("div",{className:"flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Fee"}),e.jsx("p",{className:"w-[55%] text-right",children:(s==null?void 0:s.fee)??"-"})]}),e.jsxs("div",{className:"flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Merchant Fee"}),e.jsx("p",{className:"w-[55%] text-right",children:(s==null?void 0:s.merchantFee)??"-"})]}),e.jsxs("div",{className:"flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Who bears fee?"}),e.jsx("p",{className:"w-[55%] text-right",children:(s==null?void 0:s.whoBearsFee)??"-"})]}),e.jsxs("div",{className:"flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Date Created"}),e.jsx("p",{className:"w-[55%] text-right",children:p(s==null?void 0:s.dateCreated,"dd-MM-yyyy hh:mm a")??"-"})]}),e.jsxs("div",{className:"flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Date Payment Confirmed"}),e.jsx("p",{className:"w-[55%] text-right",children:p(s==null?void 0:s.datePaymentConfirmed,"dd-MM-yyyy hh:mm a")??"-"})]}),((t=s==null?void 0:s.paymentMethod)==null?void 0:t.toUpperCase())==="BANK-TRANSFER"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Session ID"}),e.jsx("p",{className:"w-[55%] text-right",children:(s==null?void 0:s.sessionID)??"
1-"})]}),e.jsxs("div",{className:"flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Sender Account Number"}),e.jsx("p",{className:"w-[55%] text-right",children:(s==null?void 0:s.senderAccountNumber)??"-"})]}),e.jsxs("div",{className:"flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Sender Account Name"}),e.jsx("p",{className:"w-[55%] text-right",children:(s==null?void 0:s.senderAccountName)??"-"})]})]}),e.jsxs("div",{className:"flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Settlement Status"}),e.jsx("p",{className:"w-[55%] text-right",children:(s==null?void 0:s.settlementStatus)??"-"})]}),e.jsxs("div",{className:"flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:"Settlement Date"}),e.jsx("p",{className:"w-[55%] text-right",children:p(s==null?void 0:s.settlementDate,"dd-MM-yyyy hh:mm a")??"-"})]})]}),(s==null?void 0:s.customValues)&&e.jsx(e.Fragment,{children:(m=E(s==null?void 0:s.customValues))==null?void 0:m.map(d=>e.jsxs("div",{className:"mt-2 flex w-full justify-between gap-y-1 md:flex-wrap",children:[e.jsx("span",{className:"min-w-[40%]",children:d==null?void 0:d.Name}),e.jsx("p",{className:"w-[55%] text-right",children:(d==null?void 0:d.Value)??"-"})]},d.Name))})]})]})]})};export{B 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.