Skip to content

Commit

Permalink
Financial Connections: fixed/improved synchronize API all parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
kgaidis-stripe committed Oct 25, 2022
1 parent 85eb381 commit 11eb6e0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ struct APIVersion {

- Note: Update this value when a new API version is ready for use in production.
*/
private static let apiVersion: Int = 1
static let apiVersion: Int = 1 // WARNING: this is also referenced in other places, so double check changes!
private static let header = "financial_connections_client_api_beta=v\(apiVersion)"

static func configureFinancialConnectionsAPIVersion(apiClient: STPAPIClient) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,18 @@ extension STPAPIClient: FinancialConnectionsAPIClient {
func generateSessionManifest(clientSecret: String, returnURL: String?) -> Promise<FinancialConnectionsSynchronize> {
let parameters: [String: Any] = [
"client_secret": clientSecret,
"mobile" : [
"sdk_type": "ios",
"fullscreen": true,
"hide_close_button": true,
"sdk_version": 1,
],
"mobile": {
var mobileParameters: [String:Any] = [
"sdk_type": "ios",
"fullscreen": true,
"hide_close_button": true,
"sdk_version": APIVersion.apiVersion,
]
mobileParameters["app_return_url"] = returnURL
return mobileParameters
}(),
"locale": Locale.current.identifier,
]
// parameters["app_return_url"] = returnURL // TODO(kgaidis): double-check these parameters

return self.post(
resource: "financial_connections/sessions/synchronize",
parameters: parameters
Expand Down

0 comments on commit 11eb6e0

Please sign in to comment.