File tree Expand file tree Collapse file tree 3 files changed +43
-3
lines changed Expand file tree Collapse file tree 3 files changed +43
-3
lines changed Original file line number Diff line number Diff line change 2929"stand_alone_generic_error_title" = "Something went wrong";
3030"stand_alone_url_seamless_title" = "Seamless View";
3131"stand_alone_url_payment_web" = "Get payment menu";
32+ "stand_alone_url_payment_web_restricted" = "Get payment menu (restricted 2 first)";
3233"stand_alone_url_payment_apple_pay" = "ApplePay";
34+ "stand_alone_url_payment_web_based" = "Web Based";
Original file line number Diff line number Diff line change @@ -461,15 +461,51 @@ struct StandaloneUrlView: View {
461461 . background ( . black)
462462 . cornerRadius ( 30 )
463463 . padding ( . top, 10 )
464- case . webBased( identifier: let identifier) :
465- EmptyView ( )
464+ case . webBased( let paymentMethod) :
465+ Button {
466+ isFocused = false
467+
468+ viewModel. isLoadingNativePayment = true
469+ viewModel. nativePayment? . createSwedbankPaySDKController ( mode: . instrumentMode( instrument: instrument) )
470+ } label: {
471+ VStack ( spacing: 0 ) {
472+ Text ( " stand_alone_url_payment_web_based " )
473+ Text ( paymentMethod)
474+ }
475+ . smallFont ( )
476+ . frame ( maxWidth: . infinity)
477+ . frame ( height: 48 )
478+ . accessibilityIdentifier ( " webBasedButton " )
479+
480+ }
481+ . foregroundColor ( . white)
482+ . background ( . black)
483+ . cornerRadius ( 30 )
484+ . padding ( . top, 10 )
466485 }
467486 }
468487
469488 Button {
470489 isFocused = false
471490
472- viewModel. nativePayment? . createSwedbankPaySDKController ( )
491+ viewModel. nativePayment? . createSwedbankPaySDKController ( mode: . menu( restrictedToInstruments: [ availableInstruments [ 0 ] , availableInstruments [ 1 ] ] ) )
492+ } label: {
493+ Text ( " stand_alone_url_payment_web_restricted " )
494+ . smallFont ( )
495+ . frame ( maxWidth: . infinity)
496+ . frame ( height: 48 )
497+ . accessibilityIdentifier ( " webBasedButton " )
498+
499+ }
500+ . foregroundColor ( . white)
501+ . background ( . black)
502+ . cornerRadius ( 30 )
503+ . padding ( . top, 10 )
504+
505+ Button {
506+ isFocused = false
507+
508+ viewModel. nativePayment? . createSwedbankPaySDKController ( mode: . menu( restrictedToInstruments: nil ) )
473509 } label: {
474510 Text ( " stand_alone_url_payment_web " )
475511 . smallFont ( )
Original file line number Diff line number Diff line change 2929"stand_alone_generic_error_title" = "Something went wrong";
3030"stand_alone_url_seamless_title" = "Seamless View";
3131"stand_alone_url_payment_web" = "Get payment menu";
32+ "stand_alone_url_payment_web_restricted" = "Get payment menu (restricted 2 first)";
3233"stand_alone_url_payment_apple_pay" = "ApplePay";
34+ "stand_alone_url_payment_web_based" = "Web Based";
You can’t perform that action at this time.
0 commit comments