Skip to content

Commit

Permalink
Revert "Use internal property and custom get/set for public BTThreeDS…
Browse files Browse the repository at this point in the history
…ecureRequest.cardAddChallenge to avoid Xcode deprecation usage warnings"

This reverts commit 1eb5eaf.
  • Loading branch information
scannillo committed Nov 2, 2023
1 parent 1eb5eaf commit 9c9f462
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Sources/BraintreeThreeDSecure/BTThreeDSecureClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,9 @@ import BraintreeCore
"dataOnlyRequested": request.dataOnlyRequested
]

if request._cardAddChallenge == .requested || request.cardAddChallengeRequested == true {
if request.cardAddChallenge == .requested || request.cardAddChallengeRequested == true {
requestParameters["cardAdd"] = true
} else if request._cardAddChallenge == .notRequested {
} else if request.cardAddChallenge == .notRequested {
requestParameters["cardAdd"] = false
}

Expand Down
8 changes: 1 addition & 7 deletions Sources/BraintreeThreeDSecure/BTThreeDSecureRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,8 @@ import BraintreeCore
/// If set to `.notRequested` the authentication challenge will not be requested from the issuer.
/// If set to `.unspecified`, when the amount is 0, the authentication challenge will be requested from the issuer.
/// If set to `.unspecified`, when the amount is greater than 0, the authentication challenge will not be requested from the issuer.
@available(*, deprecated, message: "Use `cardAddChallengeRequested` instead")
public var cardAddChallenge: BTThreeDSecureCardAddChallenge {
get { return _cardAddChallenge }
set { _cardAddChallenge = newValue }
}
public var cardAddChallenge: BTThreeDSecureCardAddChallenge = .unspecified

var _cardAddChallenge: BTThreeDSecureCardAddChallenge = .unspecified

/// Optional. An authentication created using this flag should only be used for vaulting operations (creation of customers' credit cards or payment methods) and not for creating transactions.
/// If set to `true`, a card-add challenge will be requested from the issuer.
/// If set to `false`, a card-add challenge will not be requested.
Expand Down

0 comments on commit 9c9f462

Please sign in to comment.