**This work has been completed and summarized [here](https://paypal.sharepoint.com/:w:/r/sites/BTSDK/_layouts/15/Doc.aspx?sourcedoc=%7B490D7E50-64F1-4349-A778-0F5F1725F4AD%7D&file=Northstar%20Module%20Rename.docx&action=default&mobileredirect=true&cid=f7e7c0f8-bd85-48e2-a4ae-d5b79123b566).** [ARCHIVED] # Module Rename - Northstar Mobile SDKs Pain points to address: * Unclear that the `PayPal SDK` offers more than PayPal payments, due to it's brand reputation. * Modules like `PayPal/Card` read as capabilities within the PayPal flow. * Lack of distinction b/w `PayPalUI`, `PayPalWebCheckout`, and `PayPalNativeCheckout`. ## Current ### iOS #### CocoaPods ``` # Public pod 'PayPal/Card' pod 'PayPal/PayPalUI' pod 'PayPal/PayPalWebCheckout' pod 'PayPal/PayPalNativeCheckout' # Internal pod 'PayPal/PaymentsCore' pod 'PayPal/PayPalDataCollector' ``` #### Swift Package Manager ``` # Public ☑ Card ☑ PayPalUI ☑ PayPalWebCheckout ☑ PayPalNativeCheckout # Internal ☑ PaymentsCore ☑ PayPalDataCollector ``` ### Android **Public** ``` // Public dependencies { implementation "com.paypal.android:card:0.0.3" implementation "com.paypal.android:paypal-ui:0.0.3" implementation "com.paypal.android:paypal-web-checkout:0.0.3" implementation "com.paypal.android:paypal-native-checkout:0.0.3" implementation "com.paypal.android:paypal-data-collector:0.0.3" } // Internal dependencies { api project(':Core') } ``` --- ## Suggestion 1 Top Level ``` PayPal > ???? not PayPal ``` Modules ``` # Public Card PayPalUI > ButtonUI (if for buttons only) or CoreUI or PaymentsUI PayPalWebCheckout > LegacyCheckout PayPalNativeCheckout > NativeCheckout # Internal PaymentsCore PayPalDataCollector > FraudProtection ``` ## Suggestion 2 * Prefer `Browser` over `Web` to specify browser based PayPal flows. * Prefer `FraudDetection` over `DataCollector` ### iOS ``` # Public pod 'PayPal/CardPayments' pod 'PayPal/Buttons' pod 'PayPal/PayPalBrowserPayments' pod 'PayPal/PayPalNativePayments' # Internal pod `PayPal/CorePayments` pod `PayPal/FraudDetection` ``` #### Swift Package Manager ``` # Public ☑ CardPayments ☑ PayPalButtons ☑ PayPalBrowserPayments ☑ PayPalNativePayments # Internal ☑ CorePayments ☑ FraudDetection ``` ## Suggestion 3 ### iOS #### CocoaPods ``` # Public pod 'Payments/CardCheckout' pod 'Payments/Buttons' pod 'Payments/PayPalWebBrowserCheckout' pod 'Payments/PayPalNativeCheckout' # Internal pod `Payments/Core` pod `Payments/FraudDetection` ``` #### Swift Package Manager ``` # Public ☑ CardCheckout ☑ Buttons ☑ PayPalWebBrowserCheckout ☑ PayPalNativeCheckout # Internal ☑ Core ☑ FraudDetection ``` ## Suggestion 4 I think we need to take into account what future modules will look like, and seperate implementations from their ui components, because the UI modules could be heavy in size. Because in android we have `com.paypal.android` i think its safe to say we can remove the `paypal` prefix from modules because it is the default one. ### Android `PayPalUI` could simply be `Buttons`: `com.paypal.android:buttons` (which could encaspulate smart buttons as well) **Important**: In android the actual module name can be diferent to the package name we are publishing. So, we can still keep `PayPalUI` as module name, and publish it as `buttons`. And future ui modules could be something like: `CardFields`: `com.paypal.android:card-fields` `VenmoButtons`: `com.paypal.android:venmo-buttons` or `VenmoUI` if we are going to add more ui components to Venmo Here is what it could look like with future modules. ``` // Public dependencies { implementation "com.paypal.android:card:0.0.3" implementation "com.paypal.android:buttons:0.0.3" implementation "com.paypal.android:checkout:0.0.3" implementation "com.paypal.android:web-checkout:0.0.3" implementation "com.paypal.android:data-collector:0.0.3" //Future dependencies implementation "com.paypal.android:card-fields:0.0.3" implementation "com.paypal.android:venmo:0.0.3" implementation "com.paypal.android:venmo-buttons:0.0.3" implementation "com.paypal.android:apple-pay:0.0.3" implementation "com.paypal.android:google-pay:0.0.3" } ``` ### iOS #### CocoaPods ``` # Public pod 'PayPal/Card' pod 'PayPal/Buttons' pod 'PayPal/Checkout' pod 'PayPal/WebCheckout' # Internal pod `PayPal/Core` pod `PayPal/FraudDetection` # Future modules pod `PayPal/CardFields` pod `PayPal/Venmo` pod `PayPal/VenmoButtons` pod `PayPal/ApplePay` pod `PayPal/GooglePay` ``` #### Swift Package Manager ``` # Public ☑ Card ☑ Buttons ☑ WebCheckout ☑ Checkout # Internal ☑ Core ☑ FraudDetect # Future modules ☑ CardFields ☑ Venmo ☑ VenmoButtons ☑ ApplePay ☑ GooglePay ``` ## Final Proposal Discussed in mob review session with full SDK team: ### iOS Merchant `Podfile` example: ``` # Public pod 'PayPal/CardPayments' pod 'PayPal/PaymentButtons' pod 'PayPal/PayPalWebPayments' pod 'PayPal/PayPalNativePayments' pod 'PayPal/FraudProtection' # Internal pod 'PayPal/CorePayments' # Future modules pod 'PayPal/CardFields' pod 'PayPal/VenmoPayments' pod 'PayPal/ApplePayPayments' ``` #### Swift Package Manager ``` # Public ☑ CardPayments ☑ PaymentButtons ☑ PayPalWebCheckout ☑ PayPalNativePayments ☑ FraudProtection # Internal ☑ CorePayments # Future Modules ☑ CardFields ☑ VenmoPayments ☑ ApplePayPayments ``` ### Android Merchant `build.gradle` example: ``` // Public dependencies { implementation "com.paypal.android:card-payments:0.0.3" implementation "com.paypal.android:payment-buttons:0.0.3" implementation "com.paypal.android:paypal-web-payments:0.0.3" implementation "com.paypal.android:paypal-native-payments:0.0.3" implementation "com.paypal.android:fraud-protection:0.0.3" } // Internal dependencies { api project(':CorePayments') } // Future Modules dependencies { implementation "com.paypal.android:card-fields:0.0.3" implementation "com.paypal.android:venmo-payments:0.0.3" implementation "com.paypal.android:google-pay-payments:0.0.3" } ```