Skip to content

Commit 8e8275b

Browse files
committed
address pr comments
1 parent 65d5b85 commit 8e8275b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Sources/BraintreePayPal/BTPayPalClient.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ import BraintreeDataCollector
373373
)
374374
return
375375
}
376-
self.launchPayPalApp(with: url, token: token, completion: completion)
376+
self.launchPayPalApp(with: url, completion: completion)
377377
case .webBrowser(let url):
378378
self.handlePayPalRequest(with: url, paymentType: request.paymentType, completion: completion)
379379
}
@@ -383,7 +383,6 @@ import BraintreeDataCollector
383383

384384
private func launchPayPalApp(
385385
with payPalAppRedirectURL: URL,
386-
token: String? = nil,
387386
completion: @escaping (BTPayPalAccountNonce?, Error?) -> Void
388387
) {
389388
apiClient.sendAnalyticsEvent(
@@ -394,11 +393,11 @@ import BraintreeDataCollector
394393
)
395394

396395
var urlComponents = URLComponents(url: payPalAppRedirectURL, resolvingAgainstBaseURL: true)
397-
urlComponents?.queryItems = [
398-
URLQueryItem(name: isVaultRequest ? "ba_token" : "token", value: token),
396+
let additionalQueryItems: [URLQueryItem] = [
399397
URLQueryItem(name: "source", value: "braintree_sdk"),
400398
URLQueryItem(name: "switch_initiated_time", value: String(Int(round(Date().timeIntervalSince1970 * 1000))))
401399
]
400+
urlComponents?.queryItems?.append(contentsOf: additionalQueryItems)
402401

403402
guard let redirectURL = urlComponents?.url else {
404403
self.notifyFailure(with: BTPayPalError.invalidURL("Unable to construct PayPal app redirect URL."), completion: completion)

0 commit comments

Comments
 (0)