|
1 | 1 | import Link from 'next/link' |
2 | 2 | import { NOIR_DONATE_DEFAULTS, type NoirDonateContent } from '@/lib/noir-home-defaults' |
3 | 3 | import PayPalHostedButton from './PayPalHostedButton' |
| 4 | +import PayPalDonateButton from './PayPalDonateButton' |
4 | 5 |
|
5 | | -// PayPal "No-Code Payments" hosted buttons, embedded inline (lazy-loaded + try/catch |
6 | | -// with a graceful link fallback — see PayPalHostedButton). Ticket + donation IDs: |
| 6 | +// Tickets use a PayPal "No-Code Payments" hosted button (SDK, iframe-isolated — |
| 7 | +// see PayPalHostedButton). Donations use the classic PayPal "Donate" button (a |
| 8 | +// plain <form>, see PayPalDonateButton) — a different PayPal product + id, no SDK. |
7 | 9 | const PAYPAL_TICKET_BUTTON = 'MGNNL73RQ88DG' |
8 | | -const PAYPAL_DONATE_BUTTON = 'QT6LRLS3DQTW4' |
| 10 | +const PAYPAL_DONATE_BUTTON = 'GCRR5BM8K8D22' |
9 | 11 | const ncpUrl = (id: string) => `https://www.paypal.com/ncp/payment/${id}` |
10 | 12 |
|
11 | 13 | export default function NoirDonateSection({ content }: { content?: NoirDonateContent | null }) { |
@@ -77,11 +79,7 @@ export default function NoirDonateSection({ content }: { content?: NoirDonateCon |
77 | 79 | <div className="nh-lab">Spenden</div> |
78 | 80 | <h3>{cardHeading}</h3> |
79 | 81 | <p className="nh-card-sub">{cardSubtext}</p> |
80 | | - <PayPalHostedButton |
81 | | - hostedButtonId={PAYPAL_DONATE_BUTTON} |
82 | | - fallbackUrl={ncpUrl(PAYPAL_DONATE_BUTTON)} |
83 | | - fallbackLabel="Jetzt spenden via PayPal" |
84 | | - /> |
| 82 | + <PayPalDonateButton hostedButtonId={PAYPAL_DONATE_BUTTON} label="Jetzt spenden via PayPal" /> |
85 | 83 | <div className="nh-bank"> |
86 | 84 | <div className="nh-bank-title">Spendenkonto</div> |
87 | 85 | <dl className="nh-bank-list"> |
|
0 commit comments