1import{_ as A}from"./Layout-C89TAZrY.js";import{d as O,u as M,b as l,r as B,e as F,J as V,o as d,l as E,m as L,a as o,x as j,t as c,c as h,z as p,n as q,g as v}from"./main-BMgC90kc.js";import{u as J,b as G}from"./useApiPlatform-Cc7ihsaY.js";import"./mixins-Dls10kYM.js";import"./location-D88ZdvxG.js";const $={class:"ct-block ct-block--info ct-block--step-payment"},z={class:"container"},H={class:"row"},U={class:"col-12"},W={class:"col-content"},Y=o("div",{class:"headline-wrap"},[o("h3",{class:"headline headline--center"},"Quét mã QR Code Äá» thanh toán")],-1),K={class:"row"},X={class:"col-md-12"},Z={class:"qr-code-payment"},oo=["src"],to=["href"],so=o("i",{class:"w-ico w-ico--16 w-ico--momo"},null,-1),eo=o("span",null,"Và MoMo",-1),no=[so,eo],co=o("i",{class:"w-ico w-ico--16 w-ico--download"},null,-1),ao=o("span",null,"Tải vá» mã QR Code",-1),lo=[co,ao],io={class:"d-flex flex-column align-items-center gap-_3"},ro=o("p",null,"Sau khi thanh toán, nhấp và o nút bên dưá»i",-1),uo=["disabled"],mo=o("i",{class:"w-ico w-ico--16 w-ico--check"},null,-1),_o=o("span",null,"Tôi Äã hoà n tất thanh toán trên App",-1),ho=[mo,_o],po={key:0,class:"error-text"},fo={class:"row mt-4"},wo={class:"col-12"},bo={class:"details-list"},Co=o("div",{class:"row"},[o("div",{class:"col-md-12"},[o("h3",{class:"sub-headline"},"Thông tin ÄÆ¡n hà ng")])],-1),go={class:"details-list-info"},vo={class:"row g-0"},yo=o("span",{class:"col-4 col-md-5 col-l"},"Chá»§ hợp Äá»ng",-1),ko={class:"col-8 col-md-7 col-r"},To={class:"row g-0"},Do=o("span",{class:"col-4 col-md-5 col-l"},"Sá» Äiá»n thoại",-1),Io={class:"col-8 col-md-7 col-r"},So={class:"row g-0"},Po=o("span",{class:"col-4 col-md-5 col-l"},"Mã giao dá»ch",-1),Qo={class:"col-8 col-md-7 col-r"},Ro={class:"row g-0"},xo=o("span",{class:"col-4 col-md-5 col-l"},"Tá»ng tiá»n (Äã bao gá»m VAT)",-1),No={class:"col-8 col-md-7 col-r"},Ao={class:"col-tt",style:{color:"#0047FF"}},Oo={class:"col-ex"},Mo={class:"row g-0"},Bo=o("span",{class:"col-4 col-md-5 col-l"},"Thông tin",-1),Fo={class:"col-8 col-md-7 col-r"},Vo=["innerHTML"],$o={__name:"QrCodePayment",setup(Eo){const r=O(),{formatTime:y,numberToWords:k,formatCurrency:T}=J(),{getConfigPayment:D,getCheckPayment:u}=G(),f=M();f.setStep(3),f.setIsPage("fsafe_go");const a=l(!1),w=l(null),i=l(null),b=l(null),m=l(null),t=B({qrCode:"",fileName:"",fullName:"",phone:"",orderCode:"",deepLink:"",paygateTransactionId:"",total:"",countDown:"",checkPaymentObj:null,timeoutCountDown:null});F(()=>{I(),S()}),V(()=>{t.checkPaymentObj&&clearInterval(t.checkPaymentObj),clearTimeout(t.timeoutCountDown)});function I(){const s=sessionStorage.getItem("fsafeGoDataQrCode")?JSON.parse(sessionStorage.getItem("fsafeGoDataQrCode")):null;i.value=sessionStorage.orderid,b.value=sessionStorage.FSAFE_PAIDTYPE,s&&(t.qrCode="data:image/jpeg;base64, "+s.QRCodeInfo.ImageBase64,t.fileName=`QRCODE_${s.OrderCode}`||"",t.fullName=s.QRCodeInfo?s.QRCodeInfo.CustomerName:"",t.phone=s.QRCodeInfo?s.QRCodeInfo.PhoneNumber:"",t.orderCode=s.OrderCode||"",t.deepLink=s.QRCodeInfo.OpenInAppDeeplink||"",t.paygateTransactionId=s.PaygateTransactionID||"",t.total=s.QRCodeInfo?s.QRCodeInfo.TotalVAT:"",t.countDown=s.QRCodeInfo?s.QRCodeInfo.ExpireTime*60-120:0),sessionStorage.countDownSession&&(t.countDown=JSON.parse(sessionStorage.countDownSession))}function S(){D(x,b.value),u(_,parseInt(i.value)),C(),t.checkPaymentObj=setInterval((function(){u(_,parseInt(i.value))}).bind(this),15e3)}function P(){u(_,parseInt(i.value)),Q()}function Q(){a.value=!0,setTimeout(()=>{a.value=!1},5e3)}function _(s,e,n){const g=e.data.Code;if(g===1||g===2){window.scrollTo(0,0),r.push("/fsafe-go/finish").catch(()=>{}),clearTimeout(t.timeoutCountDown);return}else R()}function R(){t.countDown<=0&&(window.scrollTo(0,0),r.push("/fsafe-go/payment").catch(()=>{}))}function x(s,e,n){s&&e.data.content&&(m.value=e.data.content)}function C(){t.countDown>0?t.timeoutCountDown=setTimeout(()=>{t.countDown=t.countDown-1,w.value=Math.floor(t.countDown/60)+":"+y(t.countDown%60),C(),sessionStorage.countDownSession=t.countDown},1e3):r.push("/fsafe-go/payment").catch(()=>{})}function N(s,e){typeof window.downloadJPG<"u"&&window.downloadJPG(s,e);var n=document.createElement("a");n.setAttribute("href",e),n.setAttribute("download",s),n.click()}return(s,e)=>(d(),E(A,null,{default:L(()=>[o("section",$,[o("div",z,[o("div",H,[o("div",U,[o("div",W,[Y,o("div",K,[o("div",X,[o("div",Z,[o("img",{src:t.qrCode,alt:"QR Code"},null,8,oo),o("p",null,[j("Mã QR Code sẽ hết hạn sau "),o("b",null,c(w.value),1)]),t.deepLink?(d(),h("a",{key:0,class:"custom-btn custom-btn--xl custom-btn--momo custom-btn--w-ico custom-btn--w-ico-st mt-2 d-block d-md-none d-flex d-md-none",type:"button",href:t.deepLink},no,8,to)):p("",!0),o("button",{class:"custom-btn custom-btn--xl custom-btn--blue custom-btn--w-ico custom-btn--w-ico-st",type:"button",onClick:e[0]||(e[0]=n=>N(t.fileName,t.qrCode))},lo)])])]),o("div",io,[ro,o("button",{class:q(["custom-btn custom-btn--fsize custom-btn--w-ico custom-btn--w-ico-st",{"disabled-button":a.value}]),type:"button",onClick:e[1]||(e[1]=n=>P()),disabled:a.value},ho,10,uo),a.value?(d(),h("p",po,"Vui lòng chá» trong giây lát, há» thá»ng chưa nháºn ÄÆ°á»£c khoản thanh toán")):p("",!0)]),o("div",fo,[o("div",wo,[o("div",bo,[Co,o("ul",go,[o("li",vo,[yo,o("span",ko,c(t.fullName),1)]),o("li",To,[Do,o("span",Io,c(t.phone),1)]),o("li",So,[Po,o("span",Qo,c(t.paygateTransactionId),1)]),o("li",Ro,[xo,o("span",No,[o("span",Ao,c(v(T)(t.total)+"Ä"),1),o("span",Oo,c(v(k)(t.total)),1)])]),o("li",Mo,[Bo,o("span",Fo,c(t.orderCode),1)])]),m.value?(d(),h("section",{key:0,class:"mb-4 sec-payment-step2",innerHTML:m.value},null,8,Vo)):p("",!0)])])])])])])])])]),_:1}))}};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.