Merge version_3 into main #4
1416
src/app/layout.tsx
1416
src/app/layout.tsx
File diff suppressed because it is too large
Load Diff
@@ -14,6 +14,42 @@ import FooterMedia from "@/components/sections/footer/FooterMedia";
|
||||
import { Zap, Sparkles, Settings, Crown, Star, HelpCircle } from "lucide-react";
|
||||
|
||||
export default function FluxcityLanding() {
|
||||
const handlePayPalCheckout = (productId: string, productName: string, price: string) => {
|
||||
// Extract numeric price
|
||||
const numericPrice = price.replace(/[^0-9.]/g, '');
|
||||
|
||||
// PayPal IPN endpoint
|
||||
const paypalForm = document.createElement('form');
|
||||
paypalForm.method = 'POST';
|
||||
paypalForm.action = 'https://www.paypal.com/cgi-bin/webscr';
|
||||
paypalForm.style.display = 'none';
|
||||
|
||||
const fields = {
|
||||
'cmd': '_xclick',
|
||||
'business': 'FluxcityScripts@gmail.com',
|
||||
'item_name': productName,
|
||||
'item_number': productId,
|
||||
'amount': numericPrice,
|
||||
'currency_code': 'USD',
|
||||
'return': window.location.origin,
|
||||
'cancel_return': window.location.origin,
|
||||
'notify_url': `${window.location.origin}/api/paypal/ipn`,
|
||||
'no_shipping': '2',
|
||||
};
|
||||
|
||||
Object.entries(fields).forEach(([key, value]) => {
|
||||
const input = document.createElement('input');
|
||||
input.type = 'hidden';
|
||||
input.name = key;
|
||||
input.value = value as string;
|
||||
paypalForm.appendChild(input);
|
||||
});
|
||||
|
||||
document.body.appendChild(paypalForm);
|
||||
paypalForm.submit();
|
||||
document.body.removeChild(paypalForm);
|
||||
};
|
||||
|
||||
return (
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="shift-hover"
|
||||
@@ -88,19 +124,19 @@ export default function FluxcityLanding() {
|
||||
products={[
|
||||
{
|
||||
id: "apex-pro", brand: "Fluxcity", name: "Apex Pro Script", price: "$29.99", rating: 5,
|
||||
reviewCount: "1.2k", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AezWAAofjdiUub75PabFbpqZky/a-sleek-product-showcase-of-an-advanced--1772968138771-11c3ada6.png?_wi=1", imageAlt: "Apex Legends Pro Script"
|
||||
reviewCount: "1.2k", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AezWAAofjdiUub75PabFbpqZky/a-sleek-product-showcase-of-an-advanced--1772968138771-11c3ada6.png?_wi=1", imageAlt: "Apex Legends Pro Script", onProductClick: () => handlePayPalCheckout("apex-pro", "Apex Pro Script", "$29.99")
|
||||
},
|
||||
{
|
||||
id: "cod-elite", brand: "Fluxcity", name: "COD Elite Bundle", price: "$49.99", rating: 5,
|
||||
reviewCount: "2.8k", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AezWAAofjdiUub75PabFbpqZky/professional-call-of-duty-script-interfa-1772968139778-605559cf.png?_wi=1", imageAlt: "Call of Duty Elite Script Bundle"
|
||||
reviewCount: "2.8k", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AezWAAofjdiUub75PabFbpqZky/professional-call-of-duty-script-interfa-1772968139778-605559cf.png?_wi=1", imageAlt: "Call of Duty Elite Script Bundle", onProductClick: () => handlePayPalCheckout("cod-elite", "COD Elite Bundle", "$49.99")
|
||||
},
|
||||
{
|
||||
id: "fortnite-master", brand: "Fluxcity", name: "Fortnite Master Script", price: "$34.99", rating: 5,
|
||||
reviewCount: "1.9k", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AezWAAofjdiUub75PabFbpqZky/vibrant-fortnite-gameplay-showcase-with--1772968138533-0a849f07.png", imageAlt: "Fortnite Master Gaming Script"
|
||||
reviewCount: "1.9k", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AezWAAofjdiUub75PabFbpqZky/vibrant-fortnite-gameplay-showcase-with--1772968138533-0a849f07.png", imageAlt: "Fortnite Master Gaming Script", onProductClick: () => handlePayPalCheckout("fortnite-master", "Fortnite Master Script", "$34.99")
|
||||
},
|
||||
{
|
||||
id: "ultimate-bundle", brand: "Fluxcity", name: "Ultimate Gaming Bundle", price: "$99.99", rating: 5,
|
||||
reviewCount: "4.5k", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AezWAAofjdiUub75PabFbpqZky/a-high-octane-gaming-hero-image-showing--1772968138267-74e3311a.png?_wi=2", imageAlt: "Ultimate All-in-One Gaming Bundle"
|
||||
reviewCount: "4.5k", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AezWAAofjdiUub75PabFbpqZky/a-high-octane-gaming-hero-image-showing--1772968138267-74e3311a.png?_wi=2", imageAlt: "Ultimate All-in-One Gaming Bundle", onProductClick: () => handlePayPalCheckout("ultimate-bundle", "Ultimate Gaming Bundle", "$99.99")
|
||||
},
|
||||
]}
|
||||
gridVariant="three-columns-all-equal-width"
|
||||
@@ -150,7 +186,7 @@ export default function FluxcityLanding() {
|
||||
plans={[
|
||||
{
|
||||
id: "starter", price: "$19.99/mo", name: "Starter", buttons: [
|
||||
{ text: "Get Started", href: "#" },
|
||||
{ text: "Get Started", onClick: () => handlePayPalCheckout("starter", "Starter Plan", "$19.99") },
|
||||
{ text: "Learn More", href: "#" },
|
||||
],
|
||||
features: [
|
||||
@@ -160,7 +196,7 @@ export default function FluxcityLanding() {
|
||||
{
|
||||
id: "professional", badge: "Most Popular", badgeIcon: Crown,
|
||||
price: "$49.99/mo", name: "Professional", buttons: [
|
||||
{ text: "Upgrade Now", href: "#" },
|
||||
{ text: "Upgrade Now", onClick: () => handlePayPalCheckout("professional", "Professional Plan", "$49.99") },
|
||||
{ text: "Start Trial", href: "#" },
|
||||
],
|
||||
features: [
|
||||
@@ -169,7 +205,7 @@ export default function FluxcityLanding() {
|
||||
},
|
||||
{
|
||||
id: "elite", price: "$99.99/mo", name: "Elite", buttons: [
|
||||
{ text: "Choose Elite", href: "#" },
|
||||
{ text: "Choose Elite", onClick: () => handlePayPalCheckout("elite", "Elite Plan", "$99.99") },
|
||||
{ text: "Contact Sales", href: "#" },
|
||||
],
|
||||
features: [
|
||||
|
||||
Reference in New Issue
Block a user