Skip to content

Commit

Permalink
Reverse changes to PayPalClient
Browse files Browse the repository at this point in the history
  • Loading branch information
warmkesselj committed Dec 19, 2024
1 parent 2e6c851 commit a9a6f60
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Sources/BraintreePayPal/BTPayPalClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -412,28 +412,28 @@ import BraintreeDataCollector
}

application.open(redirectURL) { success in
self.invokedOpenURLSuccessfully(success, completion: completion)
self.invokedOpenURLSuccessfully(success, url: redirectURL, completion: completion)
}
}

func invokedOpenURLSuccessfully(_ success: Bool, completion: @escaping (BTPayPalAccountNonce?, Error?) -> Void) {
func invokedOpenURLSuccessfully(_ success: Bool, url: URL, completion: @escaping (BTPayPalAccountNonce?, Error?) -> Void) {
if success {
apiClient.sendAnalyticsEvent(
BTPayPalAnalytics.appSwitchSucceeded,
appSwitchURL: url,
isVaultRequest: isVaultRequest,
linkType: linkType,
payPalContextID: payPalContextID,
shopperSessionID: payPalRequest?.shopperSessionID
payPalContextID: payPalContextID
)
BTPayPalClient.payPalClient = self
appSwitchCompletion = completion
} else {
apiClient.sendAnalyticsEvent(
BTPayPalAnalytics.appSwitchFailed,
appSwitchURL: url,
isVaultRequest: isVaultRequest,
linkType: linkType,
payPalContextID: payPalContextID,
shopperSessionID: payPalRequest?.shopperSessionID
payPalContextID: payPalContextID
)
notifyFailure(with: BTPayPalError.appSwitchFailed, completion: completion)
}
Expand Down

0 comments on commit a9a6f60

Please sign in to comment.