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

Jetpack compose sample #186

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

GibsonRuitiari
Copy link

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

Copy link

@sumanabhi sumanabhi left a 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.

Comment on lines 71 to 76
/* 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

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

Copy link
Author

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.

@GibsonRuitiari
Copy link
Author

@sumanabhi Moved the checkout state into its package, I think it is neater now.

Copy link

@sumanabhi sumanabhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

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

Successfully merging this pull request may close these issues.

None yet

3 participants