Skip to content

Conversation

@tillh-stripe
Copy link
Collaborator

@tillh-stripe tillh-stripe commented Sep 16, 2025

Summary

This pull request updates STPElementsSession.supportsLink to only consider the linkSettings.linkMode value, as opposed to looking at the orderedPaymentMethodTypes and linkPassthroughModeEnabled.

Motivation

Be in line with Web and simplify future backend changes.

Testing

Updated tests and test structs.

Changelog

@tillh-stripe tillh-stripe force-pushed the tillh/link-enabled-based-on-link-mode branch from 4229b0c to 1131dc7 Compare September 16, 2025 21:07
@github-actions
Copy link

github-actions bot commented Sep 16, 2025

⚠️ Public API changes detected:

StripePayments

- public var allResponseFields: [Swift.AnyHashable : Any] {
- get
- }
- public var allResponseFields: [Swift.AnyHashable : Any] {
- get
- }
- public var allResponseFields: [Swift.AnyHashable : Any] {
- get
- }

If you are adding a new public API consider the following:

  • Do these APIs need to be public or can they be protected with @_spi(STP)?
  • If these APIs need to be public, assess whether they require an API review.

If you are modifying or removing a public API:

  • Does this require a breaking version change?
  • Do these changes require API review?

If you confirm these APIs need to be added/updated and have undergone necessary review, add the label modifies public API to this PR to acknowledge and bypass this check.

ℹ️ If this comment appears to be left in error, make sure your branch is up-to-date with master.

@tillh-stripe tillh-stripe force-pushed the tillh/link-enabled-based-on-link-mode branch 4 times, most recently from 3c9ac10 to 9008ed9 Compare September 18, 2025 02:43
@tillh-stripe tillh-stripe force-pushed the tillh/link-enabled-based-on-link-mode branch 2 times, most recently from 7af64a4 to 15acd4b Compare September 29, 2025 15:33

private func updatePaymentMethodDetail(data: Data, variables: [String: String]) -> Data {
var template = String(decoding: data, as: UTF8.self)
var template = String(data: data, encoding: .utf8)!
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drive-by fix.

)
presentPaymentSheet(darkMode: false)
verify(paymentSheet.bottomSheetViewController.view!)
UserDefaults.standard.removeObject(forKey: "FINANCIAL_CONNECTIONS_INSTANT_DEBITS_INCENTIVES")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test started failing, and I assume it's because we never reset the value after enabling it at the start of the test.

}

func testPromoBadgeInFormTitle() {
UserDefaults.standard.setValue(true, forKey: "FINANCIAL_CONNECTIONS_INSTANT_DEBITS_INCENTIVES")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

externalPaymentMethodTypes: [String] = [],
customerSessionData: [String: Any]? = nil,
cardBrandChoiceData: [String: Any]? = nil,
isLinkPassthroughModeEnabled: Bool? = nil,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this parameter, as the link_mode determines the passthrough state. Added logic below so that link_settings.link_passthrough_mode_enabled is still set correctly.

@tillh-stripe tillh-stripe force-pushed the tillh/link-enabled-based-on-link-mode branch from a6e3672 to 56d82dd Compare September 29, 2025 21:58
@tillh-stripe tillh-stripe force-pushed the tillh/link-enabled-based-on-link-mode branch from 56d82dd to 08c931d Compare October 1, 2025 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants