Google Pay API – часть сервисов Google Play. Чтобы получить все необходимые компоненты, импортируйте библиотеку сервисов Google Play.
Вы также можете выбрать API для самостоятельной компиляции.
Если необходимо скомпилировать только нужные вам API, откройте файл build.gradle в модуле приложения и добавьте в блок зависимостей следующие параметры:
Указаны минимальные версии, которые требуются для работы с последней версией библиотеки Google Pay API. В приложении автоматически может быть выбрано большее значение.
Более подробная информация о текущей версии Google Pay API представлена в разделе Как настроить сервисы Google Play.
Чтобы получить актуальные сведения о вспомогательных библиотеках, ознакомьтесь с разделом Настройка вспомогательной библиотеки.
[[["Прост для понимания","easyToUnderstand","thumb-up"],["Помог мне решить мою проблему","solvedMyProblem","thumb-up"],["Другое","otherUp","thumb-up"]],[["Отсутствует нужная мне информация","missingTheInformationINeed","thumb-down"],["Слишком сложен/слишком много шагов","tooComplicatedTooManySteps","thumb-down"],["Устарел","outOfDate","thumb-down"],["Проблема с переводом текста","translationIssue","thumb-down"],["Проблемы образцов/кода","samplesCodeIssue","thumb-down"],["Другое","otherDown","thumb-down"]],["Последнее обновление: 2024-10-16 UTC."],[[["\u003cp\u003eTo use the Google Pay API, your Android app must be distributed through the Google Play Store and built with a \u003ccode\u003eminSdkVersion\u003c/code\u003e of 21 or higher and a \u003ccode\u003ecompileSdkVersion\u003c/code\u003e of 34 or higher.\u003c/p\u003e\n"],["\u003cp\u003eBefore integrating, ensure you have the Google Wallet app installed, add a payment method, and comply with the Google Pay API Acceptable Use Policy and Google Play Developer Policy.\u003c/p\u003e\n"],["\u003cp\u003eImplement payments using Google Play In-app Billing if Google processes payments for you or if you sell digital goods.\u003c/p\u003e\n"],["\u003cp\u003eIntegrate the Google Pay API by adding the necessary dependency to your app's Gradle build file and enabling it in your \u003ccode\u003eAndroidManifest.xml\u003c/code\u003e file.\u003c/p\u003e\n"],["\u003cp\u003eTo go live, consult the publishing guide for essential information after completing the integration process.\u003c/p\u003e\n"]]],["To utilize the Google Pay API, ensure your app is on the Google Play store and meets `minSdkVersion` 21 and `compileSdkVersion` 34 or higher. Install the Google Wallet app with a payment method. If Google processes payments or you sell digital goods, use Google Play In-app Billing. Add the `com.google.android.gms:play-services-wallet:19.4.0` dependency to your module's Gradle file. In your `AndroidManifest.xml`, enable the API with the `meta-data` element: `com.google.android.gms.wallet.api.enabled` with a value of `true`.\n"],null,[]]