Reputation: 41
I am currently working on integrating the Adyen SDK Android Components into our application, but I've encountered an issue with implementing the SessionComponentCallback
. Despite following the documentation, I am unable to get the callback to work correctly.
Below is the relevant portion of my implementation:
val paymentMethod = checkoutSession?.getPaymentMethod(PaymentMethodTypes.GOOGLE_PAY)
val cardComponent = CardComponent.PROVIDER.get(
requireActivity(),
checkoutSession,
paymentMethod,
object : SessionComponentCallback<> {
override fun onFinished(result: SessionPaymentResult) {
// The payment finishes with a result.
}
override fun onAction(action: Action) {
// An additional action needs to be handled. Forward the action to the Component.
//cardComponent.handleAction(action, activity)
}
override fun onError(componentError: ComponentError) {
// The Component encounters an error.
}
},
null,
)
binding.adyenView.attach(cardComponent, requireActivity())
I don't know what to put in SessionComponentCallback<>
.
Upvotes: 1
Views: 44