diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 677cf0e726..0a8ee14776 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -100,7 +100,6 @@ jobs: # run sourcekitten on each Swift module individually sourcekitten doc -- -workspace Braintree.xcworkspace -scheme BraintreeCore -destination 'name=iPhone 14,platform=iOS Simulator' > braintree-core.json - sourcekitten doc -- -workspace Braintree.xcworkspace -scheme BraintreePayPalNativeCheckout -destination 'name=iPhone 14,platform=iOS Simulator' > braintree-pay-pal-native-checkout.json sourcekitten doc -- -workspace Braintree.xcworkspace -scheme BraintreeSEPADirectDebit -destination 'name=iPhone 14,platform=iOS Simulator' > braintree-sepa-direct-debit.json sourcekitten doc -- -workspace Braintree.xcworkspace -scheme BraintreeAmericanExpress -destination 'name=iPhone 14,platform=iOS Simulator' > braintree-american-express.json sourcekitten doc -- -workspace Braintree.xcworkspace -scheme BraintreeDataCollector -destination 'name=iPhone 14,platform=iOS Simulator' > braintree-data-collector.json @@ -114,7 +113,7 @@ jobs: sourcekitten doc -- -workspace Braintree.xcworkspace -scheme BraintreeShopperInsights -destination 'name=iPhone 14,platform=iOS Simulator' > braintree-shopper-insights.json # merge sourcekitten output - jq -s '.[0] + .[1] + .[2] + .[3] + .[4] + .[5] + .[6] + .[7] + .[8] + .[9] + .[10] + .[11] + .[12]' braintree-core.json braintree-pay-pal-native-checkout.json braintree-sepa-direct-debit.json braintree-american-express.json braintree-data-collector.json braintree-apple-pay.json braintree-local-payment.json braintree-three-d-secure.json braintree-card.json braintree-paypal.json braintree-venmo.json braintree-paypal-messaging.json braintree-shopper-insights.json > swiftDoc.json + jq -s '.[0] + .[1] + .[2] + .[3] + .[4] + .[5] + .[6] + .[7] + .[8] + .[9] + .[10] + .[11] + .[12]' braintree-core.json braintree-sepa-direct-debit.json braintree-american-express.json braintree-data-collector.json braintree-apple-pay.json braintree-local-payment.json braintree-three-d-secure.json braintree-card.json braintree-paypal.json braintree-venmo.json braintree-paypal-messaging.json braintree-shopper-insights.json > swiftDoc.json jazzy \ --sourcekitten-sourcefile swiftDoc.json \ diff --git a/Braintree.podspec b/Braintree.podspec index 06090d54ad..dda5571a3e 100644 --- a/Braintree.podspec +++ b/Braintree.podspec @@ -79,14 +79,6 @@ Pod::Spec.new do |s| s.resource_bundle = { "BraintreeShopperInsights_PrivacyInfo" => "Sources/BraintreeShopperInsights/PrivacyInfo.xcprivacy" } end - s.subspec "PayPalNativeCheckout" do |s| - s.source_files = "Sources/BraintreePayPalNativeCheckout/**/*.{swift}" - s.dependency "Braintree/Core" - s.dependency "Braintree/PayPal" - s.dependency "PayPalCheckout", '1.3.0' - s.resource_bundle = { "BraintreePayPalNativeCheckout_PrivacyInfo" => "Sources/BraintreePayPalNativeCheckout/PrivacyInfo.xcprivacy" } - end - s.subspec "PayPalMessaging" do |s| s.source_files = "Sources/BraintreePayPalMessaging/**/*.{swift}" s.dependency "Braintree/Core" diff --git a/Braintree.xcodeproj/project.pbxproj b/Braintree.xcodeproj/project.pbxproj index 2f7e6674e1..46d51f5f8e 100644 --- a/Braintree.xcodeproj/project.pbxproj +++ b/Braintree.xcodeproj/project.pbxproj @@ -26,24 +26,6 @@ 3BE8FFFC29EDDAF500869166 /* BTLocalPaymentAnalytics_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BE8FFFB29EDDAF500869166 /* BTLocalPaymentAnalytics_Tests.swift */; }; 3BEB03C529FD55CA001133D5 /* BTThreeDSecureAnalytics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BEB03C429FD55CA001133D5 /* BTThreeDSecureAnalytics.swift */; }; 3BEB03C829FD5716001133D5 /* BTThreeDSecureAnalytics_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BEB03C629FD5669001133D5 /* BTThreeDSecureAnalytics_Tests.swift */; }; - 3BF7FFC829D123F9005CA469 /* BTPayPalNativeCheckoutAnalytics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BF7FFC729D123F9005CA469 /* BTPayPalNativeCheckoutAnalytics.swift */; }; - 3BF7FFCC29D1D4D0005CA469 /* BTPayPalNativeCheckoutAnalytics_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BF7FFC929D1D480005CA469 /* BTPayPalNativeCheckoutAnalytics_Tests.swift */; }; - 3DAB5933286B40E2003A7BC5 /* BTPayPalNativeCheckoutRequest_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DAB5932286B40E2003A7BC5 /* BTPayPalNativeCheckoutRequest_Tests.swift */; }; - 3DAB5937286B9C6E003A7BC5 /* BTPayPalNativeHermesResponse_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DAB5936286B9C6E003A7BC5 /* BTPayPalNativeHermesResponse_Tests.swift */; }; - 3DAB5939286BA3D0003A7BC5 /* BTPayPalNativeTokenizationClient_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DAB5938286BA3D0003A7BC5 /* BTPayPalNativeTokenizationClient_Tests.swift */; }; - 3DAB593B286BD865003A7BC5 /* BTPayPalNativeOrderCreationClient_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DAB593A286BD865003A7BC5 /* BTPayPalNativeOrderCreationClient_Tests.swift */; }; - 3DAB593D286C032B003A7BC5 /* BTPayPalNativeTokenizationRequest_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DAB593C286C032B003A7BC5 /* BTPayPalNativeTokenizationRequest_Tests.swift */; }; - 3DAB593F286CB967003A7BC5 /* BTPayPalNativeCheckoutClient_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DAB593E286CB967003A7BC5 /* BTPayPalNativeCheckoutClient_Tests.swift */; }; - 3DF38AE828523F7500225F2A /* BTPayPalNativeVaultRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DF38AE728523F7500225F2A /* BTPayPalNativeVaultRequest.swift */; }; - 3DF38AEA28523FC300225F2A /* BTPayPalNativeTokenizationRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DF38AE928523FC300225F2A /* BTPayPalNativeTokenizationRequest.swift */; }; - 3DF38AEC2852421B00225F2A /* BTPayPalNativeTokenizationClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DF38AEB2852421B00225F2A /* BTPayPalNativeTokenizationClient.swift */; }; - 3DF38AEE2852488E00225F2A /* BTPayPalNativeOrderCreationClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DF38AED2852488E00225F2A /* BTPayPalNativeOrderCreationClient.swift */; }; - 3DF38AF02852493700225F2A /* BTPayPalNativeHermesResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DF38AEF2852493700225F2A /* BTPayPalNativeHermesResponse.swift */; }; - 3DF38AF2285249AE00225F2A /* BTPayPalNativeCheckoutError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DF38AF1285249AE00225F2A /* BTPayPalNativeCheckoutError.swift */; }; - 3DF38AF428524A0800225F2A /* BTPayPalNativeCheckoutClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DF38AF328524A0800225F2A /* BTPayPalNativeCheckoutClient.swift */; }; - 3DF38AFD28590B5600225F2A /* BTPayPalNativeCheckoutRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DF38AFC28590B5600225F2A /* BTPayPalNativeCheckoutRequest.swift */; }; - 3DF4B4CA285A74200072DC60 /* BTPayPalNativeVaultRequest_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DF4B4C9285A74200072DC60 /* BTPayPalNativeVaultRequest_Tests.swift */; }; - 3DF4B4CD285B77A80072DC60 /* BraintreePayPal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D941D381B59C76A0016EFB4 /* BraintreePayPal.framework */; }; 4228D80D2624D8C9001D2564 /* BTVenmoAccountNonce_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4228D80C2624D8C9001D2564 /* BTVenmoAccountNonce_Tests.swift */; }; 4228D8692624E5C3001D2564 /* BTVenmoRequest_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4228D8682624E5C3001D2564 /* BTVenmoRequest_Tests.swift */; }; 4245D669256C255F00F1A413 /* BTVenmoAppSwitchReturnURL_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4245D668256C255F00F1A413 /* BTVenmoAppSwitchReturnURL_Tests.swift */; }; @@ -66,7 +48,6 @@ 5708E0A828809BC6007946B9 /* BTJSONError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5708E0A728809BC6007946B9 /* BTJSONError.swift */; }; 570B93D72853C29A0041BAFE /* BTLogLevelDescription.swift in Sources */ = {isa = PBXBuildFile; fileRef = 570B93D62853C29A0041BAFE /* BTLogLevelDescription.swift */; }; 570B93D92853C6180041BAFE /* BTLogLevel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 570B93D82853C6180041BAFE /* BTLogLevel.swift */; }; - 57108A1C28342BC1004EB870 /* BTPayPalNativeCheckoutAccountNonce.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57108A1B28342BC1004EB870 /* BTPayPalNativeCheckoutAccountNonce.swift */; }; 574891E9286F7D300020DA36 /* BTClientMetadataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 574891E8286F7D300020DA36 /* BTClientMetadataSource.swift */; }; 574891EB286F7E4F0020DA36 /* BTClientMetadataIntegration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 574891EA286F7E4F0020DA36 /* BTClientMetadataIntegration.swift */; }; 574891ED286F7ECA0020DA36 /* BTClientMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = 574891EC286F7ECA0020DA36 /* BTClientMetadata.swift */; }; @@ -91,7 +72,6 @@ 62A659A42B98CB23008DFD67 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 62A659A32B98CB23008DFD67 /* PrivacyInfo.xcprivacy */; }; 62A746412B9255AC003D32FF /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 62A746402B9255AC003D32FF /* PrivacyInfo.xcprivacy */; }; 62B811882CC002470024A688 /* BTPayPalPhoneNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62B811872CC002470024A688 /* BTPayPalPhoneNumber.swift */; }; - 62D5EC502B9F6E9D00D09C5D /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 62D5EC4F2B9F6E9D00D09C5D /* PrivacyInfo.xcprivacy */; }; 62DE8FBF2B9656BF00F08F53 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 62DE8FBE2B9656BF00F08F53 /* PrivacyInfo.xcprivacy */; }; 62EA90492B63071800DD79BC /* BTEligiblePaymentMethods.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62EA90482B63071800DD79BC /* BTEligiblePaymentMethods.swift */; }; 800E78C429E0DD5300D1B0FC /* FPTIBatchData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 800E78C329E0DD5300D1B0FC /* FPTIBatchData.swift */; }; @@ -154,7 +134,6 @@ 9C3F55EF275E80DA00C21C8A /* BTAmericanExpressError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C3F55EE275E80DA00C21C8A /* BTAmericanExpressError.swift */; }; 9C67362827E247270089BD99 /* CreateMandateResult_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C67362727E247270089BD99 /* CreateMandateResult_Tests.swift */; }; 9C67362E27E3DAB90089BD99 /* BTSEPADirectDebitError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C67362D27E3DAB90089BD99 /* BTSEPADirectDebitError.swift */; }; - 9CE5179F282D54030013C740 /* BraintreePayPalNativeCheckout.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CE51784282D51DD0013C740 /* BraintreePayPalNativeCheckout.framework */; platformFilter = ios; }; 9CE8C7FA275ABDE700FB11F9 /* BTAmericanExpressClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CE8C7F9275ABDE700FB11F9 /* BTAmericanExpressClient.swift */; }; A903E1AE24F9D35500C314E1 /* FakeBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42ED470123A3E9DB00B889A8 /* FakeBundle.swift */; }; A903E1B124F9D35500C314E1 /* FakeApplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42ED46FF23A3E9AE00B889A8 /* FakeApplication.swift */; }; @@ -297,10 +276,6 @@ BE9BD7C52888467700022983 /* BraintreeDataCollector.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A76D7C001BB1CAB00000FA6A /* BraintreeDataCollector.framework */; }; BE9BD7EB28884EA100022983 /* BraintreeCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 570B93AC285397520041BAFE /* BraintreeCore.framework */; }; BE9BD7EF2888517300022983 /* BraintreeCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 570B93AC285397520041BAFE /* BraintreeCore.framework */; }; - BE9D76BC2A03F92F00DF9023 /* PayPalCheckout in Frameworks */ = {isa = PBXBuildFile; productRef = BE9D76BB2A03F92F00DF9023 /* PayPalCheckout */; }; - BE9E07EF2B18FBA000EF32A4 /* BTPayPalNativeCheckoutStartable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE9E07EE2B18FBA000EF32A4 /* BTPayPalNativeCheckoutStartable.swift */; }; - BE9E07F12B18FC0B00EF32A4 /* BTPayPalNativeCheckoutProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE9E07F02B18FC0B00EF32A4 /* BTPayPalNativeCheckoutProvider.swift */; }; - BE9E07F32B18FC9200EF32A4 /* BTPayPalNativeCheckoutProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE9E07F22B18FC9200EF32A4 /* BTPayPalNativeCheckoutProtocol.swift */; }; BE9EC0982899CF040022EC63 /* BTAPIPinnedCertificates.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE9EC0972899CF040022EC63 /* BTAPIPinnedCertificates.swift */; }; BE9FB82B2898324C00D6FE2F /* BTPaymentMethodNonce.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE9FB82A2898324C00D6FE2F /* BTPaymentMethodNonce.swift */; }; BE9FB82D28984ADE00D6FE2F /* BTPaymentMethodNonceParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE9FB82C28984ADE00D6FE2F /* BTPaymentMethodNonceParser.swift */; }; @@ -317,7 +292,6 @@ BEB9BF532A26872B00A3673E /* BTWebAuthenticationSessionClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEB9BF522A26872B00A3673E /* BTWebAuthenticationSessionClient.swift */; }; BEBA590F2BB1B5B9005FA8A2 /* BTPayPalReturnURL_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEBA590E2BB1B5B9005FA8A2 /* BTPayPalReturnURL_Tests.swift */; }; BEBC222728D25BB400D83186 /* Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80DBE69423A931A600373230 /* Helpers.swift */; }; - BEBC6E4B29258FD4004E25A0 /* BraintreeCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 570B93AC285397520041BAFE /* BraintreeCore.framework */; }; BEBC6E5E2927CF59004E25A0 /* Braintree.h in Headers */ = {isa = PBXBuildFile; fileRef = BEBC6E5D2927CF59004E25A0 /* Braintree.h */; settings = {ATTRIBUTES = (Public, ); }; }; BEBC6F262937A510004E25A0 /* BTClientMetadata_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEBC6F252937A510004E25A0 /* BTClientMetadata_Tests.swift */; }; BEBC6F282937BD1F004E25A0 /* BTGraphQLHTTP_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEBC6F272937BD1F004E25A0 /* BTGraphQLHTTP_Tests.swift */; }; @@ -328,8 +302,6 @@ BEBD05242A1FEE150003C15C /* MockWebAuthenticationSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEBD05232A1FEE150003C15C /* MockWebAuthenticationSession.swift */; }; BEBF0C202B02793B0079DA74 /* BTThreeDSecureUIType.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEBF0C1F2B02793B0079DA74 /* BTThreeDSecureUIType.swift */; }; BEBF0C222B0279F10079DA74 /* BTThreeDSecureRenderType.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEBF0C212B0279F10079DA74 /* BTThreeDSecureRenderType.swift */; }; - BEC251E82B1E457100E4B47C /* BTPayPalNativeCheckoutProvider_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEC251E72B1E457100E4B47C /* BTPayPalNativeCheckoutProvider_Tests.swift */; }; - BEC251EA2B1E49C600E4B47C /* MockBTPayPalNativeCheckoutProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEC251E92B1E49C600E4B47C /* MockBTPayPalNativeCheckoutProvider.swift */; }; BEC3F11328A4401E0074DF0F /* BTHTTPError.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEC3F11228A4401E0074DF0F /* BTHTTPError.swift */; }; BEC66DBE2901CC9E0030B6B2 /* BraintreeCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 570B93AC285397520041BAFE /* BraintreeCore.framework */; }; BECB10C62B5999EE008D398E /* BTPayPalLineItem_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BECB10C52B5999EE008D398E /* BTPayPalLineItem_Tests.swift */; }; @@ -347,12 +319,10 @@ BEDA91A028EDDE64007441D9 /* FakeAnalyticsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEDA919F28EDDE64007441D9 /* FakeAnalyticsService.swift */; }; BEDB820229B109EE00075AF3 /* BTApplePayAnalytics.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEDB820129B109EE00075AF3 /* BTApplePayAnalytics.swift */; }; BEDB820429B10ADA00075AF3 /* BTApplePayAnalytics_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEDB820329B10ADA00075AF3 /* BTApplePayAnalytics_Tests.swift */; }; - BEDB820629B13F9500075AF3 /* BTPayPalNativeCheckoutAccountNonce_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEDB820529B13F9500075AF3 /* BTPayPalNativeCheckoutAccountNonce_Tests.swift */; }; BEDB820829B675DC00075AF3 /* BTVenmoAccountNonce.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEDB820729B675DC00075AF3 /* BTVenmoAccountNonce.swift */; }; BEDB820A29B7A9E600075AF3 /* BTVenmoClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEDB820929B7A9E600075AF3 /* BTVenmoClient.swift */; }; BEDEAF112AC1D049004EA970 /* BTPayPalAccountNonce_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEDEAF102AC1D049004EA970 /* BTPayPalAccountNonce_Tests.swift */; }; BEE2E4A728FDB64400C03FDD /* BTAnalyticsService_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEE2E4A628FDB64400C03FDD /* BTAnalyticsService_Tests.swift */; }; - BEE2E4B9290043A200C03FDD /* PayPalCheckout in Frameworks */ = {isa = PBXBuildFile; productRef = BEE2E4B8290043A200C03FDD /* PayPalCheckout */; }; BEE2E4E6290080BD00C03FDD /* BTAnalyticsServiceError.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEE2E4E5290080BD00C03FDD /* BTAnalyticsServiceError.swift */; }; BEEB56592AE9B2A30029F264 /* BTAPIClient_IntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEEB56582AE9B2A30029F264 /* BTAPIClient_IntegrationTests.swift */; }; BEEB565B2AE9B3030029F264 /* BTIntegrationTestsConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEEB565A2AE9B3030029F264 /* BTIntegrationTestsConstants.swift */; }; @@ -377,13 +347,6 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 3DF4B4CB285B77960072DC60 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 2D941D371B59C76A0016EFB4; - remoteInfo = BraintreePayPal; - }; 804698432B27C5530090878E /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = A75DA344192138F000D997A2 /* Project object */; @@ -405,13 +368,6 @@ remoteGlobalIDString = 570B936A285397520041BAFE; remoteInfo = BraintreeCore; }; - 9CE517A0282D54030013C740 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 9CE51766282D51DD0013C740; - remoteInfo = BraintreePayPalNativeCheckout; - }; A91E1E9024FEDD7F007540E5 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = A75DA344192138F000D997A2 /* Project object */; @@ -657,13 +613,6 @@ remoteGlobalIDString = 570B936A285397520041BAFE; remoteInfo = BraintreeCoreSwift; }; - BEBC6E4929258FCF004E25A0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A75DA344192138F000D997A2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 570B936A285397520041BAFE; - remoteInfo = BraintreeCore; - }; BEC66DBC2901CC990030B6B2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = A75DA344192138F000D997A2 /* Project object */; @@ -751,23 +700,6 @@ 3BE8FFFB29EDDAF500869166 /* BTLocalPaymentAnalytics_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTLocalPaymentAnalytics_Tests.swift; sourceTree = ""; }; 3BEB03C429FD55CA001133D5 /* BTThreeDSecureAnalytics.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTThreeDSecureAnalytics.swift; sourceTree = ""; }; 3BEB03C629FD5669001133D5 /* BTThreeDSecureAnalytics_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTThreeDSecureAnalytics_Tests.swift; sourceTree = ""; }; - 3BF7FFC729D123F9005CA469 /* BTPayPalNativeCheckoutAnalytics.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalNativeCheckoutAnalytics.swift; sourceTree = ""; }; - 3BF7FFC929D1D480005CA469 /* BTPayPalNativeCheckoutAnalytics_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalNativeCheckoutAnalytics_Tests.swift; sourceTree = ""; }; - 3DAB5932286B40E2003A7BC5 /* BTPayPalNativeCheckoutRequest_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalNativeCheckoutRequest_Tests.swift; sourceTree = ""; }; - 3DAB5936286B9C6E003A7BC5 /* BTPayPalNativeHermesResponse_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalNativeHermesResponse_Tests.swift; sourceTree = ""; }; - 3DAB5938286BA3D0003A7BC5 /* BTPayPalNativeTokenizationClient_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalNativeTokenizationClient_Tests.swift; sourceTree = ""; }; - 3DAB593A286BD865003A7BC5 /* BTPayPalNativeOrderCreationClient_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalNativeOrderCreationClient_Tests.swift; sourceTree = ""; }; - 3DAB593C286C032B003A7BC5 /* BTPayPalNativeTokenizationRequest_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalNativeTokenizationRequest_Tests.swift; sourceTree = ""; }; - 3DAB593E286CB967003A7BC5 /* BTPayPalNativeCheckoutClient_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalNativeCheckoutClient_Tests.swift; sourceTree = ""; }; - 3DF38AE728523F7500225F2A /* BTPayPalNativeVaultRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalNativeVaultRequest.swift; sourceTree = ""; }; - 3DF38AE928523FC300225F2A /* BTPayPalNativeTokenizationRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalNativeTokenizationRequest.swift; sourceTree = ""; }; - 3DF38AEB2852421B00225F2A /* BTPayPalNativeTokenizationClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalNativeTokenizationClient.swift; sourceTree = ""; }; - 3DF38AED2852488E00225F2A /* BTPayPalNativeOrderCreationClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalNativeOrderCreationClient.swift; sourceTree = ""; }; - 3DF38AEF2852493700225F2A /* BTPayPalNativeHermesResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalNativeHermesResponse.swift; sourceTree = ""; }; - 3DF38AF1285249AE00225F2A /* BTPayPalNativeCheckoutError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalNativeCheckoutError.swift; sourceTree = ""; }; - 3DF38AF328524A0800225F2A /* BTPayPalNativeCheckoutClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalNativeCheckoutClient.swift; sourceTree = ""; }; - 3DF38AFC28590B5600225F2A /* BTPayPalNativeCheckoutRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalNativeCheckoutRequest.swift; sourceTree = ""; }; - 3DF4B4C9285A74200072DC60 /* BTPayPalNativeVaultRequest_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalNativeVaultRequest_Tests.swift; sourceTree = ""; }; 4149C91C1BA218830090665E /* BTPaymentMethodNonceParser_Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BTPaymentMethodNonceParser_Tests.swift; sourceTree = ""; }; 4228D80C2624D8C9001D2564 /* BTVenmoAccountNonce_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTVenmoAccountNonce_Tests.swift; sourceTree = ""; }; 4228D8682624E5C3001D2564 /* BTVenmoRequest_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTVenmoRequest_Tests.swift; sourceTree = ""; }; @@ -804,9 +736,7 @@ 570B93AF2853980C0041BAFE /* BTAPIClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTAPIClient.swift; sourceTree = ""; }; 570B93D62853C29A0041BAFE /* BTLogLevelDescription.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTLogLevelDescription.swift; sourceTree = ""; }; 570B93D82853C6180041BAFE /* BTLogLevel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTLogLevel.swift; sourceTree = ""; }; - 57108A0C282D5E23004EB870 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 57108A0E2832E1DE004EB870 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; - 57108A1B28342BC1004EB870 /* BTPayPalNativeCheckoutAccountNonce.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalNativeCheckoutAccountNonce.swift; sourceTree = ""; }; 574891E8286F7D300020DA36 /* BTClientMetadataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTClientMetadataSource.swift; sourceTree = ""; }; 574891EA286F7E4F0020DA36 /* BTClientMetadataIntegration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTClientMetadataIntegration.swift; sourceTree = ""; }; 574891EC286F7ECA0020DA36 /* BTClientMetadata.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTClientMetadata.swift; sourceTree = ""; }; @@ -832,7 +762,6 @@ 62A659A32B98CB23008DFD67 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; 62A746402B9255AC003D32FF /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; 62B811872CC002470024A688 /* BTPayPalPhoneNumber.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalPhoneNumber.swift; sourceTree = ""; }; - 62D5EC4F2B9F6E9D00D09C5D /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; 62DE8FBE2B9656BF00F08F53 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; 62EA90482B63071800DD79BC /* BTEligiblePaymentMethods.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTEligiblePaymentMethods.swift; sourceTree = ""; }; 800E23DC22206A8300C5D22E /* BTThreeDSecureAuthenticateJWT_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTThreeDSecureAuthenticateJWT_Tests.swift; sourceTree = ""; }; @@ -877,7 +806,6 @@ 80A6C6182B21205900416D50 /* UIApplication+URLOpener.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIApplication+URLOpener.swift"; sourceTree = ""; }; 80AD35F12BFBB1DD00BF890E /* TokenizationKeyError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TokenizationKeyError.swift; sourceTree = ""; }; 80B207322BF6C0F100787E37 /* TokenizationKey.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TokenizationKey.swift; sourceTree = ""; }; - 80B6190C28C9535F00FB5022 /* PayPalCheckout.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = PayPalCheckout.xcframework; path = Frameworks/XCFrameworks/PayPalCheckout.xcframework; sourceTree = ""; }; 80BA3C282B23892700900BBB /* FakeRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeRequest.swift; sourceTree = ""; }; 80BA64AB29D788E000E15264 /* BTLocalPaymentResult.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTLocalPaymentResult.swift; sourceTree = ""; }; 80BA64B129D7937E00E15264 /* BTLocalPaymentRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTLocalPaymentRequest.swift; sourceTree = ""; }; @@ -905,8 +833,6 @@ 9C3F55EE275E80DA00C21C8A /* BTAmericanExpressError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTAmericanExpressError.swift; sourceTree = ""; }; 9C67362727E247270089BD99 /* CreateMandateResult_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateMandateResult_Tests.swift; sourceTree = ""; }; 9C67362D27E3DAB90089BD99 /* BTSEPADirectDebitError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTSEPADirectDebitError.swift; sourceTree = ""; }; - 9CE51784282D51DD0013C740 /* BraintreePayPalNativeCheckout.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BraintreePayPalNativeCheckout.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 9CE5179B282D54030013C740 /* BraintreePayPalNativeCheckoutTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BraintreePayPalNativeCheckoutTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 9CE8C7F9275ABDE700FB11F9 /* BTAmericanExpressClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTAmericanExpressClient.swift; sourceTree = ""; }; A50C3BC41C1B3F1500612D90 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; A71F7DE61B6180A3005DA1B0 /* BTVenmoClient_Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BTVenmoClient_Tests.swift; sourceTree = ""; }; @@ -1037,9 +963,6 @@ BE98349D2A041AA600B6C3CC /* BTConfiguration+Venmo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "BTConfiguration+Venmo.swift"; sourceTree = ""; }; BE98349F2A041B0A00B6C3CC /* BTConfiguration+ThreeDSecure.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "BTConfiguration+ThreeDSecure.swift"; sourceTree = ""; }; BE9834A12A041B6200B6C3CC /* BTConfiguration+LocalPayment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "BTConfiguration+LocalPayment.swift"; sourceTree = ""; }; - BE9E07EE2B18FBA000EF32A4 /* BTPayPalNativeCheckoutStartable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalNativeCheckoutStartable.swift; sourceTree = ""; }; - BE9E07F02B18FC0B00EF32A4 /* BTPayPalNativeCheckoutProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalNativeCheckoutProvider.swift; sourceTree = ""; }; - BE9E07F22B18FC9200EF32A4 /* BTPayPalNativeCheckoutProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalNativeCheckoutProtocol.swift; sourceTree = ""; }; BE9EC0972899CF040022EC63 /* BTAPIPinnedCertificates.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTAPIPinnedCertificates.swift; sourceTree = ""; }; BE9FB82A2898324C00D6FE2F /* BTPaymentMethodNonce.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPaymentMethodNonce.swift; sourceTree = ""; }; BE9FB82C28984ADE00D6FE2F /* BTPaymentMethodNonceParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPaymentMethodNonceParser.swift; sourceTree = ""; }; @@ -1063,8 +986,6 @@ BEBD05232A1FEE150003C15C /* MockWebAuthenticationSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockWebAuthenticationSession.swift; sourceTree = ""; }; BEBF0C1F2B02793B0079DA74 /* BTThreeDSecureUIType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTThreeDSecureUIType.swift; sourceTree = ""; }; BEBF0C212B0279F10079DA74 /* BTThreeDSecureRenderType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTThreeDSecureRenderType.swift; sourceTree = ""; }; - BEC251E72B1E457100E4B47C /* BTPayPalNativeCheckoutProvider_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalNativeCheckoutProvider_Tests.swift; sourceTree = ""; }; - BEC251E92B1E49C600E4B47C /* MockBTPayPalNativeCheckoutProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockBTPayPalNativeCheckoutProvider.swift; sourceTree = ""; }; BEC3F11228A4401E0074DF0F /* BTHTTPError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTHTTPError.swift; sourceTree = ""; }; BECA56C929C3F0A80098EC3C /* BTThreeDSecureV2UICustomization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTThreeDSecureV2UICustomization.swift; sourceTree = ""; }; BECB10C52B5999EE008D398E /* BTPayPalLineItem_Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BTPayPalLineItem_Tests.swift; sourceTree = ""; }; @@ -1082,7 +1003,6 @@ BEDA919F28EDDE64007441D9 /* FakeAnalyticsService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAnalyticsService.swift; sourceTree = ""; }; BEDB820129B109EE00075AF3 /* BTApplePayAnalytics.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTApplePayAnalytics.swift; sourceTree = ""; }; BEDB820329B10ADA00075AF3 /* BTApplePayAnalytics_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTApplePayAnalytics_Tests.swift; sourceTree = ""; }; - BEDB820529B13F9500075AF3 /* BTPayPalNativeCheckoutAccountNonce_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalNativeCheckoutAccountNonce_Tests.swift; sourceTree = ""; }; BEDB820729B675DC00075AF3 /* BTVenmoAccountNonce.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTVenmoAccountNonce.swift; sourceTree = ""; }; BEDB820929B7A9E600075AF3 /* BTVenmoClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTVenmoClient.swift; sourceTree = ""; }; BEDE06942FEDCD2F91884DA9 /* Pods-Tests-IntegrationTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests-IntegrationTests.release.xcconfig"; path = "Target Support Files/Pods-Tests-IntegrationTests/Pods-Tests-IntegrationTests.release.xcconfig"; sourceTree = ""; }; @@ -1166,22 +1086,10 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9CE51771282D51DD0013C740 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - BEBC6E4B29258FD4004E25A0 /* BraintreeCore.framework in Frameworks */, - 3DF4B4CD285B77A80072DC60 /* BraintreePayPal.framework in Frameworks */, - BE9D76BC2A03F92F00DF9023 /* PayPalCheckout in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 9CE51798282D54030013C740 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 9CE5179F282D54030013C740 /* BraintreePayPalNativeCheckout.framework in Frameworks */, - BEE2E4B9290043A200C03FDD /* PayPalCheckout in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1613,7 +1521,6 @@ 038C7FBB1EA1648900241ABE /* BraintreeLocalPayment */, 2D941D391B59C76A0016EFB4 /* BraintreePayPal */, BECC91942B20DF7F00A2EE42 /* BraintreePayPalMessaging */, - 9CE51786282D527E0013C740 /* BraintreePayPalNativeCheckout */, BEF3F17027CE9E2600072467 /* BraintreeSEPADirectDebit */, 804698292B27C4D70090878E /* BraintreeShopperInsights */, A91E1EAC24FEEF21007540E5 /* BraintreeThreeDSecure */, @@ -1632,7 +1539,6 @@ A9E5C19F24FD5A7C00EE691F /* BraintreeDataCollectorTests */, A91E1E8B24FEDD7F007540E5 /* BraintreeLocalPaymentTests */, BECC91952B20DF9800A2EE42 /* BraintreePayPalMessagingTests */, - 9CE5179C282D54030013C740 /* BraintreePayPalNativeCheckoutTests */, A9E5C1E124FD665D00EE691F /* BraintreePayPalTests */, BE642D8B27D0129D00694A5B /* BraintreeSEPADirectDebitTests */, 8046982A2B27C4E80090878E /* BraintreeShopperInsightsTests */, @@ -1682,46 +1588,6 @@ path = ThreeDSecureV2Customization_Tests; sourceTree = ""; }; - 9CE51786282D527E0013C740 /* BraintreePayPalNativeCheckout */ = { - isa = PBXGroup; - children = ( - 57108A1B28342BC1004EB870 /* BTPayPalNativeCheckoutAccountNonce.swift */, - 3BF7FFC729D123F9005CA469 /* BTPayPalNativeCheckoutAnalytics.swift */, - 3DF38AF328524A0800225F2A /* BTPayPalNativeCheckoutClient.swift */, - 3DF38AFC28590B5600225F2A /* BTPayPalNativeCheckoutRequest.swift */, - 3DF38AF1285249AE00225F2A /* BTPayPalNativeCheckoutError.swift */, - 3DF38AEF2852493700225F2A /* BTPayPalNativeHermesResponse.swift */, - 3DF38AED2852488E00225F2A /* BTPayPalNativeOrderCreationClient.swift */, - 3DF38AEB2852421B00225F2A /* BTPayPalNativeTokenizationClient.swift */, - 3DF38AE928523FC300225F2A /* BTPayPalNativeTokenizationRequest.swift */, - 3DF38AE728523F7500225F2A /* BTPayPalNativeVaultRequest.swift */, - BE9E07EE2B18FBA000EF32A4 /* BTPayPalNativeCheckoutStartable.swift */, - BE9E07F02B18FC0B00EF32A4 /* BTPayPalNativeCheckoutProvider.swift */, - BE9E07F22B18FC9200EF32A4 /* BTPayPalNativeCheckoutProtocol.swift */, - 62D5EC4F2B9F6E9D00D09C5D /* PrivacyInfo.xcprivacy */, - ); - path = BraintreePayPalNativeCheckout; - sourceTree = ""; - }; - 9CE5179C282D54030013C740 /* BraintreePayPalNativeCheckoutTests */ = { - isa = PBXGroup; - children = ( - BEDB820529B13F9500075AF3 /* BTPayPalNativeCheckoutAccountNonce_Tests.swift */, - 3BF7FFC929D1D480005CA469 /* BTPayPalNativeCheckoutAnalytics_Tests.swift */, - 3DAB593E286CB967003A7BC5 /* BTPayPalNativeCheckoutClient_Tests.swift */, - 3DAB5932286B40E2003A7BC5 /* BTPayPalNativeCheckoutRequest_Tests.swift */, - 3DAB5936286B9C6E003A7BC5 /* BTPayPalNativeHermesResponse_Tests.swift */, - 3DAB593A286BD865003A7BC5 /* BTPayPalNativeOrderCreationClient_Tests.swift */, - 3DAB5938286BA3D0003A7BC5 /* BTPayPalNativeTokenizationClient_Tests.swift */, - 3DAB593C286C032B003A7BC5 /* BTPayPalNativeTokenizationRequest_Tests.swift */, - 3DF4B4C9285A74200072DC60 /* BTPayPalNativeVaultRequest_Tests.swift */, - 57108A0C282D5E23004EB870 /* Info.plist */, - BEC251E72B1E457100E4B47C /* BTPayPalNativeCheckoutProvider_Tests.swift */, - BEC251E92B1E49C600E4B47C /* MockBTPayPalNativeCheckoutProvider.swift */, - ); - path = BraintreePayPalNativeCheckoutTests; - sourceTree = ""; - }; A715593F1B729297007DE6F0 /* Helpers */ = { isa = PBXGroup; children = ( @@ -1769,8 +1635,6 @@ A91E1EAB24FEEF21007540E5 /* BraintreeThreeDSecure.framework */, A91E1EF224FEF2E3007540E5 /* BraintreeThreeDSecureTests.xctest */, 570B93AC285397520041BAFE /* BraintreeCore.framework */, - 9CE51784282D51DD0013C740 /* BraintreePayPalNativeCheckout.framework */, - 9CE5179B282D54030013C740 /* BraintreePayPalNativeCheckoutTests.xctest */, BE642DA027D0132A00694A5B /* BraintreeSEPADirectDebitTests.xctest */, BEF3F17C27CE9EC600072467 /* BraintreeSEPADirectDebit.framework */, 804698302B27C5340090878E /* BraintreeShopperInsights.framework */, @@ -1785,7 +1649,6 @@ isa = PBXGroup; children = ( BE139DB828EF12CF0044CD8C /* CardinalMobile.xcframework */, - 80B6190C28C9535F00FB5022 /* PayPalCheckout.xcframework */, 9C36BD4E26B3124900F0A559 /* CardinalMobile.framework */, 162174E1192D9220008DC35D /* CoreGraphics.framework */, A7A6DD261B431453008857E1 /* CoreLocation.framework */, @@ -2192,13 +2055,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9CE51773282D51DD0013C740 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; A76D7BFD1BB1CAB00000FA6A /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -2374,50 +2230,6 @@ productReference = 8046983E2B27C5530090878E /* BraintreeShopperInsightsTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - 9CE51766282D51DD0013C740 /* BraintreePayPalNativeCheckout */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9CE51781282D51DD0013C740 /* Build configuration list for PBXNativeTarget "BraintreePayPalNativeCheckout" */; - buildPhases = ( - 9CE51769282D51DD0013C740 /* Sources */, - 9CE51771282D51DD0013C740 /* Frameworks */, - 9CE51773282D51DD0013C740 /* Headers */, - 9CE51780282D51DD0013C740 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - BEBC6E4A29258FCF004E25A0 /* PBXTargetDependency */, - 3DF4B4CC285B77960072DC60 /* PBXTargetDependency */, - ); - name = BraintreePayPalNativeCheckout; - packageProductDependencies = ( - BE9D76BB2A03F92F00DF9023 /* PayPalCheckout */, - ); - productName = BraintreeCard; - productReference = 9CE51784282D51DD0013C740 /* BraintreePayPalNativeCheckout.framework */; - productType = "com.apple.product-type.framework"; - }; - 9CE5179A282D54030013C740 /* BraintreePayPalNativeCheckoutTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9CE517A2282D54030013C740 /* Build configuration list for PBXNativeTarget "BraintreePayPalNativeCheckoutTests" */; - buildPhases = ( - 9CE51797282D54030013C740 /* Sources */, - 9CE51798282D54030013C740 /* Frameworks */, - 9CE51799282D54030013C740 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 9CE517A1282D54030013C740 /* PBXTargetDependency */, - ); - name = BraintreePayPalNativeCheckoutTests; - packageProductDependencies = ( - BEE2E4B8290043A200C03FDD /* PayPalCheckout */, - ); - productName = BraintreePayPalNativeCheckoutTests; - productReference = 9CE5179B282D54030013C740 /* BraintreePayPalNativeCheckoutTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; A76D7BFF1BB1CAB00000FA6A /* BraintreeDataCollector */ = { isa = PBXNativeTarget; buildConfigurationList = A76D7C1B1BB1CAB00000FA6A /* Build configuration list for PBXNativeTarget "BraintreeDataCollector" */; @@ -2847,9 +2659,6 @@ 8046983D2B27C5530090878E = { CreatedOnToolsVersion = 15.0.1; }; - 9CE51766282D51DD0013C740 = { - LastSwiftMigration = 1320; - }; 9CE5179A282D54030013C740 = { CreatedOnToolsVersion = 13.2.1; }; @@ -2928,7 +2737,6 @@ ); mainGroup = A75DA343192138F000D997A2; packageReferences = ( - BEE2E4B52900436600C03FDD /* XCRemoteSwiftPackageReference "paypalcheckout-ios" */, BEA0F9182B235E7A00C21EFA /* XCRemoteSwiftPackageReference "paypal-messages-ios" */, ); productRefGroup = A75DA3521921394200D997A2 /* Products */; @@ -2951,8 +2759,6 @@ A9E5C1DF24FD665D00EE691F /* BraintreePayPalTests */, BECC91622B20DDFF00A2EE42 /* BraintreePayPalMessaging */, BECC91782B20DE7C00A2EE42 /* BraintreePayPalMessagingTests */, - 9CE51766282D51DD0013C740 /* BraintreePayPalNativeCheckout */, - 9CE5179A282D54030013C740 /* BraintreePayPalNativeCheckoutTests */, BEF3F17227CE9EC600072467 /* BraintreeSEPADirectDebit */, BE642D8E27D0132A00694A5B /* BraintreeSEPADirectDebitTests */, 8046982F2B27C5340090878E /* BraintreeShopperInsights */, @@ -3015,14 +2821,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9CE51780282D51DD0013C740 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 62D5EC502B9F6E9D00D09C5D /* PrivacyInfo.xcprivacy in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 9CE51799282D54030013C740 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -3423,41 +3221,10 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9CE51769282D51DD0013C740 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 3BF7FFC829D123F9005CA469 /* BTPayPalNativeCheckoutAnalytics.swift in Sources */, - 3DF38AF428524A0800225F2A /* BTPayPalNativeCheckoutClient.swift in Sources */, - 3DF38AFD28590B5600225F2A /* BTPayPalNativeCheckoutRequest.swift in Sources */, - BE9E07EF2B18FBA000EF32A4 /* BTPayPalNativeCheckoutStartable.swift in Sources */, - 3DF38AEE2852488E00225F2A /* BTPayPalNativeOrderCreationClient.swift in Sources */, - 3DF38AF2285249AE00225F2A /* BTPayPalNativeCheckoutError.swift in Sources */, - 3DF38AEA28523FC300225F2A /* BTPayPalNativeTokenizationRequest.swift in Sources */, - 57108A1C28342BC1004EB870 /* BTPayPalNativeCheckoutAccountNonce.swift in Sources */, - BE9E07F12B18FC0B00EF32A4 /* BTPayPalNativeCheckoutProvider.swift in Sources */, - BE9E07F32B18FC9200EF32A4 /* BTPayPalNativeCheckoutProtocol.swift in Sources */, - 3DF38AEC2852421B00225F2A /* BTPayPalNativeTokenizationClient.swift in Sources */, - 3DF38AE828523F7500225F2A /* BTPayPalNativeVaultRequest.swift in Sources */, - 3DF38AF02852493700225F2A /* BTPayPalNativeHermesResponse.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 9CE51797282D54030013C740 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 3DAB593F286CB967003A7BC5 /* BTPayPalNativeCheckoutClient_Tests.swift in Sources */, - 3DAB593B286BD865003A7BC5 /* BTPayPalNativeOrderCreationClient_Tests.swift in Sources */, - 3DAB5939286BA3D0003A7BC5 /* BTPayPalNativeTokenizationClient_Tests.swift in Sources */, - 3DAB593D286C032B003A7BC5 /* BTPayPalNativeTokenizationRequest_Tests.swift in Sources */, - BEC251E82B1E457100E4B47C /* BTPayPalNativeCheckoutProvider_Tests.swift in Sources */, - 3DAB5937286B9C6E003A7BC5 /* BTPayPalNativeHermesResponse_Tests.swift in Sources */, - BEDB820629B13F9500075AF3 /* BTPayPalNativeCheckoutAccountNonce_Tests.swift in Sources */, - 3DF4B4CA285A74200072DC60 /* BTPayPalNativeVaultRequest_Tests.swift in Sources */, - 3BF7FFCC29D1D4D0005CA469 /* BTPayPalNativeCheckoutAnalytics_Tests.swift in Sources */, - 3DAB5933286B40E2003A7BC5 /* BTPayPalNativeCheckoutRequest_Tests.swift in Sources */, - BEC251EA2B1E49C600E4B47C /* MockBTPayPalNativeCheckoutProvider.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3789,11 +3556,6 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 3DF4B4CC285B77960072DC60 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 2D941D371B59C76A0016EFB4 /* BraintreePayPal */; - targetProxy = 3DF4B4CB285B77960072DC60 /* PBXContainerItemProxy */; - }; 804698442B27C5530090878E /* PBXTargetDependency */ = { isa = PBXTargetDependency; platformFilter = ios; @@ -3812,12 +3574,6 @@ target = 570B936A285397520041BAFE /* BraintreeCore */; targetProxy = 80AB42562B27DF5B00249218 /* PBXContainerItemProxy */; }; - 9CE517A1282D54030013C740 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - platformFilter = ios; - target = 9CE51766282D51DD0013C740 /* BraintreePayPalNativeCheckout */; - targetProxy = 9CE517A0282D54030013C740 /* PBXContainerItemProxy */; - }; A91E1E9124FEDD7F007540E5 /* PBXTargetDependency */ = { isa = PBXTargetDependency; platformFilter = ios; @@ -4007,11 +3763,6 @@ target = 570B936A285397520041BAFE /* BraintreeCore */; targetProxy = BE9BD7ED2888516C00022983 /* PBXContainerItemProxy */; }; - BEBC6E4A29258FCF004E25A0 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 570B936A285397520041BAFE /* BraintreeCore */; - targetProxy = BEBC6E4929258FCF004E25A0 /* PBXContainerItemProxy */; - }; BEC66DBD2901CC990030B6B2 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 570B936A285397520041BAFE /* BraintreeCore */; @@ -4402,7 +4153,6 @@ 570B93AA285397520041BAFE /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(EMBEDDED_CONTENT_CONTAINS_SWIFT)"; ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -4469,7 +4219,6 @@ 570B93AB285397520041BAFE /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(EMBEDDED_CONTENT_CONTAINS_SWIFT)"; ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -4741,225 +4490,6 @@ }; name = Release; }; - 9CE51782282D51DD0013C740 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Frameworks", - ); - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/Sources/BraintreeCore/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.BraintreePayPalNativeCheckout; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SUPPORTS_MACCATALYST = NO; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = ""; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 9CE51783282D51DD0013C740 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Frameworks", - ); - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/Sources/BraintreeCore/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.BraintreePayPalNativeCheckout; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SUPPORTS_MACCATALYST = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = ""; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 9CE517A3282D54030013C740 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = "$(inherited)"; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_STYLE = Automatic; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEVELOPMENT_TEAM = MR2QQSG594; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GENERATE_INFOPLIST_FILE = NO; - INFOPLIST_FILE = UnitTests/BraintreePayPalNativeCheckoutTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.BraintreePayPalNativeCheckoutTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 9CE517A4282D54030013C740 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = "$(inherited)"; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_STYLE = Automatic; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = MR2QQSG594; - ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GENERATE_INFOPLIST_FILE = NO; - INFOPLIST_FILE = UnitTests/BraintreePayPalNativeCheckoutTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.braintreepayments.BraintreePayPalNativeCheckoutTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; A75DA348192138F000D997A2 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -5318,7 +4848,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 59A4135427B90CD7AE94D5CC /* Pods-Tests-IntegrationTests.debug.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; @@ -5378,7 +4907,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = BEDE06942FEDCD2F91884DA9 /* Pods-Tests-IntegrationTests.release.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; @@ -5780,7 +5308,6 @@ A91E1E9324FEDD7F007540E5 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_ANALYZER_NONNULL = YES; @@ -5832,7 +5359,6 @@ A91E1E9424FEDD7F007540E5 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_ANALYZER_NONNULL = YES; @@ -5987,7 +5513,6 @@ A91E1EFB24FEF2E4007540E5 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_ANALYZER_NONNULL = YES; @@ -6039,7 +5564,6 @@ A91E1EFC24FEF2E4007540E5 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_ANALYZER_NONNULL = YES; @@ -6085,7 +5609,6 @@ A948D6CF24FAB79B00F4F178 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_ANALYZER_NONNULL = YES; @@ -6132,7 +5655,6 @@ A948D6D024FAB79B00F4F178 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_ANALYZER_NONNULL = YES; @@ -6173,7 +5695,6 @@ A948D6E524FAC6C000F4F178 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_ANALYZER_NONNULL = YES; @@ -6222,7 +5743,6 @@ A948D6E624FAC6C000F4F178 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_ANALYZER_NONNULL = YES; @@ -6265,7 +5785,6 @@ A948D6F924FAC8F900F4F178 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_ANALYZER_NONNULL = YES; @@ -6312,7 +5831,6 @@ A948D6FA24FAC8F900F4F178 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_ANALYZER_NONNULL = YES; @@ -6353,7 +5871,6 @@ A95C411124FAEF2100045045 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_ANALYZER_NONNULL = YES; @@ -6401,7 +5918,6 @@ A95C411224FAEF2100045045 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_ANALYZER_NONNULL = YES; @@ -6443,7 +5959,6 @@ A9E5C1A624FD5A7C00EE691F /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_ANALYZER_NONNULL = YES; @@ -6490,7 +6005,6 @@ A9E5C1A724FD5A7C00EE691F /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_ANALYZER_NONNULL = YES; @@ -6531,7 +6045,6 @@ A9E5C1E924FD665D00EE691F /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_ANALYZER_NONNULL = YES; @@ -6579,7 +6092,6 @@ A9E5C1EA24FD665D00EE691F /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_ANALYZER_NONNULL = YES; @@ -6867,7 +6379,6 @@ BECC918B2B20DE7C00A2EE42 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_ANALYZER_NONNULL = YES; @@ -6915,7 +6426,6 @@ BECC918C2B20DE7C00A2EE42 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_ANALYZER_NONNULL = YES; @@ -7145,24 +6655,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 9CE51781282D51DD0013C740 /* Build configuration list for PBXNativeTarget "BraintreePayPalNativeCheckout" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9CE51782282D51DD0013C740 /* Debug */, - 9CE51783282D51DD0013C740 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 9CE517A2282D54030013C740 /* Build configuration list for PBXNativeTarget "BraintreePayPalNativeCheckoutTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9CE517A3282D54030013C740 /* Debug */, - 9CE517A4282D54030013C740 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; A75DA347192138F000D997A2 /* Build configuration list for PBXProject "Braintree" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -7363,22 +6855,9 @@ version = 1.0.0; }; }; - BEE2E4B52900436600C03FDD /* XCRemoteSwiftPackageReference "paypalcheckout-ios" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/paypal/paypalcheckout-ios/"; - requirement = { - kind = exactVersion; - version = 1.3.0; - }; - }; /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ - BE9D76BB2A03F92F00DF9023 /* PayPalCheckout */ = { - isa = XCSwiftPackageProductDependency; - package = BEE2E4B52900436600C03FDD /* XCRemoteSwiftPackageReference "paypalcheckout-ios" */; - productName = PayPalCheckout; - }; BEA0F9192B235E7A00C21EFA /* PayPalMessages */ = { isa = XCSwiftPackageProductDependency; package = BEA0F9182B235E7A00C21EFA /* XCRemoteSwiftPackageReference "paypal-messages-ios" */; @@ -7389,11 +6868,6 @@ package = BEA0F9182B235E7A00C21EFA /* XCRemoteSwiftPackageReference "paypal-messages-ios" */; productName = PayPalMessages; }; - BEE2E4B8290043A200C03FDD /* PayPalCheckout */ = { - isa = XCSwiftPackageProductDependency; - package = BEE2E4B52900436600C03FDD /* XCRemoteSwiftPackageReference "paypalcheckout-ios" */; - productName = PayPalCheckout; - }; /* End XCSwiftPackageProductDependency section */ }; rootObject = A75DA344192138F000D997A2 /* Project object */; diff --git a/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreePayPalNativeCheckout.xcscheme b/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreePayPalNativeCheckout.xcscheme deleted file mode 100644 index dde7235dfa..0000000000 --- a/Braintree.xcodeproj/xcshareddata/xcschemes/BraintreePayPalNativeCheckout.xcscheme +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/CHANGELOG.md b/CHANGELOG.md index e7464f9cd2..860f799993 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## unreleased (v7) * Breaking Changes * Bump minimum supported deployment target to iOS 16+ + * BraintreePayPalNativeCheckout + * Remove entire PayPal Native Checkout module * BraintreeVenmo * Update `BTVenmoRequest` to make all properties accessible on the initializer only vs via the dot syntax. * BraintreeSEPADirectDebit diff --git a/Cartfile b/Cartfile index 8cb781d312..78b7b59ff5 100644 --- a/Cartfile +++ b/Cartfile @@ -1,4 +1,3 @@ binary "https://assets.braintreegateway.com/mobile/ios/carthage-frameworks/cardinal-mobile/CardinalMobile.json" == 2.2.5-9 binary "https://assets.braintreegateway.com/mobile/ios/carthage-frameworks/pp-risk-magnes/PPRiskMagnes.json" == 5.5.0-static-Xcode15-MinOSVersion100 -binary "https://github.com/paypal/paypalcheckout-ios/raw/main/Carthage/PayPalCheckout.json" == 1.3.0 binary "https://github.com/paypal/paypal-messages-ios/raw/main/Carthage/PayPalMessages.json" == 1.0.0 diff --git a/Demo/Application/Base/ContainmentViewController.swift b/Demo/Application/Base/ContainmentViewController.swift index 22e53af06b..673e672799 100644 --- a/Demo/Application/Base/ContainmentViewController.swift +++ b/Demo/Application/Base/ContainmentViewController.swift @@ -231,8 +231,6 @@ class ContainmentViewController: UIViewController { return DataCollectorViewController(authorization: authorization) case "IdealViewController": return IdealViewController(authorization: authorization) - case "PayPalNativeCheckoutViewController": - return PayPalNativeCheckoutViewController(authorization: authorization) case "PayPalWebCheckoutViewController": return PayPalWebCheckoutViewController(authorization: authorization) case "SEPADirectDebitViewController": diff --git a/Demo/Application/Base/Settings/Settings.bundle/Root.plist b/Demo/Application/Base/Settings/Settings.bundle/Root.plist index f6f0bfc69d..4c20bcc8bc 100644 --- a/Demo/Application/Base/Settings/Settings.bundle/Root.plist +++ b/Demo/Application/Base/Settings/Settings.bundle/Root.plist @@ -17,7 +17,6 @@ BraintreeDemoCardTokenizationViewController Titles - PayPal - Native Checkout PayPal - Web Checkout Credit Card Tokenization Venmo - Custom Button @@ -32,7 +31,6 @@ Values - PayPalNativeCheckoutViewController PayPalWebCheckoutViewController CardTokenizationViewController VenmoViewController diff --git a/Demo/Application/Features/PayPalNativeCheckoutViewController.swift b/Demo/Application/Features/PayPalNativeCheckoutViewController.swift deleted file mode 100644 index 95fabd7750..0000000000 --- a/Demo/Application/Features/PayPalNativeCheckoutViewController.swift +++ /dev/null @@ -1,80 +0,0 @@ -import Foundation -import UIKit -import BraintreePayPalNativeCheckout - -class PayPalNativeCheckoutViewController: PaymentButtonBaseViewController { - - lazy var payPalNativeCheckoutClient = BTPayPalNativeCheckoutClient(apiClient: apiClient) - - override func createPaymentButton() -> UIView { - let payPalCheckoutButton = createButton(title: "One Time Checkout", action: #selector(tappedPayPalCheckout)) - - // Buyers are shown a billing agreement without purchase - // For more information: https://developer.paypal.com/braintree/docs/guides/paypal/vault/ios/v6 - let vaultCheckoutButton = createButton(title: "Vault Checkout", action: #selector(tappedVaultCheckout)) - - // Buyers are shown a billing agreement with purchase - // For more information: https://developer.paypal.com/braintree/docs/guides/paypal/checkout-with-vault/ios/v6 - let checkoutWithVaultButton = createButton(title: "Checkout With Vault", action: #selector(tappedCheckoutWithVault)) - - let stackView = UIStackView(arrangedSubviews: [payPalCheckoutButton, vaultCheckoutButton, checkoutWithVaultButton]) - stackView.axis = .vertical - stackView.alignment = .center - stackView.distribution = .fillEqually - stackView.translatesAutoresizingMaskIntoConstraints = false - return stackView - } - - @objc func tappedPayPalCheckout(_ sender: UIButton) { - progressBlock("Tapped PayPal - Native Checkout using BTPayPalNativeCheckout") - sender.setTitle("Processing...", for: .disabled) - sender.isEnabled = false - - let request = BTPayPalNativeCheckoutRequest(amount: "4.30") - payPalNativeCheckoutClient.tokenize(request) { nonce, error in - sender.isEnabled = true - - guard let nonce else { - self.progressBlock(error?.localizedDescription) - return - } - self.completionBlock(nonce) - } - } - - @objc func tappedVaultCheckout(_ sender: UIButton) { - progressBlock("Tapped PayPal - Vault using BTPayPalNativeCheckout") - sender.setTitle("Processing...", for: .disabled) - sender.isEnabled = false - - let request = BTPayPalNativeVaultRequest() - - payPalNativeCheckoutClient.tokenize(request) { nonce, error in - sender.isEnabled = true - - guard let nonce else { - self.progressBlock(error?.localizedDescription) - return - } - self.completionBlock(nonce) - } - } - - @objc func tappedCheckoutWithVault(_ sender: UIButton) { - progressBlock("Tapped PayPal - Checkout With Vault using BTPayPalNativeCheckout") - sender.setTitle("Processing...", for: .disabled) - sender.isEnabled = false - - let request = BTPayPalNativeCheckoutRequest(amount: "4.30", requestBillingAgreement: true) - - payPalNativeCheckoutClient.tokenize(request) { nonce, error in - sender.isEnabled = true - - guard let nonce else { - self.progressBlock(error?.localizedDescription) - return - } - self.completionBlock(nonce) - } - } -} diff --git a/Demo/Demo.xcodeproj/project.pbxproj b/Demo/Demo.xcodeproj/project.pbxproj index 672197362f..c283ae62ab 100644 --- a/Demo/Demo.xcodeproj/project.pbxproj +++ b/Demo/Demo.xcodeproj/project.pbxproj @@ -19,9 +19,6 @@ 42C574D525FA6CAC008B3681 /* AppSwitcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42C574D425FA6CAC008B3681 /* AppSwitcher.swift */; }; 42C5BDD625A4CE4800E8FF40 /* AmericanExpress_UITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42C5BDD525A4CE4800E8FF40 /* AmericanExpress_UITests.swift */; }; 45DDDDA92C08FB0B00C262E5 /* PayPalMessages in Frameworks */ = {isa = PBXBuildFile; productRef = 45DDDDA82C08FB0B00C262E5 /* PayPalMessages */; }; - 57108A152832E789004EB870 /* PayPalNativeCheckoutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57108A142832E789004EB870 /* PayPalNativeCheckoutViewController.swift */; }; - 57108A172832EA04004EB870 /* BraintreePayPalNativeCheckout.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 57108A162832EA04004EB870 /* BraintreePayPalNativeCheckout.framework */; }; - 57108A182832EA04004EB870 /* BraintreePayPalNativeCheckout.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 57108A162832EA04004EB870 /* BraintreePayPalNativeCheckout.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 62240F5A2B67FE1100ECE5C9 /* TextFieldWithLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62240F592B67FE1100ECE5C9 /* TextFieldWithLabel.swift */; }; 8025988D2CC1A95400E7D898 /* Toggle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8025988C2CC1A95400E7D898 /* Toggle.swift */; }; 8028B9762B28C9E100C88CE8 /* ShopperInsightsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8028B9752B28C9E100C88CE8 /* ShopperInsightsViewController.swift */; }; @@ -63,7 +60,6 @@ BE35FCD82A1BD162008F0326 /* BraintreeLocalPayment.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE35FCD72A1BD162008F0326 /* BraintreeLocalPayment.framework */; }; BE35FCD92A1BD162008F0326 /* BraintreeLocalPayment.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = BE35FCD72A1BD162008F0326 /* BraintreeLocalPayment.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; BE45D7162AD97C340047E2C7 /* ContainmentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE45D7152AD97C340047E2C7 /* ContainmentViewController.swift */; }; - BE6442D12B4DE2B00096E562 /* PayPalCheckout in Frameworks */ = {isa = PBXBuildFile; productRef = BE6442D02B4DE2B00096E562 /* PayPalCheckout */; }; BE67CDC02B29FF7B00BA4904 /* PayPalMessagingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE67CDBF2B29FF7B00BA4904 /* PayPalMessagingViewController.swift */; }; BE67CDC22B2A023F00BA4904 /* BraintreePayPalMessaging.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE67CDC12B2A023F00BA4904 /* BraintreePayPalMessaging.framework */; }; BE67CDC32B2A023F00BA4904 /* BraintreePayPalMessaging.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = BE67CDC12B2A023F00BA4904 /* BraintreePayPalMessaging.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -117,7 +113,6 @@ BE9BD75A28872E4D00022983 /* BraintreeSEPADirectDebit.framework in Embed Frameworks */, 803D64FC256DAF9A00ACE692 /* BraintreeCore.framework in Embed Frameworks */, BE67CDC32B2A023F00BA4904 /* BraintreePayPalMessaging.framework in Embed Frameworks */, - 57108A182832EA04004EB870 /* BraintreePayPalNativeCheckout.framework in Embed Frameworks */, BE35FCD92A1BD162008F0326 /* BraintreeLocalPayment.framework in Embed Frameworks */, 803D6504256DAF9A00ACE692 /* BraintreeThreeDSecure.framework in Embed Frameworks */, 803D6502256DAF9A00ACE692 /* BraintreePayPal.framework in Embed Frameworks */, @@ -144,8 +139,6 @@ 42C5BDD525A4CE4800E8FF40 /* AmericanExpress_UITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AmericanExpress_UITests.swift; sourceTree = ""; }; 42F3F6DB2603B83100401B0D /* CardinalMobile.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = CardinalMobile.xcframework; path = ../Frameworks/CardinalMobile.xcframework; sourceTree = ""; }; 570B93D32853A6D30041BAFE /* BraintreeCoreSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = BraintreeCoreSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 57108A142832E789004EB870 /* PayPalNativeCheckoutViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PayPalNativeCheckoutViewController.swift; sourceTree = ""; }; - 57108A162832EA04004EB870 /* BraintreePayPalNativeCheckout.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = BraintreePayPalNativeCheckout.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 62240F592B67FE1100ECE5C9 /* TextFieldWithLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextFieldWithLabel.swift; sourceTree = ""; }; 6D23244B5E9EE59BAB3F3003 /* Pods_Demo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Demo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 73498B4265CA7D315E2FBF38 /* Pods-Demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Demo.debug.xcconfig"; path = "Target Support Files/Pods-Demo/Pods-Demo.debug.xcconfig"; sourceTree = ""; }; @@ -219,12 +212,10 @@ files = ( 45DDDDA92C08FB0B00C262E5 /* PayPalMessages in Frameworks */, BE67CDC22B2A023F00BA4904 /* BraintreePayPalMessaging.framework in Frameworks */, - 57108A172832EA04004EB870 /* BraintreePayPalNativeCheckout.framework in Frameworks */, 803D64FB256DAF9A00ACE692 /* BraintreeCore.framework in Frameworks */, 9C36BD4C26B311D900F0A559 /* CardinalMobile.xcframework in Frameworks */, 803D64F5256DAF9A00ACE692 /* BraintreeAmericanExpress.framework in Frameworks */, BE35FCD82A1BD162008F0326 /* BraintreeLocalPayment.framework in Frameworks */, - BE6442D12B4DE2B00096E562 /* PayPalCheckout in Frameworks */, BE9BD75928872E4D00022983 /* BraintreeSEPADirectDebit.framework in Frameworks */, 9C36BD2926B3071B00F0A559 /* PPRiskMagnes.xcframework in Frameworks */, 803D6501256DAF9A00ACE692 /* BraintreePayPal.framework in Frameworks */, @@ -365,7 +356,6 @@ BEE930482A98FE9200C85779 /* DataCollectorViewController.swift */, BEAAAA332A98E5E6001ECA63 /* IdealViewController.swift */, BE67CDBF2B29FF7B00BA4904 /* PayPalMessagingViewController.swift */, - 57108A142832E789004EB870 /* PayPalNativeCheckoutViewController.swift */, BED7C4C92ABDD35700EF8550 /* PayPalWebCheckoutViewController.swift */, BE777AC327D9370400487D23 /* SEPADirectDebitViewController.swift */, 8028B9752B28C9E100C88CE8 /* ShopperInsightsViewController.swift */, @@ -393,7 +383,6 @@ 570B93D32853A6D30041BAFE /* BraintreeCoreSwift.framework */, BE24C66A28E490F30067B11A /* PayPalCheckout.xcframework */, BE9BD75828872E4D00022983 /* BraintreeSEPADirectDebit.framework */, - 57108A162832EA04004EB870 /* BraintreePayPalNativeCheckout.framework */, 9C36BD2826B3071A00F0A559 /* PPRiskMagnes.xcframework */, 42F3F6DB2603B83100401B0D /* CardinalMobile.xcframework */, 803D64EA256DAF9A00ACE692 /* BraintreeAmericanExpress.framework */, @@ -510,7 +499,6 @@ ); name = Demo; packageProductDependencies = ( - BE6442D02B4DE2B00096E562 /* PayPalCheckout */, 45DDDDA82C08FB0B00C262E5 /* PayPalMessages */, ); productName = Demo; @@ -588,7 +576,6 @@ ); mainGroup = A0988E4024DB43DC0095EEEE; packageReferences = ( - BE6442CF2B4DE2B00096E562 /* XCRemoteSwiftPackageReference "paypalcheckout-ios" */, 45DDDDA72C08FB0B00C262E5 /* XCRemoteSwiftPackageReference "paypal-messages-ios" */, ); productRefGroup = A0988E4A24DB43DC0095EEEE /* Products */; @@ -708,7 +695,6 @@ BE994B0B2AD8377D00470773 /* BaseViewController.swift in Sources */, 80D36DEE2A7967F20035380E /* VenmoViewController.swift in Sources */, BEE930492A98FE9200C85779 /* DataCollectorViewController.swift in Sources */, - 57108A152832E789004EB870 /* PayPalNativeCheckoutViewController.swift in Sources */, BEBD52832AAB62FB005D6687 /* ApplePayViewController.swift in Sources */, BEAAAD052970A70D000BD296 /* BTSEPADirectDebitTestHelper.swift in Sources */, 809E86A62AD00AF4004998B0 /* AppDelegate.swift in Sources */, @@ -1083,14 +1069,6 @@ minimumVersion = 1.0.0; }; }; - BE6442CF2B4DE2B00096E562 /* XCRemoteSwiftPackageReference "paypalcheckout-ios" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/paypal/paypalcheckout-ios/"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 1.3.0; - }; - }; /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ @@ -1099,11 +1077,6 @@ package = 45DDDDA72C08FB0B00C262E5 /* XCRemoteSwiftPackageReference "paypal-messages-ios" */; productName = PayPalMessages; }; - BE6442D02B4DE2B00096E562 /* PayPalCheckout */ = { - isa = XCSwiftPackageProductDependency; - package = BE6442CF2B4DE2B00096E562 /* XCRemoteSwiftPackageReference "paypalcheckout-ios" */; - productName = PayPalCheckout; - }; /* End XCSwiftPackageProductDependency section */ }; rootObject = A0988E4124DB43DC0095EEEE /* Project object */; diff --git a/Package.swift b/Package.swift index 1951778b6d..e12efe4611 100644 --- a/Package.swift +++ b/Package.swift @@ -39,10 +39,6 @@ let package = Package( name: "BraintreePayPalMessaging", targets: ["BraintreePayPalMessaging"] ), - .library( - name: "BraintreePayPalNativeCheckout", - targets: ["BraintreePayPalNativeCheckout"] - ), .library( name: "BraintreeSEPADirectDebit", targets: ["BraintreeSEPADirectDebit"] @@ -108,17 +104,6 @@ let package = Package( url: "https://github.com/paypal/paypal-messages-ios/releases/download/1.0.0/PayPalMessages.xcframework.zip", checksum: "565ab72a3ab75169e41685b16e43268a39e24217a12a641155961d8b10ffe1b4" ), - .target( - name: "BraintreePayPalNativeCheckout", - dependencies: ["BraintreeCore", "BraintreePayPal", "PayPalCheckout"], - path: "Sources/BraintreePayPalNativeCheckout", - resources: [.copy("PrivacyInfo.xcprivacy")] - ), - .binaryTarget( - name: "PayPalCheckout", - url: "https://github.com/paypal/paypalcheckout-ios/releases/download/1.3.0/PayPalCheckout.xcframework.zip", - checksum: "d65186f38f390cb9ae0431ecacf726774f7f89f5474c48244a07d17b248aa035" - ), .target( name: "BraintreeSEPADirectDebit", dependencies: ["BraintreeCore"], diff --git a/SampleApps/CarthageTest/CarthageTest.xcodeproj/project.pbxproj b/SampleApps/CarthageTest/CarthageTest.xcodeproj/project.pbxproj index 3f62bf7a15..5d667a4782 100644 --- a/SampleApps/CarthageTest/CarthageTest.xcodeproj/project.pbxproj +++ b/SampleApps/CarthageTest/CarthageTest.xcodeproj/project.pbxproj @@ -19,9 +19,7 @@ 45DDDD992C08F4A100C262E5 /* BraintreePayPalMessaging.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 45DDDD982C08F4A100C262E5 /* BraintreePayPalMessaging.xcframework */; }; 45DDDDAB2C091F2C00C262E5 /* PayPalMessages.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 45DDDDAA2C091F2C00C262E5 /* PayPalMessages.xcframework */; }; 805656572A38C7BF00686579 /* BraintreeSEPADirectDebit.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 805656562A38C7BF00686579 /* BraintreeSEPADirectDebit.xcframework */; }; - 8056565B2A38C7CB00686579 /* BraintreePayPalNativeCheckout.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8056565A2A38C7CB00686579 /* BraintreePayPalNativeCheckout.xcframework */; }; 8056565F2A38C7D200686579 /* BraintreeLocalPayment.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8056565E2A38C7D200686579 /* BraintreeLocalPayment.xcframework */; }; - 805656622A38C7F600686579 /* PayPalCheckout.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 805656612A38C7F500686579 /* PayPalCheckout.xcframework */; }; A74D4AF51BFBB3FB00BF36CD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A74D4AF41BFBB3FB00BF36CD /* AppDelegate.swift */; }; A74D4AF71BFBB3FB00BF36CD /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A74D4AF61BFBB3FB00BF36CD /* ViewController.swift */; }; A74D4AFA1BFBB3FB00BF36CD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A74D4AF81BFBB3FB00BF36CD /* Main.storyboard */; }; @@ -45,9 +43,7 @@ 45DDDD982C08F4A100C262E5 /* BraintreePayPalMessaging.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = BraintreePayPalMessaging.xcframework; path = Carthage/Build/BraintreePayPalMessaging.xcframework; sourceTree = ""; }; 45DDDDAA2C091F2C00C262E5 /* PayPalMessages.xcframework */ = {isa = PBXFileReference; expectedSignature = "AppleDeveloperProgram:43253H4X22:Braintree Payment Solutions, LLC"; lastKnownFileType = wrapper.xcframework; name = PayPalMessages.xcframework; path = Carthage/Build/PayPalMessages.xcframework; sourceTree = ""; }; 805656562A38C7BF00686579 /* BraintreeSEPADirectDebit.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = BraintreeSEPADirectDebit.xcframework; path = Carthage/Build/BraintreeSEPADirectDebit.xcframework; sourceTree = ""; }; - 8056565A2A38C7CB00686579 /* BraintreePayPalNativeCheckout.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = BraintreePayPalNativeCheckout.xcframework; path = Carthage/Build/BraintreePayPalNativeCheckout.xcframework; sourceTree = ""; }; 8056565E2A38C7D200686579 /* BraintreeLocalPayment.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = BraintreeLocalPayment.xcframework; path = Carthage/Build/BraintreeLocalPayment.xcframework; sourceTree = ""; }; - 805656612A38C7F500686579 /* PayPalCheckout.xcframework */ = {isa = PBXFileReference; expectedSignature = "AppleDeveloperProgram:43253H4X22:Braintree Payment Solutions, LLC"; lastKnownFileType = wrapper.xcframework; name = PayPalCheckout.xcframework; path = Carthage/Build/PayPalCheckout.xcframework; sourceTree = ""; }; A74D4AF11BFBB3FB00BF36CD /* CarthageTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CarthageTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; A74D4AF41BFBB3FB00BF36CD /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; A74D4AF61BFBB3FB00BF36CD /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; @@ -58,7 +54,6 @@ BE35FCDC2A1BE866008F0326 /* BraintreeLocalPayment.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = BraintreeLocalPayment.xcframework; path = ../../Carthage/Build/BraintreeLocalPayment.xcframework; sourceTree = ""; }; BE57E0E22846A4FF002CFBAC /* CardinalMobile.xcframework */ = {isa = PBXFileReference; expectedSignature = "AppleDeveloperProgram:H7M4G5NDNU:CardinalCommerce Corp"; lastKnownFileType = wrapper.xcframework; name = CardinalMobile.xcframework; path = ../../Frameworks/XCFrameworks/CardinalMobile.xcframework; sourceTree = ""; }; BE777AA127D90DA900487D23 /* BraintreeSEPADirectDebit.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = BraintreeSEPADirectDebit.xcframework; path = ../../Carthage/Build/BraintreeSEPADirectDebit.xcframework; sourceTree = ""; }; - BE9D76A92A02FD2000DF9023 /* BraintreePayPalNativeCheckout.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = BraintreePayPalNativeCheckout.xcframework; path = ../../Carthage/Build/BraintreePayPalNativeCheckout.xcframework; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -68,7 +63,6 @@ files = ( 45DDDDAB2C091F2C00C262E5 /* PayPalMessages.xcframework in Frameworks */, BE57E0E32846A4FF002CFBAC /* CardinalMobile.xcframework in Frameworks */, - 8056565B2A38C7CB00686579 /* BraintreePayPalNativeCheckout.xcframework in Frameworks */, 429925B5266189020085F77D /* BraintreeCore.xcframework in Frameworks */, 45DDDD992C08F4A100C262E5 /* BraintreePayPalMessaging.xcframework in Frameworks */, 8056565F2A38C7D200686579 /* BraintreeLocalPayment.xcframework in Frameworks */, @@ -80,7 +74,6 @@ 429925BB266189020085F77D /* BraintreeCard.xcframework in Frameworks */, 429925C1266189020085F77D /* BraintreeThreeDSecure.xcframework in Frameworks */, 429925AD266189010085F77D /* BraintreeDataCollector.xcframework in Frameworks */, - 805656622A38C7F600686579 /* PayPalCheckout.xcframework in Frameworks */, 429925AB266189010085F77D /* BraintreeAmericanExpress.xcframework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -93,12 +86,9 @@ children = ( 45DDDDAA2C091F2C00C262E5 /* PayPalMessages.xcframework */, 45DDDD982C08F4A100C262E5 /* BraintreePayPalMessaging.xcframework */, - 805656612A38C7F500686579 /* PayPalCheckout.xcframework */, 8056565E2A38C7D200686579 /* BraintreeLocalPayment.xcframework */, - 8056565A2A38C7CB00686579 /* BraintreePayPalNativeCheckout.xcframework */, 805656562A38C7BF00686579 /* BraintreeSEPADirectDebit.xcframework */, BE35FCDC2A1BE866008F0326 /* BraintreeLocalPayment.xcframework */, - BE9D76A92A02FD2000DF9023 /* BraintreePayPalNativeCheckout.xcframework */, BE777AA127D90DA900487D23 /* BraintreeSEPADirectDebit.xcframework */, BE57E0E22846A4FF002CFBAC /* CardinalMobile.xcframework */, 4299259D266189010085F77D /* BraintreeAmericanExpress.xcframework */, diff --git a/SampleApps/CarthageTest/CarthageTest/ViewController.swift b/SampleApps/CarthageTest/CarthageTest/ViewController.swift index bc001ba5af..748b3f2a46 100644 --- a/SampleApps/CarthageTest/CarthageTest/ViewController.swift +++ b/SampleApps/CarthageTest/CarthageTest/ViewController.swift @@ -9,7 +9,6 @@ import BraintreePayPal import BraintreePayPalMessaging import BraintreeThreeDSecure import BraintreeVenmo -import BraintreePayPalNativeCheckout import BraintreeSEPADirectDebit class ViewController: UIViewController { @@ -26,7 +25,6 @@ class ViewController: UIViewController { let payPalMessagingView = BTPayPalMessagingView(apiClient: apiClient) let threeDSecureClient = BTThreeDSecureClient(apiClient: apiClient) let venmoClient = BTVenmoClient(apiClient: apiClient) - let payPalNativeCheckoutClient = BTPayPalNativeCheckoutClient(apiClient: apiClient) let sepaDirectDebitClient = BTSEPADirectDebitClient(apiClient: apiClient) } } diff --git a/SampleApps/SPMTest/SPMTest.xcodeproj/project.pbxproj b/SampleApps/SPMTest/SPMTest.xcodeproj/project.pbxproj index 0bc311d3a6..36d48d0f70 100644 --- a/SampleApps/SPMTest/SPMTest.xcodeproj/project.pbxproj +++ b/SampleApps/SPMTest/SPMTest.xcodeproj/project.pbxproj @@ -22,7 +22,6 @@ BE35FCEA2A1C0885008F0326 /* BraintreeDataCollector in Frameworks */ = {isa = PBXBuildFile; productRef = BE35FCE92A1C0885008F0326 /* BraintreeDataCollector */; }; BE35FCEC2A1C0885008F0326 /* BraintreeLocalPayment in Frameworks */ = {isa = PBXBuildFile; productRef = BE35FCEB2A1C0885008F0326 /* BraintreeLocalPayment */; }; BE35FCEE2A1C0885008F0326 /* BraintreePayPal in Frameworks */ = {isa = PBXBuildFile; productRef = BE35FCED2A1C0885008F0326 /* BraintreePayPal */; }; - BE35FCF02A1C0885008F0326 /* BraintreePayPalNativeCheckout in Frameworks */ = {isa = PBXBuildFile; productRef = BE35FCEF2A1C0885008F0326 /* BraintreePayPalNativeCheckout */; }; BE35FCF22A1C0885008F0326 /* BraintreeSEPADirectDebit in Frameworks */ = {isa = PBXBuildFile; productRef = BE35FCF12A1C0885008F0326 /* BraintreeSEPADirectDebit */; }; BE35FCF42A1C0885008F0326 /* BraintreeThreeDSecure in Frameworks */ = {isa = PBXBuildFile; productRef = BE35FCF32A1C0885008F0326 /* BraintreeThreeDSecure */; }; BE35FCF62A1C0885008F0326 /* BraintreeVenmo in Frameworks */ = {isa = PBXBuildFile; productRef = BE35FCF52A1C0885008F0326 /* BraintreeVenmo */; }; @@ -54,7 +53,6 @@ BE35FCDB2A1BD2EF008F0326 /* BraintreeLocalPayment in Frameworks */, BE35FCE42A1C0885008F0326 /* BraintreeApplePay in Frameworks */, BE35FCE62A1C0885008F0326 /* BraintreeCard in Frameworks */, - BE35FCF02A1C0885008F0326 /* BraintreePayPalNativeCheckout in Frameworks */, BE35FCF42A1C0885008F0326 /* BraintreeThreeDSecure in Frameworks */, BE35FCF22A1C0885008F0326 /* BraintreeSEPADirectDebit in Frameworks */, BE35FCEA2A1C0885008F0326 /* BraintreeDataCollector in Frameworks */, @@ -138,7 +136,6 @@ BE35FCE92A1C0885008F0326 /* BraintreeDataCollector */, BE35FCEB2A1C0885008F0326 /* BraintreeLocalPayment */, BE35FCED2A1C0885008F0326 /* BraintreePayPal */, - BE35FCEF2A1C0885008F0326 /* BraintreePayPalNativeCheckout */, BE35FCF12A1C0885008F0326 /* BraintreeSEPADirectDebit */, BE35FCF32A1C0885008F0326 /* BraintreeThreeDSecure */, BE35FCF52A1C0885008F0326 /* BraintreeVenmo */, @@ -476,11 +473,6 @@ package = BE35FCE02A1C0885008F0326 /* XCRemoteSwiftPackageReference "braintree_ios" */; productName = BraintreePayPal; }; - BE35FCEF2A1C0885008F0326 /* BraintreePayPalNativeCheckout */ = { - isa = XCSwiftPackageProductDependency; - package = BE35FCE02A1C0885008F0326 /* XCRemoteSwiftPackageReference "braintree_ios" */; - productName = BraintreePayPalNativeCheckout; - }; BE35FCF12A1C0885008F0326 /* BraintreeSEPADirectDebit */ = { isa = XCSwiftPackageProductDependency; package = BE35FCE02A1C0885008F0326 /* XCRemoteSwiftPackageReference "braintree_ios" */; diff --git a/SampleApps/SPMTest/SPMTest/ViewController.swift b/SampleApps/SPMTest/SPMTest/ViewController.swift index e1eafe7ecb..3232545c28 100644 --- a/SampleApps/SPMTest/SPMTest/ViewController.swift +++ b/SampleApps/SPMTest/SPMTest/ViewController.swift @@ -9,7 +9,6 @@ import BraintreePayPal import BraintreePayPalMessaging import BraintreeThreeDSecure import BraintreeVenmo -import BraintreePayPalNativeCheckout import BraintreeSEPADirectDebit class ViewController: UIViewController { @@ -26,7 +25,6 @@ class ViewController: UIViewController { let payPalMessagingView = BTPayPalMessagingView(apiClient: apiClient) let threeDSecureClient = BTThreeDSecureClient(apiClient: apiClient) let venmoClient = BTVenmoClient(apiClient: apiClient) - let payPalNativeCheckoutClient = BTPayPalNativeCheckoutClient(apiClient: apiClient) let sepaDirectDebitClient = BTSEPADirectDebitClient(apiClient: apiClient) } } diff --git a/Sources/BraintreePayPal/BTPayPalCheckoutRequest.swift b/Sources/BraintreePayPal/BTPayPalCheckoutRequest.swift index cec57840b1..0871281cd3 100644 --- a/Sources/BraintreePayPal/BTPayPalCheckoutRequest.swift +++ b/Sources/BraintreePayPal/BTPayPalCheckoutRequest.swift @@ -116,11 +116,9 @@ import BraintreeCore super.init(hermesPath: "v1/paypal_hermes/create_payment_resource", paymentType: .checkout) } - // MARK: Public Methods + // MARK: Internal Methods - /// :nodoc: Exposed publicly for use by PayPal Native Checkout module. This method is not covered by semantic versioning. - @_documentation(visibility: private) - public override func parameters( + override func parameters( with configuration: BTConfiguration, universalLink: URL? = nil, isPayPalAppInstalled: Bool = false diff --git a/Sources/BraintreePayPal/BTPayPalRequest.swift b/Sources/BraintreePayPal/BTPayPalRequest.swift index c7d733d977..45fb068dc3 100644 --- a/Sources/BraintreePayPal/BTPayPalRequest.swift +++ b/Sources/BraintreePayPal/BTPayPalRequest.swift @@ -88,19 +88,17 @@ import BraintreeCore /// Optional: A risk correlation ID created with Set Transaction Context on your server. public var riskCorrelationID: String? - - /// :nodoc: Exposed publicly for use by PayPal Native Checkout module. This property is not covered by semantic versioning. - @_documentation(visibility: private) - public var hermesPath: String - - /// :nodoc: Exposed publicly for use by PayPal Native Checkout module. This property is not covered by semantic versioning. - @_documentation(visibility: private) - public var paymentType: BTPayPalPaymentType /// Optional: A user's phone number to initiate a quicker authentication flow in the scenario where the user has a PayPal account /// identified with the same phone number. public var userPhoneNumber: BTPayPalPhoneNumber? + // MARK: - Internal Properties + + var hermesPath: String + + var paymentType: BTPayPalPaymentType + // MARK: - Static Properties static let callbackURLHostAndPath: String = "onetouch/v1/" @@ -137,11 +135,9 @@ import BraintreeCore self.userPhoneNumber = userPhoneNumber } - // MARK: Public Methods + // MARK: Internal Methods - /// :nodoc: Exposed publicly for use by PayPal Native Checkout module. This method is not covered by semantic versioning. - @_documentation(visibility: private) - public func parameters( + func parameters( with configuration: BTConfiguration, universalLink: URL? = nil, isPayPalAppInstalled: Bool = false diff --git a/Sources/BraintreePayPal/BTPayPalVaultBaseRequest.swift b/Sources/BraintreePayPal/BTPayPalVaultBaseRequest.swift index 7db4ac2d38..99c31e82c1 100644 --- a/Sources/BraintreePayPal/BTPayPalVaultBaseRequest.swift +++ b/Sources/BraintreePayPal/BTPayPalVaultBaseRequest.swift @@ -23,11 +23,9 @@ import BraintreeCore super.init(hermesPath: "v1/paypal_hermes/setup_billing_agreement", paymentType: .vault) } - // MARK: Public Methods + // MARK: Internal Methods - /// :nodoc: Exposed publicly for use by PayPal Native Checkout module. This method is not covered by semantic versioning. - @_documentation(visibility: private) - public override func parameters( + override func parameters( with configuration: BTConfiguration, universalLink: URL? = nil, isPayPalAppInstalled: Bool = false diff --git a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutAccountNonce.swift b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutAccountNonce.swift deleted file mode 100644 index 02eb980b64..0000000000 --- a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutAccountNonce.swift +++ /dev/null @@ -1,72 +0,0 @@ -import Foundation - -#if canImport(BraintreeCore) -import BraintreeCore -#endif - -#if canImport(BraintreePayPal) -import BraintreePayPal -#endif - -import PayPalCheckout - -@available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") -/// Contains information about a PayPal payment method. -@objcMembers public class BTPayPalNativeCheckoutAccountNonce: BTPaymentMethodNonce { - - // MARK: - Public Properties - - /// Payer's email address. - public let email: String? - - /// Payer's first name. - public let firstName: String? - - /// Payer's last name. - public let lastName: String? - - /// Payer's phone number. - public let phone: String? - - /// The billing address. - public let billingAddress: BTPostalAddress? - - /// The shipping address. - public let shippingAddress: BTPostalAddress? - - /// Client metadata id associated with this transaction. - public let clientMetadataID: String? - - /// Optional. Payer id associated with this transaction. - /// Will be provided for Vault and Checkout. - public let payerID: String? - - // MARK: - Initializer - - init?(json: BTJSON, buyerData: User? = nil) { - let paypalAccounts = json["paypalAccounts"][0] - guard let nonce = paypalAccounts["nonce"].asString() else { - return nil - } - - let isDefault = paypalAccounts["default"].isTrue - let details = paypalAccounts["details"] - let payerInfo = details["payerInfo"] - - clientMetadataID = details["correlationId"].asString() - email = payerInfo["email"].asString() ?? details["email"].asString() ?? buyerData?.email - firstName = payerInfo["firstName"].asString() ?? buyerData?.givenName - lastName = payerInfo["lastName"].asString() ?? buyerData?.familyName - phone = payerInfo["phone"].asString() - payerID = payerInfo["payerId"].asString() ?? buyerData?.userId - - let shippingAddressJSON = details["payerInfo"]["shippingAddress"].asAddress() - let accountAddressJSON = details["payerInfo"]["accountAddress"].asAddress() - shippingAddress = shippingAddressJSON ?? accountAddressJSON - - let billingAddressJSON = details["payerInfo"]["billingAddress"].asAddress() - billingAddress = billingAddressJSON - - super.init(nonce: nonce, type: "PayPal", isDefault: isDefault) - } -} diff --git a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutAnalytics.swift b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutAnalytics.swift deleted file mode 100644 index 5a8308eb69..0000000000 --- a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutAnalytics.swift +++ /dev/null @@ -1,15 +0,0 @@ -import Foundation - -enum BTPayPalNativeCheckoutAnalytics { - - // MARK: - Conversion Events - - static let tokenizeStarted = "paypal-native:tokenize:started" - static let tokenizeFailed = "paypal-native:tokenize:failed" - static let tokenizeSucceeded = "paypal-native:tokenize:succeeded" - static let tokenizeCanceled = "paypal-native:tokenize:canceled" - - // MARK: - Additional Detail Events - - static let orderCreationFailed = "paypal-native:tokenize:order-creation:failed" -} diff --git a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutClient.swift b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutClient.swift deleted file mode 100644 index 0be8f4cdc0..0000000000 --- a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutClient.swift +++ /dev/null @@ -1,214 +0,0 @@ -import Foundation - -#if canImport(BraintreeCore) -import BraintreeCore -#endif - -#if canImport(BraintreePayPal) -import BraintreePayPal -#endif - -import PayPalCheckout - -@available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") -/// Client used to collect PayPal payment methods. If possible, this client will present a native flow; otherwise, it will fall back to a web flow. -@objc public class BTPayPalNativeCheckoutClient: NSObject { - - private let apiClient: BTAPIClient - - /// Used in POST body for FPTI analytics. - private var clientMetadataID: String? - - /// Used for linking events from the client to server side request - /// In the PayPal Native Checkout flow this will be an Order ID - private var payPalContextID: String? - - private let nativeCheckoutProvider: BTPayPalNativeCheckoutStartable - - - @available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") - /// Initializes a PayPal Native client. - /// - Parameter apiClient: The Braintree API client - @objc(initWithAPIClient:) - public convenience init(apiClient: BTAPIClient) { - self.init(apiClient: apiClient, nativeCheckoutProvider: BTPayPalNativeCheckoutProvider()) - } - - init(apiClient: BTAPIClient, nativeCheckoutProvider: BTPayPalNativeCheckoutStartable) { - self.apiClient = apiClient - self.nativeCheckoutProvider = nativeCheckoutProvider - } - - // MARK: - Public Methods - - @available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") - /// Tokenize a PayPal request to be used with the PayPal Native Checkout flow. - /// - /// On success, you will receive an instance of `BTPayPalNativeCheckoutAccountNonce`. - /// On failure or user cancelation you will receive an error. If the user cancels - /// out of the flow, the error code will equal `BTPayPalNativeError.canceled.rawValue`. - /// - /// - Parameters: - /// - request: A `BTPayPalNativeCheckoutRequest` - /// - completion: The completion will be invoked exactly once: when tokenization is complete or an error occurs. - @objc(tokenizeWithNativeCheckoutRequest:completion:) - public func tokenize( - _ request: BTPayPalNativeCheckoutRequest, - completion: @escaping (BTPayPalNativeCheckoutAccountNonce?, Error?) -> Void - ) { - tokenize(request: request, userAuthenticationEmail: request.userAuthenticationEmail, completion: completion) - } - - @available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") - /// Tokenize a PayPal request to be used with the PayPal Native Checkout flow. - /// - /// On success, you will receive an instance of `BTPayPalNativeCheckoutAccountNonce`. - /// On failure or user cancelation you will receive an error. If the user cancels - /// out of the flow, the error code will equal `BTPayPalNativeError.canceled.rawValue`. - /// - /// - Parameter request: A `BTPayPalNativeCheckoutRequest` - /// - Returns: A `BTPayPalNativeCheckoutAccountNonce` if successful - /// - Throws: An `Error` describing the failure - public func tokenize(_ request: BTPayPalNativeCheckoutRequest) async throws -> BTPayPalNativeCheckoutAccountNonce { - try await withCheckedThrowingContinuation { continuation in - tokenize(request) { nonce, error in - if let error { - continuation.resume(throwing: error) - } else if let nonce { - continuation.resume(returning: nonce) - } - } - } - } - - @available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") - /// Tokenize a PayPal request to be used with the PayPal Native Vault flow. - /// - /// On success, you will receive an instance of `BTPayPalNativeCheckoutAccountNonce`. - /// On failure or user cancelation you will receive an error. If the user cancels - /// out of the flow, the error code will equal `BTPayPalNativeError.canceled.rawValue`. - /// - /// - Parameters: - /// - request: A `BTPayPalNativeVaultRequest` - /// - completion: The completion will be invoked exactly once: when tokenization is complete or an error occurs. - @objc(tokenizeWithNativeVaultRequest:completion:) - public func tokenize( - _ request: BTPayPalNativeVaultRequest, - completion: @escaping (BTPayPalNativeCheckoutAccountNonce?, Error?) -> Void - ) { - tokenize(request: request, completion: completion) - } - - @available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") - /// Tokenize a PayPal request to be used with the PayPal Native Vault flow. - /// - /// On success, you will receive an instance of `BTPayPalNativeCheckoutAccountNonce`. - /// On failure or user cancelation you will receive an error. If the user cancels - /// out of the flow, the error code will equal `BTPayPalNativeError.canceled.rawValue`. - /// - /// - Parameter request: A `BTPayPalNativeVaultRequest` - /// - Returns: A `BTPayPalNativeCheckoutAccountNonce` if successful - /// - Throws: An `Error` describing the failure - public func tokenize(_ request: BTPayPalNativeVaultRequest) async throws -> BTPayPalNativeCheckoutAccountNonce { - try await withCheckedThrowingContinuation { continuation in - tokenize(request) { nonce, error in - if let error { - continuation.resume(throwing: error) - } else if let nonce { - continuation.resume(returning: nonce) - } - } - } - } - - // MARK: - Private Methods - - private func tokenize( - request: BTPayPalRequest, - userAuthenticationEmail: String? = nil, - completion: @escaping (BTPayPalNativeCheckoutAccountNonce?, Error?) -> Void - ) { - clientMetadataID = request.riskCorrelationID ?? State.correlationIDs.riskCorrelationID - self.apiClient.sendAnalyticsEvent(BTPayPalNativeCheckoutAnalytics.tokenizeStarted) - - let orderCreationClient = BTPayPalNativeOrderCreationClient(with: apiClient) - - orderCreationClient.createOrder(with: request) { [weak self] result in - guard let self else { - completion(nil, BTPayPalNativeCheckoutError.deallocated) - return - } - - if let payPalContextID = orderCreationClient.payPalContextID, !payPalContextID.isEmpty { - self.payPalContextID = payPalContextID - } - - switch result { - case .success(let order): - let nxoConfig = CheckoutConfig(clientID: order.payPalClientID, environment: order.environment) - nxoConfig.authConfig.userEmail = userAuthenticationEmail - - nativeCheckoutProvider.start(request: request, order: order, nxoConfig: nxoConfig) { returnURL, buyerData in - self.tokenize(returnURL: returnURL, buyerData: buyerData, request: request, completion: completion) - } onStartableCancel: { - self.notifyCancel(completion: completion) - } onStartableError: { error in - self.notifyFailure(with: error, completion: completion) - } - - case .failure(let error): - notifyFailure(with: error, completion: completion) - } - } - } - - private func tokenize( - returnURL: String?, - buyerData: User? = nil, - request: BTPayPalRequest, - completion: @escaping (BTPayPalNativeCheckoutAccountNonce?, Error?) -> Void - ) { - let tokenizationClient = BTPayPalNativeTokenizationClient(apiClient: apiClient) - tokenizationClient.tokenize(request: request, returnURL: returnURL, buyerData: buyerData) { result in - switch result { - case .success(let nonce): - self.notifySuccess(with: nonce, completion: completion) - case .failure(let error): - self.notifyFailure(with: error, completion: completion) - } - } - } - - // MARK: - Analytics Helper Methods - - private func notifySuccess( - with result: BTPayPalNativeCheckoutAccountNonce, - completion: @escaping (BTPayPalNativeCheckoutAccountNonce?, Error?) -> Void - ) { - apiClient.sendAnalyticsEvent( - BTPayPalNativeCheckoutAnalytics.tokenizeSucceeded, - correlationID: clientMetadataID, - payPalContextID: payPalContextID - ) - completion(result, nil) - } - - private func notifyFailure(with error: Error, completion: @escaping (BTPayPalNativeCheckoutAccountNonce?, Error?) -> Void) { - apiClient.sendAnalyticsEvent( - BTPayPalNativeCheckoutAnalytics.tokenizeFailed, - correlationID: clientMetadataID, - errorDescription: error.localizedDescription, - payPalContextID: payPalContextID - ) - completion(nil, error) - } - - private func notifyCancel(completion: @escaping (BTPayPalNativeCheckoutAccountNonce?, Error?) -> Void) { - self.apiClient.sendAnalyticsEvent( - BTPayPalNativeCheckoutAnalytics.tokenizeCanceled, - correlationID: clientMetadataID, - payPalContextID: payPalContextID - ) - completion(nil, BTPayPalNativeCheckoutError.canceled) - } -} diff --git a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutError.swift b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutError.swift deleted file mode 100644 index 2262d66bdd..0000000000 --- a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutError.swift +++ /dev/null @@ -1,118 +0,0 @@ -import Foundation -import PayPalCheckout - -@available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") -/// Error returned from the native PayPal flow -public enum BTPayPalNativeCheckoutError: Error, CustomNSError, LocalizedError, Equatable { - - /// 0. Request is not of type BTPayPalNativeCheckoutRequest or BTPayPalNativeVaultRequest - case invalidRequest - - /// 1. Failed to fetch Braintree configuration - case fetchConfigurationFailed - - /// 2. PayPal is not enabled for this merchant in the Braintree Control Panel - case payPalNotEnabled - - /// 3. Could not find PayPal client ID in the Braintree configuration - case payPalClientIDNotFound - - /// 4. Invalid environment identifier found in the Braintree configuration - case invalidEnvironment - - /// 5. Failed to create PayPal order - case orderCreationFailed(Error) - - /// 6. PayPal flow was canceled by the user - case canceled - - /// 7. PayPalCheckout SDK returned an error - case checkoutSDKFailed(PayPalCheckout.ErrorInfo) - - /// 8. Tokenization with the Braintree Gateway failed - case tokenizationFailed(Error) - - /// 9. Failed to parse tokenization result - case parsingTokenizationResultFailed - - /// 10. Invalid JSON response - case invalidJSONResponse - - /// 11. Deallocated BTPayPalNativeCheckoutClient - case deallocated - - /// 12. Missing return url in approval data - case missingReturnURL - - public static var errorDomain: String { - "com.braintreepayments.BTPaypalNativeCheckoutErrorDomain" - } - - public var errorCode: Int { - switch self { - case .invalidRequest: - return 0 - case .fetchConfigurationFailed: - return 1 - case .payPalNotEnabled: - return 2 - case .payPalClientIDNotFound: - return 3 - case .invalidEnvironment: - return 4 - case .orderCreationFailed: - return 5 - case .canceled: - return 6 - case .checkoutSDKFailed: - return 7 - case .tokenizationFailed: - return 8 - case .parsingTokenizationResultFailed: - return 9 - case .invalidJSONResponse: - return 10 - case .deallocated: - return 11 - case .missingReturnURL: - return 12 - } - } - - public var errorDescription: String? { - switch self { - case .invalidRequest: - return "Request is not of type BTPayPalNativeCheckoutRequest or BTPayPalNativeVaultRequest." - case .fetchConfigurationFailed: - return "Failed to fetch Braintree configuration." - case .payPalNotEnabled: - return "PayPal is not enabled for this merchant in the Braintree Control Panel." - case .payPalClientIDNotFound: - return "Could not find PayPal client ID in Braintree configuration." - case .invalidEnvironment: - return "Invalid environment identifier found in the Braintree configuration." - case .orderCreationFailed(let error): - return "Failed to create PayPal order: \(error.localizedDescription)" - case .canceled: - return "PayPal flow was canceled by the user." - case .checkoutSDKFailed(let error): - return "PayPalCheckout SDK returned an error: \(error.description)" - case .tokenizationFailed(let error): - return "Tokenization with the Braintree Gateway failed: \(error.localizedDescription)" - case .parsingTokenizationResultFailed: - return "Failed to parse tokenization result." - case .invalidJSONResponse: - return "Invalid JSON response." - case .deallocated: - return "BTPayPalNativeCheckoutClient has been deallocated." - case .missingReturnURL: - return "Return URL is missing from the approval data." - } - } - - // MARK: - Equatable Conformance - - public static func == (lhs: BTPayPalNativeCheckoutError, rhs: BTPayPalNativeCheckoutError) -> Bool { - lhs.errorCode == rhs.errorCode - } -} diff --git a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutProtocol.swift b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutProtocol.swift deleted file mode 100644 index 730968b31f..0000000000 --- a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutProtocol.swift +++ /dev/null @@ -1,22 +0,0 @@ -import UIKit -import PayPalCheckout - -protocol BTPayPalNativeCheckoutProtocol { - - static var showsExitAlert: Bool { get set } - - // swiftlint:disable function_parameter_count - static func start( - presentingViewController: UIViewController?, - createOrder: CheckoutConfig.CreateOrderCallback?, - onApprove: CheckoutConfig.ApprovalCallback?, - onShippingChange: CheckoutConfig.ShippingChangeCallback?, - onCancel: CheckoutConfig.CancelCallback?, - onError: CheckoutConfig.ErrorCallback? - ) - // swiftlint:enable function_parameter_count - - static func set(config: CheckoutConfig) -} - -extension Checkout: BTPayPalNativeCheckoutProtocol { } diff --git a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutProvider.swift b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutProvider.swift deleted file mode 100644 index 83bc868b0c..0000000000 --- a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutProvider.swift +++ /dev/null @@ -1,71 +0,0 @@ -import Foundation -import PayPalCheckout - -#if canImport(BraintreePayPal) -import BraintreePayPal -#endif - -@available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") -class BTPayPalNativeCheckoutProvider: BTPayPalNativeCheckoutStartable { - - /// Used in POST body for FPTI analytics. - var clientMetadataID: String? - - private let checkout: BTPayPalNativeCheckoutProtocol.Type - - init(_ mxo: BTPayPalNativeCheckoutProtocol.Type = Checkout.self) { - self.checkout = mxo - } - - // swiftlint:disable function_parameter_count - func start( - request: BTPayPalRequest, - order: BTPayPalNativeOrder, - nxoConfig: CheckoutConfig, - onStartableApprove: @escaping StartableApproveCallback, - onStartableCancel: @escaping StartableCancelCallback, - onStartableError: @escaping StartableErrorCallback - ) { - checkout.showsExitAlert = false - checkout.set(config: nxoConfig) - - checkout.start( - presentingViewController: nil, - createOrder: { [weak self] action in - guard self != nil else { - onStartableError(.deallocated) - return - } - - switch request.paymentType { - case .checkout: - action.set(orderId: order.orderID) - case .vault: - action.set(billingAgreementToken: order.orderID) - @unknown default: - onStartableError(.invalidRequest) - } - }, - onApprove: { [weak self] approval in - guard let self else { - onStartableError(.deallocated) - return - } - self.clientMetadataID = approval.data.correlationIDs.riskCorrelationID - onStartableApprove(approval.data.returnURL?.absoluteString, approval.data.buyer) - }, - onShippingChange: nil, - onCancel: { - onStartableCancel() - return - }, - onError: { error in - self.clientMetadataID = error.correlationIDs.riskCorrelationID - onStartableError(.checkoutSDKFailed(error)) - } - ) - - NotificationCenter.default.post(name: Notification.Name("brain_tree_source_event"), object: nil) - } - // swiftlint:enable function_parameter_count -} diff --git a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutRequest.swift b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutRequest.swift deleted file mode 100644 index a5591b46ac..0000000000 --- a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutRequest.swift +++ /dev/null @@ -1,54 +0,0 @@ -import Foundation - -#if canImport(BraintreeCore) -import BraintreeCore -#endif - -#if canImport(BraintreePayPal) -import BraintreePayPal -#endif - -@available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") -/// Options for the PayPal Checkout flow. -@objcMembers public class BTPayPalNativeCheckoutRequest: BTPayPalCheckoutRequest { - - // MARK: - Initializer - - /// Initializes a PayPal Native Checkout request - /// - Parameters: - /// - amount: Used for a one-time payment. Amount must be greater than or equal to zero, may optionally contain exactly 2 decimal places separated by '.' - /// - intent: Optional: Payment intent. Defaults to `.authorize`. Only applies to PayPal Checkout. - /// and is limited to 7 digits before the decimal point. - /// - offerPayLater: Optional: Offers PayPal Pay Later if the customer qualifies. Defaults to `false`. Only available with PayPal Checkout. - /// - currencyCode: Optional: A three-character ISO-4217 ISO currency code to use for the transaction. Defaults to merchant currency code if not set. - /// See https://developer.paypal.com/docs/api/reference/currency-codes/ for a list of supported currency codes. - /// - requestBillingAgreement: Optional: If set to `true`, this enables the Checkout with Vault flow, where the customer will be prompted to consent to a billing agreement during checkout. - /// - billingAgreementDescription: Optional: Display a custom description to the user for a billing agreement. For Checkout with Vault flows, you must also - /// set `requestBillingAgreement` to `true` on your `BTPayPalNativeVaultRequest`. - /// - userAuthenticationEmail: Optional: User email to initiate a quicker authentication flow in cases where the user has a PayPal Account with the same email. - public init( - amount: String, - intent: BTPayPalRequestIntent = .authorize, - offerPayLater: Bool = false, - currencyCode: String? = nil, - requestBillingAgreement: Bool = false, - billingAgreementDescription: String? = nil, - userAuthenticationEmail: String? = nil - ) { - super.init( - amount: amount, - intent: intent, - offerPayLater: offerPayLater, - currencyCode: currencyCode, - requestBillingAgreement: requestBillingAgreement - ) - - self.amount = amount - self.intent = intent - self.offerPayLater = offerPayLater - self.currencyCode = currencyCode - self.requestBillingAgreement = requestBillingAgreement - self.billingAgreementDescription = billingAgreementDescription - self.userAuthenticationEmail = userAuthenticationEmail - } -} diff --git a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutStartable.swift b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutStartable.swift deleted file mode 100644 index fee51a4566..0000000000 --- a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeCheckoutStartable.swift +++ /dev/null @@ -1,25 +0,0 @@ -import Foundation -import PayPalCheckout - -#if canImport(BraintreePayPal) -import BraintreePayPal -#endif - -@available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") -protocol BTPayPalNativeCheckoutStartable { - - typealias StartableApproveCallback = (String?, User?) -> Void - typealias StartableErrorCallback = (BTPayPalNativeCheckoutError) -> Void - typealias StartableCancelCallback = () -> Void - - // swiftlint:disable function_parameter_count - func start( - request: BTPayPalRequest, - order: BTPayPalNativeOrder, - nxoConfig: CheckoutConfig, - onStartableApprove: @escaping StartableApproveCallback, - onStartableCancel: @escaping StartableCancelCallback, - onStartableError: @escaping StartableErrorCallback - ) - // swiftlint:enable function_parameter_count -} diff --git a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeHermesResponse.swift b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeHermesResponse.swift deleted file mode 100644 index 6c495aa140..0000000000 --- a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeHermesResponse.swift +++ /dev/null @@ -1,28 +0,0 @@ -import Foundation - -#if canImport(BraintreeCore) -import BraintreeCore -#endif - -struct BTPayPalNativeHermesResponse { - - let orderID: String - - init?(json: BTJSON?) { - guard let json = json else { return nil } - - let redirectURL = json["paymentResource"]["redirectUrl"].asURL() - let approvalURL = json["agreementSetup"]["approvalUrl"].asURL() - - guard let url = redirectURL ?? approvalURL else { return nil } - - let token = URLComponents(url: url, resolvingAgainstBaseURL: false)? - .queryItems? - .first { $0.name == "token" || $0.name == "ba_token" }? - .value - - guard let orderID = token else { return nil } - - self.orderID = orderID - } -} diff --git a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeOrderCreationClient.swift b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeOrderCreationClient.swift deleted file mode 100644 index 1c183c4bb9..0000000000 --- a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeOrderCreationClient.swift +++ /dev/null @@ -1,84 +0,0 @@ -#if canImport(BraintreeCore) -import BraintreeCore -#endif - -#if canImport(BraintreePayPal) -import BraintreePayPal -#endif - -import PayPalCheckout - -struct BTPayPalNativeOrder: Equatable { - - let payPalClientID: String - let environment: PayPalCheckout.Environment - let orderID: String -} - -@available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") -class BTPayPalNativeOrderCreationClient { - - var payPalContextID: String? - - private let apiClient: BTAPIClient - - init(with apiClient: BTAPIClient) { - self.apiClient = apiClient - } - - func createOrder( - with request: BTPayPalRequest, - completion: @escaping (Result) -> Void - ) { - apiClient.fetchOrReturnRemoteConfiguration { configuration, error in - guard let config = configuration, error == nil else { - completion(.failure(.fetchConfigurationFailed)) - return - } - - guard let paypalEnabled = config.json?["paypalEnabled"].isTrue, paypalEnabled else { - completion(.failure(.payPalNotEnabled)) - return - } - - guard let payPalClientID = config.json?["paypal"]["clientId"].asString() else { - completion(.failure(.payPalClientIDNotFound)) - return - } - - let payPalEnvironment: PayPalCheckout.Environment? - if config.environment == "production" { - payPalEnvironment = .live - } else if config.environment == "sandbox" { - payPalEnvironment = .sandbox - } else { - payPalEnvironment = nil - } - - guard let environment = payPalEnvironment else { - completion(.failure(.invalidEnvironment)) - return - } - - self.apiClient.post( - request.hermesPath, - parameters: request.parameters(with: config) - ) { json, _, error in - guard let hermesResponse = BTPayPalNativeHermesResponse(json: json), error == nil else { - let underlyingError = error ?? BTPayPalNativeCheckoutError.invalidJSONResponse - completion(.failure(.orderCreationFailed(underlyingError))) - return - } - - let order = BTPayPalNativeOrder( - payPalClientID: payPalClientID, - environment: environment, - orderID: hermesResponse.orderID - ) - - self.payPalContextID = order.orderID - completion(.success(order)) - } - } - } -} diff --git a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeTokenizationClient.swift b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeTokenizationClient.swift deleted file mode 100644 index 149cc65f19..0000000000 --- a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeTokenizationClient.swift +++ /dev/null @@ -1,54 +0,0 @@ -#if canImport(BraintreeCore) -import BraintreeCore -#endif - -#if canImport(BraintreePayPal) -import BraintreePayPal -#endif - -import PayPalCheckout - -@available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") -class BTPayPalNativeTokenizationClient { - - private let apiClient: BTAPIClient - - init(apiClient: BTAPIClient) { - self.apiClient = apiClient - } - - func tokenize( - request: BTPayPalRequest, - returnURL: String?, - buyerData: User? = nil, - completion: @escaping (Result) -> Void - ) { - guard let returnURL else { - completion(.failure(.missingReturnURL)) - return - } - - let tokenizationRequest = BTPayPalNativeTokenizationRequest( - request: request, - correlationID: request.riskCorrelationID ?? State.correlationIDs.riskCorrelationID ?? "" - ) - - apiClient.post( - "v1/payment_methods/paypal_accounts", - parameters: tokenizationRequest.parameters(returnURL: returnURL) - ) { body, _, error in - guard let json = body, error == nil else { - let underlyingError = error ?? BTPayPalNativeCheckoutError.invalidJSONResponse - completion(.failure(.tokenizationFailed(underlyingError))) - return - } - - guard let accountNonce = BTPayPalNativeCheckoutAccountNonce(json: json, buyerData: buyerData) else { - completion(.failure(.parsingTokenizationResultFailed)) - return - } - - completion(.success(accountNonce)) - } - } -} diff --git a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeTokenizationRequest.swift b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeTokenizationRequest.swift deleted file mode 100644 index 2300df899b..0000000000 --- a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeTokenizationRequest.swift +++ /dev/null @@ -1,46 +0,0 @@ -#if canImport(BraintreeCore) -import BraintreeCore -#endif - -#if canImport(BraintreePayPal) -import BraintreePayPal -#endif - -import PayPalCheckout - -@available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") -class BTPayPalNativeTokenizationRequest { - - private let request: BTPayPalRequest - private let correlationID: String - - init(request: BTPayPalRequest, correlationID: String) { - self.request = request - self.correlationID = correlationID - } - - // The return URL is vended from the Native Checkout SDK and is consumed - // by the Braintree Gateway to consume payment details - func parameters(returnURL: String?) -> [String: Any] { - let clientDictionary: [String: String] = [ - "platform": "iOS", - "product_name": "PayPal", - "paypal_sdk_version": "version" - ] - - let responseDictionary: [String: String?] = ["webURL": returnURL ?? ""] - var account: [String: Any] = [ - "client": clientDictionary, - "response": responseDictionary, - "response_type": "web", - "correlation_id": correlationID - ] - - if let checkoutRequest = request as? BTPayPalNativeCheckoutRequest { - account["options"] = ["validate": false] - account["intent"] = checkoutRequest.intent.stringValue - } - - return ["paypal_account": account] - } -} diff --git a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeVaultRequest.swift b/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeVaultRequest.swift deleted file mode 100644 index ecd4fa7400..0000000000 --- a/Sources/BraintreePayPalNativeCheckout/BTPayPalNativeVaultRequest.swift +++ /dev/null @@ -1,29 +0,0 @@ -import Foundation - -#if canImport(BraintreeCore) -import BraintreeCore -#endif - -#if canImport(BraintreePayPal) -import BraintreePayPal -#endif - -@available(*, deprecated, message: "BraintreePayPalNativeCheckout Module is deprecated, use BraintreePayPal Module instead") -/// Options for the PayPal Vault flow. -@objcMembers public class BTPayPalNativeVaultRequest: BTPayPalVaultBaseRequest { - - // MARK: - Initializer - - /// Initializes a PayPal Native Vault request - /// - Parameters: - /// - offerCredit: Optional: Offers PayPal Credit if the customer qualifies. Defaults to `false`. - /// - billingAgreementDescription: Optional: Display a custom description to the user for a billing agreement. For Checkout with Vault flows, you must also set - /// `requestBillingAgreement` to `true` on your `BTPayPalCheckoutRequest`. - public init( - offerCredit: Bool = false, - billingAgreementDescription: String? = nil - ) { - super.init(offerCredit: offerCredit) - self.billingAgreementDescription = billingAgreementDescription - } -} diff --git a/Sources/BraintreePayPalNativeCheckout/PrivacyInfo.xcprivacy b/Sources/BraintreePayPalNativeCheckout/PrivacyInfo.xcprivacy deleted file mode 100644 index ed6d3c3a38..0000000000 --- a/Sources/BraintreePayPalNativeCheckout/PrivacyInfo.xcprivacy +++ /dev/null @@ -1,33 +0,0 @@ - - - - - NSPrivacyCollectedDataTypes - - - NSPrivacyCollectedDataType - NSPrivacyCollectedDataTypePaymentInfo - NSPrivacyCollectedDataTypeLinked - - NSPrivacyCollectedDataTypeTracking - - NSPrivacyCollectedDataTypePurposes - - NSPrivacyCollectedDataTypePurposeAppFunctionality - - - - NSPrivacyCollectedDataType - NSPrivacyCollectedDataTypeEmailAddress - NSPrivacyCollectedDataTypeLinked - - NSPrivacyCollectedDataTypeTracking - - NSPrivacyCollectedDataTypePurposes - - NSPrivacyCollectedDataTypePurposeAppFunctionality - - - - - diff --git a/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeCheckoutAccountNonce_Tests.swift b/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeCheckoutAccountNonce_Tests.swift deleted file mode 100644 index 4eb4086a52..0000000000 --- a/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeCheckoutAccountNonce_Tests.swift +++ /dev/null @@ -1,87 +0,0 @@ -import XCTest -import BraintreeCore -@testable import BraintreePayPalNativeCheckout - -final class BTPayPalNativeCheckoutAccountNonce_Tests: XCTestCase { - - func testInit_withAllJSON_createsPayPalNativeCheckoutNonceWithAllValues() { - let nativeCheckoutJSON = BTJSON( - value: [ - "paypalAccounts": [ - [ - "nonce": "a-nonce", - "description": "A description", - "default": "true", - "details": [ - "correlationId": "a-fake-clientMetadataID", - "email": "hello@world.com", - "payerInfo": [ - "firstName": "Some", - "lastName": "Dude", - "phone": "867-5309", - "payerId": "FAKE-PAYER-ID", - "accountAddress": [ - "street1": "1 Foo Ct", - "street2": "Apt Bar", - "city": "Fubar", - "state": "FU", - "postalCode": "42", - "country": "USA" - ] as [String: Any], - "billingAddress": [ - "recipientName": "Bar Foo", - "line1": "2 Foo Ct", - "line2": "Apt Foo", - "city": "Barfoo", - "state": "BF", - "postalCode": "24", - "countryCode": "ASU" - ], - "shippingAddress": [ - "recipientName": "Some Dude", - "line1": "3 Foo Ct", - "line2": "Apt 5", - "city": "Dudeville", - "state": "CA", - "postalCode": "24", - "countryCode": "US" - ] - ] as [String: Any] - ] as [String: Any] - ] as [String: Any] - ] - ] - ) - - let payPalNativeCheckoutNonce = BTPayPalNativeCheckoutAccountNonce(json: nativeCheckoutJSON) - XCTAssertNotNil(payPalNativeCheckoutNonce) - XCTAssertEqual(payPalNativeCheckoutNonce?.nonce, "a-nonce") - XCTAssertEqual(payPalNativeCheckoutNonce?.isDefault, false) - XCTAssertEqual(payPalNativeCheckoutNonce?.clientMetadataID, "a-fake-clientMetadataID") - XCTAssertEqual(payPalNativeCheckoutNonce?.email, "hello@world.com") - XCTAssertEqual(payPalNativeCheckoutNonce?.firstName, "Some") - XCTAssertEqual(payPalNativeCheckoutNonce?.lastName, "Dude") - XCTAssertEqual(payPalNativeCheckoutNonce?.phone, "867-5309") - XCTAssertEqual(payPalNativeCheckoutNonce?.payerID, "FAKE-PAYER-ID") - - let billingAddress = payPalNativeCheckoutNonce?.billingAddress - XCTAssertNotNil(billingAddress) - XCTAssertEqual(billingAddress?.recipientName, "Bar Foo") - XCTAssertEqual(billingAddress?.streetAddress, "2 Foo Ct") - XCTAssertEqual(billingAddress?.extendedAddress, "Apt Foo") - XCTAssertEqual(billingAddress?.locality, "Barfoo") - XCTAssertEqual(billingAddress?.region, "BF") - XCTAssertEqual(billingAddress?.postalCode, "24") - XCTAssertEqual(billingAddress?.countryCodeAlpha2, "ASU") - - let shippingAddress = payPalNativeCheckoutNonce?.shippingAddress! - XCTAssertNotNil(shippingAddress) - XCTAssertEqual(shippingAddress?.recipientName, "Some Dude") - XCTAssertEqual(shippingAddress?.streetAddress, "3 Foo Ct") - XCTAssertEqual(shippingAddress?.extendedAddress, "Apt 5") - XCTAssertEqual(shippingAddress?.locality, "Dudeville") - XCTAssertEqual(shippingAddress?.region, "CA") - XCTAssertEqual(shippingAddress?.postalCode, "24") - XCTAssertEqual(shippingAddress?.countryCodeAlpha2, "US") - } -} diff --git a/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeCheckoutAnalytics_Tests.swift b/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeCheckoutAnalytics_Tests.swift deleted file mode 100644 index f66b07fb1a..0000000000 --- a/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeCheckoutAnalytics_Tests.swift +++ /dev/null @@ -1,12 +0,0 @@ -import XCTest -@testable import BraintreePayPalNativeCheckout - -final class BTPayPalNativeCheckoutAnalytics_Tests: XCTestCase { - func test_tokenizeAnalyticEvents_sendExpectedEventNames() { - XCTAssertEqual(BTPayPalNativeCheckoutAnalytics.tokenizeStarted, "paypal-native:tokenize:started") - XCTAssertEqual(BTPayPalNativeCheckoutAnalytics.tokenizeFailed, "paypal-native:tokenize:failed") - XCTAssertEqual(BTPayPalNativeCheckoutAnalytics.tokenizeSucceeded, "paypal-native:tokenize:succeeded") - XCTAssertEqual(BTPayPalNativeCheckoutAnalytics.tokenizeCanceled, "paypal-native:tokenize:canceled") - XCTAssertEqual(BTPayPalNativeCheckoutAnalytics.orderCreationFailed, "paypal-native:tokenize:order-creation:failed") - } -} diff --git a/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeCheckoutClient_Tests.swift b/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeCheckoutClient_Tests.swift deleted file mode 100644 index 869fd8fa77..0000000000 --- a/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeCheckoutClient_Tests.swift +++ /dev/null @@ -1,259 +0,0 @@ -import XCTest -import PayPalCheckout -@testable import BraintreeTestShared -@testable import BraintreePayPalNativeCheckout -@testable import BraintreeCore -@testable import BraintreePayPal - -class BTPayPalNativeCheckoutClient_Tests: XCTestCase { - var apiClient: MockAPIClient! - let nxoConfig = CheckoutConfig( - clientID: "testClientID", - createOrder: nil, - onApprove: nil, - onShippingChange: nil, - onCancel: nil, - onError: nil, - environment: .sandbox - ) - - lazy var mockNativeCheckoutProvider = MockBTPayPalNativeCheckoutProvider(nxoConfig: nxoConfig) - - override func setUp() { - super.setUp() - apiClient = MockAPIClient(authorization: "development_client_key") - } - - func testInvalidConfiguration_ReturnsCorrectError() { - let environment = "sandbox" - apiClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "environment": environment, - "paypal": ["clientId": nil] as [String: Any?] - ] as [String: Any]) - - let nativeCheckoutRequest = BTPayPalNativeCheckoutRequest(amount: "4.30") - let checkoutClient = BTPayPalNativeCheckoutClient(apiClient: apiClient) - checkoutClient.tokenize(nativeCheckoutRequest) { nonce, error in - XCTAssertNil(nonce) - XCTAssertEqual(error as? BTPayPalNativeCheckoutError, .payPalClientIDNotFound) - XCTAssertEqual(self.apiClient.postedAnalyticsEvents.last, BTPayPalNativeCheckoutAnalytics.tokenizeFailed) - } - } - - func testUserAuthenticationIsPassed_returnsRequestEmail() { - apiClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "environment": "sandbox", - "paypal": ["clientId": "a-fake-client-id"] as [String: Any?] - ] as [String: Any]) - - apiClient.cannedResponseBody = BTJSON(value: [ - "paymentResource": ["redirectUrl": "https://www.paypal.com/checkout?token=fake-ec-token"] - ]) - - let payPalNativeCheckoutClient = BTPayPalNativeCheckoutClient(apiClient: apiClient, nativeCheckoutProvider: mockNativeCheckoutProvider) - let request = BTPayPalNativeCheckoutRequest(amount: "1.99", userAuthenticationEmail: "fake_user_email@mock.paypal.com") - payPalNativeCheckoutClient.tokenize(request) { _, _ in } - XCTAssertEqual(mockNativeCheckoutProvider.userAuthenticationEmail, "fake_user_email@mock.paypal.com") - } - - func testUserAuthenticationIsNil_returnsNilForEmail() async { - apiClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "environment": "sandbox", - "paypal": ["clientId": "a-fake-client-id"] as [String: Any?] - ] as [String: Any]) - - apiClient.cannedResponseBody = BTJSON(value: [ - "paymentResource": ["redirectUrl": "https://www.paypal.com/checkout?token=fake-ec-token"] - ]) - - let payPalNativeCheckoutClient = BTPayPalNativeCheckoutClient(apiClient: apiClient, nativeCheckoutProvider: mockNativeCheckoutProvider) - let request = BTPayPalNativeCheckoutRequest(amount: "1.99") - payPalNativeCheckoutClient.tokenize(request) { _, _ in } - XCTAssertNil(mockNativeCheckoutProvider.userAuthenticationEmail) - } - - func testTokenize_whenOnStartableApproved_returnsDidApprove() { - apiClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "environment": "sandbox", - "paypal": ["clientId": "a-fake-client-id"] as [String: Any?] - ] as [String: Any]) - - apiClient.cannedResponseBody = BTJSON(value: [ - "paymentResource": ["redirectUrl": "https://www.paypal.com/checkout?token=fake-ec-token"] - ]) - - let payPalNativeCheckoutClient = BTPayPalNativeCheckoutClient(apiClient: apiClient, nativeCheckoutProvider: mockNativeCheckoutProvider) - let request = BTPayPalNativeVaultRequest() - payPalNativeCheckoutClient.tokenize(request) { _, _ in } - mockNativeCheckoutProvider.triggerApprove(returnURL: "https://fake-return-url") - - XCTAssertTrue(mockNativeCheckoutProvider.didApprove) - } - - func testTokenize_whenOnStartableCancel_returnsCancel() { - apiClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "environment": "sandbox", - "paypal": ["clientId": "a-fake-client-id"] as [String: Any?] - ] as [String: Any]) - - apiClient.cannedResponseBody = BTJSON(value: [ - "paymentResource": ["redirectUrl": "https://www.paypal.com/checkout?token=fake-ec-token"] - ]) - - let payPalNativeCheckoutClient = BTPayPalNativeCheckoutClient(apiClient: apiClient, nativeCheckoutProvider: mockNativeCheckoutProvider) - let request = BTPayPalNativeCheckoutRequest(amount: "1.99") - payPalNativeCheckoutClient.tokenize(request) { _, _ in } - mockNativeCheckoutProvider.triggerCancel() - XCTAssertTrue(mockNativeCheckoutProvider.didCancel) - } - - func testTokenize_whenOnStartableErrorCalled_returnsError() { - apiClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "environment": "sandbox", - "paypal": ["clientId": "a-fake-client-id"] as [String: Any?] - ] as [String: Any]) - - let payPalNativeCheckoutClient = BTPayPalNativeCheckoutClient(apiClient: apiClient, nativeCheckoutProvider: mockNativeCheckoutProvider) - let request = BTPayPalNativeCheckoutRequest(amount: "1.99") - payPalNativeCheckoutClient.tokenize(request) { _, error in - self.mockNativeCheckoutProvider.triggerError(error: error as! BTPayPalNativeCheckoutError) - XCTAssertEqual((error as! BTPayPalNativeCheckoutError).errorDescription, "Failed to create PayPal order: Invalid JSON response.") - } - } - - func testTokenize_whenInvalidRedirectURL_returnsError() { - apiClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "environment": "sandbox", - "paypal": ["clientId": "a-fake-client-id"] as [String: Any?] - ] as [String: Any]) - - apiClient.cannedResponseBody = BTJSON(value: [ - "paymentResource": ["redirectUrl": "not-a-url"] - ]) - - let payPalNativeCheckoutClient = BTPayPalNativeCheckoutClient(apiClient: apiClient) - let request = BTPayPalNativeCheckoutRequest(amount: "1.99") - let expectation = expectation(description: "Checkout fails with error") - - payPalNativeCheckoutClient.tokenize(request) { nonce, error in - guard let error = error as NSError? else { XCTFail(); return } - XCTAssertNil(nonce) - XCTAssertEqual(error.domain, "com.braintreepayments.BTPaypalNativeCheckoutErrorDomain") - XCTAssertEqual(error.code, 5) - XCTAssertEqual(error.localizedDescription, "Failed to create PayPal order: Invalid JSON response.") - expectation.fulfill() - } - - waitForExpectations(timeout: 1) - } - - func testTokenize_whenInvalidConfiguration_returnsError() { - apiClient.cannedConfigurationResponseBody = nil - - let request = BTPayPalNativeCheckoutRequest(amount: "1") - let payPalNativeCheckoutClient = BTPayPalNativeCheckoutClient(apiClient: apiClient) - let expectation = expectation(description: "Checkout fails with error") - - payPalNativeCheckoutClient.tokenize(request) { nonce, error in - guard let error = error as NSError? else { XCTFail(); return } - XCTAssertNil(nonce) - XCTAssertEqual(error.domain, "com.braintreepayments.BTPaypalNativeCheckoutErrorDomain") - XCTAssertEqual(error.code, 1) - XCTAssertEqual(error.localizedDescription, "Failed to fetch Braintree configuration.") - expectation.fulfill() - } - - waitForExpectations(timeout: 1) - } - - func testTokenize_whenPayPalNotEnabled_returnsError() async { - apiClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": false, - "environment": "sandbox", - "paypal": ["clientId": "a-fake-client-id"] as [String: Any?] - ] as [String: Any]) - - let request = BTPayPalNativeVaultRequest() - let payPalNativeCheckoutClient = BTPayPalNativeCheckoutClient(apiClient: apiClient) - - do { - let _ = try await payPalNativeCheckoutClient.tokenize(request) - } catch { - guard let error = error as NSError? else { XCTFail(); return } - XCTAssertEqual(error.domain, "com.braintreepayments.BTPaypalNativeCheckoutErrorDomain") - XCTAssertEqual(error.code, 2) - XCTAssertEqual(error.localizedDescription, "PayPal is not enabled for this merchant in the Braintree Control Panel.") - } - } - - func testTokenize_whenInvalidEnvironment_returnsError() async { - apiClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "environment": "bogus", - "paypal": ["clientId": "a-fake-client-id"] as [String: Any?] - ] as [String: Any]) - - let request = BTPayPalNativeCheckoutRequest(amount: "1") - let payPalNativeCheckoutClient = BTPayPalNativeCheckoutClient(apiClient: apiClient) - - do { - let _ = try await payPalNativeCheckoutClient.tokenize(request) - } catch { - guard let error = error as NSError? else { XCTFail(); return } - XCTAssertEqual(error.domain, "com.braintreepayments.BTPaypalNativeCheckoutErrorDomain") - XCTAssertEqual(error.code, 4) - XCTAssertEqual(error.localizedDescription, "Invalid environment identifier found in the Braintree configuration.") - } - } - - func testTokenize_whenOrderIDIsReturned_sendsPayPalContextIDInAnalytics() { - apiClient.cannedConfigurationResponseBody = BTJSON( - value: [ - "paypalEnabled": true, - "environment": "sandbox", - "paypal": ["clientId": "a-fake-client-id"] as [String: Any?] - ] as [String: Any] - ) - - apiClient.cannedResponseBody = BTJSON(value: [ - "paymentResource": ["redirectUrl": "https://www.paypal.com/checkout?token=fake-ec-token"] - ]) - - let payPalNativeCheckoutClient = BTPayPalNativeCheckoutClient(apiClient: apiClient) - let request = BTPayPalNativeVaultRequest() - - payPalNativeCheckoutClient.tokenize(request) { _, _ in } - mockNativeCheckoutProvider.triggerApprove(returnURL: "https://fake-return-url") - - XCTAssertEqual(apiClient.postedPayPalContextID, "fake-ec-token") - } - - func testTokenize_whenOrderIDIsNotReturned_doesNotSendPayPalContextIDInAnalytics() { - apiClient.cannedConfigurationResponseBody = BTJSON( - value: [ - "paypalEnabled": true, - "environment": "sandbox", - "paypal": ["clientId": "a-fake-client-id"] as [String: Any?] - ] as [String: Any] - ) - - apiClient.cannedResponseBody = BTJSON(value: [ - "paymentResource": ["redirectUrl": "https://www.paypal.com/checkout?token="] - ]) - - let payPalNativeCheckoutClient = BTPayPalNativeCheckoutClient(apiClient: apiClient) - let request = BTPayPalNativeVaultRequest() - - payPalNativeCheckoutClient.tokenize(request) { _, _ in } - mockNativeCheckoutProvider.triggerApprove(returnURL: "https://fake-return-url") - - XCTAssertNil(apiClient.postedPayPalContextID) - } -} diff --git a/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeCheckoutProvider_Tests.swift b/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeCheckoutProvider_Tests.swift deleted file mode 100644 index 8c1cf64409..0000000000 --- a/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeCheckoutProvider_Tests.swift +++ /dev/null @@ -1,44 +0,0 @@ -import XCTest -import UIKit -import PayPalCheckout -@testable import BraintreePayPalNativeCheckout - -class BTPayPalNativeCheckoutProvider_Tests: XCTestCase { - - func testStart_whenStartIsCalled_checkoutIsInitialized() { - let nativeCheckoutProvider = BTPayPalNativeCheckoutProvider(MockCheckout.self) - nativeCheckoutProvider.start( - request: BTPayPalNativeVaultRequest(), - order: BTPayPalNativeOrder(payPalClientID: "", environment: .sandbox, orderID: ""), - nxoConfig: CheckoutConfig(clientID: ""), - onStartableApprove: { _, _ in }, - onStartableCancel: { }, - onStartableError: { _ in } - ) - - XCTAssertTrue(MockCheckout.startInvoked) - XCTAssertTrue(MockCheckout.isConfigSet) - } -} - -class MockCheckout: BTPayPalNativeCheckoutProtocol { - - static var showsExitAlert = false - static var startInvoked = false - static var isConfigSet = false - - static func start( - presentingViewController: UIViewController?, - createOrder: CheckoutConfig.CreateOrderCallback?, - onApprove: CheckoutConfig.ApprovalCallback?, - onShippingChange: CheckoutConfig.ShippingChangeCallback?, - onCancel: CheckoutConfig.CancelCallback?, - onError: CheckoutConfig.ErrorCallback? - ) { - startInvoked = true - } - - static func set(config: PayPalCheckout.CheckoutConfig) { - isConfigSet = true - } -} diff --git a/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeCheckoutRequest_Tests.swift b/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeCheckoutRequest_Tests.swift deleted file mode 100644 index 8e2f48c5f2..0000000000 --- a/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeCheckoutRequest_Tests.swift +++ /dev/null @@ -1,146 +0,0 @@ -import XCTest -@testable import BraintreePayPalNativeCheckout -@testable import BraintreeCore -@testable import BraintreePayPal - -class BTPayPalNativeCheckoutRequest_Tests: XCTestCase { - - private var configuration: BTConfiguration! - - override func setUp() { - super.setUp() - let json = BTJSON(value: [ - "paypalEnabled": true, - "paypal": [ - "environment": "offline" - ] - ] as [String: Any]) - configuration = BTConfiguration(json: json) - } - - func testPaymentTypeIsCheckout() { - let checkoutRequest = BTPayPalNativeCheckoutRequest(amount: "10.00") - XCTAssertTrue(checkoutRequest.paymentType == .checkout, "Incorrect payment type on CheckoutRequest") - } - - func testHermesPathIsCorrect() { - let checkoutRequest = BTPayPalNativeCheckoutRequest(amount: "10.00") - XCTAssertEqual(checkoutRequest.hermesPath, "v1/paypal_hermes/create_payment_resource") - } - - func testUserAuthenticationEmailReturnsNil() { - let request = BTPayPalNativeCheckoutRequest(amount: "10.00") - XCTAssertNil(request.userAuthenticationEmail) - } - - func testUserAuthenticationEmailReturnsEmail() { - let request = BTPayPalNativeCheckoutRequest(amount: "10.00", userAuthenticationEmail: "user@example.com") - XCTAssertEqual(request.userAuthenticationEmail, "user@example.com") - } - - func testIntentStringReturnsCorrectValue() { - let checkoutRequest = BTPayPalNativeCheckoutRequest(amount: "10.00") - checkoutRequest.intent = .authorize - XCTAssertEqual(checkoutRequest.intent.stringValue, "authorize") - - checkoutRequest.intent = .order - XCTAssertEqual(checkoutRequest.intent.stringValue, "order") - - checkoutRequest.intent = .sale - XCTAssertEqual(checkoutRequest.intent.stringValue, "sale") - } - - func testBaseConfigurationCorrect() throws { - let request = BTPayPalNativeCheckoutRequest(amount: "10.00") - let lineItem = BTPayPalLineItem( - quantity: "1", - unitAmount: "5.00", - name: "item one", - kind: .credit - ) - request.localeCode = .en_US - request.lineItems = [lineItem] - request.isShippingAddressRequired = true - request.displayName = "Test Request" - request.merchantAccountID = "Merchant Acct ID" - request.riskCorrelationID = "Risk Correlation ID" - request.shippingAddressOverride = BTPostalAddress() - request.isShippingAddressEditable = true - let baseParameters = request.parameters(with: configuration) - - let parameterLineItem = try XCTUnwrap((baseParameters["line_items"] as? [[AnyHashable: Any]])?.first) - - // Assert that the line items associated with the checkout request are included as parameters - XCTAssertEqual(parameterLineItem["quantity"] as? String, lineItem.quantity) - XCTAssertEqual(parameterLineItem["unit_amount"] as? String, lineItem.unitAmount) - XCTAssertEqual(parameterLineItem["kind"] as? String, "credit") - XCTAssertEqual(parameterLineItem["name"] as? String, lineItem.name) - - // Assert that the return and cancel URLs are correct - XCTAssertEqual(baseParameters["cancel_url"] as? String, "sdk.ios.braintree://onetouch/v1/cancel") - XCTAssertEqual(baseParameters["return_url"] as? String, "sdk.ios.braintree://onetouch/v1/success") - XCTAssertEqual(baseParameters["merchant_account_id"] as? String, request.merchantAccountID) - XCTAssertEqual(baseParameters["correlation_id"] as? String, request.riskCorrelationID) - - let profile = try XCTUnwrap(baseParameters["experience_profile"] as? [AnyHashable: Any]) - XCTAssertEqual(profile["no_shipping"] as? Bool, !request.isShippingAddressRequired) - XCTAssertEqual(profile["brand_name"] as? String, request.displayName) - XCTAssertEqual(profile["locale_code"] as? String, request.localeCode.stringValue) - XCTAssertEqual(profile["address_override"] as? Bool, !request.isShippingAddressEditable) - } - - func testParametersWithConfigurationReturnsAllParams() { - let request = BTPayPalNativeCheckoutRequest(amount: "1") - request.intent = .sale - request.offerPayLater = true - request.currencyCode = "currency-code" - request.requestBillingAgreement = true - request.billingAgreementDescription = "description" - request.userAction = .payNow - - let shippingAddress = BTPostalAddress() - shippingAddress.streetAddress = "123 Main" - shippingAddress.extendedAddress = "Unit 1" - shippingAddress.locality = "Chicago" - shippingAddress.region = "IL" - shippingAddress.postalCode = "11111" - shippingAddress.countryCodeAlpha2 = "US" - shippingAddress.recipientName = "Recipient" - request.shippingAddressOverride = shippingAddress - request.isShippingAddressEditable = true - - let parameters = request.parameters(with: configuration) - - XCTAssertEqual(parameters["intent"] as? String, "sale") - XCTAssertEqual(parameters["amount"] as? String, "1") - XCTAssertEqual(parameters["offer_pay_later"] as? Bool, true) - XCTAssertEqual(parameters["currency_iso_code"] as? String, "currency-code") - XCTAssertEqual(parameters["line1"] as? String, "123 Main") - XCTAssertEqual(parameters["line2"] as? String, "Unit 1") - XCTAssertEqual(parameters["city"] as? String, "Chicago") - XCTAssertEqual(parameters["state"] as? String, "IL") - XCTAssertEqual(parameters["postal_code"] as? String, "11111") - XCTAssertEqual(parameters["country_code"] as? String, "US") - XCTAssertEqual(parameters["recipient_name"] as? String, "Recipient") - XCTAssertEqual(parameters["request_billing_agreement"] as? Bool, true) - - guard let billingAgreementDetails = parameters["billing_agreement_details"] as? [String : String] else { - XCTFail() - return - } - - XCTAssertEqual(billingAgreementDetails["description"], "description") - - guard let experienceProfile = parameters["experience_profile"] as? [String: Any] else { XCTFail(); return } - XCTAssertEqual(experienceProfile["user_action"] as? String, "commit") - } - - func testVaultParameters_withShippingAddressOverrideNil_doesNotPassShippingAddress() { - let request = BTPayPalNativeVaultRequest() - request.shippingAddressOverride = nil - - let parameters = request.parameters(with: configuration) - - XCTAssertNil(parameters["shipping_address"]) - } -} diff --git a/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeHermesResponse_Tests.swift b/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeHermesResponse_Tests.swift deleted file mode 100644 index 07c2aeafd6..0000000000 --- a/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeHermesResponse_Tests.swift +++ /dev/null @@ -1,27 +0,0 @@ -import XCTest -@testable import BraintreePayPalNativeCheckout -@testable import BraintreeCore - -class BTPayPalNativeHermesResponse_Tests: XCTestCase { - - func testHermesResponseCreation() throws { - let expectedECToken = "EC-4RW94683SG8462403" - - let jsonData = try XCTUnwrap(""" - { - "paymentResource": { - "authenticateUrl": null, - "intent": "authorize", - "paymentToken": "PAYID-MK5WKWI5LX430173F5705007", - "redirectUrl": "https://www.sandbox.paypal.com/checkoutnow?nolegacy=1&token=\(expectedECToken)" - } - } - """.data(using: .utf8)) - let json = BTJSON(data: jsonData) - - let hermesResponse = BTPayPalNativeHermesResponse(json: json) - XCTAssertNotNil(hermesResponse) - - XCTAssertEqual(hermesResponse?.orderID, expectedECToken) - } -} diff --git a/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeOrderCreationClient_Tests.swift b/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeOrderCreationClient_Tests.swift deleted file mode 100644 index df585a81ec..0000000000 --- a/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeOrderCreationClient_Tests.swift +++ /dev/null @@ -1,133 +0,0 @@ -import XCTest -@testable import BraintreeTestShared -@testable import BraintreePayPalNativeCheckout -@testable import BraintreeCore - -class BTPayPalNativeOrderCreationClient_Tests: XCTestCase { - var apiClient: MockAPIClient! - var orderCreationClient: BTPayPalNativeOrderCreationClient! - let request = BTPayPalNativeCheckoutRequest(amount: "10.00") - - override func setUp() { - super.setUp() - apiClient = MockAPIClient(authorization: "development_client_key") - orderCreationClient = BTPayPalNativeOrderCreationClient(with: apiClient) - } - - func testCreateOrderSuccess() { - let environment = "sandbox" - let clientId = "someClientId" - let orderId = "someOrderId" - - apiClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "environment": environment, - "paypal": ["clientId": clientId] - ] as [String: Any]) - - apiClient.cannedResponseBody = BTJSON(value: [ - "paymentResource": [ - "authenticateUrl": nil, - "intent": "authorize", - "paymentToken": "somePayToken", - "redirectUrl": "https://www.sandbox.paypal.com/checkoutnow?nolegacy=1&token=\(orderId)" - ] - ]) - - orderCreationClient.createOrder(with: request) { result in - switch result { - case .success(let order): - XCTAssertEqual(order.payPalClientID, clientId) - XCTAssertEqual(order.environment.name, environment) - XCTAssertEqual(order.orderID, orderId) - - case .failure: - XCTFail("No error should be thrown") - } - } - } - - //MARK: Failure cases - - func testCreateOrder_NoConfiguration_ThrowsConfigurationError() { - apiClient.cannedConfigurationResponseBody = nil - - orderCreationClient.createOrder(with: request) { result in - switch result { - case .success: - XCTFail("Error should be thrown due to lack of configuration") - - case .failure(let error): - XCTAssertEqual(error, .fetchConfigurationFailed) - } - } - } - - func testCreateOrder_PayPalDisabled_ThrowsDisabledError() { - apiClient.cannedConfigurationResponseBody = BTJSON(value: ["paypalEnabled": false]) - - orderCreationClient.createOrder(with: request) { result in - switch result { - case .success: - XCTFail("Configuration should result in paypal being disabled") - - case .failure(let error): - XCTAssertEqual(error, .payPalNotEnabled) - } - } - } - - func testCreateOrder_NoClientID_ThrowsClientIDError() { - apiClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "paypal": ["clientId": nil] as [String: Any?] - ] as [String: Any]) - - orderCreationClient.createOrder(with: request) { result in - switch result { - case .success: - XCTFail("Configuration state should throw a client id error") - - case .failure(let error): - XCTAssertEqual(error, .payPalClientIDNotFound) - } - } - } - - func testCreateOrder_BadEnvironment_ThrowsEnvironmentError() { - apiClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "environment": "staging", - "paypal": ["clientId": "12345"] - ] as [String: Any]) - - orderCreationClient.createOrder(with: request) { result in - switch result { - case .success: - XCTFail("Configuration state should throw an invalid environment error") - - case .failure(let error): - XCTAssertEqual(error, .invalidEnvironment) - } - } - } - - func testCreateOrder_NoHermesResponse_ThrowsOrderCreationFailure() { - apiClient.cannedConfigurationResponseBody = BTJSON(value: [ - "paypalEnabled": true, - "environment": "sandbox", - "paypal": ["clientId": "12345"] - ] as [String: Any]) - apiClient.cannedResponseBody = nil - - orderCreationClient.createOrder(with: request) { result in - switch result { - case .success: - XCTFail("No hermes response should result in a thrown error") - - case .failure(let error): - XCTAssertEqual(error, .orderCreationFailed(BTPayPalNativeCheckoutError.invalidJSONResponse)) - } - } - } -} diff --git a/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeTokenizationClient_Tests.swift b/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeTokenizationClient_Tests.swift deleted file mode 100644 index 923f1332d2..0000000000 --- a/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeTokenizationClient_Tests.swift +++ /dev/null @@ -1,105 +0,0 @@ -import XCTest - -@testable import BraintreeTestShared -@testable import BraintreePayPalNativeCheckout -@testable import BraintreeCore -@testable import BraintreePayPal - -class BTPayPalNativeTokenizationClient_Tests: XCTestCase { - - func testTokenizationRequestSuccessfulResponse() throws { - let mockClient = try XCTUnwrap(MockAPIClient(authorization: "development_client_key")) - let mockNonce = "mock-nonce" - let mockCorrelationId = "mock-corrID" - - let responseData = try XCTUnwrap(""" - { - "paypalAccounts": [{ - "consumed": 0, - "description": "PayPal", - "details": { - "correlationId": "\(mockCorrelationId)", - }, - "nonce": "\(mockNonce)", - "type": "PayPalAccount", - }] - } - """.data(using: .utf8)) - mockClient.cannedResponseBody = BTJSON(data: responseData) - - let tokenizationClient = BTPayPalNativeTokenizationClient(apiClient: mockClient) - - // Our mock does not care about the specific request, but we want to make sure - // a successful response is vended through the completion handler - // We don't need to use `waitForExpectations` here because the mock will vend a response - // synchronously - tokenizationClient.tokenize(request: BTPayPalNativeCheckoutRequest(amount: "1"), returnURL: "a-fake-return-url") { result in - switch result { - case .success(let account): - XCTAssertEqual(account.nonce, mockNonce) - XCTAssertEqual(account.type, "PayPal") - XCTAssertEqual(account.clientMetadataID, mockCorrelationId) - case .failure: - XCTFail("Successful mock did not vend a PayPal account nonce") - } - } - } - - func testTokenizationRequestFailureResponse() throws { - let mockClient = try XCTUnwrap(MockAPIClient(authorization: "development_client_key")) - let mockCorrelationId = "mock-corrID" - - /// Same response data as the successful response, but the nonce is absent - let responseData = try XCTUnwrap(""" - { - "paypalAccounts": [{ - "consumed": 0, - "description": "PayPal", - "details": { - "correlationId": "\(mockCorrelationId)", - }, - "type": "PayPalAccount", - }] - } - """.data(using: .utf8)) - mockClient.cannedResponseBody = BTJSON(data: responseData) - let tokenizationClient = BTPayPalNativeTokenizationClient(apiClient: mockClient) - tokenizationClient.tokenize(request: BTPayPalNativeVaultRequest(), returnURL: "a-fake-return-url") { result in - switch result { - case .success: - XCTFail("A response without a nonce string should be a failure") - case .failure(let error): - XCTAssertEqual(error, .parsingTokenizationResultFailed) - } - } - } - - func testTokenizationRequestFailureResponseForNilReturnUrl() throws { - let mockClient = try XCTUnwrap(MockAPIClient(authorization: "development_client_key")) - let mockCorrelationId = "mock-corrID" - let mockNonce = "mock-nonce" - let responseData = try XCTUnwrap(""" - { - "paypalAccounts": [{ - "consumed": 0, - "description": "PayPal", - "details": { - "correlationId": "\(mockCorrelationId)", - }, - "nonce": "\(mockNonce)", - "type": "PayPalAccount", - }] - } - """.data(using: .utf8)) - mockClient.cannedResponseBody = BTJSON(data: responseData) - let tokenizationClient = BTPayPalNativeTokenizationClient(apiClient: mockClient) - tokenizationClient.tokenize(request: BTPayPalNativeVaultRequest(), returnURL: nil) { result in - switch result { - case .success: - XCTFail("A response without a nonce string should be a failure") - case .failure(let error): - XCTAssertEqual(error, .missingReturnURL) - } - } - } -} diff --git a/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeTokenizationRequest_Tests.swift b/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeTokenizationRequest_Tests.swift deleted file mode 100644 index 657f08e042..0000000000 --- a/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeTokenizationRequest_Tests.swift +++ /dev/null @@ -1,30 +0,0 @@ -import XCTest -@testable import BraintreePayPalNativeCheckout - -class BTPayPalNativeTokenizationRequest_Tests: XCTestCase { - - func testTokenizationRequestParameters() throws { - let correlationId = "12345" - let checkoutRequest = BTPayPalNativeCheckoutRequest(amount: "10.00") - checkoutRequest.intent = .order - - let request = BTPayPalNativeTokenizationRequest( - request: checkoutRequest, - correlationID: correlationId - ) - - let account = try XCTUnwrap(request.parameters(returnURL: "a-fake-return-url")["paypal_account"] as? [String: Any]) - - let client = account["client"] as? [String: String] - let response = account["response"] as? [String: String] - - XCTAssertEqual(client?["platform"], "iOS") - XCTAssertEqual(client?["product_name"], "PayPal") - XCTAssertEqual(client?["paypal_sdk_version"], "version") - XCTAssertEqual(account["response_type"] as? String, "web") - XCTAssertEqual(account["correlation_id"] as? String, correlationId) - XCTAssertEqual(account["options"] as? [String: Bool], ["validate": false]) - XCTAssertEqual(account["intent"] as? String, checkoutRequest.intent.stringValue) - XCTAssertEqual(response?["webURL"], "a-fake-return-url") - } -} diff --git a/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeVaultRequest_Tests.swift b/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeVaultRequest_Tests.swift deleted file mode 100644 index 53c91377c4..0000000000 --- a/UnitTests/BraintreePayPalNativeCheckoutTests/BTPayPalNativeVaultRequest_Tests.swift +++ /dev/null @@ -1,65 +0,0 @@ -import XCTest -@testable import BraintreePayPalNativeCheckout -@testable import BraintreeCore - -class BTPayPalNativeVaultRequest_Tests: XCTestCase { - - private var configuration: BTConfiguration! - - override func setUp() { - super.setUp() - let json = BTJSON(value: [ - "paypalEnabled": true, - "paypal": [ - "environment": "offline" - ] - ] as [String: Any]) - configuration = BTConfiguration(json: json) - } - - func testPaymentTypeIsCheckout() { - let checkoutRequest = BTPayPalNativeVaultRequest() - XCTAssertTrue(checkoutRequest.paymentType == .vault, "Incorrect payment type on CheckoutRequest") - } - - func testHermesPathIsCorrect() { - let checkoutRequest = BTPayPalNativeVaultRequest() - XCTAssertEqual(checkoutRequest.hermesPath,"v1/paypal_hermes/setup_billing_agreement") - } - - func testParametersWithConfiguration_returnsAllParams() { - let request = BTPayPalNativeVaultRequest() - request.billingAgreementDescription = "desc" - - let shippingAddress = BTPostalAddress() - shippingAddress.streetAddress = "123 Main" - shippingAddress.extendedAddress = "Unit 1" - shippingAddress.locality = "Chicago" - shippingAddress.region = "IL" - shippingAddress.postalCode = "11111" - shippingAddress.countryCodeAlpha2 = "US" - shippingAddress.recipientName = "Recipient" - request.shippingAddressOverride = shippingAddress - request.isShippingAddressEditable = true - request.offerCredit = true - request.riskCorrelationID = "risk ID" - request.merchantAccountID = "merchant ID" - - let parameters = request.parameters(with: configuration) - - XCTAssertEqual(parameters["description"] as? String, "desc") - XCTAssertEqual(parameters["offer_paypal_credit"] as? Bool, true) - XCTAssertEqual(parameters["correlation_id"] as? String, "risk ID") - XCTAssertEqual(parameters["merchant_account_id"] as? String, "merchant ID") - - guard let shippingParams = parameters["shipping_address"] as? [String:String] else { XCTFail(); return } - - XCTAssertEqual(shippingParams["line1"], "123 Main") - XCTAssertEqual(shippingParams["line2"], "Unit 1") - XCTAssertEqual(shippingParams["city"], "Chicago") - XCTAssertEqual(shippingParams["state"], "IL") - XCTAssertEqual(shippingParams["postal_code"], "11111") - XCTAssertEqual(shippingParams["country_code"], "US") - XCTAssertEqual(shippingParams["recipient_name"], "Recipient") - } -} diff --git a/UnitTests/BraintreePayPalNativeCheckoutTests/Info.plist b/UnitTests/BraintreePayPalNativeCheckoutTests/Info.plist deleted file mode 100644 index 64d65ca495..0000000000 --- a/UnitTests/BraintreePayPalNativeCheckoutTests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/UnitTests/BraintreePayPalNativeCheckoutTests/MockBTPayPalNativeCheckoutProvider.swift b/UnitTests/BraintreePayPalNativeCheckoutTests/MockBTPayPalNativeCheckoutProvider.swift deleted file mode 100644 index 177d52daea..0000000000 --- a/UnitTests/BraintreePayPalNativeCheckoutTests/MockBTPayPalNativeCheckoutProvider.swift +++ /dev/null @@ -1,44 +0,0 @@ -import Foundation -import PayPalCheckout -@testable import BraintreePayPal -@testable import BraintreePayPalNativeCheckout - -class MockBTPayPalNativeCheckoutProvider: BTPayPalNativeCheckoutStartable { - - var userAuthenticationEmail: String? - var onCancel: StartableCancelCallback? - var onError: StartableErrorCallback? - var onApprove: StartableApproveCallback? - - var didCancel: Bool = false - var didApprove: Bool = false - var error: Error? - - required init(nxoConfig: CheckoutConfig) { } - - func start( - request: BTPayPalRequest, - order: BTPayPalNativeOrder, - nxoConfig: CheckoutConfig, - onStartableApprove: @escaping StartableApproveCallback, - onStartableCancel: @escaping StartableCancelCallback, - onStartableError: @escaping StartableErrorCallback - ) { - self.onApprove = onStartableApprove - self.onCancel = onStartableCancel - self.onError = onStartableError - self.userAuthenticationEmail = nxoConfig.authConfig.userEmail - } - - func triggerCancel() { - didCancel = true - } - - func triggerError(error: BTPayPalNativeCheckoutError) { - self.error = error - } - - func triggerApprove(returnURL: String) { - didApprove = true - } -} diff --git a/V7_MIGRATION.md b/V7_MIGRATION.md index ed75b0c8bd..8d0c509ae7 100644 --- a/V7_MIGRATION.md +++ b/V7_MIGRATION.md @@ -10,6 +10,7 @@ _Documentation for v7 will be published to https://developer.paypal.com/braintre 1. [Venmo](#venmo) 1. [SEPA Direct Debit](#sepa-direct-debit) 1. [Local Payments](#local-payments) +1. [PayPal Native Checkout](#paypal-native-checkout) ## Supported Versions @@ -27,3 +28,8 @@ All properties within `BTSEPADirectDebitRequest` can only be accessed on the ini ## Local Payments v7 updates `BTLocalPaymentRequest` to require setting all properties through the initializer, removing support for dot syntax. To construct a `BTLocalPaymentRequest`, pass the properties directly in the initializer. + +## PayPal Native Checkout +The PayPal Native Checkout integration is no longer supported. Please remove it from your app and +use the [PayPal (web)](https://developer.paypal.com/braintree/docs/guides/paypal/overview/ios/v6) integration. +