> ## Documentation Index
> Fetch the complete documentation index at: https://docs.y.uno/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Test in the sandbox first: base URL https://api-sandbox.y.uno (Test Mode in the Dashboard). Production is https://api.y.uno (Live Mode).
> Every API request needs the public-api-key and private-secret-key headers. Get them in the Dashboard at https://dashboard.y.uno/developers (Developers > Credentials); sandbox and production keys are different.
> Send an X-Idempotency-Key (a UUID) when creating payments, refunds and cancels, so retries do not create duplicates.
> Start with the Quickstart (https://docs.y.uno/docs/quickstart.md) and the agent guide (https://docs.y.uno/agents.md). To search these docs from a coding agent, connect the docs MCP server at https://docs.y.uno/mcp.

# 通过服务提供商集成

> 通过负责令牌解密和处理的支付服务提供商集成 Google Pay。

采用服务提供商集成时，Google Pay™ 完全由您的支付服务提供商（例如 Adyen、Cielo）处理。Yuno 将交易路由到服务提供商，由其负责 Google Pay 令牌的解密和处理。在此流程中，卡数据不会经过 Yuno。

如果您已经在使用某个服务提供商的 Google Pay 解决方案，或者服务提供商代表您管理 Google Pay 认证流程，这种方式是理想的选择。

> [!NOTE]
>
> 不确定该使用哪种集成？请参阅 [Google Pay 概览](https://docs.y.uno/zh-hans/docs/wallets/google-pay#integration-options)，比较全部三种选项。

## 要求

确保您满足 [Google Pay 一般要求](https://docs.y.uno/zh-hans/docs/wallets/google-pay#requirements)。

## 服务提供商

要使用 Yuno 将 Google Pay 纳入您的系统，请先选择一个支持此支付方式的服务提供商。

在集成 Google Pay 之前，您必须拥有凭证，以便使用 [Yuno Dashboard](https://dashboard.y.uno/) 连接到所选的服务提供商。

## 集成

要使用 Yuno 将 Google Pay 集成到您的系统中，您需要完成一些步骤。

1. 首先，查看 Google 针对 [Android 设备](https://developers.google.com/pay/api/android/overview)或 [Google Pay on the Web](https://developers.google.com/pay/api/web/overview) 的审批流程。
   1. 首先查看服务条款和可接受使用政策。
   2. 完成教程和集成检查清单。
   3. 在向 Google 申请生产环境凭证之前，完成 [Android](https://developers.google.com/pay/api/android/guides/test-and-deploy/integration-checklist) 或 [Web](https://developers.google.com/pay/api/web/guides/test-and-deploy/integration-checklist) 的集成检查清单。
   4. 最后，申请您的生产环境访问权限。
2. 从您选择用于 Yuno 的服务提供商处获取开发者凭证。

> [!NOTE]
>
> **Adyen 连接**
>
> 对于 Adyen，商户需要创建一个[测试账户](https://www.adyen.com/signup)，并获取 **Merchant Account** 和 **x-api-key**。

1. 在 [Yuno Dashboard](https://dashboard.y.uno/) 中，选择 **Connections** 标签页。找到您选择的服务提供商并点击 **Connect**。在侧边面板的字段中填写您的凭证。下方是 Adyen 和 Cielo 连接面板的示例。

![](https://mintcdn.com/yuno-3979e326/MTlogjS0_SlxtlJG/images/reference/integration-via-provider-google-pay/image1.png?fit=max\&auto=format\&n=MTlogjS0_SlxtlJG\&q=85\&s=7b99414a1242a4ee940f8306591f592e)

4. 使用您已连接的 gateway 在 Yuno Dashboard 中创建路由。有关创建路由的更多信息，请访问[配置动态路由](https://docs.y.uno/zh-hans/docs/using-yuno/dashboard-overview/routing.md#configuring-the-dynamic-routing)指南页面。

## 在 Yuno 中启用并测试 Google Pay

在 Yuno 上完成集成后，您可以按照以下步骤在 Yuno 中启用 Google Pay 并执行集成测试：

1. 首先，将 [Yuno 的 SDK](https://docs.y.uno/docs/sdks/full-checkout/android-payments) 集成到您的应用中。
2. 创建 Google Wallet 测试账户：
   1. 访问 [Google Wallet Test Account Sign-In](https://accounts.google.com/InteractiveLogin/signinchooser?continue=https%3A%2F%2Fpay.google.com%2Fbusiness%2Fconsole%2F\&followup=https%3A%2F%2Fpay.google.com%2Fbusiness%2Fconsole%2F\&osid=1\&passive=1209600\&ifkv=AeDOFXjl_LLJZyuykU06uleha4p7uSXJNnLCv_n2jshX6QVJYCy9AKq3K28mIfpgyfS2NDHfimnAFg\&flowName=GlifWebSignIn\&flowEntry=ServiceLogin) 页面。
   2. 如果您没有 Google 账户，则需要创建一个才能继续。
   3. 登录后，您将被重定向到 Google Wallet 商家控制台。
3. 访问 Google Wallet API 部分：
   1. 在 Google Wallet 商家控制台中，前往与 API 管理或集成相关的部分。它位于开发者设置或集成设置中。
4. 选择 **Create a Pass** 以启用 **Demo Mode**：
   1. 在 Google Wallet API 部分中，找到标记为 **Create a Pass** 的选项。
   2. 点击此选项以启用 **Demo mode**。此模式让您可以模拟和测试卡券创建及交互，而无需进行真实交易。

![](https://mintcdn.com/yuno-3979e326/MTlogjS0_SlxtlJG/images/reference/integration-via-provider-google-pay/image2.png?fit=max\&auto=format\&n=MTlogjS0_SlxtlJG\&q=85\&s=9917a2a502f5ee70bce1ce921bc638a5)

5. 从 Play Store 下载 Google Wallet App。
6. 完整运行支付流程以测试集成。

按照这些步骤，您可以在向客户提供 Google Pay 之前，确保它已集成到您的应用中并按预期工作。

## 实现细节

Yuno 支持 Google Pay API 的两种授权方式：

* **`PAN_ONLY`**：存储在用户 Google 账户中的卡凭证。使用此方式时，所选服务提供商会按配置处理身份验证。
* **`CRYPTOGRAM_3DS`**：基于设备的卡凭证，内置身份验证。这些凭证包含加密身份验证。

这两种方式在 Yuno 运营的所有国家/地区均受支持。在 frontend 中，请在 `allowedAuthMethods` 数组中同时包含 `PAN_ONLY` 和 `CRYPTOGRAM_3DS`，以获得最高的支付成功率。

* **服务提供商特定配置**：Google Pay 授权方式的处理可能因您所选的服务提供商而异。有关 `PAN_ONLY` 和 `CRYPTOGRAM_3DS` 处理的具体要求和功能，请查阅您的服务提供商的文档。

## 相关文档

* [Google Pay 概览](https://docs.y.uno/zh-hans/docs/wallets/google-pay)
* [Google Pay SDK 集成](https://docs.y.uno/zh-hans/docs/wallets/google-pay/google-pay-sdk-integration.md)
* [Google Pay Direct 集成](https://docs.y.uno/zh-hans/docs/wallets/google-pay/google-pay-direct-integration.md)
* [Google Pay 与 PIX](https://docs.y.uno/zh-hans/docs/wallets/google-pay/google-pay-with-pix.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.