(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[939],{65403:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/payment-success",function(){return t(62459)}])},62459:function(e,s,t){"use strict";t.r(s),t.d(s,{__N_SSP:function(){return l},default:function(){return Index}});var r=t(85893),n=t(67294),i=t(11163),a=t(51034),c=t(89226),p=t.n(c),d=t(28276),o=t(85551),l=!0;function Index(){let e=(0,i.useRouter)(),{t:s}=(0,d.$G)(""),[t,c]=(0,n.useState)(!1),[l,_]=(0,n.useState)(!1),confirmPaymentSuccess=async(e,s)=>{try{let t=await (0,a.qC)("".concat("https://app.documan.am/api","/order-process"),{orderId:e,paymentId:s},{returnError:!0});t.data?_(!0):c(!0)}catch(e){console.log(e)}};return(0,n.useEffect)(()=>{let s=e.locale;localStorage.setItem("lang",s||"en");let{flowOrderId:t,resposneCode:r,paymentID:n}=e.query;confirmPaymentSuccess(t,n)},[]),(0,r.jsxs)("div",{className:p().wrapper,children:[t&&(0,r.jsxs)("div",{className:p().payment_modal_wrapper,children:[(0,r.jsx)("img",{src:"/icons/ic_payment_success.svg",alt:""}),(0,r.jsx)("div",{className:p().title,children:s("payment-success-title")}),(0,r.jsxs)("div",{className:p().description_wrapper,children:[(0,r.jsx)("div",{className:p().description,children:s("payment-success-description_1")}),(0,r.jsx)("br",{}),(0,r.jsx)("div",{className:p().description,children:s("payment-success-description_2")}),(0,r.jsx)("br",{}),(0,r.jsx)("div",{className:p().description,children:s("payment-success-description_3")}),(0,r.jsx)("div",{className:p().description,children:s("payment-success-description_4")})]}),(0,r.jsx)(o.Z,{style:{width:240,padding:"6px",minHeight:"48px"},text:s("payment-button-title"),to:"/dashboard"})]}),l&&(0,r.jsxs)("div",{className:p().payment_modal_wrapper,children:[(0,r.jsx)("img",{src:"/icons/ic_payment_error.svg",alt:""}),(0,r.jsx)("div",{className:p().title,children:s("payment-error-title")}),(0,r.jsxs)("div",{className:p().description_wrapper,children:[(0,r.jsx)("div",{className:p().description,children:s("payment-error-description_1")}),(0,r.jsx)("br",{}),(0,r.jsx)("div",{className:p().description,children:s("payment-error-description_2")}),(0,r.jsx)("div",{className:p().description,children:s("payment-error-description_3")})]}),(0,r.jsx)(o.Z,{style:{width:240,padding:"6px",minHeight:"48px"},text:s("payment-button-title"),to:"/dashboard"})]})]})}},89226:function(e){e.exports={wrapper:"payment_wrapper__4Wv02",payment_modal_wrapper:"payment_payment_modal_wrapper__7u04n",title:"payment_title__XBt_o",description_wrapper:"payment_description_wrapper__XaJg_",description:"payment_description__Ydrbi"}}},function(e){e.O(0,[774,888,179],function(){return e(e.s=65403)}),_N_E=e.O()}]);