-
Notifications
You must be signed in to change notification settings - Fork 951
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Instant Debits: implemented first-pass basic support for instant debi…
…ts in payment sheet which also connections to financial connections SDK.
- Loading branch information
1 parent
aef5164
commit e7a81a8
Showing
38 changed files
with
898 additions
and
184 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
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
36 changes: 3 additions & 33 deletions
36
...ns Bindings/ConnectionsSDKInterface.swift → ... Bindings/FinancialConnectionsEvent.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
17 changes: 17 additions & 0 deletions
17
StripeCore/StripeCore/Source/Connections Bindings/FinancialConnectionsLinkedBank.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 @@ | ||
// | ||
// 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 } | ||
} |
21 changes: 21 additions & 0 deletions
21
StripeCore/StripeCore/Source/Connections Bindings/FinancialConnectionsSDKInterface.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,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 | ||
) | ||
} |
19 changes: 19 additions & 0 deletions
19
StripeCore/StripeCore/Source/Connections Bindings/FinancialConnectionsSDKResult.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,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) | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
StripeCore/StripeCore/Source/Connections Bindings/InstantDebitsLinkedBank.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,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 } | ||
} |
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
Oops, something went wrong.