PageSourceSearch

https://sayy.ai/assets/RazorpayAuthPage-BTd_mVRS.js

js sayy.ai collected 2026-10-05 12:54:52 UTC 6,401 bytes, 1 lines download raw bytes

1import{j as e}from"./crypto-BhrlFu3K.js";import{u as v,h as w,r as s,L as d}from"./routing-BWf71gZX.js";import{n as N}from"./notifications-CP6RlmgK.js";import"./index-D9Fb1lmT.js";import{razorpayCallback as C}from"./agent-B9rs43Gt.js";import{aA as S,A as k,t as m,am as x}from"./ui-CIKeZNy-.js";import"./date-CROXBL6n.js";import"./utils-Dtd7kdR7.js";import"./state-BY8jJeYO.js";const G=()=>{v();const[t]=w(),[A,n]=s.useState({}),[u,i]=s.useState(!0),[h,a]=s.useState(!1),[o,l]=s.useState("");return s.useEffect(()=>{const c=()=>{const r=t.get("payment_id")||`razorpay_${Date.now()}`,g=t.get("order_id")||`order_${Date.now()}`,f=t.get("amount")||"0.00",p=t.get("currency")||"INR",b=t.get("status")||"success",j=t.get("merchant_id")||"merchant_123",y=t.get("timestamp")||new Date().toISOString();n({paymentId:r,orderId:g,amount:f,currency:p,status:b,merchantId:j,timestamp:y})};(async()=>{i(!0),l("");try{const r=await C(window.location.href);if(r&&r.error){l(r.result),a(!1),c();return}else n(r.result),a(!0),N.success("Razorpay connection verified!")}catch{a(!1),c()}finally{i(!1)}})()},[t]),u?e.jsx("div",{className:"min-h-screen bg-gradient-to-br from-indigo-50 via-white to-purple-50 flex items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"animate-spin rounded-full h-20 w-20 border-4 border-indigo-200 border-t-indigo-600 mx-auto mb-6"}),e.jsx("h2",{className:"text-2xl font-bold text-gray-800 mb-3",children:"Processing Authentication"}),e.jsx("p",{className:"text-gray-600 max-w-sm",children:"Please wait while we verify your Razorpay connection..."})]})}):h?e.jsx("div",{className:"min-h-screen bg-gradient-to-br from-indigo-50 via-white to-purple-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:"bg-white rounded-3xl shadow-2xl border border-gray-100 p-10 max-w-md w-full relative overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-indigo-100 to-purple-100 rounded-full -translate-y-16 translate-x-16 opacity-50"}),e.jsx("div",{className:"absolute bottom-0 left-0 w-24 h-24 bg-gradient-to-tr from-green-100 to-blue-100 rounded-full translate-y-12 -translate-x-12 opacity-50"}),e.jsxs("div",{className:"relative text-center",children:[e.jsxs("div",{className:"relative mb-8",children:[e.jsx("div",{className:"w-20 h-20 bg-gradient-to-br from-green-400 to-emerald-500 rounded-full flex items-center justify-center mx-auto shadow-lg animate-pulse",children:e.jsx(x,{className:"w-10 h-10 text-white"})}),e.jsx("div",{className:"absolute -top-2 -right-2 w-8 h-8 bg-green-500 rounded-full flex items-center justify-center animate-bounce",children:e.jsx(x,{className:"w-5 h-5 text-white"})})]}),e.jsx("h1",{className:"text-3xl font-bold bg-gradient-to-r from-indigo-600 to-purple-600 bg-clip-text text-transparent mb-4",children:"Authentication Successful!"}),e.jsx("p",{className:"text-gray-600 mb-10 text-lg leading-relaxed",children:"Your Razorpay account has been successfully connected and is ready to use."}),e.jsxs(d,{to:"/admin/business/payments",className:"group relative inline-flex items-center justify-center space-x-3 bg-gradient-to-r from-indigo-600 to-purple-600 text-white rounded-xl px-8 py-4 font-semibold hover:from-indigo-700 hover:to-purple-700 transition-all duration-300 transform hover:scale-105 hover:shadow-xl w-full",children:[e.jsx(m,{className:"w-5 h-5 group-hover:animate-pulse"}),e.jsx("span",{children:"Go To Dashboard"}),e.jsx("div",{className:"absolute inset-0 bg-white opacity-0 group-hover:opacity-10 rounded-xl transition-opacity duration-300"})]}),e.jsxs("div",{className:"mt-8 flex items-center justify-center space-x-2 text-sm text-gray-500",children:[e.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"}),e.jsx("span",{children:"Connection verified and secure"})]})]})]})}):e.jsx("div",{className:"min-h-screen bg-gradient-to-br from-red-50 via-white to-orange-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:"bg-white rounded-3xl shadow-2xl border border-gray-100 p-10 max-w-md w-full relative overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-red-100 to-orange-100 rounded-full -translate-y-16 translate-x-16 opacity-50"}),e.jsx("div",{className:"absolute bottom-0 left-0 w-24 h-24 bg-gradient-to-tr from-red-100 to-pink-100 rounded-full translate-y-12 -translate-x-12 opacity-50"}),e.jsxs("div",{className:"relative text-center",children:[e.jsx("div",{className:"relative mb-8",children:e.jsx("div",{className:"w-20 h-20 bg-gradient-to-br from-red-400 to-red-500 rounded-full flex items-center justify-center mx-auto 
1shadow-lg",children:e.jsx(S,{className:"w-10 h-10 text-white"})})}),e.jsx("h1",{className:"text-3xl font-bold bg-gradient-to-r from-red-600 to-orange-600 bg-clip-text text-transparent mb-4",children:"Authentication Failed"}),e.jsxs("div",{className:"mb-8",children:[e.jsx("p",{className:"text-gray-600 mb-4 text-lg leading-relaxed",children:"We couldn't verify your Razorpay connection."}),o&&e.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 mb-4",children:e.jsxs("div",{className:"flex items-start space-x-2",children:[e.jsx(k,{className:"w-5 h-5 text-red-500 mt-0.5 flex-shrink-0"}),e.jsx("p",{className:"text-red-700 text-sm",children:o})]})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("button",{onClick:()=>window.location.reload(),className:"group relative inline-flex items-center justify-center space-x-3 bg-gradient-to-r from-red-600 to-orange-600 text-white rounded-xl px-8 py-4 font-semibold hover:from-red-700 hover:to-orange-700 transition-all duration-300 transform hover:scale-105 hover:shadow-xl w-full",children:e.jsx("span",{children:"Try Again"})}),e.jsxs(d,{to:"/admin/business/payments",className:"group relative inline-flex items-center justify-center space-x-3 bg-gray-100 text-gray-700 rounded-xl px-8 py-4 font-semibold hover:bg-gray-200 transition-all duration-300 w-full",children:[e.jsx(m,{className:"w-5 h-5"}),e.jsx("span",{children:"Go To Dashboard"})]})]}),e.jsxs("div",{className:"mt-8 flex items-center justify-center space-x-2 text-sm text-gray-500",children:[e.jsx("div",{className:"w-2 h-2 bg-red-500 rounded-full animate-pulse"}),e.jsx("span",{children:"Connection verification failed"})]})]})]})})};export{G 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.