-
-
- {label}
- {icon}
- >
- }
- name="paymentMethod"
- value={validPaymentMethod}
- cssOverrides={
- selected
- ? checkedRadioLabelColour
- : defaultRadioLabelColour
- }
- onChange={() => {
- setPaymentMethod(validPaymentMethod);
- setPaymentMethodError(undefined);
- // Track payment method selection with QM
- sendEventPaymentMethodSelected(validPaymentMethod);
- }}
- />
-
- {validPaymentMethod === 'Stripe' && selected && (
-
-
- {
- // no-op
- }}
- onExpiryChange={() => {
- // no-op
- }}
- onCvcChange={() => {
- // no-op
- }}
- errors={{}}
- recaptcha={
- {
- setStripeClientSecretInProgress(true);
- setRecaptchaToken(token);
- void stripeCreateSetupIntentRecaptcha(
- isTestUser,
- stripePublicKey,
- token,
- ).then((client_secret) => {
- setStripeClientSecret(client_secret);
- setStripeClientSecretInProgress(false);
- });
- }}
- onRecaptchaExpired={() => {
- setRecaptchaToken(undefined);
- }}
- />
- }
- />
-
- )}
-
- {validPaymentMethod === 'DirectDebit' && selected && (
-
- {
- setAccountHolderName(name);
- }}
- updateAccountNumber={(number: string) => {
- setAccountNumber(number);
- }}
- updateSortCode={(sortCode: string) => {
- setSortCode(sortCode);
- }}
- updateAccountHolderConfirmation={(
- confirmation: boolean,
- ) => {
- setAccountHolderConfirmation(confirmation);
- }}
- recaptcha={
- {
- setRecaptchaToken(token);
- }}
- onRecaptchaExpired={() => {
- setRecaptchaToken(undefined);
- }}
- />
- }
- formError={''}
- errors={{}}
- />
-
- )}
-
- );
- })}
-