1import{bi as k,k as w,u as P,r as n,j as e,h as S,I as b}from"./index-Dkk9Srv5.js";import{B as v}from"./button-DlbyMOSo.js";import{C as f,c as h}from"./card-C8-2Bkea.js";import{u as E}from"./use-page-title-6SAzhMBB.js";import{L as I}from"./loader-circle-CAvzmVJb.js";import{C as $}from"./circle-x-C0jws7Jh.js";import"./index-C5VogPKA.js";import"./createLucideIcon-CEkUfykS.js";function M(){const{partnerCode:c,orderId:r}=k.useParams(),o=w(),C=P(l=>l.language),t=S(C);E(t("決æ¸ãã£ã³ã»ã«"));const[g,i]=n.useState(!0),[a,y]=n.useState(0),j=10;return n.useEffect(()=>{(async()=>{var m,d,u;try{const x=await b().api["user-api"]["user-order"].orders[":orderNo"].$get({param:{orderNo:r}});if(x.ok){const s=(u=(d=(m=(await x.json()).data)==null?void 0:m.order)==null?void 0:d.data)==null?void 0:u.orderStatus;if(console.info("[PaymentCancel] Order status check:",{orderId:r,orderStatus:s,checkCount:a}),s==="paid"||s==="topup-already"||s==="esim-already"){console.info("[PaymentCancel] Payment confirmed via IPN, redirecting to success"),o({to:"/$partnerCode/payment/$orderId/success",params:{partnerCode:c,orderId:r},replace:!0});return}if(s==="pending"&&a<j){setTimeout(()=>{y(N=>N+1)},2e3);return}}i(!1)}catch(p){console.error("[PaymentCancel] Error checking order status:",p),i(!1)}})()},[a]),g?e.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",children:e.jsx(f,{className:"w-full max-w-md",children:e.jsxs(h,{className:"pt-6 text-center space-y-4",children:[e.jsx(I,{className:"h-16 w-16 text-blue-500 mx-auto animate-spin"}),e.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:t("決æ¸ç¢ºèªä¸...")}),e.jsxs("p",{className:"text-gray-600",children:[t("決æ¸ç¶æ³ã確èªãã¦ãã¾ãã"),e.jsx("br",{}),t("ãã°ãããå¾
ã¡ãã ããã")]})]})})}):e.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",children:e.jsx(f,{className:"w-full max-w-md",children:e.jsxs(h,{className:"pt-6 text-center space-y-4",children:[e.jsx($,{className:"h-16 w-16 text-yellow-500 mx-auto"}),e.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:t("決æ¸ãã£ã³ã»ã«")}),e.jsxs("p",{className:"text-gray-600",children:[t("決æ¸ããã£ã³ã»ã«ããã¾ããã"),e.jsx("br",{}),t("å度ã試ããã ããã")]}),e.jsx(v,{className:"w-full",onClick:()=>o({to:"/$partnerCode/payment",params:{partnerCode:c}}),children:t("決æ¸ç»é¢ã«æ»ã")})]})})})}export{M as component};
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.