File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed
Sources/PayPalWebPayments
UnitTests/PayPalWebPaymentsTests Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 11
22# PayPal iOS SDK Release Notes
33
4+ ## unreleased
5+ * PayPalWebPayments
6+ * Add ` vault(url:) ` method to ` PayPalWebCheckoutClient `
7+ * Add ` PayPalVaultResult ` type to return vault result
8+ * Add ` PayPalVaultDelegate ` to handle results from vault flow
9+ * Add ` PayPalWebCheckoutClientError.paypalVaultResponseError ` for missing or invalid response from vaulting
10+
411## 1.1.0 (2023-11-16)
512* PayPalNativePayments
613 * Bump ` PayPalCheckout ` to ` 1.2.0 `
Original file line number Diff line number Diff line change @@ -97,6 +97,12 @@ public class PayPalWebCheckoutClient: NSObject {
9797 return checkoutURLComponents? . url
9898 }
9999
100+ /// Starts a web session for vaulting PayPal Payment Method
101+ /// After setupToken successfullly attaches a payment method, you will need to create a payment token with the setup token
102+ /// - Parameters:
103+ /// - url: URL created from string value from setupToken API
104+ /// - Returns: PayPalVaultResult
105+ /// - Throws: PayPalSDK error if vaulting could not complete successfully
100106 public func vault( url: URL ) {
101107 webAuthenticationSession. start (
102108 url: url,
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ class PayPalClient_Tests: XCTestCase {
8888 XCTAssertEqual ( vaultError. code, expectedError. code)
8989 expectation. fulfill ( )
9090 } , cancel: { _ in
91- expectation . fulfill ( )
91+ XCTFail ( " Invoked cancel callback. Should invoke error(). " )
9292 } )
9393 payPalClient. vaultDelegate = mockVaultDelegate
9494 payPalClient. vault ( url: url!)
@@ -111,7 +111,6 @@ class PayPalClient_Tests: XCTestCase {
111111
112112 let mockVaultDelegate = MockPayPalVaultDelegate ( success: { _, _ in
113113 XCTFail ( " Invoked success() callback. Should invoke error(). " )
114- expectation. fulfill ( )
115114 } , error: { _, vaultError in
116115 XCTAssertEqual ( vaultError. code, expectedError. code)
117116 expectation. fulfill ( )
You can’t perform that action at this time.
0 commit comments