Closed tdchow closed 1 week ago
Note - I was unable to find a good way to unit test these changes without refactoring how dependency injection currently works. If anyone has other ideas on how to test the returnUrlScheme field, please let me know!
This is a great callout. In v5
it seems like BraintreeClient
may no longer be needed. Its counterpart in v3
is BraintreeFragment.java, but since we refactored v4
for increased modularity we shouldn't need this class. Also PPCP Android has no concept of a core client.
I'd personally like to remove BraintreeClient–doing so would resolve the DI ambiguity we see here.
Why do we need this? Is this an android specific feature? For app switching in iOS, I think we hard code the base url components
Note - I was unable to find a good way to unit test these changes without refactoring how dependency injection currently works. If anyone has other ideas on how to test the returnUrlScheme field, please let me know!
This is a great callout. In
v5
it seems likeBraintreeClient
may no longer be needed. Its counterpart inv3
is BraintreeFragment.java, but since we refactoredv4
for increased modularity we shouldn't need this class. Also PPCP Android has no concept of a core client.I'd personally like to remove BraintreeClient–doing so would resolve the DI ambiguity we see here.
I agree! I feel like we can refactor out BraintreeClient from the feature clients. Luckily it won't be a breaking change and we can hopefully tackle this once v5 is released.
Why do we need this? Is this an android specific feature? For app switching in iOS, I think we hard code the base url components
This is a specific change for v5. When merging main into the v5 branch the returnUrlScheme
param was set on the BraintreeClient
, which is no longer implemented by the merchant.
Why do we need this? Is this an android specific feature? For app switching in iOS, I think we hard code the base url components
Yes it's Android specific. It allows merchants to explicitly declare a deep link scheme.
One common use case for a merchant providing their own custom url scheme is when their application ID contains underscores. The default AndroidManifest.xml
placeholder we recommend would produce an invalid scheme in this case, since URL schemes cannot contain underscores.
Summary of changes
returnUrlScheme
param to Local Payment, SEPA, and Venmo clientsNote - I was unable to find a good way to unit test these changes without refactoring how dependency injection currently works. If anyone has other ideas on how to test the returnUrlScheme field, please let me know!
Checklist
Authors