import type {Gateway} from '@givewp/forms/types'; import PayPalLogo from './PayPalLogo'; type PayPalStandardGatewaySettings = { fields: { heading: string; subheading: string; body: string; }; }; let fields: PayPalStandardGatewaySettings['fields']; const paypalStandardGateway: Gateway = { id: 'paypal', initialize() { fields = this.settings.fields; }, Fields() { return (
{fields.heading}
{fields.subheading}: {fields.body}
); } } window.givewp.gateways.register(paypalStandardGateway);