-
Notifications
You must be signed in to change notification settings - Fork 997
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BANKCON-14528] Update FC SDK to accept
link_mode
value from the pa…
…yment sheet (#4050) ## Summary As part of the [Panther](https://docs.google.com/document/d/1ErJVA3lLvNspPe3A8uYP9feK8Yvfq-Sw5aatNIvlGxk/edit#heading=h.p9ofrc4zbe1z) project, we'll need to call a different payment method endpoint at the end of the Financial Connections flow based on whether or not we're in a Panther flow. To know this, we need the `link_mode` value, which is fetched in the elements session response. This passes that value into the FC SDK for future use! ## Motivation Building Panther! ## Testing Verified the correct `linkMode` value is accessed in the `FinancialConnectionsSheet`: <img width="1184" alt="Screenshot 2024-09-24 at 9 55 27 AM" src="https://github.com/user-attachments/assets/5d0831a5-dbfb-4b58-836d-8a235267abde"> ## Changelog N/a
- Loading branch information
1 parent
00c3032
commit 9a7afba
Showing
11 changed files
with
73 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
StripeCore/StripeCore/Source/Connections Bindings/ElementsSessionContext.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// ElementsSessionContext.swift | ||
// StripeCore | ||
// | ||
// Created by Mat Schmid on 2024-09-25. | ||
// | ||
|
||
import Foundation | ||
|
||
/// Contains elements session context useful for the Financial Connections SDK. | ||
@_spi(STP) public struct ElementsSessionContext { | ||
@_spi(STP) public let linkMode: LinkMode? | ||
|
||
@_spi(STP) public init(linkMode: LinkMode?) { | ||
self.linkMode = linkMode | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
StripeCore/StripeCore/Source/Connections Bindings/LinkMode.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// LinkMode.swift | ||
// StripeCore | ||
// | ||
// Created by Mat Schmid on 2024-09-24. | ||
// | ||
|
||
import Foundation | ||
|
||
@_spi(STP) public enum LinkMode: String { | ||
case linkPaymentMethod = "LINK_PAYMENT_METHOD" | ||
case passthrough = "PASSTHROUGH" | ||
case linkCardBrand = "LINK_CARD_BRAND" | ||
|
||
@_spi(STP) public var isPantherPayment: Bool { | ||
self == .linkCardBrand | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters