Conversation
sumanabhi
left a comment
There was a problem hiding this comment.
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.
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.
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. |
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