Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5d736a80ec | |||
| 410a892496 | |||
| 1958a80111 | |||
| 274c62abc2 | |||
| c94af344be |
1415
src/app/layout.tsx
1415
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";
|
import { Zap, Sparkles, Settings, Crown, Star, HelpCircle } from "lucide-react";
|
||||||
|
|
||||||
export default function FluxcityLanding() {
|
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 (
|
return (
|
||||||
<ThemeProvider
|
<ThemeProvider
|
||||||
defaultButtonVariant="shift-hover"
|
defaultButtonVariant="shift-hover"
|
||||||
@@ -88,19 +124,19 @@ export default function FluxcityLanding() {
|
|||||||
products={[
|
products={[
|
||||||
{
|
{
|
||||||
id: "apex-pro", brand: "Fluxcity", name: "Apex Pro Script", price: "$29.99", rating: 5,
|
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,
|
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,
|
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,
|
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"
|
gridVariant="three-columns-all-equal-width"
|
||||||
@@ -150,7 +186,7 @@ export default function FluxcityLanding() {
|
|||||||
plans={[
|
plans={[
|
||||||
{
|
{
|
||||||
id: "starter", price: "$19.99/mo", name: "Starter", buttons: [
|
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: "#" },
|
{ text: "Learn More", href: "#" },
|
||||||
],
|
],
|
||||||
features: [
|
features: [
|
||||||
@@ -160,7 +196,7 @@ export default function FluxcityLanding() {
|
|||||||
{
|
{
|
||||||
id: "professional", badge: "Most Popular", badgeIcon: Crown,
|
id: "professional", badge: "Most Popular", badgeIcon: Crown,
|
||||||
price: "$49.99/mo", name: "Professional", buttons: [
|
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: "#" },
|
{ text: "Start Trial", href: "#" },
|
||||||
],
|
],
|
||||||
features: [
|
features: [
|
||||||
@@ -169,7 +205,7 @@ export default function FluxcityLanding() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "elite", price: "$99.99/mo", name: "Elite", buttons: [
|
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: "#" },
|
{ text: "Contact Sales", href: "#" },
|
||||||
],
|
],
|
||||||
features: [
|
features: [
|
||||||
|
|||||||
Reference in New Issue
Block a user