-
Notifications
You must be signed in to change notification settings - Fork 38
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
Jetpack compose sample #186
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I was working on this but I am not able to complete this.
will try this branch and explore.
/* represents the different states to be observed when payment is initiated */ | ||
sealed interface PaypalCheckoutState | ||
object Loading : PaypalCheckoutState | ||
object OrderPaidForSuccessfully : PaypalCheckoutState | ||
object OrderCapturingFailed : PaypalCheckoutState | ||
object OrderPaymentCancelled : PaypalCheckoutState |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would better make a separate file for this Interface.
or might be better if we can keep the same callback message that is coming from PayPal SDK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha bet you to it.
I can make a separate file for this interface since relying on the callback message coming from Paypal Sdk
might not be that flexible because of the tight coupling of the app and Paypal Sdk
. If the Paypal Sdk
callback message change, you'll might have to refactor a lot of code to match the new changes.
Imo, making your own 'state' interface is better but I am open to guidance from you.
LGTM.
I was working on this but I am not able to complete this.
will try this branch and explore.
@sumanabhi Moved the checkout state into its package, I think it is neater now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
This pull request shows how to use Paypal checkout sdk with Jetpack compose.
The code sample can be customized depending on the developer's needs.
Please note, the code sample is intended to be a hands-on sample.
This PR closes (can close) issue Issue 98