-
Notifications
You must be signed in to change notification settings - Fork 658
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
[Feature] GooglePayPaymentMethodLauncher for compose #5201
Comments
Hi @GMetaxakis, |
@brnunes-stripe any luck? I saw a comment on an email on me few days ago but i don't see it here, could i help with anything? |
Hi @GMetaxakis, yes, I deleted because I figured out the issue. I'll finish woking on this and submit a PR soon. |
Great news 😁 happy to have helped |
This is implemented in #5274, we're just doing a review and will submit it. |
Hello, |
When I am trying to use it with a wrong
example of usage PaymentConfiguration.init(
context = LocalContext.current,
publishableKey = publishableKey,
stripeAccountId = stripeAccountId,
)
paymentLauncherGoogle = GooglePayLauncher.rememberLauncher(
config = GooglePayLauncher.Config(
environment = GooglePayEnvironment.Test,
merchantCountryCode = "GR",
merchantName = "Any"
),
readyCallback = {
if (it) {
paymentLauncherGoogle?.presentForPaymentIntent(paymentIntentSecret)
} else {
resultCallback.onPaymentResult(PaymentResult.Failed(Exception("The Gpay isn't ready")))
}
},
resultCallback = { it.mapGoogleResultToGenericResult(resultCallback) }
) |
Hi @GMetaxakis I cannot reproduce the crash you're seeing. Can you share more of your code? The full Activity would be very helpful. |
Is your feature request related to a problem? Please describe.
GooglePayPaymentMethodLauncher
works without an issue foractivities
/fragments
, but it will be very nice to consider support it an alternative creation method like thePaymentLauncher.Companion.createForCompose
forJetpackCompose
usage.Describe the solution you'd like
A way to create the
GooglePayPaymentMethodLauncher
with just context, without activity/fragment parameterDescribe alternatives you've considered
As I have 1 activity that setups the composable graphs + theme, I can move in that activity the init of the
GooglePayPaymentMethodLauncher
and keep in the activity a reference to use afterwards with anyLocalContext.current
with the usage ofContext.getActivity()
, but I don't like it 😞The text was updated successfully, but these errors were encountered: