總覽
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
有了 Google Wallet API,您的客戶就能利用 QR code 和條碼,輕鬆將大眾運輸票證新增到手機上的 Google 錢包中。
您可以透過 Google Wallet API,為使用者核發票證,以便儲存在多個平台 (包括 Android 應用程式) 和任何支援超連結的地方,例如網站、電子郵件和簡訊。
API 與 SDK
Google Wallet API 提供 REST API 和 Android SDK,能協助您輕鬆快速地核發及管理票證。
注意:透過 Google Wallet API 核發票證不需要使用 Google Wallet REST API 或 Google Wallet Android SDK,但強烈建議使用。如要進一步瞭解如何在不使用 REST API 或 Android SDK 的情況下核發票證,請參閱在 JWT 中建立票證物件和票證類別一文。
需求條件
如要透過 Google Wallet API 核發票證,請先按照下列步驟操作:
開始使用 Google Wallet API
開始使用 Google Wallet API 前,請先參閱下列實用文章,瞭解基本功能和術語。
- 重要概念和術語:本文可協助您熟悉使用 Google Wallet API 所需的所有重要詞彙和功能。
- 票證類別和物件總覽:您必須將票證類別與票證物件結合,藉此建立您核發給使用者的票證。本文將介紹這兩個概念,並說明如何運用這些概念建立票證。
- Google 錢包票證開發流程:本文提供從頭到尾使用 Google Wallet API 建立票證的所有必要步驟。
- 程式碼研究室
自助程式碼研究室會逐步引導您完成新增票證至 Google 錢包的必要步驟。首先,如果您的實作項目僅適用於 Android 裝置,請選擇「Android」;如果您的實作項目支援 Android、網頁、電子郵件或簡訊,請選擇「網路」。
Android
網頁
- 票證建構工具
使用票證製作工具以視覺化方式建立第一張票證,然後透過 Google Wallet API 自動產生建立票證時所需的 JSON。
- Google 錢包 GitHub
前往 Google 錢包 GitHub 機構取得各種程式設計語言的實用工具、程式庫和程式碼範例。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-09-05 (世界標準時間)。
[[["容易理解","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-09-05 (世界標準時間)。"],[[["The Google Wallet API enables easy addition of transit passes with QR codes and barcodes to Google Wallet on Android and where hyperlinks are supported (websites, email, SMS)."],["Developers can leverage the REST API for web, email, or SMS pass issuance and the Android SDK for native Android app integration."],["Before issuing passes, developers must create a Google Wallet API Issuer account and either a Google Cloud account (non-Android) or set up Google Play services (Android)."],["Google provides resources like codelabs, a pass builder tool, and a GitHub repository to aid in Google Wallet API integration and pass creation."]]],["The Google Wallet API enables users to add transit passes with QR codes and barcodes to Google Wallet on various platforms. You can use the REST API for platforms like web, email, or SMS, or the Android SDK for Android apps to issue and manage passes. An Issuer account and a Google Cloud account (for non-Android developers) are necessary to start. Resources such as codelabs, a pass builder tool, and the Google Wallet Github are available for development support.\n"]]