Misconfigured example AndroidManifest.xml causes GooglePay unavailable (fix inside)
I'm trying to enable GooglePay payments in my flutter app, following the official plugin example. Reading the AndroidMainfest.xml file, the meta-data tag that enable Google Pay
<meta-data
android:name="com.google.android.gms.wallet.api.enabled"
android:value="true" />
is located inside the activity tag.
This (at least for me) is not working, as calling Stripe.instance.isGooglePaySupported(IsGooglePaySupportedParams()) returns false.
Moving that block upper in the tree (that is inisde the application tag) and building again, fixed the issue.
Just to be clear I found that also the official google-pay AndroidManifest.xml put the metadata inside the application tag.
My suggestion is to update the example file and the homepage documentation.
Tested and working on my Xiaomi Mi Lite 5g with Android 11 and Emulator with Android 12.
Hope it helps
Thanks will fix this 👍 . Also I will spend some time coming weeks in adding a bit more documentation for this part.
I can confirm this causes the issue, and suggested change fixes it.