onActivityResult and includes the Google Pay button. Follow the steps below to migrate from previous 5.x.x versions to 5.9.x:
Overview
- Remove deprecated Activity Result code
- Display Google Pay button
- Google Pay availability check
Remove deprecated Activity Result code
AddAdyenComponentView to your layout and attach the component to it.
Add AdyenComponentView
Display Google Pay button
If you want to keep displaying a button yourself, then you have to replace the call togooglePayComponent.startGooglePayScreen(…) with googlePayComponent.submit().
To let the component display the Google Pay button inside the AdyenComponentView remove your own button and adjust your configuration:
Add a configuration object
com.google.pay.button:compose-pay-button dependency can now also be removed from your build.gradle.
Google Pay availability check
You no longer need to callGooglePayComponent.PROVIDER.isAvailable(…).
The GooglePayComponent now checks if Google Pay is available when you initialize it. If Google Pay is not available, you get a GooglePayUnavailableException in onError.