feat: 미결제 서비스 전체 토스페이먼츠 결제 연결
products.ts — 7개 상품 신규 등록: - prompt_team (249,000원): 팀/기업 프롬프트 패키지 - automation_basic (50,000원): 단순 업무 자동화 - automation_advanced (150,000원): 자동화 심화 - website_starter (200,000원): 홈페이지 스타터 - website_business (1,000,000원): 홈페이지 비즈니스 - website_premium (2,000,000원): 홈페이지 프리미엄 PaymentButton — style prop 추가 (inline-style 페이지 대응) 프롬프트 서비스: 팀/기업 패키지 PaymentButton 연결 업무 자동화: 단순·심화 플랜 PaymentButton 연결 (대형은 협의가격→ContactModal 유지) 웹사이트 제작: 전 플랜 Link 버튼 → PaymentButton 전환 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,11 +8,12 @@ import { PRODUCTS } from '@/lib/products';
|
||||
interface PaymentButtonProps {
|
||||
productId: string;
|
||||
className?: string;
|
||||
style?: React.CSSProperties;
|
||||
children: React.ReactNode;
|
||||
returnUrl?: string;
|
||||
}
|
||||
|
||||
export default function PaymentButton({ productId, className, children, returnUrl }: PaymentButtonProps) {
|
||||
export default function PaymentButton({ productId, className, style, children, returnUrl }: PaymentButtonProps) {
|
||||
const [loading, setLoading] = useState(false);
|
||||
const router = useRouter();
|
||||
const supabase = createClient();
|
||||
@@ -86,11 +87,12 @@ export default function PaymentButton({ productId, className, children, returnUr
|
||||
const isTestMode = process.env.NEXT_PUBLIC_TOSS_CLIENT_KEY?.startsWith('test_');
|
||||
|
||||
return (
|
||||
<div style={{ display: 'inline-block', position: 'relative' }}>
|
||||
<div style={{ display: style ? 'block' : 'inline-block', position: 'relative' }}>
|
||||
<button
|
||||
onClick={handlePayment}
|
||||
disabled={loading}
|
||||
className={className}
|
||||
style={style}
|
||||
>
|
||||
{loading ? '결제 처리 중...' : children}
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user