/** * CheckoutErrorView — Échec ou annulation du paiement * v0.402 P1.2: Page affichée après redirect Hyperswitch (order failed/cancelled) */ import { Link } from 'react-router-dom'; import { AlertCircle, ShoppingCart } from 'lucide-react'; import { Button } from '@/components/ui/button'; interface CheckoutErrorViewProps { orderId?: string; status?: string; } export function CheckoutErrorView({ orderId, status }: CheckoutErrorViewProps) { const isCancelled = status === 'cancelled' || status === 'canceled'; const title = isCancelled ? 'Paiement annulé' : 'Échec du paiement'; const message = isCancelled ? 'Vous avez annulé le paiement. Votre panier n\'a pas été modifié.' : 'Le paiement n\'a pas pu être traité. Veuillez réessayer ou utiliser une autre méthode.'; return (

{title}

{message}

{orderId && (

Référence : {orderId.slice(0, 8)}…

)}
); }