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

Inconsistency in API #165

Open
emartynov opened this issue Jul 20, 2023 · 6 comments
Open

Inconsistency in API #165

emartynov opened this issue Jul 20, 2023 · 6 comments

Comments

@emartynov
Copy link

Is your feature request related to a problem? Please describe.

The native payment SDK requires just app context.
The card payment SDK involves activity.

Describe the solution you'd like.

I prefer application context to avoid leaks related to the configuration cache.

@sshropshire
Copy link
Collaborator

Thanks for all of the feedback @emartynov I'm taking note of a lot of these items. We have some feature development in progress at the moment that I've been told is high priority, but these issues will be extremely helpful going forward and I plan on addressing each one in the near future.

For this one, if there is an ideal API that you would like to see the PayPal SDK use please feel free to open a GitHub discussion and we can talk through specific design decisions we've made in the past, and how we'd like to improve the API going forward.

@emartynov
Copy link
Author

emartynov commented Aug 14, 2023

@sshropshire I don't have the ideal API picture and you are SDK people who see more usage cases.

The ticket was opened because I had to implement an additional component in the app to have a reference of the activity in some low-level component that I called the Paypal payment provider.

I was also surprised that the card payment requires the activity since both types are firing the web view and I didn't understand why activity context is critical.

@sshropshire
Copy link
Collaborator

@emartynov understood. We do iterate through our API decisions quite a bit as you've mentioned, but we do appreciate direct feedback.

We require an Activity reference in this instance in order to keep the browser switch Chrome Custom Tab (CCT) on the same task stack as the host activity. We may consider opening this up in the future to allow a Context only integration, with the only caveat being that the CCT will be launched in a separate tab.

@emartynov
Copy link
Author

@sshropshire Then why you don't require an activity for the Paypal native client?

@sshropshire
Copy link
Collaborator

The Activity launched by the PayPalNative flow is launched in a new task. We work internally with the PayPal native team, and they own the translucent Activity that's launched for the native flow. We have less control over the configuration of the CCT activity, but again we may offer the ability to launch with context-only in a future release to see how it affects the user experience.

@emartynov
Copy link
Author

Not sure if it might be related to the difference in the launch mode. But I submitted #178 today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants