Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paypal Messaging Analytics #1161

Merged
merged 32 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1d45392
add BTPayPalMessagingColor enum
jaxdesmarais Dec 8, 2023
7e4a5c1
add BTPayPalMessagingDelegate protocol
jaxdesmarais Dec 8, 2023
823b97f
add BTPayPalMessagingLogoType enum
jaxdesmarais Dec 8, 2023
4fb2a16
add BTPayPalMessagingOfferType enum
jaxdesmarais Dec 8, 2023
2df634f
add BTPayPalMessagingPlacement enum
jaxdesmarais Dec 8, 2023
2e4ccce
add BTPayPalMessagingTextAlignment enum
jaxdesmarais Dec 8, 2023
ca993ff
add BTPayPalMessagingRequest struct
jaxdesmarais Dec 8, 2023
fab63b0
add implimentation to BTPayPalMessagingView
jaxdesmarais Dec 8, 2023
5bb08b3
add BTPayPalMessagingError and address TODOs
jaxdesmarais Dec 8, 2023
0230fe8
cleanup optional params
jaxdesmarais Dec 8, 2023
286ae57
add docstring
jaxdesmarais Dec 8, 2023
1d1c408
add CHANGELOG
jaxdesmarais Dec 8, 2023
63b27e5
add CHANGELOG entry
jaxdesmarais Dec 11, 2023
1a73572
PR feedback: rename BTPayPalMessagingView to BTPayPalMessagingClient
jaxdesmarais Dec 11, 2023
e5e4c02
update CHANGELOG; sort files by name
jaxdesmarais Dec 11, 2023
5973245
Update Sources/BraintreePayPalMessaging/BTPayPalMessagingClient.swift
jaxdesmarais Dec 11, 2023
dd9736c
Update Sources/BraintreePayPalMessaging/BTPayPalMessagingClient.swift
jaxdesmarais Dec 11, 2023
b0f635e
PR feedback: update payLaterPayIn1 to payLaterPayInOne
jaxdesmarais Dec 12, 2023
1a6cd4a
update delegate to use client naming
jaxdesmarais Dec 13, 2023
aaca36a
Merge branch 'paypal-messaging-implementation' into paypal-messaging-…
jaxdesmarais Dec 13, 2023
00f06b4
add PayPalMessaging feature to Demo app
jaxdesmarais Dec 13, 2023
1fd50d0
add title; remove TODO
jaxdesmarais Dec 13, 2023
19ada1e
Merge branch 'paypal-messaging-demo-app' into paypal-messaging-analytics
jaxdesmarais Dec 13, 2023
597ef67
add analytics to PayPalMessaging feature
jaxdesmarais Dec 13, 2023
0034217
update logic to send analytics in delegate vs method
jaxdesmarais Dec 13, 2023
d900071
capture self
jaxdesmarais Dec 13, 2023
7f542b2
Update Sources/BraintreePayPalMessaging/BTPayPalMessagingClient.swift
jaxdesmarais Dec 14, 2023
2054479
sort files by name
jaxdesmarais Dec 14, 2023
6544d35
Merge branch 'paypal-messaging-analytics' of https://github.com/brain…
jaxdesmarais Dec 14, 2023
65c49a7
Merge branch 'paypal-messaging-feature' into paypal-messaging-analytics
jaxdesmarais Dec 20, 2023
746b693
Merge branch 'paypal-messaging-feature' into paypal-messaging-analytics
jaxdesmarais Dec 20, 2023
d8477b6
cleanup
jaxdesmarais Dec 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add BTPayPalMessagingColor enum
  • Loading branch information
jaxdesmarais committed Dec 8, 2023
commit 1d453927c604546f6ef0806dcbc2766f5af771fa
47 changes: 43 additions & 4 deletions Braintree.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@
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 */; };
BEA0F9172B235DDA00C21EFA /* BTPayPalMessagingColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEA0F9162B235DDA00C21EFA /* BTPayPalMessagingColor.swift */; };
BEA0F91A2B235E7A00C21EFA /* PayPalMessages in Frameworks */ = {isa = PBXBuildFile; productRef = BEA0F9192B235E7A00C21EFA /* PayPalMessages */; };
BEA0F91C2B235E9700C21EFA /* PayPalMessages in Frameworks */ = {isa = PBXBuildFile; productRef = BEA0F91B2B235E9700C21EFA /* PayPalMessages */; };
BEB9BF532A26872B00A3673E /* BTWebAuthenticationSessionClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEB9BF522A26872B00A3673E /* BTWebAuthenticationSessionClient.swift */; };
BEBC222728D25BB400D83186 /* Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80DBE69423A931A600373230 /* Helpers.swift */; };
BEBC6E4B29258FD4004E25A0 /* BraintreeCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 570B93AC285397520041BAFE /* BraintreeCore.framework */; };
Expand Down Expand Up @@ -883,6 +886,7 @@
BE9EC0972899CF040022EC63 /* BTAPIPinnedCertificates.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTAPIPinnedCertificates.swift; sourceTree = "<group>"; };
BE9FB82A2898324C00D6FE2F /* BTPaymentMethodNonce.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPaymentMethodNonce.swift; sourceTree = "<group>"; };
BE9FB82C28984ADE00D6FE2F /* BTPaymentMethodNonceParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPaymentMethodNonceParser.swift; sourceTree = "<group>"; };
BEA0F9162B235DDA00C21EFA /* BTPayPalMessagingColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalMessagingColor.swift; sourceTree = "<group>"; };
BEB9BF522A26872B00A3673E /* BTWebAuthenticationSessionClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTWebAuthenticationSessionClient.swift; sourceTree = "<group>"; };
BEBC6E5D2927CF59004E25A0 /* Braintree.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Braintree.h; sourceTree = "<group>"; };
BEBC6F252937A510004E25A0 /* BTClientMetadata_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTClientMetadata_Tests.swift; sourceTree = "<group>"; };
Expand All @@ -900,9 +904,7 @@
BECA56C929C3F0A80098EC3C /* BTThreeDSecureV2UICustomization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTThreeDSecureV2UICustomization.swift; sourceTree = "<group>"; };
BECBA0E52AEABC99002518AC /* BTCardClient_IntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTCardClient_IntegrationTests.swift; sourceTree = "<group>"; };
BECC91762B20DDFF00A2EE42 /* BraintreePayPalMessaging.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BraintreePayPalMessaging.framework; sourceTree = BUILT_PRODUCTS_DIR; };
BECC91772B20DE0000A2EE42 /* BraintreeVenmo copy-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "BraintreeVenmo copy-Info.plist"; path = "/Users/jdesmarais/Desktop/PayPal/braintree_ios/BraintreeVenmo copy-Info.plist"; sourceTree = "<absolute>"; };
BECC918D2B20DE7C00A2EE42 /* BraintreePayPalMessagingTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BraintreePayPalMessagingTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
BECC918E2B20DE7C00A2EE42 /* BraintreeVenmoTests copy-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "BraintreeVenmoTests copy-Info.plist"; path = "/Users/jdesmarais/Desktop/PayPal/braintree_ios/BraintreeVenmoTests copy-Info.plist"; sourceTree = "<absolute>"; };
BECC91962B20E01F00A2EE42 /* BTPayPalMessagingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalMessagingView.swift; sourceTree = "<group>"; };
BECC91982B20E1E400A2EE42 /* BTPayPalMessagingView_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BTPayPalMessagingView_Tests.swift; sourceTree = "<group>"; };
BECC919C2B20E87D00A2EE42 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1140,13 +1142,15 @@
buildActionMask = 2147483647;
files = (
BECC91702B20DDFF00A2EE42 /* BraintreeCore.framework in Frameworks */,
BEA0F91A2B235E7A00C21EFA /* PayPalMessages in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
BECC91862B20DE7C00A2EE42 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
BEA0F91C2B235E9700C21EFA /* PayPalMessages in Frameworks */,
BECC91872B20DE7C00A2EE42 /* BraintreeTestShared.framework in Frameworks */,
BECC918F2B20DE9900A2EE42 /* BraintreePayPalMessaging.framework in Frameworks */,
);
Expand Down Expand Up @@ -1410,8 +1414,6 @@
80824659252C19F5000AD8FF /* Sources */,
808249F8252C1F97000AD8FF /* UnitTests */,
BECE564728F99FAD001B0F25 /* Recovered References */,
BECC91772B20DE0000A2EE42 /* BraintreeVenmo copy-Info.plist */,
BECC918E2B20DE7C00A2EE42 /* BraintreeVenmoTests copy-Info.plist */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -1753,6 +1755,7 @@
isa = PBXGroup;
children = (
BECC91962B20E01F00A2EE42 /* BTPayPalMessagingView.swift */,
BEA0F9162B235DDA00C21EFA /* BTPayPalMessagingColor.swift */,
);
path = BraintreePayPalMessaging;
sourceTree = "<group>";
Expand Down Expand Up @@ -2355,6 +2358,9 @@
BECC91632B20DDFF00A2EE42 /* PBXTargetDependency */,
);
name = BraintreePayPalMessaging;
packageProductDependencies = (
BEA0F9192B235E7A00C21EFA /* PayPalMessages */,
);
productName = BraintreeVenmo;
productReference = BECC91762B20DDFF00A2EE42 /* BraintreePayPalMessaging.framework */;
productType = "com.apple.product-type.framework";
Expand All @@ -2374,6 +2380,9 @@
BECC91922B20DE9900A2EE42 /* PBXTargetDependency */,
);
name = BraintreePayPalMessagingTests;
packageProductDependencies = (
BEA0F91B2B235E9700C21EFA /* PayPalMessages */,
);
productName = BraintreeVenmoTests;
productReference = BECC918D2B20DE7C00A2EE42 /* BraintreePayPalMessagingTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
Expand Down Expand Up @@ -2507,6 +2516,7 @@
mainGroup = A75DA343192138F000D997A2;
packageReferences = (
BEE2E4B52900436600C03FDD /* XCRemoteSwiftPackageReference "paypalcheckout-ios" */,
BEA0F9182B235E7A00C21EFA /* XCRemoteSwiftPackageReference "paypal-messages-ios" */,
);
productRefGroup = A75DA3521921394200D997A2 /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -3214,6 +3224,7 @@
buildActionMask = 2147483647;
files = (
BECC91972B20E01F00A2EE42 /* BTPayPalMessagingView.swift in Sources */,
BEA0F9172B235DDA00C21EFA /* BTPayPalMessagingColor.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -5964,6 +5975,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand All @@ -5986,6 +5998,10 @@
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;
Expand Down Expand Up @@ -6025,6 +6041,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand All @@ -6048,6 +6065,10 @@
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;
Expand Down Expand Up @@ -6550,6 +6571,14 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
BEA0F9182B235E7A00C21EFA /* XCRemoteSwiftPackageReference "paypal-messages-ios" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/paypal/paypal-messages-ios";
requirement = {
kind = exactVersion;
version = "1.0.0-prerelease.3";
};
};
BEE2E4B52900436600C03FDD /* XCRemoteSwiftPackageReference "paypalcheckout-ios" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/paypal/paypalcheckout-ios/";
Expand All @@ -6566,6 +6595,16 @@
package = BEE2E4B52900436600C03FDD /* XCRemoteSwiftPackageReference "paypalcheckout-ios" */;
productName = PayPalCheckout;
};
BEA0F9192B235E7A00C21EFA /* PayPalMessages */ = {
isa = XCSwiftPackageProductDependency;
package = BEA0F9182B235E7A00C21EFA /* XCRemoteSwiftPackageReference "paypal-messages-ios" */;
productName = PayPalMessages;
};
BEA0F91B2B235E9700C21EFA /* PayPalMessages */ = {
isa = XCSwiftPackageProductDependency;
package = BEA0F9182B235E7A00C21EFA /* XCRemoteSwiftPackageReference "paypal-messages-ios" */;
productName = PayPalMessages;
};
BEE2E4B8290043A200C03FDD /* PayPalCheckout */ = {
isa = XCSwiftPackageProductDependency;
package = BEE2E4B52900436600C03FDD /* XCRemoteSwiftPackageReference "paypalcheckout-ios" */;
Expand Down
31 changes: 31 additions & 0 deletions Sources/BraintreePayPalMessaging/BTPayPalMessagingColor.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import Foundation
import PayPalMessages

/// Text and logo color option for a PayPal Message
public enum BTPayPalMessagingColor {

/// Black text with a color logo
case black

/// White text with a white logo
case white

/// Black text with a black logo
case monochrome

/// Black text with a desaturated logo
case grayscale

var messageColorRawValue: PayPalMessageColor {
switch self {
case .black:
return .black
case .white:
return .white
case .monochrome:
return .monochrome
case .grayscale:
return .grayscale
}
}
}