驗證授權流程
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
總覽
驗證流程的目的在於為付款整合商 (整合商) 識別及驗證使用者。
最常見的驗證方式,是做為其他方法的先決條件輸入,特別是 generateDirectDebitAuthorization
。驗證授權的輸出內容,也就是驗證證明做為上述方法的輸入 (參數)。
驗證授權模式
Google Standard Payments 支援透過 Redirect
Authentication-Authorization
進行驗證授權。
重新導向驗證-授權
當 Google 將使用者重新導向至整合商擁有的資源(例如網頁應用程式或 Android 應用程式) 以執行驗證時,就會出現重新導向驗證。完成應用程式後,必須重新導向回 Google。應用程式可以是網頁應用程式和/或 Android 應用程式。
提供行動版網站和電腦版網站驗證流程,整合商將可觸及支援平台上的所有使用者。整合商也可以視需要支援 Android 應用程式重新導向。Google 強烈建議整合商支援 Android 應用程式,因為這可以提供最佳使用者體驗,進而提高轉換率。傳遞給網頁應用程式和 Android 應用程式的參數相同。網頁應用程式重新導向會使用 HTTP GET 重新導向,其中包含網址編碼中的參數。如要進一步瞭解這個編碼,請參閱網路驗證。
每個驗證機制的結果是稱為 AuthenticationAuthorizationResponse
的已簽署回應。將此回應傳回 Google 信號,表示驗證授權成功。在獨立模式下使用時,系統會使用 gspResult
和簽名來判斷驗證授權是否成功。
為了驗證流程 (例如擷取),來自 AuthenticationAuthorizationRequest
的驗證 requestId
會做為驗證授權的證明。
下圖顯示使用者瀏覽器、Google 和整合商網頁應用程式之間的互動方式:

Android 驗證流程會使用 Android 意圖將使用者重新導向。如要進一步瞭解意圖參數,請參閱 Android 驗證。
下列序列圖表顯示了使用者手機、Google 和整合商的 Android 應用程式之間的互動方式:

保留所有權利。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[[["容易理解","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"]],["上次更新時間:2025-07-25 (世界標準時間)。"],[],["Authentication identifies users to the payment integrator, often as a prerequisite for other actions like `generateDirectDebitAuthorization`. This is achieved via `Redirect Authentication-Authorization`, where users are redirected to the integrator's web or Android app for authentication and then back to Google. The process results in an `AuthenticationAuthorizationResponse`, signaling success. The `requestId` from the request serves as proof of authentication. Integrators are recommended to support both web and Android app redirects, leveraging HTTP GET or Android Intent, respectively.\n"]]