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

Add TTP auto-reconnect support #642

Merged
merged 1 commit into from
Mar 18, 2024
Merged

Conversation

nazli-stripe
Copy link
Collaborator

Summary

Adds support for TTP auto-reconnection

Motivation

3.4.0 update

Testing

  • I tested this manually
  • I added automated tests

Documentation

Select one:

  • I have added relevant documentation for my changes.
  • This PR does not result in any developer-facing changes.

Copy link
Collaborator

@bric-stripe bric-stripe left a comment

Choose a reason for hiding this comment

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

lgtm!

Comment on lines +315 to +324
let autoReconnectOnUnexpectedDisconnect = params["autoReconnectOnUnexpectedDisconnect"] as? Bool ?? false

let connectionConfig: LocalMobileConnectionConfiguration
do {
connectionConfig = try LocalMobileConnectionConfigurationBuilder(locationId: locationId ?? selectedReader.locationId ?? "")
.setMerchantDisplayName(merchantDisplayName ?? nil)
.setOnBehalfOf(onBehalfOf ?? nil)
.setTosAcceptancePermitted(tosAcceptancePermitted)
.setAutoReconnectOnUnexpectedDisconnect(autoReconnectOnUnexpectedDisconnect)
.setAutoReconnectionDelegate(autoReconnectOnUnexpectedDisconnect ? self : nil)
Copy link
Collaborator

Choose a reason for hiding this comment

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

not for this PR but we should probably setup the Swift code to use a connectReader extension similar to Android's so they're more closely matched 🤔 just noticed this difference (very low pri though 🤷‍♂️)

@nazli-stripe nazli-stripe merged commit e4f4efc into main Mar 18, 2024
2 checks passed
@nazli-stripe nazli-stripe deleted the nazli/ttp-autoreconnect branch September 7, 2024 17:14
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