@@ -336,7 +336,7 @@ struct StandaloneUrlView: View {
336336 . frame ( height: 48 )
337337 . accessibilityIdentifier ( " swishButton " )
338338 }
339- . disabled ( viewModel. swishNumber. isEmpty)
339+ . disabled ( viewModel. swishNumber. isEmpty || viewModel . isLoadingNativePayment )
340340 . foregroundColor ( !viewModel. swishNumber. isEmpty ? . white : . gray)
341341 . background ( !viewModel. swishNumber. isEmpty ? . black : . backgroundGray)
342342 . cornerRadius ( 30 )
@@ -354,6 +354,7 @@ struct StandaloneUrlView: View {
354354 . frame ( height: 48 )
355355 . accessibilityIdentifier ( " swishButton " )
356356 }
357+ . disabled ( viewModel. isLoadingNativePayment)
357358 . foregroundColor ( . white)
358359 . background ( . black)
359360 . cornerRadius ( 30 )
@@ -373,6 +374,7 @@ struct StandaloneUrlView: View {
373374 . frame ( height: 48 )
374375 . accessibilityIdentifier ( " swishPrefillButton " )
375376 }
377+ . disabled ( viewModel. isLoadingNativePayment)
376378 . foregroundColor ( . white)
377379 . background ( . black)
378380 . cornerRadius ( 30 )
@@ -398,6 +400,7 @@ struct StandaloneUrlView: View {
398400 . accessibilityIdentifier ( " creditCardPrefillButton " )
399401
400402 }
403+ . disabled ( viewModel. isLoadingNativePayment)
401404 . foregroundColor ( . white)
402405 . background ( . black)
403406 . cornerRadius ( 30 )
@@ -409,19 +412,30 @@ struct StandaloneUrlView: View {
409412 isFocused = false
410413
411414 viewModel. isLoadingNativePayment = true
412- viewModel. nativePayment? . makeNativePaymentAttempt ( instrument: . newCreditCard( enabledPaymentDetailsConsentCheckbox: true ) )
415+ viewModel. nativePayment? . makeNativePaymentAttempt ( instrument: . newCreditCard( enabledPaymentDetailsConsentCheckbox: false ) )
413416 } label: {
414417 Text ( " stand_alone_url_payment_new_credit_card " )
415418 . smallFont ( )
416419 . frame ( maxWidth: . infinity)
417420 . frame ( height: 48 )
418421 . accessibilityIdentifier ( " newCreditCardButton " )
419422 }
423+ . disabled ( viewModel. isLoadingNativePayment)
420424 . foregroundColor ( . white)
421425 . background ( . black)
422426 . cornerRadius ( 30 )
423427 . padding ( . top, 10 )
424- case . applePay:
428+ case . applePay( let canMakePayments, let canMakePaymentsUsingNetworksAndCapabilities) :
429+ VStack ( spacing: 0 ) {
430+ Text ( " stand_alone_url_payment_apple_pay " )
431+ Text ( " stand_alone_url_payment_apple_pay_can_make_payments \( String ( canMakePayments) ) " )
432+ Text ( " stand_alone_url_payment_apple_pay_using_networks_and_capabilities \( String ( canMakePaymentsUsingNetworksAndCapabilities) ) " )
433+ }
434+ . smallFont ( )
435+ . frame ( maxWidth: . infinity)
436+ . accessibilityIdentifier ( " applePayPaymentReadinessLabel " )
437+ . foregroundColor ( . black)
438+
425439 Button {
426440 isFocused = false
427441
@@ -437,6 +451,7 @@ struct StandaloneUrlView: View {
437451 . frame ( height: 48 )
438452 . accessibilityIdentifier ( " applePayExampleAppButton " )
439453 }
454+ . disabled ( viewModel. isLoadingNativePayment)
440455 . foregroundColor ( . white)
441456 . background ( . black)
442457 . cornerRadius ( 30 )
@@ -457,6 +472,7 @@ struct StandaloneUrlView: View {
457472 . frame ( height: 48 )
458473 . accessibilityIdentifier ( " applePayCharityButton " )
459474 }
475+ . disabled ( viewModel. isLoadingNativePayment)
460476 . foregroundColor ( . white)
461477 . background ( . black)
462478 . cornerRadius ( 30 )
@@ -478,6 +494,7 @@ struct StandaloneUrlView: View {
478494 . accessibilityIdentifier ( " webBasedButton " )
479495
480496 }
497+ . disabled ( viewModel. isLoadingNativePayment)
481498 . foregroundColor ( . white)
482499 . background ( . black)
483500 . cornerRadius ( 30 )
@@ -497,6 +514,7 @@ struct StandaloneUrlView: View {
497514 . accessibilityIdentifier ( " webBasedButton " )
498515
499516 }
517+ . disabled ( viewModel. isLoadingNativePayment)
500518 . foregroundColor ( . white)
501519 . background ( . black)
502520 . cornerRadius ( 30 )
@@ -522,6 +540,7 @@ struct StandaloneUrlView: View {
522540 . accessibilityIdentifier ( " webBasedButton " )
523541
524542 }
543+ . disabled ( viewModel. isLoadingNativePayment)
525544 . foregroundColor ( . white)
526545 . background ( . black)
527546 . cornerRadius ( 30 )
0 commit comments