@@ -75,10 +75,10 @@ interface CheckoutFormProps {
7575 } ;
7676 paymentInfo ?: {
7777 type :
78- | Stripe . PaymentMethod . Type
79- | 'google_iap'
80- | 'apple_iap'
81- | 'external_paypal' ;
78+ | Stripe . PaymentMethod . Type
79+ | 'google_iap'
80+ | 'apple_iap'
81+ | 'external_paypal' ;
8282 last4 ?: string ;
8383 brand ?: string ;
8484 customerSessionClientSecret ?: string ;
@@ -152,7 +152,8 @@ export function CheckoutForm({
152152
153153 //Show or hide the PayPal button and Link
154154 const hasSavedPaymentMethod = ! ! event ?. value ?. payment_method ?. id ;
155- const isNewCardSelected = event ?. value ?. type === 'card' && ! hasSavedPaymentMethod ;
155+ const isNewCardSelected =
156+ event ?. value ?. type === 'card' && ! hasSavedPaymentMethod ;
156157
157158 const selectedType = event ?. value ?. type || '' ;
158159 const isNotCardType = selectedType !== 'card' ;
@@ -172,7 +173,11 @@ export function CheckoutForm({
172173 const showPayPalButton = selectedPaymentMethod === 'external_paypal' ;
173174 const isStripe = cart ?. paymentInfo ?. type !== 'external_paypal' ;
174175 const showFullNameInput =
175- ! isPaymentElementLoading && ! showPayPalButton && ! isSavedPaymentMethod && selectedPaymentMethod === 'card' && ! isNotCard ;
176+ ! isPaymentElementLoading &&
177+ ! showPayPalButton &&
178+ ! isSavedPaymentMethod &&
179+ selectedPaymentMethod === 'card' &&
180+ ! isNotCard ;
176181 const nonStripeFieldsComplete = ! showFullNameInput || ! ! fullName ;
177182
178183 const submitHandler = async (
@@ -235,13 +240,13 @@ export function CheckoutForm({
235240 const confirmationTokenParams : ConfirmationTokenCreateParams | undefined =
236241 ! isSavedPaymentMethod
237242 ? {
238- payment_method_data : {
239- billing_details : {
240- name : fullName ,
241- email : sessionEmail || undefined ,
243+ payment_method_data : {
244+ billing_details : {
245+ name : fullName ,
246+ email : sessionEmail || undefined ,
247+ } ,
242248 } ,
243- } ,
244- }
249+ }
245250 : undefined ;
246251
247252 // Create the ConfirmationToken using the details collected by the Payment Element
@@ -256,7 +261,11 @@ export function CheckoutForm({
256261 if ( confirmationTokenError . type === 'validation_error' ) {
257262 return ;
258263 } else {
259- await handleStripeErrorAction ( cart . id , confirmationTokenError , searchParamsRecord ) ;
264+ await handleStripeErrorAction (
265+ cart . id ,
266+ confirmationTokenError ,
267+ searchParamsRecord
268+ ) ;
260269 return ;
261270 }
262271 }
@@ -374,9 +383,7 @@ export function CheckoutForm({
374383 < >
375384 { showLinkAuthElement && (
376385 < div >
377- < LinkAuthenticationElement
378- options = { linkAuthOptions }
379- />
386+ < LinkAuthenticationElement options = { linkAuthOptions } />
380387 </ div >
381388 ) }
382389 < PaymentElement
@@ -450,7 +457,7 @@ export function CheckoutForm({
450457 />
451458 ) : (
452459 < BaseButton
453- className = "mt-10 w-full"
460+ className = "h-12 mt-10 w-full"
454461 type = "submit"
455462 variant = { ButtonVariant . Primary }
456463 aria-disabled = {
0 commit comments