diff --git a/PayPal.xcodeproj/project.pbxproj b/PayPal.xcodeproj/project.pbxproj index fbb241a4..17faf7bc 100644 --- a/PayPal.xcodeproj/project.pbxproj +++ b/PayPal.xcodeproj/project.pbxproj @@ -47,6 +47,7 @@ 45B063BF2C40549000E743F2 /* EligibilityAPI_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45B063BE2C40549000E743F2 /* EligibilityAPI_Tests.swift */; }; 45B063CA2C459F9900E743F2 /* MockEligibilityAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45B063C92C459F9900E743F2 /* MockEligibilityAPI.swift */; }; 53A2A4E228A182AC0093441C /* NativeCheckoutProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53A2A4E128A182AC0093441C /* NativeCheckoutProvider.swift */; }; + 62094F872C501F760003D85F /* VenmoPaymentsError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62094F862C501F760003D85F /* VenmoPaymentsError.swift */; }; 62D3FB292C3DB5130046563B /* CorePayments.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 80B9F85126B8750000D67843 /* CorePayments.framework */; platformFilter = ios; }; 62D3FB4B2C3ED82D0046563B /* VenmoClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62D3FB492C3ED82D0046563B /* VenmoClient.swift */; }; 62EEC3EE2C471EAE00C350FD /* VenmoCheckoutRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62EEC3ED2C471EAE00C350FD /* VenmoCheckoutRequest.swift */; }; @@ -271,6 +272,7 @@ 45B063BE2C40549000E743F2 /* EligibilityAPI_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EligibilityAPI_Tests.swift; sourceTree = ""; }; 45B063C92C459F9900E743F2 /* MockEligibilityAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockEligibilityAPI.swift; sourceTree = ""; }; 53A2A4E128A182AC0093441C /* NativeCheckoutProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NativeCheckoutProvider.swift; sourceTree = ""; }; + 62094F862C501F760003D85F /* VenmoPaymentsError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VenmoPaymentsError.swift; sourceTree = ""; }; 62D3FB132C3DB4D40046563B /* VenmoClient_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VenmoClient_Tests.swift; sourceTree = ""; }; 62D3FB2F2C3DB5130046563B /* VenmoPayments.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = VenmoPayments.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 62D3FB452C3DB5370046563B /* VenmoPaymentsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VenmoPaymentsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -621,6 +623,7 @@ isa = PBXGroup; children = ( 62D3FB492C3ED82D0046563B /* VenmoClient.swift */, + 62094F862C501F760003D85F /* VenmoPaymentsError.swift */, ); name = VenmoPayments; path = Sources/VenmoPayments; @@ -1504,6 +1507,7 @@ buildActionMask = 2147483647; files = ( 62D3FB4B2C3ED82D0046563B /* VenmoClient.swift in Sources */, + 62094F872C501F760003D85F /* VenmoPaymentsError.swift in Sources */, 62EEC3EE2C471EAE00C350FD /* VenmoCheckoutRequest.swift in Sources */, 62EEC3F02C471F6000C350FD /* VenmoCheckoutResult.swift in Sources */, ); diff --git a/Sources/VenmoPayments/VenmoPaymentsError.swift b/Sources/VenmoPayments/VenmoPaymentsError.swift new file mode 100644 index 00000000..8a959872 --- /dev/null +++ b/Sources/VenmoPayments/VenmoPaymentsError.swift @@ -0,0 +1,23 @@ +import Foundation + +#if canImport(CorePayments) +import CorePayments +#endif + +enum VenmoPaymentsError { + + static let domain = "VenmoPaymentsErrorDomain" + + enum Code: Int { + /// 0. An unknown error has occurred. + case unknown + + // TODO: Add venmo specific errors at a later time, in a future PR + } + + static let unknownError = CoreSDKError( + code: Code.unknown.rawValue, + domain: domain, + errorDescription: "An unknown error has occurred. Contact developer.paypal.com/support." + ) +}