diff --git a/Sources/BraintreePayPal/BTPayPalRequest.swift b/Sources/BraintreePayPal/BTPayPalRequest.swift index e57ff8176..c73a65565 100644 --- a/Sources/BraintreePayPal/BTPayPalRequest.swift +++ b/Sources/BraintreePayPal/BTPayPalRequest.swift @@ -7,7 +7,7 @@ import BraintreeCore @objc public enum BTPayPalPaymentType: Int { /// Checkout case checkout - + /// Vault case vault @@ -163,7 +163,7 @@ import BraintreeCore isPayPalAppInstalled: Bool = false ) -> [String: Any] { var experienceProfile: [String: Any] = [:] - + experienceProfile["no_shipping"] = !isShippingAddressRequired experienceProfile["brand_name"] = displayName != nil ? displayName : configuration.json?["paypal"]["displayName"].asString() @@ -203,7 +203,7 @@ import BraintreeCore if let shopperSessionID { parameters["shopper_session_id"] = shopperSessionID } - + parameters["return_url"] = BTCoreConstants.callbackURLScheme + "://\(BTPayPalRequest.callbackURLHostAndPath)success" parameters["cancel_url"] = BTCoreConstants.callbackURLScheme + "://\(BTPayPalRequest.callbackURLHostAndPath)cancel" parameters["experience_profile"] = experienceProfile diff --git a/UnitTests/BraintreePayPalTests/BTPayPalClient_Tests.swift b/UnitTests/BraintreePayPalTests/BTPayPalClient_Tests.swift index 149b45289..8696cdd39 100644 --- a/UnitTests/BraintreePayPalTests/BTPayPalClient_Tests.swift +++ b/UnitTests/BraintreePayPalTests/BTPayPalClient_Tests.swift @@ -781,7 +781,7 @@ class BTPayPalClient_Tests: XCTestCase { XCTFail("Expected integer value for query param `switch_initiated_time`") } } - + func testTokenizeVaultAccount_whenPayPalAppApprovalURLMissingBAToken_returnsError() { let fakeApplication = FakeApplication() payPalClient.application = fakeApplication @@ -800,7 +800,7 @@ class BTPayPalClient_Tests: XCTestCase { let expectation = expectation(description: "completion block called") payPalClient.tokenize(vaultRequest) { nonce, error in XCTAssertNil(nonce) - + guard let error = error as NSError? else { XCTFail(); return } XCTAssertEqual(error.code, 12) XCTAssertEqual(error.localizedDescription, "Missing BA Token for PayPal App Switch.")