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

[Feature] Pass externalPaymentMethodType || paymentMethodType to ExternalPaymentMethodConfirmHandler + PaymentSheetResult #9208

Open
azazellj opened this issue Sep 9, 2024 · 1 comment
Labels

Comments

@azazellj
Copy link

azazellj commented Sep 9, 2024

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

For external payment type integration I should pass data to BE to notify which payment type was used for the specific transaction. Also I need to apply analytics for payment type.

Describe the solution you'd like

ExternalPaymentMethodResultHandler.onExternalPaymentMethodResult(
   context = fragmentActivity,
   externalPaymentMethodResult = ExternalPaymentMethodResult.completed(paymentMethodType = "external_paypal"),
)

val paymentSheet = rememberPaymentSheet(
   externalPaymentMethodConfirmHandler = remember { viewModel.paymentMethodConfirmHandler },
   paymentResultCallback = { paymentSheetResult ->
      viewModel.handlePaymentSheetResult(paymentSheetResult)
                    
      if (paymentSheetResult is PaymentSheetResult.Completed) {
         val paymentType = paymentSheetResult.paymentMethod,
      }
   },
)

Describe alternatives you've considered

Additional context

  • I'm using multiple external payment types
@GIgako19929
Copy link

``

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

No branches or pull requests

2 participants