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 1
1
2
2
# PayPal iOS SDK Release Notes
3
3
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
+
4
11
## 1.1.0 (2023-11-16)
5
12
* PayPalNativePayments
6
13
* Bump ` PayPalCheckout ` to ` 1.2.0 `
Original file line number Diff line number Diff line change @@ -97,6 +97,12 @@ public class PayPalWebCheckoutClient: NSObject {
97
97
return checkoutURLComponents? . url
98
98
}
99
99
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
100
106
public func vault( url: URL ) {
101
107
webAuthenticationSession. start (
102
108
url: url,
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ class PayPalClient_Tests: XCTestCase {
88
88
XCTAssertEqual ( vaultError. code, expectedError. code)
89
89
expectation. fulfill ( )
90
90
} , cancel: { _ in
91
- expectation . fulfill ( )
91
+ XCTFail ( " Invoked cancel callback. Should invoke error(). " )
92
92
} )
93
93
payPalClient. vaultDelegate = mockVaultDelegate
94
94
payPalClient. vault ( url: url!)
@@ -111,7 +111,6 @@ class PayPalClient_Tests: XCTestCase {
111
111
112
112
let mockVaultDelegate = MockPayPalVaultDelegate ( success: { _, _ in
113
113
XCTFail ( " Invoked success() callback. Should invoke error(). " )
114
- expectation. fulfill ( )
115
114
} , error: { _, vaultError in
116
115
XCTAssertEqual ( vaultError. code, expectedError. code)
117
116
expectation. fulfill ( )
You can’t perform that action at this time.
0 commit comments