Comments out Link entry points for Feb release (#757)

This commit is contained in:
Cameron 2022-02-11 12:30:24 -08:00 committed by GitHub
parent 931f4694e6
commit 5fb187e8a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 8 deletions

View File

@ -143,9 +143,13 @@ class PaymentSheetTestPlayground: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Link disabled for Feb release
linkSelector.isHidden = true
linkSelector.superview?.isHidden = true
// Enable experimental payment methods.
PaymentSheet.supportedPaymentMethods = [.card, .iDEAL, .bancontact, .sofort, .SEPADebit, .EPS, .giropay, .przelewy24, .afterpayClearpay, .klarna, .payPal, .link]
PaymentSheet.supportedPaymentMethods = [.card, .iDEAL, .bancontact, .sofort, .SEPADebit, .EPS, .giropay, .przelewy24, .afterpayClearpay, .klarna, .payPal/*, .link*/] // Link disabled for Feb release
checkoutButton.addTarget(self, action: #selector(didTapCheckoutButton), for: .touchUpInside)
checkoutButton.isEnabled = false

View File

@ -53,7 +53,9 @@ enum Intent {
}
var supportsLink: Bool {
return recommendedPaymentMethodTypes.contains(.link)
/// Disabled for Feb release
return false
// return recommendedPaymentMethodTypes.contains(.link)
}
}

View File

@ -323,6 +323,9 @@ extension PaymentSheet {
}
// Look up ConsumerSession
/*
Disabled for Feb release
let linkAccountService = LinkAccountService(apiClient: configuration.apiClient)
let consumerSessionLookupBlock: (String?) -> Void = { email in
linkAccountService.lookupAccount(withEmail: email) { result in
@ -347,6 +350,8 @@ extension PaymentSheet {
} else {
linkAccountPromise.resolve(with: nil)
}
*/
linkAccountPromise.resolve(with: nil)
}
private static func warnUnactivatedIfNeeded(unactivatedPaymentMethodTypes: [STPPaymentMethodType]) {

View File

@ -109,7 +109,7 @@ extension PaymentSheet {
/// The customer's email address.
/// Set this value if you have pre-collected the customer's email
/// address and want to use that value to prefill Link login forms.
public var customerEmail: String? = nil
internal var customerEmail: String? = nil
internal var linkPaymentMethodsOnly: Bool = false
}

View File

@ -529,11 +529,13 @@ extension PaymentSheetViewController: AddPaymentMethodViewControllerDelegate {
}
func shouldOfferLinkSignup(_ viewController: AddPaymentMethodViewController) -> Bool {
guard let linkAccount = linkAccount else {
return true
}
return !linkAccount.isRegistered
// Link disabled for Feb 15 release
return false
// guard let linkAccount = linkAccount else {
// return true
// }
//
// return !linkAccount.isRegistered
}
}