     }
 }
 
-// MARK: - Link inline signup
+// MARK: - Link
 
 private extension PaymentSheet {
+
+    func presentPayWithLinkController(
+        from presentingController: UIViewController,
+        linkAccount: PaymentSheetLinkAccount?,
+        intent: Intent,
+        paymentMethodParams: STPPaymentMethodParams? = nil,
+        completion: (() -> Void)? = nil
+    ) {
+        let payWithLinkVC = PayWithLinkViewController(
+            linkAccount: linkAccount,
+            intent: intent,
+            configuration: configuration,
+            paymentMethodParams: paymentMethodParams
+        )
+
+        payWithLinkVC.payWithLinkDelegate = self
+
+        if UIDevice.current.userInterfaceIdiom == .pad {
+            payWithLinkVC.modalPresentationStyle = .formSheet
+        } else {
+            payWithLinkVC.modalPresentationStyle = .overFullScreen
+        }
+
+        presentingController.present(payWithLinkVC, animated: true, completion: completion)
+    }
 
     @discardableResult
     func handleLinkInlineSignup(

                }
            }

            let payWithLinkVC = PayWithLinkViewController(
                linkAccount: linkAccount,
                intent: intent,
                configuration: self.configuration,
                paymentMethodParams: paymentMethodParams
            )

            payWithLinkVC.modalPresentationStyle = .overFullScreen
            payWithLinkVC.payWithLinkDelegate = self
            self.bottomSheetViewController.present(payWithLinkVC, animated: true)
        }

        linkAccount.startVerification { result in

                        self.configuration.style.configure(paymentSheetVC)
                    }
                    #endif

                    let updateBottomSheet: () -> Void = {
                        self.bottomSheetViewController.contentStack = [paymentSheetVC]
                    }

                    if linkAccount?.sessionState == .verified {
                        self.presentPayWithLinkController(
                            from: self.bottomSheetViewController,
                            linkAccount: linkAccount,
                            intent: intent,
                            completion: {
                                // Update the bottom sheet after presenting the Link controller
                                // to avoid briefly flashing the PaymentSheet in the middle of
                                // the View Controller transition.
                                updateBottomSheet()
                            }
                        )
                    } else {
                        updateBottomSheet()
                    }
                }
                
                if let linkAccount = linkAccount,
