-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUpgradeAccount-a5611593.js
1 lines (1 loc) · 5.07 KB
/
UpgradeAccount-a5611593.js
1
import{A as k}from"./AppLayout-111b7951.js";import{Q as b,T as P,r as d,x as A,o as n,c as _,w as g,a as t,d as i,g as E,t as c,F as C,e as u}from"./app-8923e865.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./LazyImage-bcb21659.js";const L={class:"py-12"},S={class:"max-w-3xl mx-auto sm:px-6 lg:px-8"},T={class:"bg-white dark:bg-gray-800 overflow-hidden shadow-xl sm:rounded-lg"},M={class:"p-6 lg:p-8 bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700"},B={class:"mt-4 space-y-2"},q={class:"text-gray-700 dark:text-gray-300"},I={class:"mt-2 text-gray-600 dark:text-gray-400"},O={key:0,class:"mt-6 p-4 bg-yellow-50 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200 rounded-md"},U={key:1,class:"mt-4 p-4 bg-red-100 dark:bg-red-900 text-red-700 dark:text-red-200 rounded-md"},D={key:2,class:"mt-4 text-center text-gray-600 dark:text-gray-400"},V={__name:"UpgradeAccount",props:{paypalClientId:String},setup(y){const m=y,x=b(),p=P({paypal_order_id:null}),s=d(null),o=d(!1),f=["10 Full Practice tests (500 Questions, Answers and Explanations) from the current CCAT","10 Full PDF files with Questions and Answers (500 ADDITIONAL Questions and Answers and Explanations)","1000+ Verbal practice questions","1000+ Math & Logic practice questions","1000+ Spatial Reasoning practice questions","Detailed Explanations for ALL Questions ","Original Tests in the same practice conditions","Weekly updates with new questions","Bonus: 3-month EasyAce.AI PRO membership!"],v=d(new Date().toLocaleString("default",{month:"long",year:"numeric"})),w=(r,e)=>{var a=function(){typeof r<"u"&&(window.location=r)};return gtag("event","conversion",{send_to:"AW-16743315494/P4MSCMX8l94ZEKbw6q8-",value:49.99,currency:"USD",transaction_id:"",event_callback:a}),!1},h=()=>{paypal.Buttons({createOrder:(r,e)=>e.order.create({purchase_units:[{amount:{value:"0.09"}}]}),onApprove:(r,e)=>(o.value=!0,s.value=null,e.order.capture().then(function(a){a.status==="COMPLETED"?(p.paypal_order_id=a.id,w(void 0,a.id),p.post(route("upgrade.account.process"),{preserveState:!0,preserveScroll:!0,onSuccess:l=>{x.props.auth.user?window.location.href=route("dashboard"):window.location.href=route("register")},onError:l=>{o.value=!1,s.value="There was an error processing your upgrade. Please try again or contact support.",console.error("Server-side error:",l)}})):(o.value=!1,s.value="Payment was not completed. Please try again.",console.error("Payment not completed:",a))}).catch(function(a){o.value=!1,s.value="There was an error processing your payment. Please try again.",console.error("PayPal Capture Error:",a)})),onError:r=>{o.value=!1,s.value="There was an error setting up the payment. Please try again or use a different payment method.",console.error("PayPal Error:",r)},onCancel:r=>{s.value="Payment was cancelled. If this was unintentional, please try again.",console.log("Payment cancelled:",r)}}).render("#paypal-button-container")};return A(()=>{const r=document.createElement("script");r.src=`https://www.paypal.com/sdk/js?client-id=${m.paypalClientId}`,r.addEventListener("load",h),r.addEventListener("error",()=>{s.value="There was an error loading the payment system. Please refresh the page or try again later."}),document.body.appendChild(r)}),(r,e)=>(n(),_(k,{title:"Upgrade Account"},{header:g(()=>e[0]||(e[0]=[t("h2",{class:"font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight"}," Upgrade Account ",-1)])),default:g(()=>[t("div",L,[t("div",S,[t("div",T,[t("div",M,[e[2]||(e[2]=t("h1",{class:"text-2xl font-bold text-gray-900 dark:text-white mb-2"}," Upgrade to Lifetime Access ",-1)),e[3]||(e[3]=t("div",{class:"flex items-center mb-6"},[t("span",{class:"text-3xl font-bold text-green-600 dark:text-green-400"},"$49.99"),t("span",{class:"ml-2 text-xl text-gray-500 dark:text-gray-400 line-through"},"$79.99"),t("span",{class:"ml-2 text-sm font-medium text-red-600 dark:text-red-400"},"TEMPORARY SALE")],-1)),e[4]||(e[4]=t("p",{class:"mt-4 text-gray-600 dark:text-gray-400 text-lg"}," Upgrade your account to get lifetime access to: ",-1)),t("ul",B,[(n(),i(C,null,E(f,(a,l)=>t("li",{key:l,class:"flex items-start"},[e[1]||(e[1]=t("svg",{class:"h-6 w-6 text-green-500 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"})],-1)),t("span",q,c(a),1)])),64))]),e[5]||(e[5]=t("p",{class:"mt-6 text-gray-600 dark:text-gray-400"}," More practice questions are added weekly. ",-1)),e[6]||(e[6]=t("p",{class:"mt-6 text-lg font-semibold text-gray-800 dark:text-gray-200"}," 98% of our users reported passing their exams using our prep solution. ",-1)),t("p",I," Latest Version CCAT "+c(v.value)+" Exams! ",1),r.$page.props.auth.user?u("",!0):(n(),i("div",O," Note: After successful payment, you'll be prompted to create an account to access your upgraded features. ")),s.value?(n(),i("div",U,c(s.value),1)):u("",!0),e[7]||(e[7]=t("div",{class:"mt-8 flex justify-center"},[t("div",{id:"paypal-button-container",class:"w-full max-w-md"})],-1)),o.value?(n(),i("div",D," Processing your payment... ")):u("",!0)])])])])]),_:1}))}};export{V as default};