Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instant Debits: first iteration of Instant Debits in Payment Sheet #3528

Merged
merged 2 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ extension PlaygroundController {
"use_link": settings.linkEnabled == .on,
"use_manual_confirmation": settings.integrationType == .deferred_mc,
"require_cvc_recollection": settings.requireCVCRecollection == .on,
// "supported_payment_methods": ["card", "link"], // Uncomment to override payment methods (also make sure Automatic PM's is off)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

for now, this needs to be uncommented for Instant Debits to show up via playground

there's a precedent for it below (😁 ):

// "set_shipping_address": true // Uncomment to make server vend PI with shipping address populated

likely not the end state we want but its OK for now given the state of the project (still iterating on design etc.)

Copy link
Contributor

Choose a reason for hiding this comment

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

Does turning the Link flag on work? That should set [card, link] as the PMs. If this is necessary, might be nice to make it a switch, it's not too difficult to add a new one

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@davidme-stripe

What is the Link flag? Or, in other words, given the current state, what would I change/do to try turning the Link flag on? (also asked some other folks in the meanwhile too)

I do see this (...but doesn't seem to do the intended):

Screenshot 2024-05-17 at 11 25 13 AM

Copy link
Contributor

Choose a reason for hiding this comment

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

That should be it — if it's on, the backend should send [card, link, (a few others)].

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@davidme-stripe

With that on...

in:

static func filteredPaymentMethodTypes(from intent: Intent, configuration: Configuration, logAvailability: Bool = false) -> [PaymentMethodType]

intent.recommendedPaymentMethodTypes returns:

(lldb) po intent.recommendedPaymentMethodTypes
▿ 7 elements
  - 0 : card
  - 1 : link
  - 2 : afterpayClearpay
  - 3 : USBankAccount
  - 4 : klarna
  - 5 : Amazon Pay
  - 6 : affirm

they key problem, as I understand it, is that the "USBankAccount" is returned (where if that exists, Instant Debits is disabled - by intent.linkFundingSources?.contains(.bankAccount) == true NOT being true)

LMK if there's other easy way around this, right now Android added a comma-separated list to the playground app to support this through the UI and the current plan was to just copy it: stripe/stripe-android#8428

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, got it! That makes sense to me.

// "set_shipping_address": true // Uncomment to make server vend PI with shipping address populated
] as [String: Any]
makeRequest(with: checkoutEndpoint, body: body) { data, response, error in
Expand Down
2 changes: 1 addition & 1 deletion Stripe/StripeiOS/Source/STPPaymentMethod+BasicUI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ extension STPPaymentMethod: STPPaymentOption {

@objc public var isReusable: Bool {
switch type {
case .card, .link, .USBankAccount:
case .card, .link, .USBankAccount, .instantDebits:
return true
case .alipay, // Careful! Revisit this if/when we support recurring Alipay
.AUBECSDebit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extension STPPaymentMethodParams: STPPaymentOption {

@objc public var isReusable: Bool {
switch type {
case .card, .link, .USBankAccount:
case .card, .link, .USBankAccount, .instantDebits:
return true
case .alipay, .AUBECSDebit, .bacsDebit, .SEPADebit, .iDEAL, .FPX, .cardPresent, .giropay,
.grabPay, .EPS, .przelewy24, .bancontact, .netBanking, .OXXO, .payPal, .sofort, .UPI,
Expand Down
24 changes: 20 additions & 4 deletions StripeCore/StripeCore.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
62FD088E003BE06F5413FB4F /* StripeCoreBundleLocator.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEA5353BC5359E08128E116A /* StripeCoreBundleLocator.swift */; };
631D09E67497B49BBCA26192 /* UIView+StripeCoreTestingUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4E4C534285F49A97A04D2B8 /* UIView+StripeCoreTestingUtils.swift */; };
677951C643328D76E46720A5 /* StripeAPIConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32CB3702691056D3404A8C5F /* StripeAPIConfiguration.swift */; };
6A05FB452BCF24100001D128 /* FinancialConnectionsSDKResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A05FB442BCF24100001D128 /* FinancialConnectionsSDKResult.swift */; };
6A05FB472BCF24370001D128 /* FinancialConnectionsLinkedBank.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A05FB462BCF24370001D128 /* FinancialConnectionsLinkedBank.swift */; };
6A05FB492BCF244A0001D128 /* InstantDebitsLinkedBank.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A05FB482BCF244A0001D128 /* InstantDebitsLinkedBank.swift */; };
6A05FB4B2BCF245C0001D128 /* FinancialConnectionsEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A05FB4A2BCF245C0001D128 /* FinancialConnectionsEvent.swift */; };
6A52ABC06783A90B9E339948 /* StripeFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73CE623A81057C4063A1E0C4 /* StripeFile.swift */; };
6B4156FCFAEDD1C73DC6EDAD /* iOSSnapshotTestCase in Frameworks */ = {isa = PBXBuildFile; platformFilters = (ios, maccatalyst, ); productRef = 23D22B2C40BA7C182BCE50B2 /* iOSSnapshotTestCase */; };
6B9C7B832BC73B1C007D5A28 /* AnalyticsHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B9C7B822BC73B1C007D5A28 /* AnalyticsHelper.swift */; };
Expand All @@ -56,7 +60,7 @@
71CD1AE29AA09552DF61131E /* StripeJSONShared.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86C675ABC9D68378DC699DED /* StripeJSONShared.swift */; };
72DA29CA8A750E8B00DBF3D4 /* STPError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C51E3FA5EE3587BB7BBC634 /* STPError.swift */; };
766FE8E61B44967F057ED424 /* AnalyticLoggableError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B890F162E1C247D5CA1A9E6 /* AnalyticLoggableError.swift */; };
772292156A4A80CEA9D9C487 /* ConnectionsSDKInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EC3BCEEECB3E1485B18F0C4 /* ConnectionsSDKInterface.swift */; };
772292156A4A80CEA9D9C487 /* FinancialConnectionsSDKInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EC3BCEEECB3E1485B18F0C4 /* FinancialConnectionsSDKInterface.swift */; };
79DA4102C501FC2E53D946B5 /* STPAPIClient+ErrorResponseTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E70193A9CA42A0C53E48C1 /* STPAPIClient+ErrorResponseTest.swift */; };
8310D598D6D40BAD23880D3F /* StripeCoreTestUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = C666CC926642D7AA76E75B5B /* StripeCoreTestUtils.h */; settings = {ATTRIBUTES = (Public, ); }; };
83790210FFC2DD764C042C8E /* STPDispatchFunctions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 591E592C9F3E5D4CB08A1847 /* STPDispatchFunctions.swift */; };
Expand Down Expand Up @@ -221,7 +225,7 @@
49538DBF8457D96707A2DA56 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Localizable.strings; sourceTree = "<group>"; };
4A8030BF88608CA86E295F18 /* Enums+CustomStringConvertible.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Enums+CustomStringConvertible.swift"; sourceTree = "<group>"; };
4C51E3FA5EE3587BB7BBC634 /* STPError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = STPError.swift; sourceTree = "<group>"; };
4EC3BCEEECB3E1485B18F0C4 /* ConnectionsSDKInterface.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConnectionsSDKInterface.swift; sourceTree = "<group>"; };
4EC3BCEEECB3E1485B18F0C4 /* FinancialConnectionsSDKInterface.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FinancialConnectionsSDKInterface.swift; sourceTree = "<group>"; };
4FF290DF69F5FD1004BBDECA /* TestJSONEncoder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestJSONEncoder.swift; sourceTree = "<group>"; };
536085BA191EC2942523A7DB /* en-GB */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "en-GB"; path = "en-GB.lproj/Localizable.strings"; sourceTree = "<group>"; };
54D4E87D67740BF3C05638FD /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Platforms/iPhoneOS.platform/Developer/Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
Expand All @@ -236,6 +240,10 @@
64635404BD4D5D62486A7626 /* UnknownFields.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnknownFields.swift; sourceTree = "<group>"; };
66CC52EF207F05E0EFAEACD8 /* NSMutableURLRequest+StripeTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSMutableURLRequest+StripeTest.swift"; sourceTree = "<group>"; };
6B9C7B822BC73B1C007D5A28 /* AnalyticsHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsHelper.swift; sourceTree = "<group>"; };
6A05FB442BCF24100001D128 /* FinancialConnectionsSDKResult.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FinancialConnectionsSDKResult.swift; sourceTree = "<group>"; };
6A05FB462BCF24370001D128 /* FinancialConnectionsLinkedBank.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FinancialConnectionsLinkedBank.swift; sourceTree = "<group>"; };
6A05FB482BCF244A0001D128 /* InstantDebitsLinkedBank.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InstantDebitsLinkedBank.swift; sourceTree = "<group>"; };
6A05FB4A2BCF245C0001D128 /* FinancialConnectionsEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FinancialConnectionsEvent.swift; sourceTree = "<group>"; };
6CDBCD70CB220014972B49A5 /* PluginDetector.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PluginDetector.swift; sourceTree = "<group>"; };
6E852B53CF75A119D3810B41 /* NSBundle+Stripe_AppName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSBundle+Stripe_AppName.swift"; sourceTree = "<group>"; };
6EEB07003465364DBAFA7DEB /* zh-HK */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-HK"; path = "zh-HK.lproj/Localizable.strings"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -423,7 +431,11 @@
4AD775367138C40FE2C98BAF /* Connections Bindings */ = {
isa = PBXGroup;
children = (
4EC3BCEEECB3E1485B18F0C4 /* ConnectionsSDKInterface.swift */,
4EC3BCEEECB3E1485B18F0C4 /* FinancialConnectionsSDKInterface.swift */,
6A05FB442BCF24100001D128 /* FinancialConnectionsSDKResult.swift */,
6A05FB462BCF24370001D128 /* FinancialConnectionsLinkedBank.swift */,
6A05FB482BCF244A0001D128 /* InstantDebitsLinkedBank.swift */,
6A05FB4A2BCF245C0001D128 /* FinancialConnectionsEvent.swift */,
);
path = "Connections Bindings";
sourceTree = "<group>";
Expand Down Expand Up @@ -923,6 +935,7 @@
files = (
87274985CE5E750FA8D34648 /* EmptyResponse.swift in Sources */,
6A52ABC06783A90B9E339948 /* StripeFile.swift in Sources */,
6A05FB472BCF24370001D128 /* FinancialConnectionsLinkedBank.swift in Sources */,
9FBA50345D53E82AA974F672 /* STPAPIClient+FileUpload.swift in Sources */,
31AD3BDC2B0C23E40080C800 /* Locale+StripeCore.swift in Sources */,
C164984958CDC2C9CA4B6316 /* STPAPIClient.swift in Sources */,
Expand All @@ -932,6 +945,7 @@
DAD4099D03E43A0CA89464CD /* StripeAPI.swift in Sources */,
D22FAB2F1AE9AE43C1808747 /* StripeAPIConfiguration+Version.swift in Sources */,
677951C643328D76E46720A5 /* StripeAPIConfiguration.swift in Sources */,
6A05FB4B2BCF245C0001D128 /* FinancialConnectionsEvent.swift in Sources */,
02A26B79617FAE660C9EB506 /* StripeError.swift in Sources */,
3B9D69AB1CB61725C7A012B6 /* StripeServiceError.swift in Sources */,
95156E152471058151076A51 /* Analytic.swift in Sources */,
Expand Down Expand Up @@ -960,7 +974,7 @@
970D95FEA3BC216351DE3C5E /* StripeJSONEncoder.swift in Sources */,
71CD1AE29AA09552DF61131E /* StripeJSONShared.swift in Sources */,
6ED5C41DBDAB475BF1119E98 /* UnknownFields.swift in Sources */,
772292156A4A80CEA9D9C487 /* ConnectionsSDKInterface.swift in Sources */,
772292156A4A80CEA9D9C487 /* FinancialConnectionsSDKInterface.swift in Sources */,
5553D952F91D193D453D777D /* Async.swift in Sources */,
CAF857D45689FBEF17627E80 /* BundleLocatorProtocol.swift in Sources */,
59CA874015261241AC255907 /* FileDownloader.swift in Sources */,
Expand All @@ -973,9 +987,11 @@
C9B6C451F9A46C9FB031CE95 /* STPURLCallbackHandler.swift in Sources */,
A62AEDF871AC89489FE19A13 /* ServerErrorMapper.swift in Sources */,
B6DBB2BF2BA8C4E400783D15 /* STPAnalyticsClient+Error.swift in Sources */,
6A05FB452BCF24100001D128 /* FinancialConnectionsSDKResult.swift in Sources */,
62FD088E003BE06F5413FB4F /* StripeCoreBundleLocator.swift in Sources */,
17CE96B50813CF626293CBF9 /* URLEncoder.swift in Sources */,
0709F5D265CC641E6DE1011D /* URLSession+Retry.swift in Sources */,
6A05FB492BCF244A0001D128 /* InstantDebitsLinkedBank.swift in Sources */,
2991461DD354A6124CCF78DA /* STPLocalizationUtils.swift in Sources */,
4506A7016EA7C45796D3A30D /* STPLocalizedString.swift in Sources */,
DFF3092E51B6C3ED81AB1448 /* String+Localized.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,41 +1,11 @@
//
// ConnectionsSDKInterface.swift
// FinancialConnectionsEvent.swift
// StripeCore
//
// Created by Vardges Avetisyan on 2/24/22.
// Copyright © 2022 Stripe, Inc. All rights reserved.
// Created by Krisjanis Gaidis on 4/16/24.
//

import UIKit

@_spi(STP) @frozen public enum FinancialConnectionsSDKResult {
case completed(linkedBank: LinkedBank)
case cancelled
case failed(error: Error)
}

@_spi(STP) public protocol FinancialConnectionsSDKInterface {
init()
func presentFinancialConnectionsSheet(
apiClient: STPAPIClient,
clientSecret: String,
returnURL: String?,
onEvent: ((FinancialConnectionsEvent) -> Void)?,
from presentingViewController: UIViewController,
completion: @escaping (FinancialConnectionsSDKResult) -> Void
)
}

// MARK: - Types

@_spi(STP) public protocol LinkedBank {
var sessionId: String { get }
var accountId: String { get }
var displayName: String? { get }
var bankName: String? { get }
var last4: String? { get }
var instantlyVerified: Bool { get }
}
import Foundation

public struct FinancialConnectionsEvent {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// FinancialConnectionsLinkedBank.swift
// StripeCore
//
// Created by Krisjanis Gaidis on 4/16/24.
//

import Foundation

@_spi(STP) public protocol FinancialConnectionsLinkedBank {
var sessionId: String { get }
var accountId: String { get }
var displayName: String? { get }
var bankName: String? { get }
var last4: String? { get }
var instantlyVerified: Bool { get }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// ConnectionsSDKInterface.swift
// StripeCore
//
// Created by Vardges Avetisyan on 2/24/22.
// Copyright © 2022 Stripe, Inc. All rights reserved.
//

import UIKit

@_spi(STP) public protocol FinancialConnectionsSDKInterface {
init()
func presentFinancialConnectionsSheet(
apiClient: STPAPIClient,
clientSecret: String,
returnURL: String?,
onEvent: ((FinancialConnectionsEvent) -> Void)?,
from presentingViewController: UIViewController,
completion: @escaping (FinancialConnectionsSDKResult) -> Void
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// FinancialConnectionsSDKResult.swift
// StripeCore
//
// Created by Krisjanis Gaidis on 4/16/24.
//

import Foundation

@_spi(STP) @frozen public enum FinancialConnectionsSDKResult {
case completed(Completed)
case cancelled
case failed(error: Error)

@_spi(STP) public enum Completed {
case financialConnections(FinancialConnectionsLinkedBank)
case instantDebits(InstantDebitsLinkedBank)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// InstantDebitsLinkedBank.swift
// StripeCore
//
// Created by Krisjanis Gaidis on 4/16/24.
//

import Foundation

@_spi(STP) public protocol InstantDebitsLinkedBank {
var paymentMethodId: String { get }
var bankName: String? { get }
var last4: String? { get }
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
691619AE9A989548ABA36535 /* HitTestView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F669BB8F3DA862C425897705 /* HitTestView.swift */; };
6944E131D351784058C7D734 /* FinancialConnectionsPaymentMethodType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191760EFAA9154C1F168E1D2 /* FinancialConnectionsPaymentMethodType.swift */; };
6A044E482BB3866A00D73A3E /* AccountUpdateRequiredViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A044E472BB3866A00D73A3E /* AccountUpdateRequiredViewController.swift */; };
6A05FB412BCF15170001D128 /* FinancialConnectionsLinkedBankImplementation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A05FB402BCF15170001D128 /* FinancialConnectionsLinkedBankImplementation.swift */; };
6A05FB432BCF153F0001D128 /* InstantDebitsLinkedBankImplementation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A05FB422BCF153F0001D128 /* InstantDebitsLinkedBankImplementation.swift */; };
6A13B9822B48BD6C00FFA327 /* AccountPickerRowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A13B9812B48BD6C00FFA327 /* AccountPickerRowView.swift */; };
6A13B9842B48BF4300FFA327 /* AccountPickerRowLabelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A13B9832B48BF4300FFA327 /* AccountPickerRowLabelView.swift */; };
6A13B9862B4CD04100FFA327 /* RetrieveAccountsLoadingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A13B9852B4CD04100FFA327 /* RetrieveAccountsLoadingView.swift */; };
Expand Down Expand Up @@ -340,6 +342,8 @@
66D2857E68EA69AC6F658BEA /* pt-PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-PT"; path = "pt-PT.lproj/Localizable.strings"; sourceTree = "<group>"; };
66D3CAB53EC9D33831C5A48B /* NetworkingSaveToLinkVerificationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkingSaveToLinkVerificationViewController.swift; sourceTree = "<group>"; };
6A044E472BB3866A00D73A3E /* AccountUpdateRequiredViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountUpdateRequiredViewController.swift; sourceTree = "<group>"; };
6A05FB402BCF15170001D128 /* FinancialConnectionsLinkedBankImplementation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FinancialConnectionsLinkedBankImplementation.swift; sourceTree = "<group>"; };
6A05FB422BCF153F0001D128 /* InstantDebitsLinkedBankImplementation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InstantDebitsLinkedBankImplementation.swift; sourceTree = "<group>"; };
6A13B9812B48BD6C00FFA327 /* AccountPickerRowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountPickerRowView.swift; sourceTree = "<group>"; };
6A13B9832B48BF4300FFA327 /* AccountPickerRowLabelView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountPickerRowLabelView.swift; sourceTree = "<group>"; };
6A13B9852B4CD04100FFA327 /* RetrieveAccountsLoadingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RetrieveAccountsLoadingView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -634,6 +638,8 @@
isa = PBXGroup;
children = (
248D51F7AADE404E49957DDA /* FinancialConnectionsSDKImplementation.swift */,
6A05FB402BCF15170001D128 /* FinancialConnectionsLinkedBankImplementation.swift */,
6A05FB422BCF153F0001D128 /* InstantDebitsLinkedBankImplementation.swift */,
);
path = FinancialConnectionsSDK;
sourceTree = "<group>";
Expand Down Expand Up @@ -1243,6 +1249,7 @@
B271AAF41C9FE6AE392B88D3 /* FinancialConnectionsMixedOAuthParams.swift in Sources */,
DAA51ABB496551074DBA1A20 /* FinancialConnectionsNetworkedAccountsResponse.swift in Sources */,
6A732CA62B69A46D00828CB1 /* PhoneTextField.swift in Sources */,
6A05FB412BCF15170001D128 /* FinancialConnectionsLinkedBankImplementation.swift in Sources */,
6FE9F171CF9A5D0EDB2035AA /* FinancialConnectionsNetworkingLinkSignup.swift in Sources */,
87198EFD873751CA4E4B5005 /* FinancialConnectionsOAuthPrepane.swift in Sources */,
6A732C9E2B64787E00828CB1 /* LinkAccountPickerLoadingView.swift in Sources */,
Expand Down Expand Up @@ -1332,6 +1339,7 @@
5F3C86F23B65CAC56FDDEC90 /* NetworkingLinkSignupBodyFormView.swift in Sources */,
6A044E482BB3866A00D73A3E /* AccountUpdateRequiredViewController.swift in Sources */,
95B2A73AC5DA9FA64017B3CB /* NetworkingLinkSignupBodyView.swift in Sources */,
6A05FB432BCF153F0001D128 /* InstantDebitsLinkedBankImplementation.swift in Sources */,
6A13B9842B48BF4300FFA327 /* AccountPickerRowLabelView.swift in Sources */,
3AC5CA5F5529B55026342A54 /* NetworkingLinkSignupDataSource.swift in Sources */,
6A13B9862B4CD04100FFA327 /* RetrieveAccountsLoadingView.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct FinancialConnectionsConsent: Decodable {
let cta: String
let belowCta: String?

let dataAccessNotice: FinancialConnectionsDataAccessNotice
let dataAccessNotice: FinancialConnectionsDataAccessNotice?
let legalDetailsNotice: FinancialConnectionsLegalDetailsNotice

struct Body: Decodable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,8 @@ struct FinancialConnectionsSessionManifest: Decodable {
var shouldAttachLinkedPaymentMethod: Bool {
return (paymentMethodType != nil)
}

var isProductInstantDebits: Bool {
return (product == "instant_debits")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ struct FinancialConnectionsSheetCompletionAnalytic {
/// Returns either a `FinancialConnectionsSheetClosedAnalytic` or `FinancialConnectionsSheetFailedAnalytic` depending on the result
static func make(
clientSecret: String,
result: FinancialConnectionsSheet.Result
result: HostControllerResult
) -> FinancialConnectionsSheetAnalytic {
switch result {
case .completed:
Expand Down