PageSourceSearch

https://www.comfama.com/portal-servicios/component---src-pages-pag…ion-estado-pago-tsx-39dd9514ddaf41508fd1.js

js comfama.com collected 2026-09-24 17:17:23 UTC 17,958 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkcomfama_portalservicios_archetype=self.webpackChunkcomfama_portalservicios_archetype||[]).push([[2621],{3026:function(e,a,t){var s=t(34164),i=t(74848);a.A=({itemList:e,currentIndex:a,title:t,subtitle:n,titleType:r,isTwo:o})=>{const l=e=>(0,s.A)("m-payment-stepper__item",{"--past":a>e,__active:a===e,"--pre-past":1===e&&.9===a}),c=(0,s.A)("m-payment-stepper__progress-bar-wrapper",{"--first":0===a,"--medium":1===a||o,"--next":.9===a,"--last":2===a,"--two":!!o,"two--left":o}),d=(0,s.A)("m-payment-stepper__content",{"stepper-two":!!o}),m=(0,s.A)("m-payment-stepper__item-name",{"--two":!!o}),p=(0,s.A)("m-payment-stepper",{"--two":!!o});return(0,i.jsxs)("div",{className:p,children:[t&&n&&(0,i.jsx)("div",{className:"m-payment-stepper__headings",children:"h1"===r?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h1",{className:"m-payment-stepper__headings__title",children:t}),(0,i.jsx)("h2",{className:"m-payment-stepper__headings__sub-title",children:n})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h2",{className:"m-payment-stepper__headings__title",children:t}),(0,i.jsx)("h3",{className:"m-payment-stepper__headings__sub-title",children:n})]})}),(0,i.jsxs)("div",{className:d,children:[e.map((e,a)=>(0,i.jsxs)("div",{className:l(a),children:[(0,i.jsx)("div",{className:"m-payment-stepper__item-number",children:(0,i.jsx)("span",{children:a+1})}),(0,i.jsx)("span",{className:m,children:e})]},`m-payment-stepper__item${a}`)),(0,i.jsx)("div",{className:c,children:(0,i.jsx)("div",{className:"m-payment-stepper__progress-bar"})})]})]})}},68315:function(e,a,t){t.d(a,{A:function(){return u}});var s=t(96540),i=t(64810),n=t(4240),r=t(45871),o=t(19871),l=t(29390),c=t(74848);var d=()=>{const e=(0,i.useStaticQuery)("8872584"),[a,t]=(0,s.useState)(5),[d,m]=(0,s.useState)(!1),{isBrowser:p,localStorage:u}=(0,o.A)(),h=e.allContentfulTemplate.nodes[0],v={renderNode:{[r.BLOCKS.PARAGRAPH]:(e,a)=>(0,c.jsx)("p",{children:a}),[r.BLOCKS.HEADING_1]:(e,a)=>(0,c.jsx)("h1",{children:a})}},f=(0,s.useCallback)(()=>setInterval(()=>{a>0?t(a-1):m(!0)},1e3),[a]);return(0,s.useEffect)(()=>{const e=f();return 0===a&&(m(!0),clearInterval(e),(()=>{var e,a;const t=null===(e=u.getItem("CURRENT_TAB"))||void 0===e?void 0:e.toString(),s=null===(a=window)||void 0===a?void 0:a.location.hostname;window.location.href="empresas"===t?"localhost"===s?"/empresas":"/portal-servicios/empresas":"localhost"===s?"/personas":"/portal-servicios/personas"})()),()=>{clearInterval(e)}},[d,a]),(0,c.jsx)(c.Fragment,{children:p&&(0,c.jsxs)("section",{className:"o-head404",children:[(0,c.jsxs)("article",{className:"o-head404__container",children:[h.tituloEnriquecido&&(0,n.i)(JSON.parse(h.tituloEnriquecido.raw),v),(0,c.jsxs)("p",{children:["Seras Redirigido a la pagina inicial en: ",a," Segundos"]})]}),(0,c.jsx)("figure",{className:"o-head404__cover",children:(0,c.jsx)("img",{loading:"lazy",className:"o-head404__cover__img",src:h.imagen[0]&&(0,l.s)(h.imagen[0]),alt:h.imagen[0].title})})]})})},m=t(92490),p=t(59039);var u=({data:e,children:a,hasLoader:t,isPrivate:s,hideSide:i,sideMenu:n,isMain:r,isActive:o,serviceId:l})=>{var u;const{metaTitulo:h,metaDescripcion:v,metaImagen:f,noIndex:_,urlCanonical:y}=e;return(0,c.jsx)(m.A,{hasLoader:t,isPrivate:s,hideSide:i,sideMenu:n,isMain:r,serviceId:l,children:o?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(p.A,{title:h,description:v,image:null==f||null===(u=f.file)||void 0===u?void 0:u.url,noIndex:_,urlCanonical:y,noCanonical:!1,lang:"es"}),a]}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(p.A,{title:"Pagina no encontrada",noIndex:!0}),(0,c.jsx)(d,{})]})})}},70277:function(e,a){a.A=e=>{const a=e.split("/");return a[0]+" de "+["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"][parseInt(a[1])-1]+" de "+a[2]}},88767:function(e,a,t){var s=t(64810),i=t(19871),n=t(74848);a.A=e=>{const{content:a}=e,{isBrowser:t}=(0,i.A)();return(0,n.jsx)("nav",{itemType:"https://schema.org/Breadcrumb",className:"miga-de-pan",children:(0,n.jsx)("ul",{className:"a-breadcrumb"+(e.specialEvent?" a-breadcrumb--special-event":""),children:t&&(a=>{const t=a.split("/").map(e=>
1e.trim()).filter(Boolean);return t.map((a,i)=>{const r=`/${t.slice(1,i+1).map(e=>e.toLowerCase().includes("certificados y consultas")?"certificados":e.replace(/\s+/g,"-").toLowerCase()).join("/")}`;return(0,n.jsx)("li",{itemProp:"url",className:`crumb url-${i}${e.specialEvent?" --special-event":""}`,children:(0,n.jsx)(s.Link,{title:a,to:r.toLocaleLowerCase(),rel:"noopener noreferrer",children:(0,n.jsx)("span",{itemProp:"title",children:a})})},i)})})(a)})})}},94339:function(e,a,t){t.r(a),t.d(a,{default:function(){return w}});var s=t(64810),i=t(96540),n=t(5588),r=t(51145),o=t(64691),l=t(68667),c=t(70277),d=t(7095),m=t(19871),p=t(88767),u=t(17325),h=t(44063),v=t(79771),f=t(3026),_=t(99476),y=t(29390),x=t(74848);var j=()=>{var e,a,t,j,g,w,N,A,b,E,C,S,P,R,I,T,D,F,B,L,$,k,O,M,V,z,J,U,G;const q=(0,s.useStaticQuery)("2991250094"),{gigyaContext:H,userInfoContext:Q,selectedTab:K}=(0,i.useContext)(o.A),[W,X]=(0,i.useState)(null),[Y,Z]=(0,i.useState)(0),[ee,ae]=(0,i.useState)(!1),[te,se]=(0,i.useState)(!0),[ie,ne]=(0,i.useState)(!1),[re,oe]=(0,i.useState)(null),{window:le}=(0,m.A)(),ce=q.allContentfulTemplate.nodes[0].referencias,de=e=>{switch(e){case"APPROVED":return 0;case"REJECTED":return 1;default:return 2}},me=e=>{switch(e){case"APPROVED":default:return 3;case"REJECTED":return 2}};(0,i.useEffect)(()=>{(async()=>{const e=new r.A,a=e.get("transactionData");if(a&&!W){const r=`/${JSON.parse(atob(a)).requestId}`;try{const e=await d.A.checkPaymentPlaceToPay(r);if(200===e.status){if(""!==e.data.comprobanteB64&&e.data.payment.length>0){var t,s,i,n,o,l,m,p;const a={dbReference:e.data.reference,receipt:null===(t=e.data.payment)||void 0===t||null===(s=t[0])||void 0===s?void 0:s.receipt,value:null===(i=e.data.payment)||void 0===i||null===(n=i[0])||void 0===n?void 0:n.amount.to.total,cus:null===(o=e.data.payment)||void 0===o||null===(l=o[0])||void 0===l?void 0:l.authorization,method:null===(m=e.data.payment)||void 0===m||null===(p=m[0])||void 0===p?void 0:p.paymentMethodName,payments:e.data.request.payments,status:e.data.status.status,date:e.data.status.dateFormatted?`${(0,c.A)(e.data.status.dateFormatted.split(" ")[0])} ${e.data.status.dateFormatted.split(" ")[1]} ${e.data.status.dateFormatted.split(" ")[2]}`:"-",base64:e.data.comprobanteB64};ne("APPROVED"!==a.status&&"REJECTED"!==a.status),"APPROVED"===a.status&&(le.dataLayer=le.dataLayer||[],le.dataLayer.push({event:"pushEventGA",category:"HomePersonas",action:"ClicPagoCredito",label:"PagoExitoso"})),se(!1),Z(de(a.status)),X(a)}else if(""===e.data.comprobanteB64)if("PENDING"===e.data.status.status){var u,h,v,f,_,y,x,j;const a={dbReference:e.data.reference,receipt:null===(u=e.data.payment)||void 0===u||null===(h=u[0])||void 0===h?void 0:h.receipt,value:null===(v=e.data.payment)||void 0===v||null===(f=v[0])||void 0===f?void 0:f.amount.to.total,cus:null===(_=e.data.payment)||void 0===_||null===(y=_[0])||void 0===y?void 0:y.authorization,method:null===(x=e.data.payment)||void 0===x||null===(j=x[0])||void 0===j?void 0:j.paymentMethodName,payments:e.data.request.payments,status:e.data.status.status,date:e.data.status.dateFormatted?`${(0,c.A)(e.data.status.dateFormatted.split(" ")[0])} ${e.data.status.dateFormatted.split(" ")[1]} ${e.data.status.dateFormatted.split(" ")[2]}`:"-",base64:e.data.comprobanteB64};ne(!0),se(!1),Z(de(a.status)),X(a)}else le.location.href=le.location.origin+("localhost"===(null==le?void 0:le.location.hostname)?"/personas/pagos":"/portal-servicios/personas/pagos")}else se(!1),ae(!0)}catch(g){console.log(g),se(!1)}finally{e.remove("transactionData",{path:"/"})}}})()},[]);const pe=e=>new Intl.NumberFormat("es-ES").format(e)+(Number.isInteger(parseFloat(e))?",00":"");(0,i.useEffect)(()=>{const e=setTimeout(()=>{var e;H&&Q&&null!==(e=Q.data)&&void 0!==e&&e.userJwt||W||Y.toString()||(console.log("error checkThereIsInfo"),se(!1),ae(!0))},5e3);return()=>{clearTimeout(e)}},[]),(0,i.useEffect)(()=>{const e=setTimeout(()=>{(ie||W&&"APPROVED"!==W.status&&"REJECTED"!==W.status)&&location.reload()},45e3);return()=>{clearTimeout(e)}},[W]);return(0,x.jsxs)("div",{className:"o-confirmation-payment "+(te?" --while-loading":""),children:[re&&(0,x.jsx)(x.Fragment,{children:re}),te?(0,x.jsx)(v.A,{size:"__big"}):!ee&&Y.toString()&&W?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("div",{className:"o-confirmation-payment-breadcrumb",children:(0,x.jsx)(p.A,{content:ce[Y].migaDePan})}),(null===(e=ce[Y])||void 0===e||null===(a=e.lista)||void 0===a?void 0:a.length)>0&&(0,x.jsx)(f.A,{itemList:ce[Y].lista,currentIndex:2}),ce[Y].imagen&&ce[Y].imagen[0]&&ce[Y].imagen[0].gatsbyImage?(0,x.jsx)(n.G,{loading:"eager",image:ce[Y].imagen[0].gatsbyImage,alt:ce[Y].imagen[0].title,title:ce[Y].imagen[0].title,className:"o-confirmation-payment-img"}):ce[Y].imagen[0].file&&ce[Y].imagen[0].file.url&&(0,x.jsx)("img",{src:(0,y.s)(ce[Y].imagen[0]),alt:ce[Y].imagen[0].title,title:ce[Y].imagen[0].title,className:"o-confirmation-payment-img"}),(0,x.jsx)("h1",{className:`o-confirmation-payment-title ${(e=>{switch(e){case 0:return" --ok";case 1:return" --failed";default:return" --pending"}})(Y)}`,children:ce[Y].nombre}),(0,x.jsxs)("div",{className:"o-confirmation-payment-card",children:[W.payments&&W.payments.length>1?(0,x.jsxs)("div",{className:"o-confirmation-payment-card-list",children:[(0,x.jsxs)("div",{className:"o-confirmation-payment-card-list__row",children:[ce[Y].referencias[0]&&ce[Y].referencias[0].lista[0]&&(0,x.jsx)("h3",{className:"o-confirmation-payment-card-list__row-title",children:null!==(t=ce[Y].referencias[0].lista[0])&&void 0!==t?t:" Valor"}),(0,x.jsx)("p",{className:"o-confirmation-payment-card-list__row-value",children:`$${pe(W.value)}`})]}),1!==Y&&(0,x.jsxs)("div",{className:"o-confirmation-payment-card-list__row",children:[ce[Y].referencias[0]&&ce[Y].referencias[0].lista[1]&&(0,x.jsx)("h3",{className:"o-confirmation-payment-card-list__row-title",children:null!==(j=ce[Y].referencias[0].lista[1])&&void 0!==j?j:" Banco"}),(0,x.jsx)("p",{className:"o-confirmation-payment-card-list__row-value",children:null!==(g=W.method)&&void 0!==g?g:"-"})]}),(0,x.jsxs)("div",{className:"o-confirmation-payment-card-list__row",children:[ce[Y].referencias[0]&&ce[Y].referencias[0].lista[1!==Y?2:1]&&(0,x.jsx)("h3",{className:"o-confirmation-payment-card-list__row-title",children:null!==(w=ce[Y].referencias[0].lista[1!==Y?2:1])&&void 0!==w?w:" Referencia de trasacción"}),(0,x.jsx)("p",{className:"o-confirmation-payment-card-list__row-value",children:null!==(N=W.dbReference)&&void 0!==N?N:"-"})]}),(0,x.jsxs)("div",{className:"o-confirmation-payment-card-list__row",children:[ce[Y].referencias[0]&&ce[Y].referencias[0].lista[1!==Y?3:2]&&(0,x.jsx)("h3",{className:"o-confirmation-payment-card-list__row-title",children:null!==(A=ce[Y].referencias[0].lista[1!==Y?3:2])&&void 0!==A?A:" Referencia y descripción"}),(0,x.jsx)("div",{className:"o-confirmation-payment-card-list__row-values",children:null===(b=W.payments)||void 0===b?void 0:b.map((e,a)=>{var t;return(0,x.jsxs)("p",{className:"o-confirmation-payment-card-list__row-value",children:[e.reference,(0,x.jsx)("span",{children:null!==(t=e.description)&&void 0!==t?t:"-"})]},`o-confirmation-payment-card-list__row-value-${a}`)}
1)})]}),1!==Y&&(0,x.jsxs)("div",{className:"o-confirmation-payment-card-list__row",children:[ce[Y].referencias[0]&&ce[Y].referencias[0].lista[4]&&(0,x.jsx)("h3",{className:"o-confirmation-payment-card-list__row-title",children:null!==(E=ce[Y].referencias[0].lista[4])&&void 0!==E?E:" Autorización CUS"}),(0,x.jsx)("p",{className:"o-confirmation-payment-card-list__row-value",children:null!==(C=W.cus)&&void 0!==C?C:"-"})]}),(0,x.jsxs)("div",{className:"o-confirmation-payment-card-list__row",children:[ce[Y].referencias[0]&&ce[Y].referencias[0].lista[1!==Y?5:3]&&(0,x.jsx)("h3",{className:"o-confirmation-payment-card-list__row-title",children:null!==(S=ce[Y].referencias[0].lista[1!==Y?5:3])&&void 0!==S?S:" Fecha y hora"}),(0,x.jsx)("p",{className:"o-confirmation-payment-card-list__row-value",children:null!==(P=W.date)&&void 0!==P?P:"-"})]})]}):(0,x.jsxs)("div",{className:"o-confirmation-payment-card-list",children:[(0,x.jsxs)("div",{className:"o-confirmation-payment-card-list__row",children:[ce[Y].referencias[1]&&ce[Y].referencias[1].lista[0]&&(0,x.jsx)("h3",{className:"o-confirmation-payment-card-list__row-title",children:null!==(R=ce[Y].referencias[1].lista[0])&&void 0!==R?R:" Valor"}),(0,x.jsx)("p",{className:"o-confirmation-payment-card-list__row-value",children:`$${pe(W.value)}`})]}),1!==Y&&(0,x.jsxs)("div",{className:"o-confirmation-payment-card-list__row",children:[ce[Y].referencias[1]&&ce[Y].referencias[1].lista[1]&&(0,x.jsx)("h3",{className:"o-confirmation-payment-card-list__row-title",children:null!==(I=ce[Y].referencias[1].lista[1])&&void 0!==I?I:" Banco"}),(0,x.jsx)("p",{className:"o-confirmation-payment-card-list__row-value",children:null!==(T=W.method)&&void 0!==T?T:"-"})]}),(0,x.jsxs)("div",{className:"o-confirmation-payment-card-list__row",children:[ce[Y].referencias[1]&&ce[Y].referencias[1].lista[1!==Y?2:1]&&(0,x.jsx)("h3",{className:"o-confirmation-payment-card-list__row-title",children:null!==(D=ce[Y].referencias[1].lista[1!==Y?2:1])&&void 0!==D?D:" Referencia transaccion"}),(0,x.jsx)("p",{className:"o-confirmation-payment-card-list__row-value",children:null!==(F=W.dbReference)&&void 0!==F?F:"-"})]}),(0,x.jsxs)("div",{className:"o-confirmation-payment-card-list__row",children:[ce[Y].referencias[1]&&ce[Y].referencias[1].lista[1!==Y?3:2]&&(0,x.jsx)("h3",{className:"o-confirmation-payment-card-list__row-title",children:null!==(B=ce[Y].referencias[1].lista[1!==Y?3:2])&&void 0!==B?B:" Referencia pago"}),(0,x.jsx)("p",{className:"o-confirmation-payment-card-list__row-value",children:null!==(L=W.payments[0].reference)&&void 0!==L?L:"-"})]}),(0,x.jsxs)("div",{className:"o-confirmation-payment-card-list__row",children:[ce[Y].referencias[1]&&ce[Y].referencias[1].lista[1!==Y?4:3]&&(0,x.jsx)("h3",{className:"o-confirmation-payment-card-list__row-title",children:null!==($=ce[Y].referencias[1].lista[1!==Y?4:3])&&void 0!==$?$:" Descripción"}),(0,x.jsx)("p",{className:"o-confirmation-payment-card-list__row-value",children:null!==(k=W.payments[0].description)&&void 0!==k?k:"-"})]}),1!==Y&&(0,x.jsxs)("div",{className:"o-confirmation-payment-card-list__row",children:[ce[Y].referencias[1]&&ce[Y].referencias[1].lista[5]&&(0,x.jsx)("h3",{className:"o-confirmation-payment-card-list__row-title",children:null!==(O=ce[Y].referencias[1].lista[5])&&void 0!==O?O:" Autorización CUS"}),(0,x.jsx)("p",{className:"o-confirmation-payment-card-list__row-value",children:null!==(M=W.cus)&&void 0!==M?M:"-"})]}),(0,x.jsxs)("div",{className:"o-confirmation-payment-card-list__row",children:[ce[Y].referencias[1]&&ce[Y].referencias[1].lista[1!==Y?6:4]&&(0,x.jsx)("h3",{className:"o-confirmation-payment-card-list__row-title",children:null!==(V=ce[Y].referencias[1].lista[1!==Y?6:4])&&void 0!==V?V:" Fecha y hora"}),(0,x.jsx)("p",{className:"o-confirmation-payment-card-list__row-value",children:null!==(z=W.date)&&void 0!==z?z:"-"})]})]}),("APPROVED"===W.status||"REJECTED"===W.status)&&W.base64&&""!==W.base64&&(0,x.jsx)(u.A,{type:"button",classname:"o-confirmation-payment-card__dowloand secondary",text:"DESCARGAR COMPROBANTE",isDisabled:!1,onClickAction:()=>{((e,a)=>{const t=atob(e),s=new Array(t.length);for(let r=0;r<t.length;r++)s[r]=t.charCodeAt(r);const i=new Uint8Array(s);try{const e=new Blob([i],{type:"application/pdf"}),t=document.createElement("a");t.href=URL.createObjectURL(e);const s=a;
1t.download=s,t.click(),oe&&oe((0,x.jsx)(h.A,{setActiveToast:oe,isOk:!0,message:"¡Tu certificado ha sido descargado con éxito!",position:"down-right",duration:4e3}))}catch(n){console.error(n),oe&&oe((0,x.jsx)(h.A,{setActiveToast:oe,isOk:!1,message:"Lo sentimos, no fue posible descargar el certificado",position:"down-right",duration:4e3}))}})(W.base64,"Comprobante")},loader:!1}),(null===(J=ce[Y])||void 0===J||null===(U=J.referencias[me(W.status)])||void 0===U?void 0:U.copyBoton)&&(0,x.jsx)(u.A,{type:"button",classname:"o-confirmation-payment-card__buttonFinish primary",text:null===(G=ce[Y])||void 0===G?void 0:G.referencias[me(W.status)].copyBoton,isDisabled:!1,onClickAction:()=>{(null==K?void 0:K.get)===l.m.BUSINESS?location.href="localhost"===(null==le?void 0:le.location.hostname)?"/empresas/pagos":"/portal-servicios/empresas/pagos":location.href="localhost"===(null==le?void 0:le.location.hostname)?"/personas/pagos":"/portal-servicios/personas/pagos"},loader:!1})]})]}):(0,x.jsx)(_.A,{})]})},g=t(68315);var w=()=>{var e,a,t;const i=(0,s.useStaticQuery)("2991154181"),n=null==i||null===(e=i.allContentfulMetaInfo)||void 0===e?void 0:e.nodes[0],r=null==i||null===(a=i.allContentfulHome)||void 0===a||null===(t=a.nodes[0])||void 0===t?void 0:t.estaActivoPagos;return(0,x.jsx)(g.A,{data:n,sideMenu:(0,x.jsx)(x.Fragment,{}),isActive:r,children:(0,x.jsx)(j,{})})}},99476:function(e,a,t){var s=t(35027),i=t(17325),n=t(74848);a.A=()=>(0,n.jsx)("div",{className:"o-we-sorry",children:(0,n.jsxs)("div",{className:"o-we-sorry__content",children:[(0,n.jsx)("img",{className:"o-we-sorry__content__img",src:s.A,alt:"we are sorry image",title:"we are sorry"}),(0,n.jsx)("h1",{className:"o-we-sorry__content__title",children:"¡Ups! Algo salió mal"}),(0,n.jsx)("p",{className:"o-we-sorry__content__desc",children:"En este momento no podemos completar la operación, te recomendamos actualizar la página o intentar más tarde"}),(0,n.jsx)("div",{className:"o-we-sorry__content__btn",children:(0,n.jsx)(i.A,{type:"link",classname:"secondary o-we-sorry__content__btn__back",text:"Volver al inicio",isDisabled:!1,href:"/portal-servicios"})})]})})}}]);
2//# sourceMappingURL=component---src-pages-pagos-confirmacion-estado-pago-tsx-39dd9514ddaf41508fd1.js.map

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.