From 439f4d62673057954ae62ae5b572192c907b40fd Mon Sep 17 00:00:00 2001 From: Victoria Park Date: Mon, 23 Oct 2023 08:45:58 -0700 Subject: [PATCH 1/9] Remove async await from PayPalNativeCheckoutClient.start and fix tests --- Demo/Demo/ViewModels/PayPalViewModel.swift | 2 +- .../PayPalNativeCheckoutClient.swift | 2 +- .../PayPalClient_Tests.swift | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Demo/Demo/ViewModels/PayPalViewModel.swift b/Demo/Demo/ViewModels/PayPalViewModel.swift index 29242b8b4..1d27510de 100644 --- a/Demo/Demo/ViewModels/PayPalViewModel.swift +++ b/Demo/Demo/ViewModels/PayPalViewModel.swift @@ -57,7 +57,7 @@ class PayPalViewModel: ObservableObject { self.shippingPreference = shippingPreference let request = PayPalNativeCheckoutRequest(orderID: orderID) - await self.payPalClient?.start(request: request) + self.payPalClient?.start(request: request) } catch let error { publishStateToMainThread(.mainContent(title: "Error", content: "\(error.localizedDescription)", flowComplete: true)) } diff --git a/Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift b/Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift index fe903f684..513bb8ef3 100644 --- a/Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift +++ b/Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift @@ -42,7 +42,7 @@ public class PayPalNativeCheckoutClient { public func start( request: PayPalNativeCheckoutRequest, presentingViewController: UIViewController? = nil - ) async { + ) { correlationID = State.correlationIDs.riskCorrelationID analyticsService = AnalyticsService(coreConfig: config, orderID: request.orderID) diff --git a/UnitTests/PayPalNativePaymentsTests/PayPalClient_Tests.swift b/UnitTests/PayPalNativePaymentsTests/PayPalClient_Tests.swift index 9acd9439d..2a1a51249 100644 --- a/UnitTests/PayPalNativePaymentsTests/PayPalClient_Tests.swift +++ b/UnitTests/PayPalNativePaymentsTests/PayPalClient_Tests.swift @@ -34,7 +34,7 @@ class PayPalClient_Tests: XCTestCase { let mockPayerID = "mock_payer_id" let mockPayPalDelegate = MockPayPalDelegate() payPalClient.delegate = mockPayPalDelegate - await payPalClient.start(request: request) + payPalClient.start(request: request) mockNativeCheckoutProvider.triggerApprove(orderdID: mockOrderID, payerID: mockPayerID) let result = mockPayPalDelegate.capturedResult XCTAssertEqual(result?.orderID, mockOrderID) @@ -45,7 +45,7 @@ class PayPalClient_Tests: XCTestCase { let mockPayPalDelegate = MockPayPalDelegate() payPalClient.delegate = mockPayPalDelegate - await payPalClient.start(request: request) + payPalClient.start(request: request) mockNativeCheckoutProvider.triggerCancel() XCTAssert(mockPayPalDelegate.paypalDidCancel) } @@ -54,7 +54,7 @@ class PayPalClient_Tests: XCTestCase { let mockPayPalDelegate = MockPayPalDelegate() payPalClient.delegate = mockPayPalDelegate - await payPalClient.start(request: request) + payPalClient.start(request: request) XCTAssert(mockPayPalDelegate.paypalDidStart) } @@ -63,7 +63,7 @@ class PayPalClient_Tests: XCTestCase { let errorMessage = "error_message" let mockPayPalDelegate = MockPayPalDelegate() payPalClient.delegate = mockPayPalDelegate - await payPalClient.start(request: request) + payPalClient.start(request: request) mockNativeCheckoutProvider.triggerError(errorReason: errorMessage) XCTAssertEqual(mockPayPalDelegate.capturedError?.errorDescription, errorMessage) } @@ -79,7 +79,7 @@ class PayPalClient_Tests: XCTestCase { ) payPalClient.shippingDelegate = mockShippingDelegate - await payPalClient.start(request: request) + payPalClient.start(request: request) mockNativeCheckoutProvider.triggerShippingChange( type: .shippingAddress, actions: PayPalNativePaysheetActions(MockShippingChangeActions()), @@ -106,7 +106,7 @@ class PayPalClient_Tests: XCTestCase { currencyCode: "usd" ) payPalClient.shippingDelegate = mockShippingDelegate - await payPalClient.start(request: request) + payPalClient.start(request: request) mockNativeCheckoutProvider.triggerShippingChange( type: .shippingMethod, actions: PayPalNativePaysheetActions(MockShippingChangeActions()), From 69b69b75a761f429bfa1ad2ff5776ad475c469ec Mon Sep 17 00:00:00 2001 From: Victoria Park Date: Mon, 23 Oct 2023 16:18:53 -0700 Subject: [PATCH 2/9] deprecate async native checkout start func --- Demo/Demo/ViewModels/PayPalViewModel.swift | 2 +- .../PayPalNativeCheckoutClient.swift | 35 ++++++++++++++----- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/Demo/Demo/ViewModels/PayPalViewModel.swift b/Demo/Demo/ViewModels/PayPalViewModel.swift index 1d27510de..a178963b9 100644 --- a/Demo/Demo/ViewModels/PayPalViewModel.swift +++ b/Demo/Demo/ViewModels/PayPalViewModel.swift @@ -57,7 +57,7 @@ class PayPalViewModel: ObservableObject { self.shippingPreference = shippingPreference let request = PayPalNativeCheckoutRequest(orderID: orderID) - self.payPalClient?.start(request: request) + self.payPalClient?.startNativeCheckout(request: request) } catch let error { publishStateToMainThread(.mainContent(title: "Error", content: "\(error.localizedDescription)", flowComplete: true)) } diff --git a/Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift b/Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift index 513bb8ef3..2d1f1c438 100644 --- a/Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift +++ b/Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift @@ -35,17 +35,13 @@ public class PayPalNativeCheckoutClient { self.networkingClient = networkingClient } - /// Present PayPal Paysheet and start a PayPal transaction - /// - Parameters: - /// - request: The PayPalNativeCheckoutRequest for the transaction - /// - presentingViewController: the ViewController to present PayPalPaysheet on, if not provided, the Paysheet will be presented on your top-most ViewController - public func start( + private func startPayPalNativeCheckout( request: PayPalNativeCheckoutRequest, presentingViewController: UIViewController? = nil ) { correlationID = State.correlationIDs.riskCorrelationID analyticsService = AnalyticsService(coreConfig: config, orderID: request.orderID) - + let nxoConfig = CheckoutConfig( clientID: config.clientID, createOrder: nil, @@ -56,7 +52,7 @@ public class PayPalNativeCheckoutClient { environment: config.environment.toNativeCheckoutSDKEnvironment() ) delegate?.paypalWillStart(self) - + analyticsService?.sendEvent("paypal-native-payments:started") self.nativeCheckoutProvider.start( presentingViewController: presentingViewController, @@ -94,7 +90,30 @@ public class PayPalNativeCheckoutClient { nxoConfig: nxoConfig ) } - + + /// Present PayPal Paysheet and start a PayPal transaction + /// - Parameters: + /// - request: The PayPalNativeCheckoutRequest for the transaction + /// - presentingViewController: the ViewController to present PayPalPaysheet on, if not provided, the Paysheet will be presented on your top-most ViewController + public func startNativeCheckout( + request: PayPalNativeCheckoutRequest, + presentingViewController: UIViewController? = nil + ) { + startPayPalNativeCheckout(request: request, presentingViewController: presentingViewController) + } + + /// Present PayPal Paysheet and start a PayPal transaction + /// - Parameters: + /// - request: The PayPalNativeCheckoutRequest for the transaction + /// - presentingViewController: the ViewController to present PayPalPaysheet on, if not provided, the Paysheet will be presented on your top-most ViewController + @available(*, deprecated, message: "Async function is deprecated. Use the non-async start function") + public func start( + request: PayPalNativeCheckoutRequest, + presentingViewController: UIViewController? = nil + ) async { + startPayPalNativeCheckout(request: request, presentingViewController: presentingViewController) + } + private func notifySuccess(for result: PayPalNativeCheckoutResult) { analyticsService?.sendEvent("paypal-native-payments:succeeded", correlationID: nativeCheckoutProvider.correlationID) delegate?.paypal(self, didFinishWithResult: result) From 292595c91988b6f9e280f14b530afe81f59e332a Mon Sep 17 00:00:00 2001 From: Victoria Park Date: Mon, 23 Oct 2023 16:44:06 -0700 Subject: [PATCH 3/9] fix tests with new function name --- .../PayPalClient_Tests.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/UnitTests/PayPalNativePaymentsTests/PayPalClient_Tests.swift b/UnitTests/PayPalNativePaymentsTests/PayPalClient_Tests.swift index 2a1a51249..0d0b302f3 100644 --- a/UnitTests/PayPalNativePaymentsTests/PayPalClient_Tests.swift +++ b/UnitTests/PayPalNativePaymentsTests/PayPalClient_Tests.swift @@ -34,7 +34,7 @@ class PayPalClient_Tests: XCTestCase { let mockPayerID = "mock_payer_id" let mockPayPalDelegate = MockPayPalDelegate() payPalClient.delegate = mockPayPalDelegate - payPalClient.start(request: request) + payPalClient.startNativeCheckout(request: request) mockNativeCheckoutProvider.triggerApprove(orderdID: mockOrderID, payerID: mockPayerID) let result = mockPayPalDelegate.capturedResult XCTAssertEqual(result?.orderID, mockOrderID) @@ -45,7 +45,7 @@ class PayPalClient_Tests: XCTestCase { let mockPayPalDelegate = MockPayPalDelegate() payPalClient.delegate = mockPayPalDelegate - payPalClient.start(request: request) + payPalClient.startNativeCheckout(request: request) mockNativeCheckoutProvider.triggerCancel() XCTAssert(mockPayPalDelegate.paypalDidCancel) } @@ -54,7 +54,7 @@ class PayPalClient_Tests: XCTestCase { let mockPayPalDelegate = MockPayPalDelegate() payPalClient.delegate = mockPayPalDelegate - payPalClient.start(request: request) + payPalClient.startNativeCheckout(request: request) XCTAssert(mockPayPalDelegate.paypalDidStart) } @@ -63,7 +63,7 @@ class PayPalClient_Tests: XCTestCase { let errorMessage = "error_message" let mockPayPalDelegate = MockPayPalDelegate() payPalClient.delegate = mockPayPalDelegate - payPalClient.start(request: request) + payPalClient.startNativeCheckout(request: request) mockNativeCheckoutProvider.triggerError(errorReason: errorMessage) XCTAssertEqual(mockPayPalDelegate.capturedError?.errorDescription, errorMessage) } @@ -79,7 +79,7 @@ class PayPalClient_Tests: XCTestCase { ) payPalClient.shippingDelegate = mockShippingDelegate - payPalClient.start(request: request) + payPalClient.startNativeCheckout(request: request) mockNativeCheckoutProvider.triggerShippingChange( type: .shippingAddress, actions: PayPalNativePaysheetActions(MockShippingChangeActions()), @@ -106,7 +106,7 @@ class PayPalClient_Tests: XCTestCase { currencyCode: "usd" ) payPalClient.shippingDelegate = mockShippingDelegate - payPalClient.start(request: request) + payPalClient.startNativeCheckout(request: request) mockNativeCheckoutProvider.triggerShippingChange( type: .shippingMethod, actions: PayPalNativePaysheetActions(MockShippingChangeActions()), From 51d1f1b5bd814d64e2de86eaf9950868993bfb54 Mon Sep 17 00:00:00 2001 From: Victoria Park Date: Mon, 23 Oct 2023 16:47:42 -0700 Subject: [PATCH 4/9] CHANGELOG for deprecating async start --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fe303a5b..0bf119585 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ # PayPal iOS SDK Release Notes ## unreleased +* Breaking Changes + * PayPalNativePayments + * `start` async function deprecated and replaced with `startNativeCheckout` function * CorePayments * Analytics * Update `component` from `ppcpmobilesdk` to `ppcpclientsdk` From fb36b83a96bc54829bc211cab5838ffb05350c13 Mon Sep 17 00:00:00 2001 From: Victoria Park Date: Mon, 23 Oct 2023 16:53:48 -0700 Subject: [PATCH 5/9] README for native checkout --- docs/PayPalNativePayments/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/PayPalNativePayments/README.md b/docs/PayPalNativePayments/README.md index 2c00e12ac..1d92f6eca 100644 --- a/docs/PayPalNativePayments/README.md +++ b/docs/PayPalNativePayments/README.md @@ -84,7 +84,7 @@ To start the PayPal Native checkout flow, call the `start` function on `PayPalNa ```swift let request = PayPalNativeCheckoutRequest(orderID: "") -await paypalNativeClient.start(request: request) +paypalNativeClient.startNativeCheckout(request: request) ``` Implement `PayPalNativeCheckoutDelegate` to listen for result notifications from the SDK. In this example, we implement it in a view model: From 0894b93cb32ee23dd0e5fa0d37ef419e070c5e0b Mon Sep 17 00:00:00 2001 From: Victoria Park Date: Wed, 25 Oct 2023 13:22:22 -0700 Subject: [PATCH 6/9] revert all commits to first --- CHANGELOG.md | 3 -- Demo/Demo/ViewModels/PayPalViewModel.swift | 2 +- .../PayPalNativeCheckoutClient.swift | 37 +++++-------------- .../PayPalClient_Tests.swift | 12 +++--- docs/PayPalNativePayments/README.md | 2 +- 5 files changed, 17 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bf119585..5fe303a5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,6 @@ # PayPal iOS SDK Release Notes ## unreleased -* Breaking Changes - * PayPalNativePayments - * `start` async function deprecated and replaced with `startNativeCheckout` function * CorePayments * Analytics * Update `component` from `ppcpmobilesdk` to `ppcpclientsdk` diff --git a/Demo/Demo/ViewModels/PayPalViewModel.swift b/Demo/Demo/ViewModels/PayPalViewModel.swift index a178963b9..29242b8b4 100644 --- a/Demo/Demo/ViewModels/PayPalViewModel.swift +++ b/Demo/Demo/ViewModels/PayPalViewModel.swift @@ -57,7 +57,7 @@ class PayPalViewModel: ObservableObject { self.shippingPreference = shippingPreference let request = PayPalNativeCheckoutRequest(orderID: orderID) - self.payPalClient?.startNativeCheckout(request: request) + await self.payPalClient?.start(request: request) } catch let error { publishStateToMainThread(.mainContent(title: "Error", content: "\(error.localizedDescription)", flowComplete: true)) } diff --git a/Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift b/Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift index 2d1f1c438..fe903f684 100644 --- a/Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift +++ b/Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift @@ -35,13 +35,17 @@ public class PayPalNativeCheckoutClient { self.networkingClient = networkingClient } - private func startPayPalNativeCheckout( + /// Present PayPal Paysheet and start a PayPal transaction + /// - Parameters: + /// - request: The PayPalNativeCheckoutRequest for the transaction + /// - presentingViewController: the ViewController to present PayPalPaysheet on, if not provided, the Paysheet will be presented on your top-most ViewController + public func start( request: PayPalNativeCheckoutRequest, presentingViewController: UIViewController? = nil - ) { + ) async { correlationID = State.correlationIDs.riskCorrelationID analyticsService = AnalyticsService(coreConfig: config, orderID: request.orderID) - + let nxoConfig = CheckoutConfig( clientID: config.clientID, createOrder: nil, @@ -52,7 +56,7 @@ public class PayPalNativeCheckoutClient { environment: config.environment.toNativeCheckoutSDKEnvironment() ) delegate?.paypalWillStart(self) - + analyticsService?.sendEvent("paypal-native-payments:started") self.nativeCheckoutProvider.start( presentingViewController: presentingViewController, @@ -90,30 +94,7 @@ public class PayPalNativeCheckoutClient { nxoConfig: nxoConfig ) } - - /// Present PayPal Paysheet and start a PayPal transaction - /// - Parameters: - /// - request: The PayPalNativeCheckoutRequest for the transaction - /// - presentingViewController: the ViewController to present PayPalPaysheet on, if not provided, the Paysheet will be presented on your top-most ViewController - public func startNativeCheckout( - request: PayPalNativeCheckoutRequest, - presentingViewController: UIViewController? = nil - ) { - startPayPalNativeCheckout(request: request, presentingViewController: presentingViewController) - } - - /// Present PayPal Paysheet and start a PayPal transaction - /// - Parameters: - /// - request: The PayPalNativeCheckoutRequest for the transaction - /// - presentingViewController: the ViewController to present PayPalPaysheet on, if not provided, the Paysheet will be presented on your top-most ViewController - @available(*, deprecated, message: "Async function is deprecated. Use the non-async start function") - public func start( - request: PayPalNativeCheckoutRequest, - presentingViewController: UIViewController? = nil - ) async { - startPayPalNativeCheckout(request: request, presentingViewController: presentingViewController) - } - + private func notifySuccess(for result: PayPalNativeCheckoutResult) { analyticsService?.sendEvent("paypal-native-payments:succeeded", correlationID: nativeCheckoutProvider.correlationID) delegate?.paypal(self, didFinishWithResult: result) diff --git a/UnitTests/PayPalNativePaymentsTests/PayPalClient_Tests.swift b/UnitTests/PayPalNativePaymentsTests/PayPalClient_Tests.swift index 0d0b302f3..9acd9439d 100644 --- a/UnitTests/PayPalNativePaymentsTests/PayPalClient_Tests.swift +++ b/UnitTests/PayPalNativePaymentsTests/PayPalClient_Tests.swift @@ -34,7 +34,7 @@ class PayPalClient_Tests: XCTestCase { let mockPayerID = "mock_payer_id" let mockPayPalDelegate = MockPayPalDelegate() payPalClient.delegate = mockPayPalDelegate - payPalClient.startNativeCheckout(request: request) + await payPalClient.start(request: request) mockNativeCheckoutProvider.triggerApprove(orderdID: mockOrderID, payerID: mockPayerID) let result = mockPayPalDelegate.capturedResult XCTAssertEqual(result?.orderID, mockOrderID) @@ -45,7 +45,7 @@ class PayPalClient_Tests: XCTestCase { let mockPayPalDelegate = MockPayPalDelegate() payPalClient.delegate = mockPayPalDelegate - payPalClient.startNativeCheckout(request: request) + await payPalClient.start(request: request) mockNativeCheckoutProvider.triggerCancel() XCTAssert(mockPayPalDelegate.paypalDidCancel) } @@ -54,7 +54,7 @@ class PayPalClient_Tests: XCTestCase { let mockPayPalDelegate = MockPayPalDelegate() payPalClient.delegate = mockPayPalDelegate - payPalClient.startNativeCheckout(request: request) + await payPalClient.start(request: request) XCTAssert(mockPayPalDelegate.paypalDidStart) } @@ -63,7 +63,7 @@ class PayPalClient_Tests: XCTestCase { let errorMessage = "error_message" let mockPayPalDelegate = MockPayPalDelegate() payPalClient.delegate = mockPayPalDelegate - payPalClient.startNativeCheckout(request: request) + await payPalClient.start(request: request) mockNativeCheckoutProvider.triggerError(errorReason: errorMessage) XCTAssertEqual(mockPayPalDelegate.capturedError?.errorDescription, errorMessage) } @@ -79,7 +79,7 @@ class PayPalClient_Tests: XCTestCase { ) payPalClient.shippingDelegate = mockShippingDelegate - payPalClient.startNativeCheckout(request: request) + await payPalClient.start(request: request) mockNativeCheckoutProvider.triggerShippingChange( type: .shippingAddress, actions: PayPalNativePaysheetActions(MockShippingChangeActions()), @@ -106,7 +106,7 @@ class PayPalClient_Tests: XCTestCase { currencyCode: "usd" ) payPalClient.shippingDelegate = mockShippingDelegate - payPalClient.startNativeCheckout(request: request) + await payPalClient.start(request: request) mockNativeCheckoutProvider.triggerShippingChange( type: .shippingMethod, actions: PayPalNativePaysheetActions(MockShippingChangeActions()), diff --git a/docs/PayPalNativePayments/README.md b/docs/PayPalNativePayments/README.md index 1d92f6eca..2c00e12ac 100644 --- a/docs/PayPalNativePayments/README.md +++ b/docs/PayPalNativePayments/README.md @@ -84,7 +84,7 @@ To start the PayPal Native checkout flow, call the `start` function on `PayPalNa ```swift let request = PayPalNativeCheckoutRequest(orderID: "") -paypalNativeClient.startNativeCheckout(request: request) +await paypalNativeClient.start(request: request) ``` Implement `PayPalNativeCheckoutDelegate` to listen for result notifications from the SDK. In this example, we implement it in a view model: From d13c53e7cbe80bc0e278b980670e43c2f7ffd6fd Mon Sep 17 00:00:00 2001 From: Victoria Park Date: Wed, 25 Oct 2023 13:30:40 -0700 Subject: [PATCH 7/9] add comment to remove async start on NativeCheckoutClient next major version --- Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift b/Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift index fe903f684..80b8f741e 100644 --- a/Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift +++ b/Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift @@ -39,6 +39,7 @@ public class PayPalNativeCheckoutClient { /// - Parameters: /// - request: The PayPalNativeCheckoutRequest for the transaction /// - presentingViewController: the ViewController to present PayPalPaysheet on, if not provided, the Paysheet will be presented on your top-most ViewController + // NEXT_MAJOR_VERSION: - Change to non-async public func start( request: PayPalNativeCheckoutRequest, presentingViewController: UIViewController? = nil From f899d289861fbf79ee23be97669055bbadd37e8c Mon Sep 17 00:00:00 2001 From: Victoria Park Date: Wed, 25 Oct 2023 13:37:23 -0700 Subject: [PATCH 8/9] linting error --- Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift b/Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift index 80b8f741e..fa5fc0931 100644 --- a/Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift +++ b/Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift @@ -39,11 +39,11 @@ public class PayPalNativeCheckoutClient { /// - Parameters: /// - request: The PayPalNativeCheckoutRequest for the transaction /// - presentingViewController: the ViewController to present PayPalPaysheet on, if not provided, the Paysheet will be presented on your top-most ViewController - // NEXT_MAJOR_VERSION: - Change to non-async public func start( request: PayPalNativeCheckoutRequest, presentingViewController: UIViewController? = nil ) async { + // NEXT_MAJOR_VERSION: - Change to non-async correlationID = State.correlationIDs.riskCorrelationID analyticsService = AnalyticsService(coreConfig: config, orderID: request.orderID) From dd91cffd9ccb5cd849acaf586d5379a2c82d3dff Mon Sep 17 00:00:00 2001 From: Victoria Park Date: Thu, 26 Oct 2023 11:58:18 -0700 Subject: [PATCH 9/9] move next_major_version comment up --- Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift b/Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift index fa5fc0931..03f1b9568 100644 --- a/Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift +++ b/Sources/PayPalNativePayments/PayPalNativeCheckoutClient.swift @@ -35,6 +35,7 @@ public class PayPalNativeCheckoutClient { self.networkingClient = networkingClient } + // NEXT_MAJOR_VERSION: - Change to non-async /// Present PayPal Paysheet and start a PayPal transaction /// - Parameters: /// - request: The PayPalNativeCheckoutRequest for the transaction @@ -43,7 +44,6 @@ public class PayPalNativeCheckoutClient { request: PayPalNativeCheckoutRequest, presentingViewController: UIViewController? = nil ) async { - // NEXT_MAJOR_VERSION: - Change to non-async correlationID = State.correlationIDs.riskCorrelationID analyticsService = AnalyticsService(coreConfig: config, orderID: request.orderID)