/** * CheckoutPaymentForm — Formulaire de paiement Hyperswitch * v0.402 P1.5: Intégration @juspay-tech/react-hyper-js pour client_secret */ import { useState, useEffect } from 'react'; import { loadHyper } from '@juspay-tech/hyper-js'; import { HyperElements, UnifiedCheckout } from '@juspay-tech/react-hyper-js'; import { Button } from '@/components/ui/button'; import type { HyperInstance } from '@juspay-tech/hyper-js'; interface CheckoutPaymentFormProps { clientSecret: string; returnUrl?: string; // Set at payment creation; kept for potential override onCancel: () => void; } function PaymentFormInner({ onCancel }: { onCancel: () => void }) { return (
Configure VITE_HYPERSWITCH_PUBLISHABLE_KEY in .env.local to enable payment form.
For now, you can complete payment via the Hyperswitch hosted page or use simulated payments (HYPERSWITCH_ENABLED=false).